Examples of gainLife()


Examples of mage.players.Player.gainLife()

            Player player = game.getPlayer(damageEvent.getPlayerId());
            Permanent damageSource = game.getPermanent(damageEvent.getSourceId());
            player.addCounters(CounterType.POISON.createInstance(actualDamage), game);
            if (damageSource != null && damageSource.getAbilities().containsKey(LifelinkAbility.getInstance().getId())) {
                Player controlPlayer = game.getPlayer(damageSource.getControllerId());
                controlPlayer.gainLife(actualDamage, game);
            }
            game.fireEvent(new DamagedPlayerEvent(damageEvent.getPlayerId(), damageEvent.getSourceId(), damageEvent.getPlayerId(), actualDamage, damageEvent.isCombatDamage()));
        }
        return true;
    }
View Full Code Here

Examples of mage.players.Player.gainLife()

                if (targetCreature != null && !targetCreature.getControllerId().equals(source.getControllerId())) {
                    int amountLife = targetCreature.getPower().getValue();
                    Player controller = game.getPlayer(targetCreature.getControllerId());
                    targetCreature.moveToExile(null, null, source.getSourceId(), game);
                    if (controller != null && amountLife != 0) {
                        controller.gainLife(amountLife, game);
                    }
                }
            }
        }
        return true;
View Full Code Here

Examples of mage.players.Player.gainLife()

        int amount = 2 + (numberSpirits * 2);
        Player targetPlayer = game.getPlayer(getTargetPointer().getFirst(game, source));
        Player sourcePlayer = game.getPlayer(source.getControllerId());
        if (targetPlayer != null && sourcePlayer != null) {
            targetPlayer.loseLife(amount, game);
            sourcePlayer.gainLife(amount, game);
            return true;
        }
        return false;
    }
}
View Full Code Here

Examples of mage.players.Player.gainLife()

            else {
                break;
            }
        }
        if (tappedAmount > 0) {
            you.gainLife(tappedAmount * 2, game);
            return true;
        }
        return false;
    }

View Full Code Here

Examples of mage.players.Player.gainLife()

    @Override
    public boolean apply(Game game, Ability source) {
        int amount = game.getBattlefield().countAll(new FilterCreaturePermanent(), source.getControllerId(), game);
        Player player = game.getPlayer(source.getControllerId());
        if (player != null) {
            player.gainLife(amount, game);
        }
        return true;
    }

    @Override
View Full Code Here

Examples of mage.players.Player.gainLife()

    @Override
    public boolean apply(Game game, Ability source) {
        Player player = game.getPlayer(source.getControllerId());
        if (player != null) {
            player.gainLife((Integer) this.getValue("damageAmount"), game);
        }
        return true;
    }

View Full Code Here

Examples of mage.players.Player.gainLife()

            if (card.getCardType().contains(CardType.LAND)) {
                player.getLibrary().getCard(card.getId(), game);
                card.putOntoBattlefield(game, Zone.LIBRARY, source.getSourceId(), source.getControllerId());
            }
            if (!card.getCardType().contains(CardType.CREATURE) && !card.getCardType().contains(CardType.LAND)) {
                player.gainLife(2, game);
            }

            Cards cards = new CardsImpl();
            cards.add(card);
            player.revealCards("Druidic Satchel", cards, game);
View Full Code Here

Examples of mage.players.Player.gainLife()

        Permanent permanent = game.getPermanentOrLKIBattlefield(this.getTargetPointer().getFirst(game, source));
        if (permanent != null) {
            int power = permanent.getPower().getValue();
            Player player = game.getPlayer(source.getControllerId());
            if (player != null) {
                player.gainLife(power, game);
            }
            return true;
        }
        return false;
    }
View Full Code Here

Examples of mage.players.Player.gainLife()

    @Override
    public boolean apply(Game game, Ability source) {
        int amount = game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game);
        Player player = game.getPlayer(source.getControllerId());
        if (player != null) {
            player.gainLife(amount, game);
            return true;
        }
        return false;
    }
View Full Code Here

Examples of mage.players.Player.gainLife()

        if (card != null) {
            Permanent creature = (Permanent) game.getLastKnownInformation(card.getId(), Zone.BATTLEFIELD);
            if (creature != null) {
                int toughness = creature.getToughness().getValue();
                if (you != null) {
                    you.gainLife(toughness, 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.