mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 14:44:58 +00:00
Added some more Gen 8 item effects, added Intimidate being blocked by some abilities, fixed Nectars being usable on fainted Oricorio
This commit is contained in:
@@ -80,7 +80,7 @@ class PokeBattle_Battle
|
||||
attr_accessor :lastMoveUsed # Last move used
|
||||
attr_accessor :lastMoveUser # Last move user
|
||||
attr_accessor :first_poke_ball # ID of the first thrown Poké Ball that failed
|
||||
attr_Accessor :poke_ball_failed # Set after first_poke_ball to prevent it being set again
|
||||
attr_accessor :poke_ball_failed # Set after first_poke_ball to prevent it being set again
|
||||
attr_reader :switching # True if during the switching phase of the round
|
||||
attr_reader :futureSight # True if Future Sight is hitting
|
||||
attr_reader :endOfRound # True during the end of round
|
||||
|
||||
@@ -121,7 +121,7 @@ class PokeBattle_Battle
|
||||
pbParty(1).each_with_index do |pkmn,idxPkmn|
|
||||
pbCreateBattler(2*idxPkmn+side,pkmn,idxPkmn)
|
||||
# Changes the Pokémon's form upon entering battle (if it should)
|
||||
@peer.pbOnEnteringBattle(self,pkmn,true)
|
||||
@peer.pbOnEnteringBattle(self, @battlers[2 * idxPkmn + side], pkmn, true)
|
||||
pbSetSeen(@battlers[2*idxPkmn+side])
|
||||
@usedInBattle[side][idxPkmn] = true
|
||||
end
|
||||
|
||||
@@ -291,7 +291,7 @@ class PokeBattle_Battle
|
||||
# Called from def pbReplace above and at the start of battle.
|
||||
# sendOuts is an array; each element is itself an array: [idxBattler,pkmn]
|
||||
def pbSendOut(sendOuts,startBattle=false)
|
||||
sendOuts.each { |b| @peer.pbOnEnteringBattle(self,b[1]) }
|
||||
sendOuts.each { |b| @peer.pbOnEnteringBattle(self, @battlers[b[0]], b[1]) }
|
||||
@scene.pbSendOutBattlers(sendOuts,startBattle)
|
||||
sendOuts.each do |b|
|
||||
@scene.pbResetMoveIndex(b[0])
|
||||
|
||||
@@ -67,16 +67,14 @@ class PokeBattle_Battle
|
||||
when :ShadowSky then pbDisplay(_INTL("The shadow sky continues."))
|
||||
end
|
||||
# Effects due to weather
|
||||
curWeather = pbWeather
|
||||
priority.each do |b|
|
||||
# Weather-related abilities
|
||||
if b.abilityActive?
|
||||
BattleHandlers.triggerEORWeatherAbility(b.ability,curWeather,b,self)
|
||||
BattleHandlers.triggerEORWeatherAbility(b.ability, b.effectiveWeather, b, self)
|
||||
b.pbFaint if b.fainted?
|
||||
end
|
||||
# Weather damage
|
||||
# NOTE:
|
||||
case curWeather
|
||||
case b.effectiveWeather
|
||||
when :Sandstorm
|
||||
next if !b.takesSandstormDamage?
|
||||
pbDisplay(_INTL("{1} is buffeted by the sandstorm!",b.pbThis))
|
||||
@@ -257,10 +255,8 @@ class PokeBattle_Battle
|
||||
pbDisplay(_INTL("{1}'s wish came true!",wishMaker))
|
||||
end
|
||||
# Sea of Fire damage (Fire Pledge + Grass Pledge combination)
|
||||
curWeather = pbWeather
|
||||
for side in 0...2
|
||||
next if sides[side].effects[PBEffects::SeaOfFire]==0
|
||||
next if [:Rain, :HeavyRain].include?(curWeather)
|
||||
@battle.pbCommonAnimation("SeaOfFire") if side==0
|
||||
@battle.pbCommonAnimation("SeaOfFireOpp") if side==1
|
||||
priority.each do |b|
|
||||
|
||||
Reference in New Issue
Block a user