Difference between revisions of "Fall Damage"
From Worms Knowledge Base
m (short text) |
m |
||
Line 25: | Line 25: | ||
{{ReplayBox|Fall Damage Activation.WAgame|Video-info about|Fall Damage activation with 508% of damage.}} | {{ReplayBox|Fall Damage Activation.WAgame|Video-info about|Fall Damage activation with 508% of damage.}} | ||
− | An intentional feature added by Team17 does not let the Fall Damage be activated when a worm touches the map after a blast. Without this feature, a lot more inconsistency from damage taken from explosions would happen (because FD works basing in the velocity, not in distance). Note that this "failure" only happens with explosions (and not with punches or arrows). | + | An intentional feature added by Team17 does not let the Fall Damage be activated when a worm touches the map after a blast. Without this feature, a lot more inconsistency from damage taken from explosions would happen (because FD works basing in the velocity, not in distance). Note that this "failure" only happens with explosions (and not with punches or arrows). [http://forum.team17.com/showthread.php?p=723112#post723112] |
Revision as of 19:32, 9 July 2010
There really is no maximum fall damage — there's a maximum vertical speed, and it's normally at this impact speed that the highest fall damage is reached. With TestStuff5, there's no maximum speed. The maximum fall damage with TestStuff5 should be 32767/18 = 1820 (at extremely high speeds the damage will be pseudo-randomized due to integer truncation, but it'll always be <= 1820). [1]
Fall Damage Formulas
Here is the exact formula, in BASIC parlance:
FDCOEF = (FDBYTE * 50) mod 256
DAMAGE = INT(((VSPEED - 8 + 1/65536) * FDCOEF + 18) / 18)
VSPEED is the vertical speed at impact in pixels per frame. The normal maximum for this 32. So using the standard values for everything: DAMAGE = INT(((32 - 8 + 1/65536) * 50 + 18) / 18) = 67
Note: With a value of FDCOEF=0, this formula gives a DAMAGE=1. However, W:A treats this as an exception — FDCOEF=0 disables fall damage completely.
Here is the reverse formula, covering values of FDPERCENT ranging from 0 to 508 in increments of 4: FDBYTE = ((FDPERCENT / 4) * 41) mod 128
Before Deadcode's fixes, W:A used to use this formula instead:
DAMAGE = INT((VSPEED - 7) * FDCOEF) / 18
This yields a standard max fall damage of 69 instead of 67.
Activation "failure"
W:A replay: Video-info about Fall Damage activation with 508% of damage. | |
Download · Info |
An intentional feature added by Team17 does not let the Fall Damage be activated when a worm touches the map after a blast. Without this feature, a lot more inconsistency from damage taken from explosions would happen (because FD works basing in the velocity, not in distance). Note that this "failure" only happens with explosions (and not with punches or arrows). [2]