mirror of
https://github.com/correl/mage.git
synced 2024-11-28 19:19:55 +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 mage.MageInt;
|
||||
import mage.constants.SubType;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
@ -43,7 +44,7 @@ public class HuatlisSnubhorn extends CardImpl {
|
|||
public HuatlisSnubhorn(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
|
||||
|
||||
this.subtype.add("Dinosaur");
|
||||
this.subtype.add(SubType.DINOSAUR);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ public class TempleOfAclazotz extends CardImpl {
|
|||
this.addAbility(new BlackManaAbility());
|
||||
|
||||
// {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)));
|
||||
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);
|
||||
this.staticText = "You gain life equal to the sacrificed creature's toughness";
|
||||
}
|
||||
|
||||
public MirenTheMoallEffect(final MirenTheMoallEffect effect) {
|
||||
public TempleOfAclazotzEffect(final TempleOfAclazotzEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MirenTheMoallEffect copy() {
|
||||
return new MirenTheMoallEffect(this);
|
||||
public TempleOfAclazotzEffect copy() {
|
||||
return new TempleOfAclazotzEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -34,6 +34,9 @@ if ($power || $power eq 0) {
|
|||
}else {
|
||||
$OUT .= "\nimport mage.MageInt;"
|
||||
}
|
||||
if ($hasSubTypes eq 'true') {
|
||||
$OUT .="\nimport mage.constants.SubType;"
|
||||
}
|
||||
}
|
||||
=][=$abilitiesImports=]
|
||||
import mage.cards.CardImpl;
|
||||
|
|
|
@ -186,6 +186,7 @@ $vars{'toughness'} = $card[7];
|
|||
my @types;
|
||||
$vars{'planeswalker'} = 'false';
|
||||
$vars{'subType'} = '';
|
||||
$vars{'hasSubTypes'} = 'false';
|
||||
my $cardAbilities = $card[8];
|
||||
my $type = $card[5];
|
||||
while ($type =~ m/([a-zA-Z]+)( )*/g) {
|
||||
|
@ -197,7 +198,9 @@ while ($type =~ m/([a-zA-Z]+)( )*/g) {
|
|||
}
|
||||
} else {
|
||||
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 {
|
||||
my $st = uc($1);
|
||||
$vars{'subType'} .= "\n addSuperType(SuperType.$st);";
|
||||
|
|
Loading…
Reference in a new issue