Added "airborne" event name tag, can have Safari battles with no party, fixed Micle Berry, fixed data box not refreshing when Illusion is broken, added triggers for more EoR animations

This commit is contained in:
Maruno17
2024-04-27 00:10:28 +01:00
parent 494e646fd5
commit 04985eab5c
7 changed files with 12 additions and 5 deletions

View File

@@ -171,6 +171,7 @@ class Battle
priority.each do |battler|
next if !battler.effects[PBEffects::AquaRing]
next if !battler.canHeal?
pbCommonAnimation("AquaRing", battler)
hpGain = battler.totalhp / 16
hpGain = (hpGain * 1.3).floor if battler.hasActiveItem?(:BIGROOT)
battler.pbRecoverHP(hpGain)
@@ -180,6 +181,7 @@ class Battle
priority.each do |battler|
next if !battler.effects[PBEffects::Ingrain]
next if !battler.canHeal?
pbCommonAnimation("Ingrain", battler)
hpGain = battler.totalhp / 16
hpGain = (hpGain * 1.3).floor if battler.hasActiveItem?(:BIGROOT)
battler.pbRecoverHP(hpGain)
@@ -259,6 +261,7 @@ class Battle
priority.each do |battler|
battler.effects[PBEffects::Nightmare] = false if !battler.asleep?
next if !battler.effects[PBEffects::Nightmare] || !battler.takesIndirectDamage?
pbCommonAnimation("Nightmare", battler)
battler.pbTakeEffectDamage(battler.totalhp / 4) do |hp_lost|
pbDisplay(_INTL("{1} is locked in a nightmare!", battler.pbThis))
end
@@ -266,6 +269,7 @@ class Battle
# Curse
priority.each do |battler|
next if !battler.effects[PBEffects::Curse] || !battler.takesIndirectDamage?
pbCommonAnimation("Curse", battler)
battler.pbTakeEffectDamage(battler.totalhp / 4) do |hp_lost|
pbDisplay(_INTL("{1} is afflicted by the curse!", battler.pbThis))
end

View File

@@ -393,6 +393,7 @@ class Battle::Scene
shadowSprite.setPokemonBitmap(pkmn)
# Set visibility of battler's shadow
shadowSprite.visible = pkmn.species_data.shows_shadow? if shadowSprite && !back
@sprites["dataBox_#{idxBattler}"].refresh
end
def pbResetCommandsIndex(idxBattler)

View File

@@ -499,7 +499,7 @@ class Battle::AI::AIBattler
when :ASPEARBERRY, :CHERIBERRY, :CHESTOBERRY, :PECHABERRY, :RAWSTBERRY
# Status cure
cured_status = {
:ASPEAR => :FROZEN,
:ASPEARBERRY => :FROZEN,
:CHERIBERRY => :PARALYSIS,
:CHESTOBERRY => :SLEEP,
:PECHABERRY => :POISON,

View File

@@ -346,7 +346,7 @@ Battle::ItemEffects::HPHeal.add(:MAGOBERRY,
Battle::ItemEffects::HPHeal.add(:MICLEBERRY,
proc { |item, battler, battle, forced|
next false if !forced && !battler.canConsumePinchBerry?
next false if !battler.effects[PBEffects::MicleBerry]
next false if battler.effects[PBEffects::MicleBerry]
battle.pbCommonAnimation("EatBerry", battler) if !forced
battler.effects[PBEffects::MicleBerry] = true
itemName = GameData::Item.get(item).name