Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native/Special Defense Tweaks #3722

Merged
merged 9 commits into from Mar 12, 2022
3 changes: 3 additions & 0 deletions default/scripting/specials/planet/HIGH_TECH_NATIVES.focs.txt
Expand Up @@ -10,6 +10,9 @@ Special
Species
/// @content_tag{PRIMITIVE} Prevents this special at a location with tag
Not HasTag name = "PRIMITIVE"
Not HasTag name = "NO_RESEARCH"
Not HasTag name = "VERY_BAD_RESEARCH"
Not HasTag name = "BAD_RESEARCH"
Not HasSpecial name = "MODERATE_TECH_NATIVES_SPECIAL"
]
effectsgroups = [
Expand Down
Expand Up @@ -10,6 +10,8 @@ Special
Species
/// @content_tag{PRIMITIVE} Prevents this special from being added to a location with this tag during universe generation
Not HasTag name = "PRIMITIVE"
Not HasTag name = "NO_RESEARCH"
Not HasTag name = "VERY_BAD_RESEARCH"
Not HasSpecial name = "HIGH_TECH_NATIVES_SPECIAL"
]
effectsgroups = [
Expand Down
@@ -0,0 +1,27 @@
Special
name = "NATIVE_FORTIFICATION_HIGH"
description = "NATIVE_FORTIFICATION_HIGH_DESC"
stealth = 0
spawnrate = 0
effectsgroups = [
EffectsGroup
scope = Source
activation = Unowned
effects = [
SetMaxDefense value = Value + ( 30 * [[PLANET_DEFENSE_FACTOR]] )
SetMaxShield value = Value + ( 30 * [[PLANET_SHIELD_FACTOR]] )
SetMaxTroops value = Value + 30
SetDetection value = Value + 30
]

EffectsGroup
scope = Source
activation = Or [
OwnedBy affiliation = AnyEmpire
Not Species
]
effects = RemoveSpecial name = "NATIVE_FORTIFICATION_HIGH"
]
graphic = "icons/focus/protection.png"

#include "/scripting/common/misc.macros"
@@ -0,0 +1,27 @@
Special
name = "NATIVE_FORTIFICATION_LOW"
description = "NATIVE_FORTIFICATION_LOW_DESC"
stealth = 0
spawnrate = 0
effectsgroups = [
EffectsGroup
scope = Source
activation = Unowned
effects = [
SetMaxDefense value = Value + ( 10 * [[PLANET_DEFENSE_FACTOR]] )
SetMaxShield value = Value + ( 10 * [[PLANET_SHIELD_FACTOR]] )
SetMaxTroops value = Value + 10
SetDetection value = Value + 10
]

EffectsGroup
scope = Source
activation = Or [
OwnedBy affiliation = AnyEmpire
Not Species
]
effects = RemoveSpecial name = "NATIVE_FORTIFICATION_LOW"
]
graphic = "icons/focus/protection.png"

#include "/scripting/common/misc.macros"
@@ -0,0 +1,27 @@
Special
name = "NATIVE_FORTIFICATION_MEDIUM"
description = "NATIVE_FORTIFICATION_MEDIUM_DESC"
stealth = 0
spawnrate = 0
effectsgroups = [
EffectsGroup
scope = Source
activation = Unowned
effects = [
SetMaxDefense value = Value + ( 20 * [[PLANET_DEFENSE_FACTOR]] )
SetMaxShield value = Value + ( 20 * [[PLANET_SHIELD_FACTOR]] )
SetMaxTroops value = Value + 20
SetDetection value = Value + 20
]

EffectsGroup
scope = Source
activation = Or [
OwnedBy affiliation = AnyEmpire
Not Species
]
effects = RemoveSpecial name = "NATIVE_FORTIFICATION_MEDIUM"
]
graphic = "icons/focus/protection.png"

#include "/scripting/common/misc.macros"
@@ -0,0 +1,24 @@
Special
name = "NATIVE_FORTIFICATION_MINIMAL"
description = "NATIVE_FORTIFICATION_MINIMAL_DESC"
stealth = 0
spawnrate = 0
effectsgroups = [
EffectsGroup
scope = Source
activation = Unowned
effects = [
SetMaxShield value = Value + ( 1 * [[PLANET_SHIELD_FACTOR]] )
]

EffectsGroup
scope = Source
activation = Or [
OwnedBy affiliation = AnyEmpire
Not Species
]
effects = RemoveSpecial name = "NATIVE_FORTIFICATION_MINIMAL"
]
graphic = "icons/focus/protection.png"

#include "/scripting/common/misc.macros"
Expand Up @@ -8,12 +8,20 @@ Special
Planet
Planet type = [Radiated Barren Tundra]
Not Species
Not WithinStarlaneJumps jumps = 1 condition = And [
System
Contains And [
Planet
OwnedBy affiliation = AnyEmpire
]
]
]
effectsgroups = [
[[SPECIAL_INFLUENCE_RESOURCE_EXPORT(FRACTAL_GEODES_SPECIAL)]]

[[CHANCE_OF_GUARD_1]]
[[SPECIAL_LIKES_OR_DISLIKES_SPECIAL_STABILITY_EFFECTS]]
]
graphic = "icons/specials_huge/geodes.png"

#include "../monster_guard.macros"
#include "/scripting/specials/specials.macros.txt"
10 changes: 9 additions & 1 deletion default/scripting/specials/planet/luxury/MIMETIC_ALLOY.focs.txt
Expand Up @@ -8,12 +8,20 @@ Special
Planet
Planet type = [Radiated Inferno]
Not Species
Not WithinStarlaneJumps jumps = 1 condition = And [
System
Contains And [
Planet
OwnedBy affiliation = AnyEmpire
]
]
]
effectsgroups = [
[[SPECIAL_INFLUENCE_RESOURCE_EXPORT(MIMETIC_ALLOY_SPECIAL)]]

[[CHANCE_OF_GUARD_1]]
[[SPECIAL_LIKES_OR_DISLIKES_SPECIAL_STABILITY_EFFECTS]]
]
graphic = "icons/specials_huge/mimetic_alloy.png"

#include "../monster_guard.macros"
#include "/scripting/specials/specials.macros.txt"
10 changes: 9 additions & 1 deletion default/scripting/specials/planet/luxury/SHIMMER_SILK.focs.txt
Expand Up @@ -8,12 +8,20 @@ Special
Planet
Planet type = [Inferno Toxic Swamp]
Not Species
Not WithinStarlaneJumps jumps = 1 condition = And [
System
Contains And [
Planet
OwnedBy affiliation = AnyEmpire
]
]
]
effectsgroups = [
[[SPECIAL_INFLUENCE_RESOURCE_EXPORT(SHIMMER_SILK_SPECIAL)]]

[[CHANCE_OF_GUARD_1]]
[[SPECIAL_LIKES_OR_DISLIKES_SPECIAL_STABILITY_EFFECTS]]
]
graphic = "icons/specials_huge/silk.png"

#include "../monster_guard.macros"
#include "/scripting/specials/specials.macros.txt"
10 changes: 9 additions & 1 deletion default/scripting/specials/planet/luxury/SPARK_FOSSILS.focs.txt
Expand Up @@ -8,12 +8,20 @@ Special
Planet
Planet type = [Radiated Inferno]
Not Species
Not WithinStarlaneJumps jumps = 1 condition = And [
System
Contains And [
Planet
OwnedBy affiliation = AnyEmpire
]
]
]
effectsgroups = [
[[SPECIAL_INFLUENCE_RESOURCE_EXPORT(SPARK_FOSSILS_SPECIAL)]]

[[CHANCE_OF_GUARD_1]]
[[SPECIAL_LIKES_OR_DISLIKES_SPECIAL_STABILITY_EFFECTS]]
]
graphic = "icons/specials_huge/fossils.png"

#include "../monster_guard.macros"
#include "/scripting/specials/specials.macros.txt"
Expand Up @@ -8,12 +8,20 @@ Special
Planet
Planet type = [Terran Ocean Swamp]
Not Species
Not WithinStarlaneJumps jumps = 1 condition = And [
System
Contains And [
Planet
OwnedBy affiliation = AnyEmpire
]
]
]
effectsgroups = [
[[SPECIAL_INFLUENCE_RESOURCE_EXPORT(SUCCULENT_BARNACLES_SPECIAL)]]

[[CHANCE_OF_GUARD_1]]
[[SPECIAL_LIKES_OR_DISLIKES_SPECIAL_STABILITY_EFFECTS]]
]
graphic = "icons/specials_huge/barnacles.png"

#include "../monster_guard.macros"
#include "/scripting/specials/specials.macros.txt"
59 changes: 50 additions & 9 deletions default/scripting/specials/planet/monster_guard.macros
Expand Up @@ -14,10 +14,22 @@ CHANCE_OF_GUARD_1
]
effects = [
If condition = Or [ Random probability = 0.6 Homeworld ]
effects = CreateShip designname = OneOf("SM_GUARD_0", "SM_GUARD_1")
effects = [
If condition = ContainedBy Contains Planet type = Asteroids
effects = CreateShip designname = OneOf("SM_SNAIL", "SM_GUARD_0", "SM_GUARD_1")
else = [
CreateShip designname = OneOf("SM_GUARD_0", "SM_GUARD_1")
]
]
else = [
SetSpecies name = "SP_ANCIENT_GUARDIANS"
SetPopulation value = Target.TargetPopulation
If condition = Random probability = 0.8
effects = [
SetSpecies name = "SP_ANCIENT_GUARDIANS"
SetPopulation value = Target.TargetPopulation
]
else = [
AddSpecial name = "CLOUD_COVER_MASTER_SPECIAL"
]
]
]
'''
Expand All @@ -41,9 +53,15 @@ CHANCE_OF_GUARD_2
]
effects = CreateShip designname = "SM_GUARD_2"
else = [
SetSpecies name = "SP_ANCIENT_GUARDIANS"
SetPopulation value = Target.TargetPopulation
AddSpecial name = "MODERATE_TECH_NATIVES_SPECIAL"
If condition = Random probability = 0.8
effects = [
SetSpecies name = "SP_ANCIENT_GUARDIANS"
SetPopulation value = Target.TargetPopulation
AddSpecial name = "MODERATE_TECH_NATIVES_SPECIAL"
]
else = [
AddSpecial name = "VOLCANIC_ASH_MASTER_SPECIAL"
]
]
]
'''
Expand All @@ -67,9 +85,32 @@ CHANCE_OF_GUARD_3
]
effects = CreateShip designname = "SM_GUARD_3"
else = [
SetSpecies name = "SP_ANCIENT_GUARDIANS"
SetPopulation value = Target.TargetPopulation
AddSpecial name = "HIGH_TECH_NATIVES_SPECIAL"
If condition = Random probability = 0.8
effects = [
SetSpecies name = "SP_ANCIENT_GUARDIANS"
SetPopulation value = Target.TargetPopulation
AddSpecial name = "HIGH_TECH_NATIVES_SPECIAL"
]
else = [
AddSpecial name = "DIM_RIFT_MASTER_SPECIAL"
]
]
]
'''

CHANCE_OF_HIDE_1
''' EffectsGroup
scope = Source
activation = And [
Turn high = 0
Random probability = 0.15
(GalaxyMaxAIAggression >= 1)
Not ContainedBy Contains Or [
Design name = "SM_EXP_OUTPOST"
Building name = "BLD_EXPERIMENTOR_OUTPOST"
]
]
effects = [
AddSpecial name = "CLOUD_COVER_MASTER_SPECIAL"
]
'''
Expand Up @@ -16,9 +16,11 @@ Special
]
effectsgroups = [
[[MONSTER_NEST(JUGGERNAUT,juggernaut,0.06)]]
[[CHANCE_OF_HIDE_1]]
[[SPECIAL_LIKES_OR_DISLIKES_SPECIAL_STABILITY_EFFECTS]]
]
graphic = "icons/specials_huge/juggernaut-nest.png"

#include "monster_nest.macros"
#include "../monster_guard.macros"
#include "/scripting/specials/specials.macros.txt"
Expand Up @@ -16,9 +16,11 @@ Special
]
effectsgroups = [
[[MONSTER_NEST(KRAKEN,kraken,0.05)]]
[[CHANCE_OF_HIDE_1]]
[[SPECIAL_LIKES_OR_DISLIKES_SPECIAL_STABILITY_EFFECTS]]
]
graphic = "icons/specials_huge/kraken-nest.png"

#include "monster_nest.macros"
#include "../monster_guard.macros"
#include "/scripting/specials/specials.macros.txt"
Expand Up @@ -15,9 +15,11 @@ Special
]
effectsgroups = [
[[MONSTER_NEST(SNOWFLAKE,snowflake,0.08)]]
[[SPECIAL_LIKES_OR_DISLIKES_SPECIAL_STABILITY_EFFECTS]]
[[CHANCE_OF_HIDE_1]]
[[SPECIAL_LIKES_OR_DISLIKES_SPECIAL_STABILITY_EFFECTS]]
]
graphic = "icons/specials_huge/snowflake-nest.png"

#include "monster_nest.macros"
#include "../monster_guard.macros"
#include "/scripting/specials/specials.macros.txt"
14 changes: 12 additions & 2 deletions default/scripting/species/SP_BEIGEGOO.focs.txt
Expand Up @@ -59,9 +59,19 @@ Species
[[GREAT_DEFENSE_TROOPS]]

// not for description
[[AVERAGE_PLANETARY_SHIELDS]]
[[AVERAGE_PLANETARY_DEFENSE]]
[[DEFAULT_NATIVE_DEFENSE]]
[[STANDARD_SHIP_SHIELDS]]

EffectsGroup
scope = Source
activation = And [
Planet
Turn high = 0
(GalaxyMaxAIAggression >= 1)
(GalaxyMonsterFrequency >= 1)
]
effects = CreateShip designname = "SM_TREE"

]

[[RADIATED_STANDARD_EP]]
Expand Down
3 changes: 1 addition & 2 deletions default/scripting/species/SP_CELESTEPHYTE.focs.txt
Expand Up @@ -45,8 +45,7 @@ Species
[[FAST_COLONIZATION]]

// not for description
[[AVERAGE_PLANETARY_SHIELDS]]
[[AVERAGE_PLANETARY_DEFENSE]]
[[DEFAULT_NATIVE_DEFENSE]]
[[STANDARD_SHIP_SHIELDS]]
[[NARROW_EP]]

Expand Down