Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Recoil calculation is incorrect
#1
This would prob be more appropriate in the move section but I see this main section is more active.

Situation:

Recoil move does 1/2 the damage back
Attacking pokemon attacks for 100 damage
Defending pokemon has 50 HP

Recoil should be 25 because the defending mon only has 50 HP to lose, but instead recoil is 50 damage, the full force of the attack. Not how it works on pokemon games.


Your code probably looks something like

Recoil = Damage / 2


Your code should look like this

If(AttackersDamage > DefendingMonsHitpoints)
    Recoil = DefendingMonsHitpoints /2
else
    Recoil = AttackersDamage / 2


This way a level 90 doesn't kill itself when it uses a recoil move on a level 2
#2
It does work this way.
#3
recoil damage was limited to enemy's maximum hp

but i just did an update and now it is limited to enemy's current HP

Forum Jump:

Users browsing this thread: 2 Guest(s)

Users browsed this thread: bnsdfgw33 , dgdfhdf , here444 , Rule Follower , tt5ruty7i