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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,3 +29,15 @@ namespace Gen7 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#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,4 +1,5 @@
|
||||||
namespace Gen7 {
|
namespace Gen7 {
|
||||||
|
namespace CopyableMoves{
|
||||||
dictionary _nonCopyableMoves = {
|
dictionary _nonCopyableMoves = {
|
||||||
{"assist", true},
|
{"assist", true},
|
||||||
{"baneful_bunker", true},
|
{"baneful_bunker", true},
|
||||||
|
@ -55,4 +56,5 @@ namespace Gen7 {
|
||||||
bool CanCopyMove(const MoveData@ move){
|
bool CanCopyMove(const MoveData@ move){
|
||||||
return !_nonCopyableMoves.exists(move.Name);
|
return !_nonCopyableMoves.exists(move.Name);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue