mirror of
https://github.com/correl/mage.git
synced 2024-12-01 11:09:56 +00:00
updated card generation template for subtype enum
This commit is contained in:
parent
935eefcf01
commit
e27d302e9d
4 changed files with 16 additions and 9 deletions
|
@ -29,6 +29,7 @@ package mage.cards.h;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
|
import mage.constants.SubType;
|
||||||
import mage.abilities.keyword.VigilanceAbility;
|
import mage.abilities.keyword.VigilanceAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
@ -43,7 +44,7 @@ public class HuatlisSnubhorn extends CardImpl {
|
||||||
public HuatlisSnubhorn(UUID ownerId, CardSetInfo setInfo) {
|
public HuatlisSnubhorn(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
|
||||||
|
|
||||||
this.subtype.add("Dinosaur");
|
this.subtype.add(SubType.DINOSAUR);
|
||||||
this.power = new MageInt(2);
|
this.power = new MageInt(2);
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ public class TempleOfAclazotz extends CardImpl {
|
||||||
this.addAbility(new BlackManaAbility());
|
this.addAbility(new BlackManaAbility());
|
||||||
|
|
||||||
// {T}, Sacrifice a creature: You gain life equal to the sacrificed creature’s toughness.
|
// {T}, Sacrifice a creature: You gain life equal to the sacrificed creature’s toughness.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new MirenTheMoallEffect(), new TapSourceCost());
|
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new TempleOfAclazotzEffect(), new TapSourceCost());
|
||||||
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent("a creature"), true)));
|
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent("a creature"), true)));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
@ -77,20 +77,20 @@ public class TempleOfAclazotz extends CardImpl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class MirenTheMoallEffect extends OneShotEffect {
|
class TempleOfAclazotzEffect extends OneShotEffect {
|
||||||
|
|
||||||
public MirenTheMoallEffect() {
|
public TempleOfAclazotzEffect() {
|
||||||
super(Outcome.GainLife);
|
super(Outcome.GainLife);
|
||||||
this.staticText = "You gain life equal to the sacrificed creature's toughness";
|
this.staticText = "You gain life equal to the sacrificed creature's toughness";
|
||||||
}
|
}
|
||||||
|
|
||||||
public MirenTheMoallEffect(final MirenTheMoallEffect effect) {
|
public TempleOfAclazotzEffect(final TempleOfAclazotzEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MirenTheMoallEffect copy() {
|
public TempleOfAclazotzEffect copy() {
|
||||||
return new MirenTheMoallEffect(this);
|
return new TempleOfAclazotzEffect(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -34,6 +34,9 @@ if ($power || $power eq 0) {
|
||||||
}else {
|
}else {
|
||||||
$OUT .= "\nimport mage.MageInt;"
|
$OUT .= "\nimport mage.MageInt;"
|
||||||
}
|
}
|
||||||
|
if ($hasSubTypes eq 'true') {
|
||||||
|
$OUT .="\nimport mage.constants.SubType;"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
=][=$abilitiesImports=]
|
=][=$abilitiesImports=]
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
|
@ -186,6 +186,7 @@ $vars{'toughness'} = $card[7];
|
||||||
my @types;
|
my @types;
|
||||||
$vars{'planeswalker'} = 'false';
|
$vars{'planeswalker'} = 'false';
|
||||||
$vars{'subType'} = '';
|
$vars{'subType'} = '';
|
||||||
|
$vars{'hasSubTypes'} = 'false';
|
||||||
my $cardAbilities = $card[8];
|
my $cardAbilities = $card[8];
|
||||||
my $type = $card[5];
|
my $type = $card[5];
|
||||||
while ($type =~ m/([a-zA-Z]+)( )*/g) {
|
while ($type =~ m/([a-zA-Z]+)( )*/g) {
|
||||||
|
@ -197,7 +198,9 @@ while ($type =~ m/([a-zA-Z]+)( )*/g) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (@types) {
|
if (@types) {
|
||||||
$vars{'subType'} .= "\n this.subtype.add(\"$1\");";
|
my $st = uc($1);
|
||||||
|
$vars{'subType'} .= "\n this.subtype.add(SubType.$st);";
|
||||||
|
$vars{'hasSubTypes'} = 'true';
|
||||||
} else {
|
} else {
|
||||||
my $st = uc($1);
|
my $st = uc($1);
|
||||||
$vars{'subType'} .= "\n addSuperType(SuperType.$st);";
|
$vars{'subType'} .= "\n addSuperType(SuperType.$st);";
|
||||||
|
|
Loading…
Reference in a new issue