@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)); }
@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()); }