Esempio n. 1
0
  /** Checks if anything died. */
  public void deathCheck() {
    attackerDied = attacker.isDead();
    defenderDied = defender.isDead();

    // if either have died, cut the battle short.
    if (attackerDied || defenderDied) controlState = 6;

    // If we have no more attacks, move on to the next phase
    else if (numAttacks == 0) controlState = 2;
    // If we do have attacks, go back to fighting.
    else controlState = 3;
  }