Fixed Cotton Down also lowering the bearer's speed, tweaked rendering of buttons in the Animation Editor

This commit is contained in:
Maruno17
2023-03-05 22:58:57 +00:00
parent e43fdeec25
commit ee72ad371f
2 changed files with 50 additions and 26 deletions

View File

@@ -1708,10 +1708,10 @@ Battle::AbilityEffects::OnBeingHit.add(:ANGERPOINT,
Battle::AbilityEffects::OnBeingHit.add(:COTTONDOWN,
proc { |ability, user, target, move, battle|
next if battle.allBattlers.none? { |b| b.pbCanLowerStatStage?(:DEFENSE, target) }
next if battle.allBattlers.none? { |b| b.index != target.index && b.pbCanLowerStatStage?(:SPEED, target) }
battle.pbShowAbilitySplash(target)
battle.allBattlers.each do |b|
b.pbLowerStatStageByAbility(:SPEED, 1, target, false)
b.pbLowerStatStageByAbility(:SPEED, 1, target, false) if b.index != target.index
end
battle.pbHideAbilitySplash(target)
}