Exemple #1
0
 private void checkPaid(UUID uuid, Spell spell) {
   for (Cost cost : spell.getSpellAbility().getManaCostsToPay()) {
     if (!cost.isPaid()) {
       return;
     }
   }
   CardView cardView = stack.get(uuid);
   cardView.paid = true;
 }
 @Override
 public boolean apply(MageObject input, Game game) {
   Spell spell = game.getStack().getSpell(input.getId());
   if (spell != null) {
     Targets spellTargets = spell.getSpellAbility().getTargets();
     int numberOfTargets = 0;
     for (Target target : spellTargets) {
       numberOfTargets += target.getTargets().size();
     }
     if (numberOfTargets == targets) {
       return true;
     }
   }
   return false;
 }