mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 05:34:58 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user