Merge branch 'dev' into ai

This commit is contained in:
Maruno17
2023-01-18 19:12:34 +00:00
2 changed files with 6 additions and 15 deletions

View File

@@ -33,15 +33,6 @@ module Battle::CatchAndStoreMixin
next if party_index < 0 # Cancelled
party_size = pbPlayer.party.length
# Send chosen Pokémon to storage
# NOTE: This doesn't work properly if you catch multiple Pokémon in
# the same battle, because the code below doesn't alter the
# contents of pbParty(0), only pbPlayer.party. This means that
# viewing the party in battle after replacing a party Pokémon
# with a caught one (which is possible if you've caught a second
# Pokémon) will not show the first caught Pokémon in the party
# but will still show the boxed Pokémon in the party. Correcting
# this would take a surprising amount of code, and it's very
# unlikely to be needed anyway, so I'm ignoring it for now.
send_pkmn = pbPlayer.party[party_index]
stored_box = @peer.pbStorePokemon(pbPlayer, send_pkmn)
pbPlayer.party.delete_at(party_index)

View File

@@ -1318,13 +1318,13 @@ Battle::ItemEffects::OnBeingHit.add(:JABOCABERRY,
next if !user.takesIndirectDamage?
amt = user.totalhp / 8
ripening = false
if battler.hasActiveAbility?(:RIPEN)
battle.pbShowAbilitySplash(battler)
if target.hasActiveAbility?(:RIPEN)
battle.pbShowAbilitySplash(target)
amt *= 2
ripening = true
end
battle.pbCommonAnimation("EatBerry", target)
battle.pbHideAbilitySplash(battler) if ripening
battle.pbHideAbilitySplash(target) if ripening
battle.scene.pbDamageAnimation(user)
user.pbReduceHP(amt, false)
battle.pbDisplay(_INTL("{1} consumed its {2} and hurt {3}!", target.pbThis,
@@ -1388,13 +1388,13 @@ Battle::ItemEffects::OnBeingHit.add(:ROWAPBERRY,
next if !user.takesIndirectDamage?
amt = user.totalhp / 8
ripening = false
if battler.hasActiveAbility?(:RIPEN)
battle.pbShowAbilitySplash(battler)
if target.hasActiveAbility?(:RIPEN)
battle.pbShowAbilitySplash(target)
amt *= 2
ripening = true
end
battle.pbCommonAnimation("EatBerry", target)
battle.pbHideAbilitySplash(battler) if ripening
battle.pbHideAbilitySplash(target) if ripening
battle.scene.pbDamageAnimation(user)
user.pbReduceHP(amt, false)
battle.pbDisplay(_INTL("{1} consumed its {2} and hurt {3}!", target.pbThis,