Ejemplo n.º 1
0
  @Override
  public void switchActivePokemon(MoveWithPP switchOption) {

    Move switchTo = switchOption.getMove();

    AiWriter.writeSwitch(activePokemon, teamId);
    activePokemon.setSleep(activePokemon.getInitialSleepDuration());

    switch (switchTo) {
      case SWITCH_1:
        activePokemon = new ActivePokemon(party.get(0));
        break;
      case SWITCH_2:
        activePokemon = new ActivePokemon(party.get(1));
        break;
      case SWITCH_3:
        activePokemon = new ActivePokemon(party.get(2));
        break;
      case SWITCH_4:
        activePokemon = new ActivePokemon(party.get(3));
        break;
      case SWITCH_5:
        activePokemon = new ActivePokemon(party.get(4));
        break;
      case SWITCH_6:
        activePokemon = new ActivePokemon(party.get(5));
        break;
      default:
        break;
    }

    EntryHazardDamage.applyToxicSpikes(this);
    EntryHazardDamage.applySpikeDamage(this);
    EntryHazardDamage.applyStealthRocks(this);
  }
Ejemplo n.º 2
0
 @Override
 public void decrementWishCount() {
   if (wishCount > 0) {
     wishCount--;
     if (wishCount == 0) {
       activePokemon.setCurrHp(activePokemon.getCurrHp() + wishHealAmount);
       wishHealAmount = 0;
     }
   }
 }