Guys I need help one more time. In my project there is a gym leader who is a dance teacher but she uses fighting-type Pokémon. So far so good. As you already know, Oricorio has a ability (Dancer) that copies the dance moves if your opponent uses any.
My idea is to give only this Gym Leader's Pokes the same effect as the Dancer ability, without change the original abilities of your Pokémon, can anyone guide me how to do this?
I'll leave here the code I use to Dancer
Ty~@
My idea is to give only this Gym Leader's Pokes the same effect as the Dancer ability, without change the original abilities of your Pokémon, can anyone guide me how to do this?
I'll leave here the code I use to Dancer
Spoiler:
Code:
if thismove.isDanceMove? && !dancercheck
if @battle.doublebattle
for k in @battle.pbPriority(true)
if k!=user && !k.isFainted?
if !k.effects[PBEffects::Dancer] &&
k.hasWorkingAbility(:DANCER)
@battle.battlers[user.index].effects[PBEffects::Dancer]=true
if k==user.pbPartner
if !target.isFainted?
if target==user.pbPartner
if !user.pbOpposing1.isFainted?
@battle.pbDisplay(_INTL("{1} also dances!",k.pbThis))
k.effects[PBEffects::Dancer]=true
pbProcessMoveAgainstTarget(thismove,k,user.pbOpposing1,numhits,turneffects,nocheck,alltargets,showanimation,true)
elsif !user.pbOpposing2.isFainted?
@battle.pbDisplay(_INTL("{1} also dances!",k.pbThis))
k.effects[PBEffects::Dancer]=true
pbProcessMoveAgainstTarget(thismove,k,user.pbOpposing2,numhits,turneffects,nocheck,alltargets,showanimation,true)
elsif !user.isFainted?
@battle.pbDisplay(_INTL("{1} wants to dance, but will not attack its ally!",user.pbPartner.pbThis))
else
@battle.pbDisplay(_INTL("What a pity! {1} wanted to dance...",user.pbPartner.pbThis))
end
else
@battle.pbDisplay(_INTL("{1} also dances!",k.pbThis))
k.effects[PBEffects::Dancer]=true
pbProcessMoveAgainstTarget(thismove,k,target,numhits,turneffects,nocheck,alltargets,showanimation,true)
end
elsif !target.pbPartner.isFainted?
@battle.pbDisplay(_INTL("{1} also dances!",k.pbThis))
k.effects[PBEffects::Dancer]=true
pbProcessMoveAgainstTarget(thismove,k,target.pbPartner,numhits,turneffects,nocheck,alltargets,showanimation,true)
elsif !user.isFainted?
@battle.pbDisplay(_INTL("{1} wants to dance, but will not attack its ally!",user.pbPartner.pbThis))
else
@battle.pbDisplay(_INTL("What a pity! {1} wanted to dance...",user.pbPartner.pbThis))
end
elsif k==user.pbOpposing1
if !user.isFainted?
@battle.pbDisplay(_INTL("{1} also dances!",k.pbThis))
k.effects[PBEffects::Dancer]=true
pbProcessMoveAgainstTarget(thismove,k,user,numhits,turneffects,nocheck,alltargets,showanimation,true)
elsif !user.pbPartner.isFainted?
@battle.pbDisplay(_INTL("{1} also dances!",k.pbThis))
k.effects[PBEffects::Dancer]=true
pbProcessMoveAgainstTarget(thismove,k,user.pbPartner,numhits,turneffects,nocheck,alltargets,showanimation,true)
elsif !user.pbOpposing2.isFainted?
@battle.pbDisplay(_INTL("{1} wants to dance, but will not attack its ally!",user.pbOpposing1.pbThis))
else
@battle.pbDisplay(_INTL("What a pity! {1} wanted to dance...",user.pbOpposing1.pbThis))
end
elsif k==user.pbOpposing2
if !user.isFainted?
@battle.pbDisplay(_INTL("{1} also dances!",k.pbThis))
k.effects[PBEffects::Dancer]=true
pbProcessMoveAgainstTarget(thismove,k,user,numhits,turneffects,nocheck,alltargets,showanimation,true)
elsif !user.pbPartner.isFainted?
@battle.pbDisplay(_INTL("{1} also dances!",k.pbThis))
k.effects[PBEffects::Dancer]=true
pbProcessMoveAgainstTarget(thismove,k,user.pbPartner,numhits,turneffects,nocheck,alltargets,showanimation,true)
elsif !user.pbOpposing1.isFainted?
@battle.pbDisplay(_INTL("{1} wants to dance, but will not attack its ally!",user.pbOpposing1.pbThis))
else
@battle.pbDisplay(_INTL("What a pity! {1} wanted to dance...",user.pbOpposing2.pbThis))
end
end
end
end
end
elsif target.hasWorkingAbility(:DANCER) && !target.isFainted? && !user.isFainted?
@battle.pbDisplay(_INTL("{1} also dances!",target.pbThis))
pbProcessMoveAgainstTarget(thismove,target,user,numhits,turneffects,nocheck,alltargets,showanimation,true)
elsif target.hasWorkingAbility(:DANCER) && !target.isFainted? && user.isFainted?
@battle.pbDisplay(_INTL("What a pity! {1} wanted to dance...",target.pbThis))
end
end
Ty~@