mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Merge branch 'dev' into ai
This commit is contained in:
@@ -144,6 +144,7 @@ class Battle::Move
|
||||
def tramplesMinimize?; return @flags.any? { |f| f[/^TramplesMinimize$/i] }; end
|
||||
|
||||
def nonLethal?(_user, _target); return false; end # For False Swipe
|
||||
def preventsBattlerConsumingHealingBerry?(battler, targets); return false; end # For Bug Bite/Pluck
|
||||
|
||||
def ignoresSubstitute?(user) # user is the Pokémon using this move
|
||||
if Settings::MECHANICS_GENERATION >= 6
|
||||
|
||||
@@ -378,6 +378,11 @@ end
|
||||
# User consumes target's berry and gains its effect. (Bug Bite, Pluck)
|
||||
#===============================================================================
|
||||
class Battle::Move::UserConsumeTargetBerry < Battle::Move
|
||||
def preventsBattlerConsumingHealingBerry?(battler, targets)
|
||||
return targets.any? { |b| b.index == battler.index } &&
|
||||
battler.item&.is_berry? && Battle::ItemEffects::HPHeal[battler.item]
|
||||
end
|
||||
|
||||
def pbEffectAfterAllHits(user, target)
|
||||
return if user.fainted? || target.fainted?
|
||||
return if target.damageState.unaffected || target.damageState.substitute
|
||||
|
||||
Reference in New Issue
Block a user