mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-11 15:15:00 +00:00
Added evolution method for Galarian Yamask, minor refactoring in battle code, a Pokémon's ability no longer needs resetting when changing its ability_index
This commit is contained in:
@@ -706,6 +706,10 @@ class PokeBattle_Battler
|
||||
return @battle.pbOwnedByPlayer?(@index)
|
||||
end
|
||||
|
||||
def wild?
|
||||
return @battle.wildBattle? && opposes?
|
||||
end
|
||||
|
||||
# Returns 0 if self is on the player's side, or 1 if self is on the opposing
|
||||
# side.
|
||||
def idxOwnSide
|
||||
|
||||
@@ -86,6 +86,7 @@ class PokeBattle_Battler
|
||||
# Do other things
|
||||
@battle.pbClearChoice(@index) # Reset choice
|
||||
pbOwnSide.effects[PBEffects::LastRoundFainted] = @battle.turnCount
|
||||
$game_temp.party_direct_damage_taken[@pokemonIndex] = 0 if pbOwnedByPlayer?
|
||||
# Check other battlers' abilities that trigger upon a battler fainting
|
||||
pbAbilitiesOnFainting
|
||||
# Check for end of primordial weather
|
||||
|
||||
@@ -5,7 +5,7 @@ class PokeBattle_Battler
|
||||
def pbProcessTurn(choice,tryFlee=true)
|
||||
return false if fainted?
|
||||
# Wild roaming Pokémon always flee if possible
|
||||
if tryFlee && @battle.wildBattle? && opposes? &&
|
||||
if tryFlee && wild? &&
|
||||
@battle.rules["alwaysflee"] && @battle.pbCanRun?(@index)
|
||||
pbBeginTurn(choice)
|
||||
pbSEPlay("Battle flee")
|
||||
|
||||
Reference in New Issue
Block a user