Tidying up of Gen 8 ability code, fixed Analytic's effect, added trigger for berry consuming when Unnerve ends

This commit is contained in:
Maruno17
2021-10-17 19:49:25 +01:00
parent c68e5e7abf
commit 72c50db6c0
6 changed files with 373 additions and 370 deletions

View File

@@ -100,7 +100,7 @@ class PokeBattle_Move
# Checks whether the move will be ineffective against the target.
def pbFailsAgainstTarget?(user, target, show_message); return false; end
def pbMoveFailedLastInRound?(user)
def pbMoveFailedLastInRound?(user, showMessage = true)
unmoved = false
@battle.eachBattler do |b|
next if b.index==user.index
@@ -110,7 +110,7 @@ class PokeBattle_Move
break
end
if !unmoved
@battle.pbDisplay(_INTL("But it failed!"))
@battle.pbDisplay(_INTL("But it failed!")) if showMessage
return true
end
return false