コード例 #1
0
  public int getAlivePokemon() {
    int i = 0;
    for (EntityPokemon p : getTeam()) {
      if (p.getCurrentHP() > 0) {
        i++;
      }
    }

    return i;
  }
コード例 #2
0
  @Override
  public void execute(EntityPokemon user, EntityPokemon target) {
    System.out.println(user.getName() + " used " + getName() + "!");

    if (user.getAtkStage().increment() == user.getAtkStage()) {
      System.out.println(user.getName() + "'s Attack couldn't go any higher!");
    } else {
      System.out.println(user.getName() + "'s Attack rose sharply!");
      user.setAtkStage(user.getAtkStage().increment());
      user.setAtkStage(user.getAtkStage().increment());
    }
  }