- Joined
- Sep 14, 2009
- Messages
- 284
Hi. I have remade the hero attributes to 3 stats: Spell Power, Resistance and Crit Chance (instead of str, agi and int).
The one I have a problem with is Resistance. This stat is supposed to reduce magic damage the same way as armor reduces physical dmg.
The problem is that when enemies have < 0 resistance, they do not take bonus dmg, but instead take reduced dmg. ?.?
Lets say an enemy with -2 Resistance. A spell is cast that deals 60 magic damage. The enemy is supposed to take 61,2 damage. But for some reason instead recieves 58,8 damage.
Here is the trigger for reducing magic dmg:
Take in mind that it uses the same formula as armor, and the constant factor is 0.01. Agility is Resistance. (I use Bribe dmg detection system).
The one I have a problem with is Resistance. This stat is supposed to reduce magic damage the same way as armor reduces physical dmg.
The problem is that when enemies have < 0 resistance, they do not take bonus dmg, but instead take reduced dmg. ?.?
Lets say an enemy with -2 Resistance. A spell is cast that deals 60 magic damage. The enemy is supposed to take 61,2 damage. But for some reason instead recieves 58,8 damage.
Here is the trigger for reducing magic dmg:
Take in mind that it uses the same formula as armor, and the constant factor is 0.01. Agility is Resistance. (I use Bribe dmg detection system).
-
GetResistance
-
Events
- Game - DamageModifierEvent becomes Equal to 1.00
-
Conditions
- AbilityMagical Equal to (==) True
-
Actions
- Set GetResistanceReductionAmount = (((Real((Agility of DamageEventTarget (Include bonuses)))) x 0.01) / (1.00 + ((Real((Agility of DamageEventTarget (Include bonuses)))) x 0.01)))
- Set DamageEventAmount = (DamageEventAmount x (1.00 - GetResistanceReductionAmount))
-
Events