Hello there,
By curiosity, I was looking to the xPawn class and noticed the shield and health management.
I've discovered strange figures, and I would like to know if I'm wrong or if there is something strange in the code.
First point, I would like to say that I consider SmallShieldStrength to be set to 0 when an object of that class (xPawn) is instanciated.
I've noticed two strange behaviors.
1) Let's say I have health: 100 and shield: 100 ( = 1 * 100)
I take a damage of 133.
According to my computations, what remains me is:
health = 67, shield = 0.25 (0 dot 25, almost 0)
Now, same starting values (H:100,S;100) , but damage is 134
I'll have health = 41, shield = 0
Notice the health drop (26 points less for 1 more damage point).
2) Now, I start with health: 100, shield 150 ( = 1 * 100 + 1 * 50)
Damage received = 116
==> health = 84, shield = 50.5
(still H:100, S:150) but damage is 117
==> health = 85, shield = 35
Notice the small health "increase" and the shield drop (15), for 1 more damage point.
Am I done some wrong computations or is this the real (and imo strange) behavior?
Did I forget something?
Greets.
PS:
1st case is:
AddShieldStrength(100)
ShieldAbsorb(133) or ShieldAbsorb(134)
2nd case is:
AddShieldStrength(100)
AddShieldStrength(50)
ShieldAbsorb(116) or ShieldAbsorb(117)
I considered that what is returned by the ShieldAbsord function is directly taken on health.
By curiosity, I was looking to the xPawn class and noticed the shield and health management.
I've discovered strange figures, and I would like to know if I'm wrong or if there is something strange in the code.
First point, I would like to say that I consider SmallShieldStrength to be set to 0 when an object of that class (xPawn) is instanciated.
I've noticed two strange behaviors.
1) Let's say I have health: 100 and shield: 100 ( = 1 * 100)
I take a damage of 133.
According to my computations, what remains me is:
health = 67, shield = 0.25 (0 dot 25, almost 0)
Now, same starting values (H:100,S;100) , but damage is 134
I'll have health = 41, shield = 0
Notice the health drop (26 points less for 1 more damage point).
2) Now, I start with health: 100, shield 150 ( = 1 * 100 + 1 * 50)
Damage received = 116
==> health = 84, shield = 50.5
(still H:100, S:150) but damage is 117
==> health = 85, shield = 35
Notice the small health "increase" and the shield drop (15), for 1 more damage point.
Am I done some wrong computations or is this the real (and imo strange) behavior?
Did I forget something?
Greets.
PS:
1st case is:
AddShieldStrength(100)
ShieldAbsorb(133) or ShieldAbsorb(134)
2nd case is:
AddShieldStrength(100)
AddShieldStrength(50)
ShieldAbsorb(116) or ShieldAbsorb(117)
I considered that what is returned by the ShieldAbsord function is directly taken on health.
Comment