mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
Implemented Glint-Horn Buccaneer
This commit is contained in:
parent
53f3b133e6
commit
b218f70d8b
2 changed files with 93 additions and 0 deletions
92
Mage.Sets/src/mage/cards/g/GlintHornBuccaneer.java
Normal file
92
Mage.Sets/src/mage/cards/g/GlintHornBuccaneer.java
Normal file
|
@ -0,0 +1,92 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.condition.common.SourceAttackingCondition;
|
||||
import mage.abilities.costs.common.DiscardCardCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
import mage.abilities.effects.common.DamagePlayersEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class GlintHornBuccaneer extends CardImpl {
|
||||
|
||||
public GlintHornBuccaneer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{R}");
|
||||
|
||||
this.subtype.add(SubType.MINOTAUR);
|
||||
this.subtype.add(SubType.PIRATE);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Haste
|
||||
this.addAbility(HasteAbility.getInstance());
|
||||
|
||||
// Whenever you discard a card, Glint-Horn Buccaneer deals 1 damage to each opponent.
|
||||
this.addAbility(new GlintHornBuccaneerTriggeredAbility());
|
||||
|
||||
// {1}{R}, Discard a card: Draw a card. Activate this ability only if Glint-Horn Buccaneer is attacking.
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1),
|
||||
new ManaCostsImpl("{1}{R}"), SourceAttackingCondition.instance
|
||||
);
|
||||
ability.addCost(new DiscardCardCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private GlintHornBuccaneer(final GlintHornBuccaneer card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GlintHornBuccaneer copy() {
|
||||
return new GlintHornBuccaneer(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GlintHornBuccaneerTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
GlintHornBuccaneerTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new DamagePlayersEffect(1, TargetController.OPPONENT), false);
|
||||
}
|
||||
|
||||
private GlintHornBuccaneerTriggeredAbility(final GlintHornBuccaneerTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GlintHornBuccaneerTriggeredAbility copy() {
|
||||
return new GlintHornBuccaneerTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.DISCARDED_CARD;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
return isControlledBy(event.getPlayerId());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever you discard a card, " + super.getRule();
|
||||
}
|
||||
}
|
|
@ -146,6 +146,7 @@ public final class CoreSet2020 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Fry", 140, Rarity.UNCOMMON, mage.cards.f.Fry.class));
|
||||
cards.add(new SetCardInfo("Gift of Paradise", 173, Rarity.COMMON, mage.cards.g.GiftOfParadise.class));
|
||||
cards.add(new SetCardInfo("Glaring Aegis", 18, Rarity.COMMON, mage.cards.g.GlaringAegis.class));
|
||||
cards.add(new SetCardInfo("Glint-Horn Buccaneer", 141, Rarity.RARE, mage.cards.g.GlintHornBuccaneer.class));
|
||||
cards.add(new SetCardInfo("Gnarlback Rhino", 300, Rarity.UNCOMMON, mage.cards.g.GnarlbackRhino.class));
|
||||
cards.add(new SetCardInfo("Goblin Bird-Grabber", 142, Rarity.COMMON, mage.cards.g.GoblinBirdGrabber.class));
|
||||
cards.add(new SetCardInfo("Goblin Ringleader", 143, Rarity.UNCOMMON, mage.cards.g.GoblinRingleader.class));
|
||||
|
|
Loading…
Reference in a new issue