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:
Maruno17
2021-11-07 18:05:32 +00:00
parent ae7721316f
commit 34ab0b8afe
24 changed files with 109 additions and 52 deletions

View File

@@ -232,7 +232,8 @@ class PokeBattle_Battle
def pbGetOwnerFromBattlerIndex(idxBattler)
idxTrainer = pbGetOwnerIndexFromBattlerIndex(idxBattler)
return (opposes?(idxBattler)) ? @opponent[idxTrainer] : @player[idxTrainer]
trainer = (opposes?(idxBattler)) ? @opponent : @player
return (trainer.nil?) ? nil : trainer[idxTrainer]
end
def pbGetOwnerIndexFromPartyIndex(idxBattler,idxParty)
@@ -248,7 +249,8 @@ class PokeBattle_Battle
# switch another trainer's Pokémon.
def pbGetOwnerFromPartyIndex(idxBattler,idxParty)
idxTrainer = pbGetOwnerIndexFromPartyIndex(idxBattler,idxParty)
return (opposes?(idxBattler)) ? @opponent[idxTrainer] : @player[idxTrainer]
trainer = (opposes?(idxBattler)) ? @opponent : @player
return (trainer.nil?) ? nil : trainer[idxTrainer]
end
def pbGetOwnerName(idxBattler)