Examples of addPower()


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

        int affectedTargets = 0;
        UUID permanentId = targetPointer.getFirst(game, source);

        Permanent target = game.getPermanent(permanentId);
        if (target != null) {
            target.addPower(power);
            target.addToughness(toughness);
            affectedTargets++;
        }

        if (this.paired != null) {
View Full Code Here

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

        }

        if (this.paired != null) {
            Permanent paired = game.getPermanent(this.paired);
            if (paired != null) {
                paired.addPower(power);
                paired.addToughness(toughness);
                affectedTargets++;
            }
        }
View Full Code Here

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

    @Override
    public boolean apply(Game game, Ability source) {
        Permanent permanent = game.getPermanent(source.getFirstTarget());
        if (permanent != null) {
            permanent.addPower(1);
            permanent.addToughness(1);
        }
        permanent = game.getPermanent(source.getTargets().get(0).getTargets().get(1));
        if (permanent != null) {
            permanent.addPower(-1);
View Full Code Here

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

            permanent.addPower(1);
            permanent.addToughness(1);
        }
        permanent = game.getPermanent(source.getTargets().get(0).getTargets().get(1));
        if (permanent != null) {
            permanent.addPower(-1);
            permanent.addToughness(-1);
        }
        return true;
    }
}
View Full Code Here

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

        public boolean apply(Game game, Ability source) {
            int count = game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game) - 1;
            if (count > 0) {
                Permanent target = (Permanent) game.getPermanent(source.getSourceId());
                if (target != null) {
                    target.addPower(count);
                    target.addToughness(count);
                    return true;
                }
            }
            return false;
View Full Code Here

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

        Permanent equipment = game.getPermanent(source.getSourceId());
        if (amount != null && amount > 0 && equipment != null && equipment.getAttachedTo() != null) {
            Permanent creature = game.getPermanent(equipment.getAttachedTo());
            if (creature != null) {
                creature.addPower(amount);
                return true;
            }
        }

        return false;
View Full Code Here

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

    public boolean apply(Game game, Ability source) {
        Watcher watcher = game.getState().getWatchers().get("LandPlayed", source.getControllerId());
        Permanent target = (Permanent) game.getPermanent(source.getFirstTarget());
        if (target != null) {
            if (watcher != null && watcher.conditionMet()) {
                target.addPower(4);
                target.addToughness(4);
            }
            else{
                target.addPower(2);
                target.addToughness(2);
View Full Code Here

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

            if (watcher != null && watcher.conditionMet()) {
                target.addPower(4);
                target.addToughness(4);
            }
            else{
                target.addPower(2);
                target.addToughness(2);
            }
            return true;
        }
        return false;
View Full Code Here

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

@Override
public boolean apply(Game game, Ability source){
    Permanent target = game.getPermanent(source.getFirstTarget());
    if (target != null) {
        MageInt power = target.getPower();
        target.addPower(power.getValue());
        target.addToughness(power.getValue());
    }
    return true;
}
View Full Code Here

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

        public boolean apply(Game game, Ability source) {
            int count = game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game) - 1;
            if (count > 0) {
                Permanent target = (Permanent) game.getPermanent(source.getSourceId());
                if (target != null) {
                    target.addPower(count);
                    target.addToughness(count);
                    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.