mirror of
https://github.com/correl/mage.git
synced 2024-11-14 19:19:32 +00:00
[LTR] Implement Eastfarthing Farmer
This commit is contained in:
parent
7b6384f9c6
commit
15188d7ba7
2 changed files with 83 additions and 0 deletions
82
Mage.Sets/src/mage/cards/e/EastfarthingFarmer.java
Normal file
82
Mage.Sets/src/mage/cards/e/EastfarthingFarmer.java
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
package mage.cards.e;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.common.delayed.ReflexiveTriggeredAbility;
|
||||||
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
|
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.filter.common.FilterControlledPermanent;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.token.FoodToken;
|
||||||
|
import mage.target.common.TargetControlledCreaturePermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class EastfarthingFarmer extends CardImpl {
|
||||||
|
|
||||||
|
public EastfarthingFarmer(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.HALFLING);
|
||||||
|
this.subtype.add(SubType.PEASANT);
|
||||||
|
this.power = new MageInt(2);
|
||||||
|
this.toughness = new MageInt(3);
|
||||||
|
|
||||||
|
// When Eastfarthing Farmer enters the battlefield, create a Food token. When you do, target creature you control gets +1/+1 until end of turn for each Food you control.
|
||||||
|
this.addAbility(new EntersBattlefieldTriggeredAbility(new EastfarthingFarmerEffect()));
|
||||||
|
}
|
||||||
|
|
||||||
|
private EastfarthingFarmer(final EastfarthingFarmer card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EastfarthingFarmer copy() {
|
||||||
|
return new EastfarthingFarmer(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class EastfarthingFarmerEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(new FilterControlledPermanent(SubType.FOOD), 1);
|
||||||
|
|
||||||
|
EastfarthingFarmerEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "create a Food token. When you do, target creature " +
|
||||||
|
"you control gets +1/+1 until end of turn for each Food you control";
|
||||||
|
}
|
||||||
|
|
||||||
|
private EastfarthingFarmerEffect(final EastfarthingFarmerEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EastfarthingFarmerEffect copy() {
|
||||||
|
return new EastfarthingFarmerEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
if (!new FoodToken().putOntoBattlefield(1, game, source)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
ReflexiveTriggeredAbility ability = new ReflexiveTriggeredAbility(
|
||||||
|
new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn), false
|
||||||
|
);
|
||||||
|
ability.addTarget(new TargetControlledCreaturePermanent());
|
||||||
|
game.fireReflexiveTriggeredAbility(ability, source);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
|
@ -34,6 +34,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Dunland Crebain", 82, Rarity.COMMON, mage.cards.d.DunlandCrebain.class));
|
cards.add(new SetCardInfo("Dunland Crebain", 82, Rarity.COMMON, mage.cards.d.DunlandCrebain.class));
|
||||||
cards.add(new SetCardInfo("Dunedain Blade", 6, Rarity.COMMON, mage.cards.d.DunedainBlade.class));
|
cards.add(new SetCardInfo("Dunedain Blade", 6, Rarity.COMMON, mage.cards.d.DunedainBlade.class));
|
||||||
cards.add(new SetCardInfo("Easterling Vanguard", 83, Rarity.COMMON, mage.cards.e.EasterlingVanguard.class));
|
cards.add(new SetCardInfo("Easterling Vanguard", 83, Rarity.COMMON, mage.cards.e.EasterlingVanguard.class));
|
||||||
|
cards.add(new SetCardInfo("Eastfarthing Farmer", 8, Rarity.COMMON, mage.cards.e.EastfarthingFarmer.class));
|
||||||
cards.add(new SetCardInfo("Fire of Orthanc", 127, Rarity.COMMON, mage.cards.f.FireOfOrthanc.class));
|
cards.add(new SetCardInfo("Fire of Orthanc", 127, Rarity.COMMON, mage.cards.f.FireOfOrthanc.class));
|
||||||
cards.add(new SetCardInfo("Foray of Orcs", 128, Rarity.UNCOMMON, mage.cards.f.ForayOfOrcs.class));
|
cards.add(new SetCardInfo("Foray of Orcs", 128, Rarity.UNCOMMON, mage.cards.f.ForayOfOrcs.class));
|
||||||
cards.add(new SetCardInfo("Forest", 270, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Forest", 270, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
|
||||||
|
|
Loading…
Reference in a new issue