Crimsondeath
Active member
Hi everyone, I have an issue with the DOT (Damage Over Time) command. I’m using a script that converts damage into MP.
The script “absorbs” half of the damage received and restores MP to the damage taker (this part works fine).
However, when the opponent’s attack includes the DOT command:
It seems that the script also absorbs DOT damage and restores MP as if the damage taker were receiving normal hits, causing the MP recovery to become disproportionate (almost fill his MP bar xd).
I’m not sure if there’s a way to properly handle DOT damage or if it would be easier to just disable it for this kind of attacks entirely.
Any ideas? Thanks
C++:
...
void damageabsorb() {
void self = getlocalvar("self");
float damage = getlocalvar("damage");
float mp = getentityproperty(self, "mp");
float mpgain = damage/2;
changeentityproperty(self, "mp", mp+mpgain);
}
...
The script “absorbs” half of the damage received and restores MP to the damage taker (this part works fine).
However, when the opponent’s attack includes the DOT command:
Code:
...
loop 0
offset 35 122
range 50 80
bbox 20 20 35 95
delay 7
frame data/chars/robodroid/special2d.gif
frame data/chars/robodroid/special2c.gif
delay 14
frame data/chars/robodroid/special3a.gif
delay 7
jugglecost 15
dot 1 100 4 1 10 <--- Here
sound data/sounds/burnpain.wav
hitflash Flash_Fire
hitfx data/sounds/no-hit.wav
burn 55 30 60 35 21 16 1 0 15 0
...
It seems that the script also absorbs DOT damage and restores MP as if the damage taker were receiving normal hits, causing the MP recovery to become disproportionate (almost fill his MP bar xd).
I’m not sure if there’s a way to properly handle DOT damage or if it would be easier to just disable it for this kind of attacks entirely.
Any ideas? Thanks