|
|
@ -1198,23 +1198,35 @@ goes on a very long time, I hope you can understand this is only for testing pur |
|
|
|
}break; |
|
|
|
}break; |
|
|
|
case BattleState::MOVE_SELECT:{ |
|
|
|
case BattleState::MOVE_SELECT:{ |
|
|
|
if (LeftPressed()) { |
|
|
|
if (LeftPressed()) { |
|
|
|
if (MOVEMENT_GRID.count({SELECTED_MOVE_SQUARE.x-1,SELECTED_MOVE_SQUARE.y})) { |
|
|
|
for (int i=1;i<=3;i++) { |
|
|
|
SELECTED_MOVE_SQUARE.x-=1; |
|
|
|
if (MOVEMENT_GRID.count({SELECTED_MOVE_SQUARE.x-i,SELECTED_MOVE_SQUARE.y})) { |
|
|
|
|
|
|
|
SELECTED_MOVE_SQUARE.x-=i; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (RightPressed()) { |
|
|
|
if (RightPressed()) { |
|
|
|
if (MOVEMENT_GRID.count({SELECTED_MOVE_SQUARE.x+1,SELECTED_MOVE_SQUARE.y})) { |
|
|
|
for (int i=1;i<=8;i++) { |
|
|
|
SELECTED_MOVE_SQUARE.x+=1; |
|
|
|
if (MOVEMENT_GRID.count({SELECTED_MOVE_SQUARE.x+i,SELECTED_MOVE_SQUARE.y})) { |
|
|
|
|
|
|
|
SELECTED_MOVE_SQUARE.x+=i; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (UpPressed()) { |
|
|
|
if (UpPressed()) { |
|
|
|
if (MOVEMENT_GRID.count({SELECTED_MOVE_SQUARE.x,SELECTED_MOVE_SQUARE.y-1})) { |
|
|
|
for (int i=1;i<=8;i++) { |
|
|
|
SELECTED_MOVE_SQUARE.y-=1; |
|
|
|
if (MOVEMENT_GRID.count({SELECTED_MOVE_SQUARE.x,SELECTED_MOVE_SQUARE.y-i})) { |
|
|
|
|
|
|
|
SELECTED_MOVE_SQUARE.y-=i; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (DownPressed()) { |
|
|
|
if (DownPressed()) { |
|
|
|
if (MOVEMENT_GRID.count({SELECTED_MOVE_SQUARE.x,SELECTED_MOVE_SQUARE.y+1})) { |
|
|
|
for (int i=1;i<=8;i++) { |
|
|
|
SELECTED_MOVE_SQUARE.y+=1; |
|
|
|
if (MOVEMENT_GRID.count({SELECTED_MOVE_SQUARE.x,SELECTED_MOVE_SQUARE.y+i})) { |
|
|
|
|
|
|
|
SELECTED_MOVE_SQUARE.y+=i; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}break; |
|
|
|
}break; |
|
|
|