Phobos
Phobos copied to clipboard
New AutoDeath condition & convert when AutoDeath
1 - added the following AutoDeath conditions:
OwnedByPlayer/OwnedByAI: The object will die if its owner house is / isn't a human player.MoneyExceed/MoneyBelow: The object will die if its owner house has credits greater / smaller than (or equal to) set value.LowPower/FullPower: The object will die if its owner house is in low / full power.PassengersExceed/PassengersBelow: The object will die if its current passenger amount is greater / smaller than (or equal to) set value.
2 - instead of firing AutoDeath when any condition is met, you can now set OnAnyCondition to false to make it trigger only when all conditions are met
3 - AutoDeath now support convert behavior. If the object is a unit, it will be changed into the TechnoType in Convert.AutoDeath instead of destroyed.
In rulesmd.ini:
[SOMETECHNO] ; TechnoType
AutoDeath.Behavior= ; enumeration (kill | vanish | sell | convert), default not set
AutoDeath.OwnedByPlayer=false ; boolean
AutoDeath.OwnedByAI=false ; boolean
AutoDeath.MoneyExceed=-1 ; integer
AutoDeath.MoneyBelow=-1 ; integer
AutoDeath.LowPower=false ; boolean
AutoDeath.FullPower=false ; boolean
AutoDeath.PassengersExceed=-1 ; integer
AutoDeath.PassengersBelow=-1 ; integer
AutoDeath.OnAnyCondition=true ; boolean
Convert.AutoDeath= ; TechnoType
Would be nice if there was also:
AutoDeath.IsAI=
That would work when owner of techno isn't human player.
Thanks for the suugestion. I've added AutoDeath.OwnedByPlayer and AutoDeath.OwnedByAI
One way is to regroup it into the AttachEffect system, so that you can apply an AE under a given condition. That might be a huge change to the code structure.
Why not just fire a weapon on itself instead?