Пример #1
0
  @Override
  public MyTurnState perform(PlayableCard minion, BoardState oldstate) {
    Set<Action> actions = new LinkedHashSet<Action>();
    for (int id : oldstate.getIdsInPlayOrder()) {
      Minion targetMinion = oldstate.findMinion(id);

      if (targetMinion.isTargettable() && targetMinion.getRace().equals(Race.MURLOC))
        actions.add(new HungryCrabChoice((Minion) minion, id));
    }
    if (actions.size() == 0) return oldstate;
    return new ChoiceState(oldstate, actions, BufferType.BATTLECRY, ((Minion) minion).getId());
  }
Пример #2
0
    @Override
    public MyTurnState result(BoardState oldstate) {

      Minion defender = oldstate.findMinion(id);

      MyTurnState tempstate = defender.destroy(oldstate);
      return tempstate.applyBuff(source.getId(), new AdditiveBuff(-1, 2, 2, 0));
    }
Пример #3
0
 @Override
 public MyTurnState perform(PlayableCard minion, BoardState oldstate) {
   return oldstate.drawCard();
 }
Пример #4
0
  @Override
  public MyTurnState result(BoardState oldstate) {
    Hero hero = (oldstate.getHero()).fresh();
    hero.setPowerUsed(true);
    hero.setCurrentMana(hero.getCurrentMana() - manacost);

    BoardState tempstate =
        new BoardState(
            oldstate.getViewType(),
            hero,
            oldstate.getEnemy(),
            oldstate.getOppSide(),
            oldstate.getMySide(),
            oldstate.getIdsInPlayOrder(),
            oldstate.getEnemyHandSize(),
            oldstate.isTurnEnded(),
            oldstate.getIdCounter());

    return (tempstate.getEnemy()).damage(tempstate, damage);
  }
Пример #5
0
 public boolean useable(BoardState oldstate) {
   return ((oldstate.getHero()).getCurrentMana() >= manacost);
 }