- 144
- Posts
- 7
- Years
- Seen Aug 28, 2021
EDIT: I was mistaken.
Last edited:
Credit to me and WolfPP for this solution is appreciated. Thanks!
My mistake. Thanks for clarifying.If you watch carefully, I published the Power Construct ability 10 minutes before WolfPP, and although what I said in this post may seem to suggest that I used your code, I didn't.
def revertOtherForms
if isConst?(self.species,PBSpecies,:GRENINJA) ||
isConst?(self.species,PBSpecies,:MIMIKYU)
self.form=0
elsif isConst?(self.species,PBSpecies,:ZYGARDE)
if $zygardeform>=0
self.form=$zygardeform
$zygardeform=-1
elsif self.form==2 # If caught a Full Forme
self.form=rand(2)
end
end
end
In PokeBattle_Battler:
Spoiler:
Code:def pbFaint(showMessage=true) unless fainted? PBDebug.log("!!!***Can't faint with HP greater than 0") return true end if @fainted # PBDebug.log("!!!***Can't faint if already fainted") return true end @battle.scene.pbFainted(self) pbInitEffects(false) # Reset status self.status=0 self.statusCount=0 if @pokemon && @battle.internalbattle @pokemon.changeHappiness("faint") end @pokemon.makeUnmega if self.isMega? @pokemon.makeUnprimal if self.isPrimal? [COLOR="Red"]@pokemon.revertOtherForms[/COLOR] @fainted=true # reset choice @battle.choices[@index]=[0,0,nil,-1] pbOwnSide.effects[PBEffects::LastRoundFainted][email protected] @battle.pbDisplayPaused(_INTL("{1} fainted!",pbThis)) if showMessage PBDebug.log("[Pokémon fainted] #{pbThis}") return true end
.
@ pokemon.revertOtherForms [COLOR="Red"]if isConst? (self.species, PBSpecies,: ZYGARDE) && $ zygardeform> = 0[/COLOR]
def pbFaint(showMessage=true)
unless fainted?
PBDebug.log("!!!***Can't faint with HP greater than 0")
return true
end
if @fainted
# PBDebug.log("!!!***Can't faint if already fainted")
return true
end
@battle.scene.pbFainted(self)
pbInitEffects(false)
# Reset status
self.status=0
self.statusCount=0
if @pokemon && @battle.internalbattle
@pokemon.changeHappiness("faint")
end
@pokemon.makeUnmega if self.isMega?
@pokemon.makeUnprimal if self.isPrimal?
@pokemon.revertOtherForms if isConst?(self.species,PBSpecies,:ZYGARDE) && $zygardeform>=0
@pokemon.makeDisguised if self.isBusted?#
@pokemon.makeUnUltra if self.isUltra?#
@fainted=true
# reset choice
@battle.choices[@index]=[0,0,nil,-1]
pbOwnSide.effects[PBEffects::LastRoundFainted][email protected]
@battle.pbDisplayPaused(_INTL("{1} fainted!",pbThis)) if showMessage
PBDebug.log("[Pokémon fainted] #{pbThis}")
return true
end