Code: Select all
<Events> <onShieldDamage> (if (geq aShieldDamageHP 18) (list Nil (divide aShieldDamageHP (max 1 (subtract 18 (max 0 (divide (subtract aShieldDamageHP 54) 2))))) 0) (list "reflect" 0 0)) </onShieldDamage> </Events>
This... has not been providing consistent results. Sometimes it works as intended - usually until the first time the shields go down on the intro screen.*
But ingame, or after the shields go down once on the intro screen, it completely fails, and begins acting as if I had a aShieldHP script *also running* at the same time as this aShieldDamageHP one.
What happens is: say I am using this shield in-game on my ship. I start getting attacked. At first, the damage goes down normally, but then it starts doing less and less damage. However, shots doing less than 18 damage are *Always* reflected, regardless of the shield HP. If a Phobos is attacking me, most of the lightning shots will be reflected regardless what shield HP I'm at. But the APA will take my shields down to ~18HP on the first hit, and subsequent hits will rebound or do only 1HP damage.
*Actually this seems to be inconsistent as well.
Also I could have sworn the scripts were working just fine yesterday, since I have st.ks littered with the ships that were using these shields during my testing session, so they werent immortal before.
The script had not been touched since I got it working either yesterday.
The wiki says:
aShieldDamageHP is the number of hit points of damage that the hit will do to shields.
aShieldHP is the current number of hit points on the shields.