mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
Implemented Giant's Skewer
This commit is contained in:
parent
ca518ed7df
commit
c6bacef9ac
2 changed files with 85 additions and 0 deletions
84
Mage.Sets/src/mage/cards/g/GiantsSkewer.java
Normal file
84
Mage.Sets/src/mage/cards/g/GiantsSkewer.java
Normal file
|
@ -0,0 +1,84 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.DamagedCreatureEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.FoodToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class GiantsSkewer extends CardImpl {
|
||||
|
||||
public GiantsSkewer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}{B}");
|
||||
|
||||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
// Equipped creature gets +2/+1.
|
||||
this.addAbility(new SimpleStaticAbility(new BoostEquippedEffect(2, 1)));
|
||||
|
||||
// Whenever equipped creature deals combat damage to a creature, create a Food token.
|
||||
this.addAbility(new GiantsSkewerTriggeredAbility());
|
||||
|
||||
// Equip {3}
|
||||
this.addAbility(new EquipAbility(3));
|
||||
}
|
||||
|
||||
private GiantsSkewer(final GiantsSkewer card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GiantsSkewer copy() {
|
||||
return new GiantsSkewer(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GiantsSkewerTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
GiantsSkewerTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new CreateTokenEffect(new FoodToken()));
|
||||
}
|
||||
|
||||
private GiantsSkewerTriggeredAbility(final GiantsSkewerTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GiantsSkewerTriggeredAbility copy() {
|
||||
return new GiantsSkewerTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.DAMAGED_CREATURE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (!((DamagedCreatureEvent) event).isCombatDamage()) {
|
||||
return false;
|
||||
}
|
||||
Permanent permanent = game.getPermanent(event.getSourceId());
|
||||
return permanent != null && permanent.getAttachments().contains(this.getSourceId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever equipped creature deals combat damage to a creature, create a Food token.";
|
||||
}
|
||||
}
|
|
@ -109,6 +109,7 @@ public final class ThroneOfEldraine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Garruk, Cursed Huntsman", 191, Rarity.MYTHIC, mage.cards.g.GarrukCursedHuntsman.class));
|
||||
cards.add(new SetCardInfo("Giant Killer", 14, Rarity.RARE, mage.cards.g.GiantKiller.class));
|
||||
cards.add(new SetCardInfo("Giant Opportunity", 159, Rarity.UNCOMMON, mage.cards.g.GiantOpportunity.class));
|
||||
cards.add(new SetCardInfo("Giant's Skewer", 91, Rarity.COMMON, mage.cards.g.GiantsSkewer.class));
|
||||
cards.add(new SetCardInfo("Gilded Goose", 160, Rarity.RARE, mage.cards.g.GildedGoose.class));
|
||||
cards.add(new SetCardInfo("Gingerbrute", 219, Rarity.COMMON, mage.cards.g.Gingerbrute.class));
|
||||
cards.add(new SetCardInfo("Glass Casket", 15, Rarity.UNCOMMON, mage.cards.g.GlassCasket.class));
|
||||
|
|
Loading…
Reference in a new issue