Sorry to have to ask for help yet again, I tried for the last week to figure this one out, but no luck.
The countdown using SpecialCapacity does work as it is supposed to. However, when the countdown reaches 0, the planet is not completely destroyed, only the population and resource output vanish, buildings and specials and the planet type remain (it is just reduced to outpost status maybe?). No destruction sitreps are generated. But on the next turn, if the Destroy Button is pushed again, the planet is destroyed. I've attached an image of the current situation below. Relevant focs parts are:
Code: Select all
// if countdown ends, destroy planet
EffectsGroup
scope = And [
[[PDC_SCOPE]]
HasSpecialCapacity name = "DESTRUCTION_COUNTDOWN_SPECIAL" high = 0.5
]
[[PLANET_DESTRUCTION_EFFECT]]
(Don't see what could go wrong here.)
as well as
Code: Select all
PLANET_DESTRUCTION_EFFECT
''' effects = [
GenerateSitRepMessage // sitrep for destroying empire
message = "EFFECT_PLANET_DESTRUCTION"
label = "EFFECT_PLANET_DESTRUCTION_LABEL"
icon = "icons/sitrep/planet_destroyed.png"
parameters = [
tag = "planet" data = Target.ID
tag = "empire" data = Target.Owner
]
empire = Source.Owner
GenerateSitRepMessage // sitrep for targeted empire
message = "EFFECT_PLANET_DESTRUCTION_OWN"
label = "EFFECT_PLANET_DESTRUCTION_LABEL"
icon = "icons/sitrep/planet_destroyed.png"
parameters = [
tag = "planet" data = Target.ID
tag = "empire" data = Source.Owner
]
empire = Target.Owner
RemoveAllSpecials
RemoveAllBuildings
SetOwner empire = -1
SetSpecies name = ""
SetPopulation value = 0
SetPlanetType type = Asteroids
]
'''
Any idea what might cause this behaviour?
[Edit]I should add that the planet destruction focs code works if the countdown isn't involved; "direct" destruction with the lvl 2 pdc works!
If I provided any images, code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0.