mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 12:02:01 -08:00
[NEO] Implemented Mobilizer Mech
This commit is contained in:
parent
626486d704
commit
04129c55fa
5 changed files with 103 additions and 0 deletions
|
|
@ -100,6 +100,7 @@ class HeartOfKiranAlternateCrewCost extends CostImpl {
|
|||
if (paid) {
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.CREWED_VEHICLE, target.getFirstTarget(), source, controllerId));
|
||||
}
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.VEHICLE_CREWED, source.getSourceId(), source, controllerId));
|
||||
}
|
||||
|
||||
return paid;
|
||||
|
|
|
|||
94
Mage.Sets/src/mage/cards/m/MobilizerMech.java
Normal file
94
Mage.Sets/src/mage/cards/m/MobilizerMech.java
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.common.continuous.AddCardTypeTargetEffect;
|
||||
import mage.abilities.keyword.CrewAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class MobilizerMech extends CardImpl {
|
||||
|
||||
public MobilizerMech(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}{U}");
|
||||
|
||||
this.subtype.add(SubType.VEHICLE);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Whenever Mobilizer Mech becomes crewed, up to one other target Vehicle you control becomes an artifact creature until end of turn.
|
||||
this.addAbility(new MobilizerMechTriggeredAbility());
|
||||
|
||||
// Crew 3
|
||||
this.addAbility(new CrewAbility(3));
|
||||
}
|
||||
|
||||
private MobilizerMech(final MobilizerMech card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MobilizerMech copy() {
|
||||
return new MobilizerMech(this);
|
||||
}
|
||||
}
|
||||
|
||||
class MobilizerMechTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledPermanent(
|
||||
SubType.VEHICLE, "up to one other Vehicle you control"
|
||||
);
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
MobilizerMechTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new AddCardTypeTargetEffect(Duration.EndOfTurn, CardType.ARTIFACT, CardType.CREATURE));
|
||||
this.addTarget(new TargetPermanent(0,1,filter));
|
||||
}
|
||||
|
||||
private MobilizerMechTriggeredAbility(final MobilizerMechTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MobilizerMechTriggeredAbility copy() {
|
||||
return new MobilizerMechTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.CREWED_VEHICLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
return event.getSourceId().equals(getSourceId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever {this} becomes crewed, up to one other target Vehicle " +
|
||||
"you control becomes an artifact creature until end of turn.";
|
||||
}
|
||||
}
|
||||
|
|
@ -102,6 +102,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Malicious Malfunction", 110, Rarity.UNCOMMON, mage.cards.m.MaliciousMalfunction.class));
|
||||
cards.add(new SetCardInfo("Memory of Toshiro", 108, Rarity.UNCOMMON, mage.cards.m.MemoryOfToshiro.class));
|
||||
cards.add(new SetCardInfo("Michiko's Reign of Truth", 29, Rarity.UNCOMMON, mage.cards.m.MichikosReignOfTruth.class));
|
||||
cards.add(new SetCardInfo("Mobilizer Mech", 65, Rarity.UNCOMMON, mage.cards.m.MobilizerMech.class));
|
||||
cards.add(new SetCardInfo("Moon-Circuit Hacker", 67, Rarity.COMMON, mage.cards.m.MoonCircuitHacker.class));
|
||||
cards.add(new SetCardInfo("Mountain", 289, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Nameless Conqueror", 162, Rarity.COMMON, mage.cards.n.NamelessConqueror.class));
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ class CrewCost extends CostImpl {
|
|||
for (UUID targetId : target.getTargets()) {
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.CREWED_VEHICLE, targetId, source, controllerId));
|
||||
}
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.VEHICLE_CREWED, source.getSourceId(), source, controllerId));
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -148,6 +148,12 @@ public class GameEvent implements Serializable {
|
|||
sourceId sourceId of the vehicle
|
||||
playerId the id of the controlling player
|
||||
*/
|
||||
VEHICLE_CREWED,
|
||||
/* VEHICLE_CREWED
|
||||
targetId the id of the vehicle
|
||||
sourceId sourceId of the vehicle
|
||||
playerId the id of the controlling player
|
||||
*/
|
||||
X_MANA_ANNOUNCE,
|
||||
/* X_MANA_ANNOUNCE
|
||||
mana x-costs announced by players (X value can be changed by replace events like Unbound Flourishing)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue