Examples of addPower()


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

    @Override
    public boolean apply(Game game, Ability source) {
        Permanent permanent = game.getPermanent(source.getSourceId());
        if (permanent != null) {
            int power = permanent.getPower().getValue();
            permanent.addPower(power);
            permanent.addToughness(power);
            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) {
            target.addPower(amount);
            target.addToughness(amount);
            return true;
        }
        return false;
    }
View Full Code Here

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

            Permanent creature = game.getPermanent(enchantment.getAttachedTo());
            if (creature != null) {
                switch (layer) {
                    case PTChangingEffects_7:
                        if (sublayer == SubLayer.ModifyPT_7c) {
                            creature.addPower(2);
                            creature.addToughness(2);
                        }
                        break;
                    case AbilityAddingRemovingEffects_6:
                        if (sublayer == SubLayer.NA) {
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(2);
            permanent.addToughness(2);
        }
        permanent = game.getPermanent(source.getTargets().get(0).getTargets().get(1));
        if (permanent != null) {
            permanent.addPower(-2);
View Full Code Here

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

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

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

        Permanent creature = game.getPermanent(enchantment.getAttachedTo());
        if (creature != null) {
            switch (layer) {
                case PTChangingEffects_7:
                    if (sublayer == SubLayer.ModifyPT_7c) {
                        creature.addPower(3);
                        creature.addToughness(3);
                    }
                    break;
            }
            return true;
View Full Code Here

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

        if (count > 0) {
            Permanent enchantment = game.getPermanent(source.getSourceId());
            if (enchantment != null && enchantment.getAttachedTo() != null) {
                Permanent creature = game.getPermanent(enchantment.getAttachedTo());
                if (creature != null) {
                    creature.addPower(count);
                    creature.addToughness(count);
                    return true;
                }
            }
        }
View Full Code Here

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

        Permanent creature = game.getPermanent(enchantment.getAttachedTo());
        if (creature != null) {
            switch (layer) {
                case PTChangingEffects_7:
                    if (sublayer == SubLayer.ModifyPT_7c) {
                        creature.addPower(-2);
                        creature.addToughness(-1);
                    }
                    break;
            }
            return true;
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(3);
            permanent.addToughness(3);
        }
        permanent = game.getPermanent(source.getTargets().get(0).getTargets().get(1));
        if (permanent != null) {
            permanent.addPower(-3);
View Full Code Here

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

            permanent.addPower(3);
            permanent.addToughness(3);
        }
        permanent = game.getPermanent(source.getTargets().get(0).getTargets().get(1));
        if (permanent != null) {
            permanent.addPower(-3);
            permanent.addToughness(-3);
        }
        return true;
    }
}
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.