Puts Copyable Moves in its own namespace for clarity, began working on assist unit tests
This commit is contained in:
parent
94529b7b6b
commit
12765c5e69
|
@ -15,7 +15,7 @@ namespace Gen7 {
|
||||||
for (uint j = 0; j < moves.length; j++){
|
for (uint j = 0; j < moves.length; j++){
|
||||||
auto m = moves[j];
|
auto m = moves[j];
|
||||||
if (m is null){ continue; }
|
if (m is null){ continue; }
|
||||||
if (CanCopyMove(m.MoveData)){
|
if (CopyableMoves::CanCopyMove(m.MoveData)){
|
||||||
possibleMoves.insertLast(m.MoveData);
|
possibleMoves.insertLast(m.MoveData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,4 +28,16 @@ namespace Gen7 {
|
||||||
moveName = possibleMoves[i].Name;
|
moveName = possibleMoves[i].Name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if TESTS
|
||||||
|
[Test name="Assist: Switch move to known move from party member"]
|
||||||
|
void Assist_ChangesMove(){
|
||||||
|
auto p1 = CreateSimpleParty({"charizard", "blastoise"}, 100);
|
||||||
|
auto p2 = CreateSimpleParty({"venusaur", "pikachu"}, 100);
|
||||||
|
|
||||||
|
auto battle = CreateSimpleBattle(684, p1, p2);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
|
@ -1,58 +1,60 @@
|
||||||
namespace Gen7 {
|
namespace Gen7 {
|
||||||
dictionary _nonCopyableMoves = {
|
namespace CopyableMoves{
|
||||||
{"assist", true},
|
dictionary _nonCopyableMoves = {
|
||||||
{"baneful_bunker", true},
|
{"assist", true},
|
||||||
{"beak_blast", true},
|
{"baneful_bunker", true},
|
||||||
{"belch", true},
|
{"beak_blast", true},
|
||||||
{"bestow", true},
|
{"belch", true},
|
||||||
{"bounce", true},
|
{"bestow", true},
|
||||||
{"celebrate", true},
|
{"bounce", true},
|
||||||
{"chatter", true},
|
{"celebrate", true},
|
||||||
{"circle_throw", true},
|
{"chatter", true},
|
||||||
{"copycat", true},
|
{"circle_throw", true},
|
||||||
{"counter", true},
|
{"copycat", true},
|
||||||
{"covet", true},
|
{"counter", true},
|
||||||
{"destiny_bond", true},
|
{"covet", true},
|
||||||
{"detect", true},
|
{"destiny_bond", true},
|
||||||
{"dig", true},
|
{"detect", true},
|
||||||
{"dive", true},
|
{"dig", true},
|
||||||
{"dragon_tail", true},
|
{"dive", true},
|
||||||
{"endure", true},
|
{"dragon_tail", true},
|
||||||
{"feint", true},
|
{"endure", true},
|
||||||
{"fly", true},
|
{"feint", true},
|
||||||
{"focus_punch", true},
|
{"fly", true},
|
||||||
{"follow_me", true},
|
{"focus_punch", true},
|
||||||
{"helping_hand", true},
|
{"follow_me", true},
|
||||||
{"hold_hands", true},
|
{"helping_hand", true},
|
||||||
{"kings_shield", true},
|
{"hold_hands", true},
|
||||||
{"mat_block", true},
|
{"kings_shield", true},
|
||||||
{"me_first", true},
|
{"mat_block", true},
|
||||||
{"metronome", true},
|
{"me_first", true},
|
||||||
{"mimic", true},
|
{"metronome", true},
|
||||||
{"mirror_coat", true},
|
{"mimic", true},
|
||||||
{"mirror_move", true},
|
{"mirror_coat", true},
|
||||||
{"nature_power", true},
|
{"mirror_move", true},
|
||||||
{"phantom_force", true},
|
{"nature_power", true},
|
||||||
{"protect", true},
|
{"phantom_force", true},
|
||||||
{"rage_powder", true},
|
{"protect", true},
|
||||||
{"roar", true},
|
{"rage_powder", true},
|
||||||
{"shadow_force", true},
|
{"roar", true},
|
||||||
{"shell_trap", true},
|
{"shadow_force", true},
|
||||||
{"sketch", true},
|
{"shell_trap", true},
|
||||||
{"sky_drop", true},
|
{"sketch", true},
|
||||||
{"sleep_talk", true},
|
{"sky_drop", true},
|
||||||
{"snatch", true},
|
{"sleep_talk", true},
|
||||||
{"spiky_shield", true},
|
{"snatch", true},
|
||||||
{"spotlight", true},
|
{"spiky_shield", true},
|
||||||
{"struggle", true},
|
{"spotlight", true},
|
||||||
{"switcheroo", true},
|
{"struggle", true},
|
||||||
{"thief", true},
|
{"switcheroo", true},
|
||||||
{"transform", true},
|
{"thief", true},
|
||||||
{"trick", true},
|
{"transform", true},
|
||||||
{"whirlwind", true}
|
{"trick", true},
|
||||||
};
|
{"whirlwind", true}
|
||||||
|
};
|
||||||
bool CanCopyMove(const MoveData@ move){
|
|
||||||
return !_nonCopyableMoves.exists(move.Name);
|
bool CanCopyMove(const MoveData@ move){
|
||||||
|
return !_nonCopyableMoves.exists(move.Name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue