Some clarification around loyalty. Added unit test.

This commit is contained in:
Nathaniel Brandes 2017-03-09 02:30:52 -08:00
parent dd0c89db1d
commit d7d700f66a
2 changed files with 30 additions and 0 deletions

View file

@ -63,6 +63,12 @@ public class PayLoyaltyCost extends CostImpl {
return planeswalker != null && planeswalker.getCounters(game).getCount(CounterType.LOYALTY) + amount >= 0 && planeswalker.canLoyaltyBeUsed(game);
}
/**
* Gatherer Ruling:
* 10/1/2005: Planeswalkers will enter the battlefield with double the normal amount of loyalty counters. However,
* if you activate an ability whose cost has you put loyalty counters on a planeswalker, the number you put on isnt doubled.
* This is because those counters are put on as a cost, not as an effect.
**/
@Override
public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) {
Permanent planeswalker = game.getPermanent(sourceId);