Examples of sacrifice()


Examples of mage.game.permanent.Permanent.sacrifice()

  @Override
  public boolean pay(Game game, UUID sourceId, UUID controllerId, boolean noMana) {
    Permanent permanent = game.getPermanent(sourceId);
    if (permanent != null) {
      paid = permanent.sacrifice(sourceId, game);
    }
    return paid;
  }

  @Override
View Full Code Here

Examples of mage.game.permanent.Permanent.sacrifice()

      perms.addAll(target.getTargets());
    }
    for (UUID permID: perms) {
      Permanent permanent = game.getPermanent(permID);
      if (permanent != null)
        permanent.sacrifice(source.getSourceId(), game);
    }
    return true;
  }

  @Override
View Full Code Here

Examples of mage.game.permanent.Permanent.sacrifice()

  @Override
  public boolean apply(Game game, Ability source) {
    Permanent permanent = game.getPermanent(source.getSourceId());
    if (permanent != null) {
      return permanent.sacrifice(source.getSourceId(), game);
    }
    return false;
  }

  @Override
View Full Code Here

Examples of mage.game.permanent.Permanent.sacrifice()

    Player player = game.getPlayer(source.getControllerId());
    if (target.canChoose(source.getId(), source.getControllerId(), game)) {
      player.choose(this.outcome, target, game);
      Permanent permanent = game.getPermanent(target.getFirstTarget());
      if (permanent != null) {
        return permanent.sacrifice(source.getSourceId(), game);
      }
    }
    Permanent permanent = game.getPermanent(source.getSourceId());
    if (permanent != null) {
      return permanent.sacrifice(source.getSourceId(), game);
View Full Code Here

Examples of mage.game.permanent.Permanent.sacrifice()

        return permanent.sacrifice(source.getSourceId(), game);
      }
    }
    Permanent permanent = game.getPermanent(source.getSourceId());
    if (permanent != null) {
      return permanent.sacrifice(source.getSourceId(), game);
    }
    return false;

  }
View Full Code Here

Examples of mage.game.permanent.Permanent.sacrifice()

      for (UUID targetId: targets.get(0).getTargets()) {
        Permanent permanent = game.getPermanent(targetId);
        if (permanent == null)
          return false;
        permanents.add(permanent.copy());
        paid |= permanent.sacrifice(sourceId, game);
      }
    }
    return paid;
  }
View Full Code Here

Examples of mage.game.permanent.Permanent.sacrifice()

    public boolean apply(Game game, Ability source) {
        int affectedTargets = 0;
        for (UUID permanentId : targetPointer.getTargets(game, source)) {
            Permanent permanent = game.getPermanent(permanentId);
            if (permanent != null) {
                permanent.sacrifice(source.getSourceId(), game);
                affectedTargets++;
            }
        }
        return affectedTargets > 0;
    }
View Full Code Here

Examples of mage.game.permanent.Permanent.sacrifice()

                cost.clearPaid();
                if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false)) {
                    return true;
                }
            }
            permanent.sacrifice(source.getSourceId(), game);
            return true;
        }
        return false;
    }
View Full Code Here

Examples of mage.game.permanent.Permanent.sacrifice()

            }
        }
        for (UUID permID : perms) {
            Permanent permanent = game.getPermanent(permID);
            if (permanent != null) {
                permanent.sacrifice(source.getSourceId(), game);
            }
        }
        return true;
    }
View Full Code Here

Examples of mage.game.permanent.Permanent.sacrifice()

        Permanent permanent = game.getPermanent(source.getSourceId());
        if (player != null && permanent != null) {
            if (condition.apply(game, source)) {
                return true;
            }
            permanent.sacrifice(source.getSourceId(), game);
            return true;
        }
        return false;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.