gen-card.pl some improvements for Planeswalker and split cards.

This commit is contained in:
LevelX2 2017-06-29 17:55:29 +02:00
parent 667d596f43
commit c2d2ab2148
3 changed files with 101 additions and 7 deletions

View file

@ -29,7 +29,11 @@ package mage.cards.[=$cardNameFirstLetter=];
import java.util.UUID;[=
if ($power || $power eq 0) {
$OUT .= "\nimport mage.MageInt;"
if ($planeswalker) {
$OUT .= "\nimport mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility;"
}else {
$OUT .= "\nimport mage.MageInt;"
}
}
=][=$abilitiesImports=]
import mage.cards.CardImpl;
@ -46,8 +50,12 @@ public class [=$className=] extends CardImpl {
super(ownerId, setInfo, new CardType[]{[=$type=]}, "[=$manaCost=]");
[=$subType=][=$colors=][=
if ($power || $power eq 0) {
$OUT .= "\n this.power = new MageInt($power);";
$OUT .= "\n this.toughness = new MageInt($toughness);";
if ($planeswalker) {
$OUT .= "\n this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility($power));";
} else {
$OUT .= "\n this.power = new MageInt($power);";
$OUT .= "\n this.toughness = new MageInt($toughness);";
}
}
=][=$abilities=]
}