mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 20:11:59 -08:00
[FIN] Implement Cargo Ship
This commit is contained in:
parent
0b362bf14a
commit
de49c76e3b
2 changed files with 87 additions and 0 deletions
86
Mage.Sets/src/mage/cards/c/CargoShip.java
Normal file
86
Mage.Sets/src/mage/cards/c/CargoShip.java
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.ConditionalMana;
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.keyword.CrewAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.abilities.mana.ConditionalColorlessManaAbility;
|
||||
import mage.abilities.mana.builder.ConditionalManaBuilder;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class CargoShip extends CardImpl {
|
||||
|
||||
public CargoShip(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}{U}");
|
||||
|
||||
this.subtype.add(SubType.VEHICLE);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Vigilance
|
||||
this.addAbility(VigilanceAbility.getInstance());
|
||||
|
||||
// {T}: Add {C}. Spend this mana only to cast an artifact spell or activate an ability of an artifact source.
|
||||
this.addAbility(new ConditionalColorlessManaAbility(1, new CargoShipManaBuilder()));
|
||||
|
||||
// Crew 1
|
||||
this.addAbility(new CrewAbility(1));
|
||||
}
|
||||
|
||||
private CargoShip(final CargoShip card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CargoShip copy() {
|
||||
return new CargoShip(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CargoShipManaBuilder extends ConditionalManaBuilder {
|
||||
|
||||
@Override
|
||||
public ConditionalMana build(Object... options) {
|
||||
return new CargoShipConditionalMana(this.mana);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Spend this mana only to cast an artifact spell or activate an ability of an artifact source";
|
||||
}
|
||||
}
|
||||
|
||||
class CargoShipConditionalMana extends ConditionalMana {
|
||||
|
||||
CargoShipConditionalMana(Mana mana) {
|
||||
super(mana);
|
||||
addCondition(CargoShipCondition.instance);
|
||||
}
|
||||
}
|
||||
|
||||
enum CargoShipCondition implements Condition {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
MageObject object = game.getObject(source);
|
||||
return object != null && object.isArtifact(game) && !source.isActivated();
|
||||
}
|
||||
}
|
||||
|
|
@ -70,6 +70,7 @@ public final class FinalFantasy extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Buster Sword", 255, Rarity.MYTHIC, mage.cards.b.BusterSword.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Buster Sword", 351, Rarity.MYTHIC, mage.cards.b.BusterSword.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Capital City", 274, Rarity.UNCOMMON, mage.cards.c.CapitalCity.class));
|
||||
cards.add(new SetCardInfo("Cargo Ship", 47, Rarity.UNCOMMON, mage.cards.c.CargoShip.class));
|
||||
cards.add(new SetCardInfo("Cecil, Dark Knight", 380, Rarity.RARE, mage.cards.c.CecilDarkKnight.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Cecil, Dark Knight", 445, Rarity.RARE, mage.cards.c.CecilDarkKnight.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Cecil, Dark Knight", 525, Rarity.RARE, mage.cards.c.CecilDarkKnight.class, NON_FULL_USE_VARIOUS));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue