mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 14:44:58 +00:00
Added more Gen 8 code
This commit is contained in:
@@ -153,6 +153,10 @@ module PokeBattle_BattleCommon
|
||||
# Save the Pokémon for storage at the end of battle
|
||||
@caughtPokemon.push(pkmn)
|
||||
end
|
||||
if numShakes != 4
|
||||
@first_poke_ball = ball if !@poke_ball_failed
|
||||
@poke_ball_failed = true
|
||||
end
|
||||
end
|
||||
|
||||
#=============================================================================
|
||||
|
||||
@@ -79,6 +79,8 @@ class PokeBattle_Battle
|
||||
attr_reader :successStates # Success states
|
||||
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_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
|
||||
|
||||
@@ -110,6 +110,9 @@ class PokeBattle_Battle
|
||||
return true if idxUser==idxTarget
|
||||
return false if opposes?(idxUser,idxTarget)
|
||||
return false if !nearBattlers?(idxUser,idxTarget)
|
||||
when :AllAllies
|
||||
return false if idxUser == idxTarget
|
||||
return false if opposes?(idxUser, idxTarget)
|
||||
when :UserAndAllies
|
||||
return false if opposes?(idxUser,idxTarget)
|
||||
when :NearFoe, :RandomNearFoe, :AllNearFoes
|
||||
|
||||
@@ -593,7 +593,7 @@ class PokeBattle_Battle
|
||||
BattleHandlers.triggerEOREffectAbility(b.ability,b,self) if b.abilityActive?
|
||||
# Flame Orb, Sticky Barb, Toxic Orb
|
||||
BattleHandlers.triggerEOREffectItem(b.item,b,self) if b.itemActive?
|
||||
# Harvest, Pickup
|
||||
# Harvest, Pickup, Ball Fetch
|
||||
BattleHandlers.triggerEORGainItemAbility(b.ability,b,self) if b.abilityActive?
|
||||
end
|
||||
pbGainExp
|
||||
@@ -650,6 +650,7 @@ class PokeBattle_Battle
|
||||
b.tookPhysicalHit = false
|
||||
b.statsRaised = false
|
||||
b.statsLowered = false
|
||||
b.canRestoreIceFace = false
|
||||
b.lastRoundMoveFailed = b.lastMoveFailed
|
||||
b.lastAttacker.clear
|
||||
b.lastFoeAttacker.clear
|
||||
|
||||
Reference in New Issue
Block a user