- 76
- Posts
- 9
- Years
- Seen Dec 9, 2022
Hey guys, I want to include something specific within a move. First time the move is used a music changes to A but after the second time using the move I want that the music changes to B. However, even using the if-else function, the music do not change. Why is that?
################################################################################
# Auraburst
################################################################################
class PokeBattle_Move_170 < PokeBattle_Move
def pbEffectAfterHit(attacker,opponent,turneffects)
if isConst?(@id,PBMoves,:AURABURST)
if isConst?(attacker.species,PBSpecies,:GRENINJA) &&
!attacker.effects[PBEffects::Transform] &&
!(attacker.hasWorkingAbility(:SHEERFORCE) && self.addlEffect>0) &&
!attacker.isFainted?
if pbBGMPlay("Dragon Ball Super - Goku VS Jiren Theme",100,100)
pbBGMPlay("8-Bit Boss Battle 4 - By EliteFerrex",100,100)
else
pbBGMPlay("Dragon Ball Super - Goku VS Jiren Theme",100,100)
end
attacker.form=attacker.form+10
attacker.pbIncreaseStat(PBStats::ATTACK,3,attacker,false,self)
attacker.pbIncreaseStat(PBStats::DEFENSE,3,attacker,false,self)
attacker.pbIncreaseStat(PBStats::SPATK,3,attacker,false,self)
attacker.pbIncreaseStat(PBStats::SPDEF,3,attacker,false,self)
attacker.pbIncreaseStat(PBStats::SPEED,3,attacker,false,self)
attacker.pbUpdate(true)
u/battle.scene.pbChangePokemon(attacker,attacker.pokemon)
u/battle.pbDisplay(_INTL("{1}'s hidden potential got unlocked!",attacker.pbThis))
PBDebug.log("[Form changed] #{attacker.pbThis} changed to form #{attacker.form}")
return 0
end
end
end
end