Thread Rating:
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
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
Messages In This Thread
Recoil calculation is incorrect - by Krigeris - 2016-05-02, 07:28 PM
RE: Recoil calculation is incorrect - by SomebodyUnown - 2016-05-13, 12:11 AM
RE: Recoil calculation is incorrect - by CeFurkan - 2016-05-18, 06:52 PM
Users browsing this thread: 1 Guest(s)
Users browsed this thread: bnsdfgw33 , dgdfhdf , here444 ,