- 68
- Posts
- 5
- Years
- Seen Nov 9, 2023
Does anyone know how to make it so Destiny Bond will fail when it's used twice in a row (like in Gen 7)?
I've tried scripting it myself, but I ran into an issue where once it failed, it would fail for the rest of the battle.
If anyone could help me, that would be great.
By the way, here's my failed attempt at scripting it.
I've tried scripting it myself, but I ran into an issue where once it failed, it would fail for the rest of the battle.
If anyone could help me, that would be great.
By the way, here's my failed attempt at scripting it.
Code:
class PokeBattle_Move_0E7 < PokeBattle_Move
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
if id==attacker.lastMoveUsed && id=186
@battle.pbDisplay(_INTL("But it failed!"))
return -1
end
pbShowAnimation(@id,attacker,nil,hitnum,alltargets,showanimation)
attacker.effects[PBEffects::DestinyBond]=true
@battle.pbDisplay(_INTL("{1} is trying to take its foe down with it!",attacker.pbThis))
return 0
end
end