mirror of
https://github.com/OMGeeky/andors-trail.git
synced 2026-01-21 10:58:12 +01:00
Refactor player combat round methods
This commit is contained in:
@@ -240,7 +240,7 @@ public final class CombatController implements VisualEffectCompletedCallback {
|
||||
exitCombat(true);
|
||||
return;
|
||||
}
|
||||
if (!playerHasApLeft()) beginMonsterTurn(false);
|
||||
if (!playerHasApLeft()) endPlayerTurn();
|
||||
}
|
||||
private void continueTurn() {
|
||||
if (world.model.uiSelections.isPlayersCombatTurn) return;
|
||||
@@ -270,7 +270,7 @@ public final class CombatController implements VisualEffectCompletedCallback {
|
||||
|
||||
private void fleeingFailed() {
|
||||
combatActionListeners.onPlayerFailedFleeing();
|
||||
beginMonsterTurn(false);
|
||||
endPlayerTurn();
|
||||
}
|
||||
|
||||
private final Handler monsterTurnHandler = new Handler() {
|
||||
@@ -288,7 +288,10 @@ public final class CombatController implements VisualEffectCompletedCallback {
|
||||
}
|
||||
}
|
||||
|
||||
public void beginMonsterTurn(boolean isFirstRound) {
|
||||
public void endPlayerTurn() {
|
||||
beginMonsterTurn(false);
|
||||
}
|
||||
private void beginMonsterTurn(boolean isFirstRound) {
|
||||
controllers.actorStatsController.setActorMinAP(world.model.player);
|
||||
world.model.uiSelections.isPlayersCombatTurn = false;
|
||||
for (MonsterSpawnArea a : world.model.currentMap.spawnAreas) {
|
||||
|
||||
@@ -72,7 +72,7 @@ public final class CombatView extends RelativeLayout implements CombatSelectionL
|
||||
endTurnButton.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View arg0) {
|
||||
c.beginMonsterTurn(false);
|
||||
c.endPlayerTurn();
|
||||
}
|
||||
});
|
||||
Button fleeButton = (Button) findViewById(R.id.combatview_flee);
|
||||
|
||||
Reference in New Issue
Block a user