Examples of sacrifice()


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;
    }

}
View Full Code Here

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

            if (amount > 0) {
                p.removeCounters(CounterType.FADE.createInstance(), game);
            }
            else
            {
                p.sacrifice(source.getSourceId(), game);
            }
            return true;
        }
        return false;
    }
View Full Code Here

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

        List<UUID> attachments = permanent.getAttachments();
        for (UUID attachmentId : attachments) {
            Permanent attachment = game.getPermanent(attachmentId);
            if (attachment != null && attachment.getName().equals("Blazing Torch")) {
                ((BlazingTorchDamageEffect) ability.getEffects().get(0)).setSourceId(attachmentId);
                paid |= attachment.sacrifice(sourceId, game);
                return paid;
            }
        }
        return paid;
    }
View Full Code Here

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

                }

                // all chosen permanents are sacrificed together
                for (Permanent permanent : game.getBattlefield().getAllActivePermanents()) {
                    if (chosen.contains(permanent)) {
                        permanent.sacrifice(source.getSourceId(), game);
                    }
                }
                return true;
            }
        }
View Full Code Here

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

            Permanent permanent = game.getPermanent(uuid);
            if (permanent == null) {
                permanent = game.getPermanent(equipment.getAttachedTo());
            }
            if (permanent != null) {
                return permanent.sacrifice(source.getSourceId(), game);
            }
        }
        return false;
    }
View Full Code Here

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

                    totalCost.clearPaid();
                    if (totalCost.payOrRollback(source, game, source.getSourceId(), source.getControllerId())){
                        return true;
                    }
                }
                permanent.sacrifice(source.getSourceId(), game);
                return true;   
            }
            else{
                CostsImpl totalCost = new CostsImpl();
                for(int i = 0 ; i < ageCounter; i++){
View Full Code Here

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

                    }
                    else{
                        game.restoreState(bookmark, source.getRule());
                    }
                }
                permanent.sacrifice(source.getSourceId(), game);
                return true;   
            }
           
        }
        return false;
View Full Code Here

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

                    Permanent offer = game.getPermanent(target.getFirstTarget());
                    if (offer != null) {
                        UUID activationId = UUID.randomUUID();
                        OfferingCostReductionEffect effect = new OfferingCostReductionEffect(spellToCast.getSpellAbility().getId(), offer.getSpellAbility().getManaCosts(), activationId);
                        game.addEffect(effect, source);
                        offer.sacrifice(source.getSourceId(), game);
                        game.getState().setValue("offering_ok_" + card.getId(), true);
                        game.getState().setValue("offering_Id_" + card.getId(), activationId);
                        return true;
                      
                    }
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()

        Player player = game.getPlayer(source.getControllerId());
        if (target.canChoose(source.getControllerId(), game)) {
            player.choose(this.outcome, target, source.getSourceId(), 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
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.