Fixed slightly inaccurate chances for each number of hits for moves that hit 2-5 times

This commit is contained in:
Maruno17
2021-06-24 20:57:32 +01:00
parent eceb7f2084
commit 80e95dc48a
2 changed files with 7 additions and 2 deletions

View File

@@ -1957,7 +1957,12 @@ class PokeBattle_Move_0C0 < PokeBattle_Move
if @id == :WATERSHURIKEN && user.isSpecies?(:GRENINJA) && user.form == 2
return 3
end
hitChances = [2,2,3,3,4,5]
hitChances = [
2, 2, 2, 2, 2, 2, 2,
3, 3, 3, 3, 3, 3, 3,
4, 4, 4,
5, 5, 5
]
r = @battle.pbRandom(hitChances.length)
r = hitChances.length-1 if user.hasActiveAbility?(:SKILLLINK)
return hitChances[r]

View File

@@ -216,7 +216,7 @@ class PokeBattle_AI
if user.hasActiveAbility?(:SKILLLINK)
baseDmg *= 5
else
baseDmg = (baseDmg*19/6).floor # Average damage dealt
baseDmg = (baseDmg * 31 / 10).floor # Average damage dealt
end
when "0C1" # Beat Up
mult = 0