@Override public int calculate(Game game, Ability sourceAbility, Effect effect) { int amount = 0; Player player = game.getPlayer(sourceAbility.getControllerId()); if (player != null) { amount = player.getCounters().getCount(CounterType.EXPERIENCE); } return amount; }
@Override public boolean apply(Game game, Ability source) { Permanent target = game.getPermanent(source.getFirstTarget()); if (target == null) { return false; } Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { int amount = controller.getCounters().getCount(CounterType.EXPERIENCE); target.addCounters(CounterType.P1P1.createInstance(amount), game); } return false; }