mirror of
https://github.com/correl/mage.git
synced 2025-01-07 11:08:44 +00:00
[LTC] Implement Frodo, Adventurous Hobbit
This commit is contained in:
parent
31b2bf5ebb
commit
8c2fcefaeb
2 changed files with 83 additions and 0 deletions
82
Mage.Sets/src/mage/cards/f/FrodoAdventurousHobbit.java
Normal file
82
Mage.Sets/src/mage/cards/f/FrodoAdventurousHobbit.java
Normal file
|
@ -0,0 +1,82 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.SourceIsRingBearerCondition;
|
||||
import mage.abilities.condition.common.YouGainedLifeCondition;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.keyword.TheRingTemptsYouEffect;
|
||||
import mage.abilities.keyword.PartnerWithAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.game.Game;
|
||||
import mage.watchers.common.PlayerGainedLifeWatcher;
|
||||
import mage.watchers.common.TemptedByTheRingWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class FrodoAdventurousHobbit extends CardImpl {
|
||||
|
||||
private static final Condition condition = new YouGainedLifeCondition(ComparisonType.MORE_THAN, 2);
|
||||
|
||||
public FrodoAdventurousHobbit(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}{B}");
|
||||
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.HALFLING);
|
||||
this.subtype.add(SubType.SCOUT);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Partner with Sam, Loyal Attendant
|
||||
this.addAbility(new PartnerWithAbility("Sam, Loyal Attendant"));
|
||||
|
||||
// Vigilance
|
||||
this.addAbility(VigilanceAbility.getInstance());
|
||||
|
||||
// Whenever Frodo, Adventurous Hobbit attacks, if you gained 3 or more life this turn, the Ring tempts you. Then if Frodo is your Ring-bearer and the Ring has tempted you two or more times this game, draw a card.
|
||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
||||
new AttacksTriggeredAbility(new TheRingTemptsYouEffect()),
|
||||
condition, "Whenever {this} attacks, if you gained 3 or more life this turn, " +
|
||||
"the Ring tempts you. Then if {this} is your Ring-bearer and the Ring " +
|
||||
"has tempted you two or more times this game, draw a card."
|
||||
);
|
||||
ability.addEffect(new ConditionalOneShotEffect(
|
||||
new DrawCardSourceControllerEffect(1),
|
||||
FrodoAdventurousHobbitCondition.instance
|
||||
));
|
||||
this.addAbility(ability.addHint(ControllerGotLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
||||
}
|
||||
|
||||
private FrodoAdventurousHobbit(final FrodoAdventurousHobbit card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FrodoAdventurousHobbit copy() {
|
||||
return new FrodoAdventurousHobbit(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum FrodoAdventurousHobbitCondition implements Condition {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return SourceIsRingBearerCondition.instance.apply(game, source)
|
||||
&& TemptedByTheRingWatcher.getCount(source.getControllerId(), game) >= 2;
|
||||
}
|
||||
}
|
|
@ -94,6 +94,7 @@ public final class TalesOfMiddleEarthCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Foreboding Ruins", 310, Rarity.RARE, mage.cards.f.ForebodingRuins.class));
|
||||
cards.add(new SetCardInfo("Forth Eorlingas!", 56, Rarity.RARE, mage.cards.f.ForthEorlingas.class));
|
||||
cards.add(new SetCardInfo("Fortified Village", 311, Rarity.RARE, mage.cards.f.FortifiedVillage.class));
|
||||
cards.add(new SetCardInfo("Frodo, Adventurous Hobbit", 2, Rarity.MYTHIC, mage.cards.f.FrodoAdventurousHobbit.class));
|
||||
cards.add(new SetCardInfo("Frontier Warmonger", 217, Rarity.RARE, mage.cards.f.FrontierWarmonger.class));
|
||||
cards.add(new SetCardInfo("Frontline Medic", 169, Rarity.RARE, mage.cards.f.FrontlineMedic.class));
|
||||
cards.add(new SetCardInfo("Frostboil Snarl", 312, Rarity.RARE, mage.cards.f.FrostboilSnarl.class));
|
||||
|
|
Loading…
Reference in a new issue