mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Allow tapping deployed commander to cancel any action
This commit is contained in:
@@ -287,25 +287,25 @@ public class ConquestMapScreen extends FScreen {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { //deploy panel - toggle whether selected commander is deployed to current region
|
else { //deploy panel - toggle whether selected commander is deployed to current region
|
||||||
if (commanderRow.selectedIndex != -1) {
|
ConquestCommander commander = regionDisplay.deployedCommander.commander;
|
||||||
ConquestCommander commander = commanderRow.panels[commanderRow.selectedIndex].commander;
|
if (commander == null) {
|
||||||
|
commander = commanderRow.panels[commanderRow.selectedIndex].commander;
|
||||||
if (commander.getCurrentDayAction() == null) {
|
if (commander.getCurrentDayAction() == null) {
|
||||||
if (regionDisplay.deployedCommander.commander == null) {
|
regionDisplay.deployedCommander.setCommander(commander);
|
||||||
regionDisplay.deployedCommander.setCommander(commander);
|
regionDisplay.data.setDeployedCommander(commander);
|
||||||
regionDisplay.data.setDeployedCommander(commander);
|
commander.setCurrentDayAction(ConquestAction.Deploy);
|
||||||
commander.setCurrentDayAction(ConquestAction.Deploy);
|
commander.setDeployedRegion(regionDisplay.data.getRegion());
|
||||||
commander.setDeployedRegion(regionDisplay.data.getRegion());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (commander.getCurrentDayAction() == ConquestAction.Deploy) {
|
|
||||||
if (regionDisplay.deployedCommander.commander == commander) {
|
|
||||||
regionDisplay.deployedCommander.setCommander(null);
|
|
||||||
regionDisplay.data.setDeployedCommander(null);
|
|
||||||
commander.setCurrentDayAction(null);
|
|
||||||
commander.setDeployedRegion(null);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (commander.getCurrentDayAction() == ConquestAction.Deploy) {
|
||||||
|
regionDisplay.deployedCommander.setCommander(null);
|
||||||
|
regionDisplay.data.setDeployedCommander(null);
|
||||||
|
commander.setCurrentDayAction(null);
|
||||||
|
commander.setDeployedRegion(null);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
commander.setCurrentDayAction(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user