mirror of
https://github.com/OMGeeky/andors-trail.git
synced 2026-02-23 15:38:29 +01:00
Bugfix: Update "attack" button to "move" when fleeing.
This commit is contained in:
@@ -143,22 +143,23 @@ public final class CombatView extends RelativeLayout implements CombatSelectionL
|
||||
updateMonsterHealth(selectedMonster);
|
||||
currentMonster = selectedMonster;
|
||||
}
|
||||
updateAttackMoveButtonText(selectedMonster != null);
|
||||
}
|
||||
|
||||
|
||||
private void updateAttackMoveButtonText() {
|
||||
if (world.model.uiSelections.selectedMonster != null) {
|
||||
updateAttackMoveButtonText(world.model.uiSelections.selectedMonster != null);
|
||||
}
|
||||
private void updateAttackMoveButtonText(boolean hasSelectedMonster) {
|
||||
if (hasSelectedMonster) {
|
||||
attackMoveButton.setText(res.getString(R.string.combat_attack, player.getAttackCost()));
|
||||
} else if (world.model.uiSelections.selectedPosition != null) {
|
||||
attackMoveButton.setText(res.getString(R.string.combat_move, player.getMoveCost()));
|
||||
} else {
|
||||
attackMoveButton.setText(res.getString(R.string.combat_attack, player.getAttackCost()));
|
||||
attackMoveButton.setText(res.getString(R.string.combat_move, player.getMoveCost()));
|
||||
}
|
||||
}
|
||||
|
||||
public void updateStatus() {
|
||||
updatePlayerAP();
|
||||
updateSelectedMonster(world.model.uiSelections.selectedMonster);
|
||||
updateAttackMoveButtonText();
|
||||
}
|
||||
|
||||
private void show() {
|
||||
|
||||
Reference in New Issue
Block a user