mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
gen-card.pl some improvements for Planeswalker and split cards.
This commit is contained in:
parent
667d596f43
commit
c2d2ab2148
3 changed files with 101 additions and 7 deletions
|
|
@ -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=]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue