What we have about Dancer ability and works so far (made by mybusiness)
(DO NOT COPY, THIS IS JUST AN FEEDBACK):
In Move script, paste below 'def isBombMove?':
Now, works fine for Status Move (Swords Dance i.e. but I still didn't test for Lunar Dance). Inside Battler script, use CTRL+F to find '# Try to use move against user if there aren't any targets', then, paste:
This is the move's details:
Also, what we have for it (from Pokémon Reborn):
But we still have these bugs to fix:
How can we fix the bugs?
(DO NOT COPY, THIS IS JUST AN FEEDBACK):
In Move script, paste below 'def isBombMove?':
Code:
def isDanceMove?
return isConst?(@id,PBMoves,:QUIVERDANCE) ||
isConst?(@id,PBMoves,:DRAGONDANCE) ||
isConst?(@id,PBMoves,:FIERYDANCE) ||
isConst?(@id,PBMoves,:FEATHERDANCE) ||
isConst?(@id,PBMoves,:PETALDANCE) ||
isConst?(@id,PBMoves,:SWORDSDANCE) ||
isConst?(@id,PBMoves,:TEETERDANCE) ||
isConst?(@id,PBMoves,:LUNARDANCE) ||
isConst?(@id,PBMoves,:REVELATIONDANCE)
end
Now, works fine for Status Move (Swords Dance i.e. but I still didn't test for Lunar Dance). Inside Battler script, use CTRL+F to find '# Try to use move against user if there aren't any targets', then, paste:
Code:
else
PBDebug.logonerr{
thismove.pbEffect(user,nil)
}
# Dancer using non-damaging move
if thismove.isDanceMove?
for s in @battle.pbPriority(true)
if s!=user && s.hasWorkingAbility(:DANCER) && !s.fainted?
PBDebug.logonerr{
thismove.pbEffect(s,nil)
}
end
end
end
end
else
# We have targets
This is the move's details:
Code:
Whenever another Pokémon uses a dance move, a Pokémon with the Ability Dancer will immediately use that move as well. Using a move through Dancer is a separate action to using the move originally selected. Dancer will not activate for a move copied by another Pokémon with Dancer, but it will activate on an instructed dance move.
Dancer is able to copy a status dance move that has been powered up into its corresponding Z-Move (e.g. Z-Feather Dance), but the Pokémon with Dancer copies the regular version of the move and does not gain the additional Z-Power effect.
Dancer will not activate if the move's animation does not play (assuming battle animations are on): if all of the move's targets are protected from it, the move fails to affect any Pokémon (e.g. Teeter Dance if all of the targets are already confused or have Own Tempo), or all targets are immune (e.g. Electric-type Revelation Dance if the target is Ground-type). Dancer will not activate if the move is stolen by Snatch.
If multiple Pokémon have Dancer when a dance move is used, the slowest Pokémon will move first (Lagging Tail and Full Incense are ignored), even during Trick Room.
If the Pokémon with Dancer is confused, it may hurt itself instead of copying the move, even if it is protected by a move like Protect or Mat Block. If a Pokémon has flinched, this also applies to moves it subsequently tries to copy with Dancer. A Pokémon with Dancer that is locked into a consecutively executed move (such as Petal Dance) or any move by Encore or a held Choice item will still try to copy the move, but will fail unless it is locked into that same dance move; if a Pokémon uses Petal Dance via Dancer while locked into Petal Dance, this usage does not count towards the 2-3 turn duration. If a Pokémon with Dancer is holding an Assault Vest, it can still successfully copy status dance moves.
Lunar Dance is copied after the original user faints. If a Pokémon copies Petal Dance via Dancer, it will not be locked into the move. If Feather Dance is reflected by Magic Bounce or Magic Coat, Dancer will not activate for either the initial usage of the move or its reflected use. If the Pokémon with Dancer is under the effect of Taunt, it will still try to copy a status dance move, but will fail.
Moves used via Dancer can be stolen by Snatch and reflected by Magic Bounce and Magic Coat. Moves used via Dancer are not considered the move used most recently (such as for the purpose of Instruct, Mimic or Mirror Move), but damage dealt by them is considered for the purpose of Mirror Coat and Metal Burst.
In a Double Battle, if an ally uses a single-target dance move on an opponent, then the copied move will target the same opponent when copied by Dancer. Otherwise, a copied single-target dance move will target the user of the dance move.
Also, what we have for it (from Pokémon Reborn):
Battler script, paste below 'def pbUseMoveSimple(moveid,index=-1,target=-1)':
Now you need add 'danced=false' in bouth defs:
def pbUseMove(choice,specialusage=false,danced=false)
def pbUseMoveSimple(moveid,index=-1,target=-1,danced=false)
Then, use CTRL+F to find '# We have targets' and add above (below 'else'):
And now, add the code like I did:
Code:
def pbDancerMoveCheck(id)
dancemoves = [17,63,138,170,192,418,420,483,669]
for i in @battle.battlers
next if i == self
for j in dancemoves
if id == j
if i.hasWorkingAbility(:DANCER)
@battle.pbDisplay(_INTL("{1} joined in with the dance!",i.pbThis))
i.pbUseMoveSimple(id,-1,-1,true)
end
end
end
end
end
Now you need add 'danced=false' in bouth defs:
def pbUseMove(choice,specialusage=false,danced=false)
def pbUseMoveSimple(moveid,index=-1,target=-1,danced=false)
Then, use CTRL+F to find '# We have targets' and add above (below 'else'):
Code:
unless !thismove
pbDancerMoveCheck(thismove.id) unless danced
end
else
# We have targets
showanimation=true
alltargets=[]
Code:
# Get the number of hits
numhits=thismove.pbNumHits(user)
# Reset damage state, set Focus Band/Focus Sash to available
target.damagestate.reset
# Use move against the current target
pbProcessMoveAgainstTarget(thismove,user,target,numhits,turneffects,false,alltargets,showanimation)
showanimation=false
i+=1
end
unless !thismove
pbDancerMoveCheck(thismove.id) unless danced
end
end
# Pokémon switching caused by Roar, Whirlwind, Circle Throw, Dragon Tail, Red Card
But we still have these bugs to fix:
Code:
*Dancer will not activate for a move copied by another Pokémon with Dancer, but it will activate on an instructed dance move.
For first part, I think 'if k!=user && !k.fainted?' solved it but IDK about the second part.
*Dancer will not activate if the move is stolen by Snatch.
We need to put some '&& !thismove.effects[PBEffects::Snatch]' or something;
*If multiple Pokémon have Dancer when a dance move is used, the slowest Pokémon will move first (Lagging Tail and Full Incense are ignored), even during Trick Room.
IDK if mybusiness made 'for k in @battle.pbPriority(true)' for that case;
*If the Pokémon with Dancer is confused, it may hurt itself instead of copying the move, even if it is protected by a move like Protect or Mat Block.
We need to put some 'if k.effects[PBEffects::Confusion]>0; pbConfusionDamage' or something;
A Pokémon with Dancer that is locked into a consecutively executed move (such as Petal Dance) or any move by Encore or a held Choice item will still try to copy the move, but will fail unless it is locked into that same dance move;
if a Pokémon uses Petal Dance via Dancer while locked into Petal Dance, this usage does not count towards the 2-3 turn duration.
*Lunar Dance is copied after the original user faints.
I will check that later...
*If a Pokémon copies Petal Dance via Dancer, it will not be locked into the move.
What mybusiness did and Pokémon Reborn has that bug. How can we fix it?
If Feather Dance is reflected by Magic Bounce or Magic Coat, Dancer will not activate for either the initial usage of the move or its reflected use.
*If the Pokémon with Dancer is under the effect of Taunt, it will still try to copy a status dance move, but will fail.
We need to put some 'if k.effects[PBEffects::Taunt]>0; thismove.pbMoveFailed(user,target)' or something, IDK yet.
Moves used via Dancer can be stolen by Snatch and reflected by Magic Bounce and Magic Coat. Moves used via Dancer are not considered the move used most recently (such as for the purpose of Instruct, Mimic or Mirror Move), but damage dealt by them is considered for the purpose of Mirror Coat and Metal Burst.
In a Double Battle, if an ally uses a single-target dance move on an opponent, then the copied move will target the same opponent when copied by Dancer. Otherwise, a copied single-target dance move will target the user of the dance move.