mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 19:11:59 -08:00
Implemented Inferno Hellion
This commit is contained in:
parent
1140b7cb37
commit
cf8e80ef1f
2 changed files with 79 additions and 0 deletions
78
Mage.Sets/src/mage/cards/i/InfernoHellion.java
Normal file
78
Mage.Sets/src/mage/cards/i/InfernoHellion.java
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
package mage.cards.i;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.common.ShuffleIntoLibrarySourceEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.game.Game;
|
||||
import mage.watchers.common.AttackedThisTurnWatcher;
|
||||
import mage.watchers.common.BlockedThisTurnWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class InfernoHellion extends CardImpl {
|
||||
|
||||
public InfernoHellion(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
|
||||
|
||||
this.subtype.add(SubType.HELLION);
|
||||
this.power = new MageInt(7);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// At the beginning of each end step, if Inferno Hellion attacked or blocked this turn, its owner shuffles it into their library.
|
||||
Ability ability = new ConditionalTriggeredAbility(
|
||||
new BeginningOfEndStepTriggeredAbility(
|
||||
new ShuffleIntoLibrarySourceEffect(),
|
||||
TargetController.ANY, false
|
||||
),
|
||||
InfernoHellionCondition.instance,
|
||||
"At the beginning of each end step, "
|
||||
+ "if {this} attacked or blocked this turn, "
|
||||
+ "its owner shuffles it into their library."
|
||||
);
|
||||
ability.addWatcher(new AttackedThisTurnWatcher());
|
||||
ability.addWatcher(new BlockedThisTurnWatcher());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public InfernoHellion(final InfernoHellion card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InfernoHellion copy() {
|
||||
return new InfernoHellion(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum InfernoHellionCondition implements Condition {
|
||||
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
AttackedThisTurnWatcher watcherAttacked = (AttackedThisTurnWatcher) game.getState().getWatchers().get(AttackedThisTurnWatcher.class.getSimpleName());
|
||||
BlockedThisTurnWatcher watcherBlocked = (BlockedThisTurnWatcher) game.getState().getWatchers().get(BlockedThisTurnWatcher.class.getSimpleName());
|
||||
MageObjectReference mor = new MageObjectReference(source.getSourceId(), game);
|
||||
if (watcherAttacked == null || watcherBlocked == null) {
|
||||
return false;
|
||||
}
|
||||
return watcherAttacked.getAttackedThisTurnCreatures().contains(mor)
|
||||
|| watcherBlocked.getBlockedThisTurnCreatures().contains(mor);
|
||||
}
|
||||
}
|
||||
|
|
@ -157,6 +157,7 @@ public final class CoreSet2019 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Infectious Horror", 101, Rarity.COMMON, mage.cards.i.InfectiousHorror.class));
|
||||
cards.add(new SetCardInfo("Infernal Reckoning", 102, Rarity.RARE, mage.cards.i.InfernalReckoning.class));
|
||||
cards.add(new SetCardInfo("Infernal Scarring", 103, Rarity.COMMON, mage.cards.i.InfernalScarring.class));
|
||||
cards.add(new SetCardInfo("Inferno Hellion", 148, Rarity.UNCOMMON, mage.cards.i.InfernoHellion.class));
|
||||
cards.add(new SetCardInfo("Inspired Charge", 15, Rarity.COMMON, mage.cards.i.InspiredCharge.class));
|
||||
cards.add(new SetCardInfo("Invoke the Divine", 16, Rarity.COMMON, mage.cards.i.InvokeTheDivine.class));
|
||||
cards.add(new SetCardInfo("Isareth the Awakener", 104, Rarity.RARE, mage.cards.i.IsarethTheAwakener.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue