mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
[DFT] Implement Lifecraft Engine (#13294)
This commit is contained in:
parent
145bda842b
commit
78fa8e1cb0
2 changed files with 102 additions and 0 deletions
101
Mage.Sets/src/mage/cards/l/LifecraftEngine.java
Normal file
101
Mage.Sets/src/mage/cards/l/LifecraftEngine.java
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
package mage.cards.l;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AsEntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.common.ChooseCreatureTypeEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostAllOfChosenSubtypeEffect;
|
||||
import mage.abilities.keyword.CrewAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author jackd149
|
||||
*/
|
||||
public final class LifecraftEngine extends CardImpl {
|
||||
|
||||
public LifecraftEngine(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||
|
||||
this.subtype.add(SubType.VEHICLE);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// As this Vehicle enters, choose a creature type.
|
||||
this.addAbility(new AsEntersBattlefieldAbility(new ChooseCreatureTypeEffect(Outcome.BoostCreature)));
|
||||
|
||||
// Vehicle creatures you control are the chosen creature type in addition to their other types.
|
||||
this.addAbility(new SimpleStaticAbility(new LifecraftEngineAddSubTypeAllEffect()));
|
||||
|
||||
// Each creature you control of the chosen type other than this Vehicle gets +1/+1.
|
||||
BoostAllOfChosenSubtypeEffect effect = new BoostAllOfChosenSubtypeEffect(1, 1, Duration.WhileOnBattlefield, StaticFilters.FILTER_PERMANENT_CREATURE_CONTROLLED, true);
|
||||
effect.setText("Each creature you control of the chosen type other than this Vehicle gets +1/+1.");
|
||||
this.addAbility(new SimpleStaticAbility(effect));
|
||||
|
||||
// Crew 3
|
||||
this.addAbility(new CrewAbility(3));
|
||||
}
|
||||
|
||||
private LifecraftEngine(final LifecraftEngine card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LifecraftEngine copy() {
|
||||
return new LifecraftEngine(this);
|
||||
}
|
||||
}
|
||||
|
||||
class LifecraftEngineAddSubTypeAllEffect extends ContinuousEffectImpl {
|
||||
|
||||
static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.add(SubType.VEHICLE.getPredicate());
|
||||
}
|
||||
|
||||
public LifecraftEngineAddSubTypeAllEffect() {
|
||||
super(Duration.WhileOnBattlefield, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Benefit);
|
||||
|
||||
staticText = "Vehicle creatures you control are the chosen type in addition to their other types.";
|
||||
}
|
||||
|
||||
private LifecraftEngineAddSubTypeAllEffect(final LifecraftEngineAddSubTypeAllEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LifecraftEngineAddSubTypeAllEffect copy() {
|
||||
return new LifecraftEngineAddSubTypeAllEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
UUID controllerId = source.getControllerId();
|
||||
Player controller = game.getPlayer(controllerId);
|
||||
SubType subType = ChooseCreatureTypeEffect.getChosenCreatureType(source.getSourceId(), game);
|
||||
if (controller == null || subType == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
List<Permanent> creatures = game.getBattlefield().getAllActivePermanents(
|
||||
filter, controllerId, game);
|
||||
for (Permanent creature : creatures) {
|
||||
if (creature != null) {
|
||||
creature.addSubType(game, subType);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -133,6 +133,7 @@ public final class Aetherdrift extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Kickoff Celebrations", 135, Rarity.COMMON, mage.cards.k.KickoffCelebrations.class));
|
||||
cards.add(new SetCardInfo("Lagorin, Soul of Alacria", 211, Rarity.UNCOMMON, mage.cards.l.LagorinSoulOfAlacria.class));
|
||||
cards.add(new SetCardInfo("Leonin Surveyor", 18, Rarity.COMMON, mage.cards.l.LeoninSurveyor.class));
|
||||
cards.add(new SetCardInfo("Lifecraft Engine", 234, Rarity.RARE, mage.cards.l.LifecraftEngine.class));
|
||||
cards.add(new SetCardInfo("Lightning Strike", 136, Rarity.COMMON, mage.cards.l.LightningStrike.class));
|
||||
cards.add(new SetCardInfo("Lightshield Parry", 19, Rarity.COMMON, mage.cards.l.LightshieldParry.class));
|
||||
cards.add(new SetCardInfo("Lightwheel Enhancements", 20, Rarity.COMMON, mage.cards.l.LightwheelEnhancements.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue