mirror of
https://github.com/magefree/mage.git
synced 2026-01-25 12:49:39 -08:00
Implemented Font of Agonies
This commit is contained in:
parent
fb9b69ae9a
commit
6aeedac387
4 changed files with 89 additions and 2 deletions
81
Mage.Sets/src/mage/cards/f/FontOfAgonies.java
Normal file
81
Mage.Sets/src/mage/cards/f/FontOfAgonies.java
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class FontOfAgonies extends CardImpl {
|
||||
|
||||
public FontOfAgonies(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{B}");
|
||||
|
||||
// Whenever you pay life, put that many blood counters on Font of Agonies.
|
||||
this.addAbility(new FontOfAgoniesTriggeredAbility());
|
||||
|
||||
// {1}{B}, Remove four blood counters from Font of Agonies: Destroy target creature.
|
||||
Ability ability = new SimpleActivatedAbility(new DestroyTargetEffect(), new ManaCostsImpl("{1}{B}"));
|
||||
ability.addCost(new RemoveCountersSourceCost(CounterType.BLOOD.createInstance(4)));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private FontOfAgonies(final FontOfAgonies card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FontOfAgonies copy() {
|
||||
return new FontOfAgonies(this);
|
||||
}
|
||||
}
|
||||
|
||||
class FontOfAgoniesTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
FontOfAgoniesTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.BLOOD.createInstance()), false);
|
||||
}
|
||||
|
||||
private FontOfAgoniesTriggeredAbility(final FontOfAgoniesTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FontOfAgoniesTriggeredAbility copy() {
|
||||
return new FontOfAgoniesTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType().equals(GameEvent.EventType.LIFE_PAID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getPlayerId().equals(controllerId) && event.getAmount() > 0) {
|
||||
this.getEffects().clear();
|
||||
this.addEffect(new AddCountersSourceEffect(CounterType.BLOOD.createInstance(event.getAmount())));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever you pay life, put that many blood counters on {this}.";
|
||||
}
|
||||
}
|
||||
|
|
@ -74,6 +74,7 @@ public final class RavnicaAllegiance extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("End-Raze Forerunners", 124, Rarity.RARE, mage.cards.e.EndRazeForerunners.class));
|
||||
cards.add(new SetCardInfo("Essence Capture", 37, Rarity.UNCOMMON, mage.cards.e.EssenceCapture.class));
|
||||
cards.add(new SetCardInfo("Ethereal Absolution", 170, Rarity.RARE, mage.cards.e.EtherealAbsolution.class));
|
||||
cards.add(new SetCardInfo("Font of Agonies", 74, Rarity.RARE, mage.cards.f.FontOfAgonies.class));
|
||||
cards.add(new SetCardInfo("Frenzied Arynx", 173, Rarity.COMMON, mage.cards.f.FrenziedArynx.class));
|
||||
cards.add(new SetCardInfo("Frilled Mystic", 174, Rarity.UNCOMMON, mage.cards.f.FrilledMystic.class));
|
||||
cards.add(new SetCardInfo("Gate Colossus", 232, Rarity.UNCOMMON, mage.cards.g.GateColossus.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue