| 1 |
from focs._effects import ( |
| 2 |
EffectsGroup, |
| 3 |
Focus, |
| 4 |
GalaxyMaxAIAggression, |
| 5 |
Happiness, |
| 6 |
IsHuman, |
| 7 |
IsSource, |
| 8 |
Planet, |
| 9 |
SetTargetResearch, |
| 10 |
Target, |
| 11 |
Value, |
| 12 |
) |
| 13 |
from macros.base_prod import RESEARCH_PER_POP |
| 14 |
from macros.misc import DESCRIPTION_EFFECTSGROUP_MACRO |
| 15 |
from macros.multiplier import ( |
| 16 |
BAD_MULTIPLIER, |
| 17 |
GOOD_MULTIPLIER, |
| 18 |
GREAT_MULTIPLIER, |
| 19 |
ULTIMATE_MULTIPLIER, |
| 20 |
VERY_BAD_MULTIPLIER, |
| 21 |
) |
| 22 |
from macros.priorities import ( |
| 23 |
TARGET_AFTER_SCALING_PRIORITY, |
| 24 |
TARGET_EARLY_BEFORE_SCALING_PRIORITY, |
| 25 |
TARGET_SCALING_PRIORITY, |
| 26 |
) |
| 27 |
|
| 28 |
_BASIC_RESEARCH = [ |
| 29 |
EffectsGroup( |
| 30 |
scope=IsSource, |
| 31 |
activation=Planet() & Focus(type=["FOCUS_RESEARCH"]) & Happiness(low=0), |
| 32 |
accountinglabel="FOCUS_RESEARCH_LABEL", |
| 33 |
priority=TARGET_EARLY_BEFORE_SCALING_PRIORITY, |
| 34 |
effects=SetTargetResearch(value=Value + Target.Population * RESEARCH_PER_POP), |
| 35 |
), |
| 36 |
EffectsGroup( # gives human bonuses when AI Aggression set to Beginner |
| 37 |
scope=IsSource, |
| 38 |
activation=Planet() & IsHuman & (GalaxyMaxAIAggression == 0), # human player, not human species |
| 39 |
accountinglabel="DIFFICULTY", |
| 40 |
priority=TARGET_AFTER_SCALING_PRIORITY, |
| 41 |
effects=SetTargetResearch(value=Value * 2), |
| 42 |
), |
| 43 |
] |
| 44 |
|
| 45 |
NO_RESEARCH = DESCRIPTION_EFFECTSGROUP_MACRO("NO_RESEARCH_DESC") |
| 46 |
|
| 47 |
|
| 48 |
VERY_BAD_RESEARCH = [ |
| 49 |
*_BASIC_RESEARCH, |
| 50 |
EffectsGroup( |
| 51 |
description="VERY_BAD_RESEARCH_DESC", |
| 52 |
scope=IsSource, |
| 53 |
activation=Planet() & Focus(type=["FOCUS_RESEARCH"]), |
| 54 |
accountinglabel="VERY_BAD_RESEARCH_LABEL", |
| 55 |
priority=TARGET_SCALING_PRIORITY, |
| 56 |
effects=SetTargetResearch(value=Value * VERY_BAD_MULTIPLIER), |
| 57 |
), |
| 58 |
] |
| 59 |
|
| 60 |
|
| 61 |
BAD_RESEARCH = [ |
| 62 |
*_BASIC_RESEARCH, |
| 63 |
EffectsGroup( |
| 64 |
description="BAD_RESEARCH_DESC", |
| 65 |
scope=IsSource, |
| 66 |
activation=Planet() & Focus(type=["FOCUS_RESEARCH"]), |
| 67 |
accountinglabel="BAD_RESEARCH_LABEL", |
| 68 |
priority=TARGET_SCALING_PRIORITY, |
| 69 |
effects=SetTargetResearch(value=Value * BAD_MULTIPLIER), |
| 70 |
), |
| 71 |
] |
| 72 |
|
| 73 |
AVERAGE_RESEARCH = _BASIC_RESEARCH |
| 74 |
|
| 75 |
GOOD_RESEARCH = [ |
| 76 |
*_BASIC_RESEARCH, |
| 77 |
EffectsGroup( |
| 78 |
description="GOOD_RESEARCH_DESC", |
| 79 |
scope=IsSource, |
| 80 |
activation=Planet() & Focus(type=["FOCUS_RESEARCH"]) & Happiness(low=2), |
| 81 |
accountinglabel="GOOD_RESEARCH_LABEL", |
| 82 |
priority=TARGET_SCALING_PRIORITY, |
| 83 |
effects=SetTargetResearch(value=Value * GOOD_MULTIPLIER), |
| 84 |
), |
| 85 |
] |
| 86 |
|
| 87 |
|
| 88 |
GREAT_RESEARCH = [ |
| 89 |
*_BASIC_RESEARCH, |
| 90 |
EffectsGroup( |
| 91 |
description="GREAT_RESEARCH_DESC", |
| 92 |
scope=IsSource, |
| 93 |
activation=Planet() & Focus(type=["FOCUS_RESEARCH"]) & Happiness(low=0), |
| 94 |
accountinglabel="GREAT_RESEARCH_LABEL", |
| 95 |
priority=TARGET_SCALING_PRIORITY, |
| 96 |
effects=SetTargetResearch(value=Value * GREAT_MULTIPLIER), |
| 97 |
), |
| 98 |
] |
| 99 |
|
| 100 |
|
| 101 |
ULTIMATE_RESEARCH = [ |
| 102 |
*_BASIC_RESEARCH, |
| 103 |
EffectsGroup( |
| 104 |
description="ULTIMATE_RESEARCH_DESC", |
| 105 |
scope=IsSource, |
| 106 |
activation=Planet() & Focus(type=["FOCUS_RESEARCH"]), |
| 107 |
accountinglabel="ULTIMATE_RESEARCH_LABEL", |
| 108 |
priority=TARGET_SCALING_PRIORITY, |
| 109 |
effects=SetTargetResearch(value=Value * ULTIMATE_MULTIPLIER), |
| 110 |
), |
| 111 |
] |