mirror of
https://github.com/correl/mage.git
synced 2025-01-12 11:08:01 +00:00
Merge branch 'master' of https://github.com/magefree/mage
This commit is contained in:
commit
80230df2eb
2 changed files with 77 additions and 0 deletions
76
Mage.Sets/src/mage/cards/l/LoafingGiant.java
Normal file
76
Mage.Sets/src/mage/cards/l/LoafingGiant.java
Normal file
|
@ -0,0 +1,76 @@
|
|||
package mage.cards.l;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksOrBlocksTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.PreventCombatDamageBySourceEffect;
|
||||
import mage.abilities.effects.common.combat.CantBeBlockedByAllSourceEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.*;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author noahg
|
||||
*/
|
||||
public final class LoafingGiant extends CardImpl {
|
||||
|
||||
public LoafingGiant(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}");
|
||||
|
||||
this.subtype.add(SubType.GIANT);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(6);
|
||||
|
||||
// Whenever Loafing Giant attacks or blocks, put the top card of your library into your graveyard. If that card is a land card, prevent all combat damage Loafing Giant would deal this turn.
|
||||
this.addAbility(new AttacksOrBlocksTriggeredAbility(new LoafingGiantEffect(), false));
|
||||
}
|
||||
|
||||
public LoafingGiant(final LoafingGiant card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LoafingGiant copy() {
|
||||
return new LoafingGiant(this);
|
||||
}
|
||||
}
|
||||
|
||||
class LoafingGiantEffect extends OneShotEffect {
|
||||
|
||||
public LoafingGiantEffect() {
|
||||
super(Outcome.UnboostCreature);
|
||||
this.staticText = "Put the top card of your library into your graveyard. If that card is a land card, prevent all combat damage {this} would deal this turn.";
|
||||
}
|
||||
|
||||
public LoafingGiantEffect(final LoafingGiantEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LoafingGiantEffect copy() {
|
||||
return new LoafingGiantEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
Card card = player.getLibrary().getFromTop(game);
|
||||
if (card != null) {
|
||||
player.moveCards(card, Zone.GRAVEYARD, source, game);
|
||||
if (card.isLand()) {
|
||||
game.addEffect(new PreventCombatDamageBySourceEffect(Duration.EndOfTurn), source);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -162,6 +162,7 @@ public final class Invasion extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Llanowar Elite", 196, Rarity.COMMON, mage.cards.l.LlanowarElite.class));
|
||||
cards.add(new SetCardInfo("Llanowar Knight", 254, Rarity.COMMON, mage.cards.l.LlanowarKnight.class));
|
||||
cards.add(new SetCardInfo("Llanowar Vanguard", 197, Rarity.COMMON, mage.cards.l.LlanowarVanguard.class));
|
||||
cards.add(new SetCardInfo("Loafing Giant", 153, Rarity.RARE, mage.cards.l.LoafingGiant.class));
|
||||
cards.add(new SetCardInfo("Lobotomy", 255, Rarity.UNCOMMON, mage.cards.l.Lobotomy.class));
|
||||
cards.add(new SetCardInfo("Lotus Guardian", 305, Rarity.RARE, mage.cards.l.LotusGuardian.class));
|
||||
cards.add(new SetCardInfo("Mana Maze", 59, Rarity.RARE, mage.cards.m.ManaMaze.class));
|
||||
|
|
Loading…
Reference in a new issue