mage/Utils/cardClass.tmpl

52 lines
1.3 KiB
Cheetah
Raw Normal View History

2016-10-18 04:45:47 +00:00
package mage.cards.[=$cardNameFirstLetter=];
2010-11-24 13:54:31 +00:00
import java.util.UUID;[=
2011-07-25 19:27:27 +00:00
if ($power || $power eq 0) {
Ready for Review: Implementing Battles (#10156) * add types and subtypes * add startingDefense attribute * [MOM] Implement Invasion of Ravnica / Guildpact Paragon * fix two small errors * refactor various instances of "any target" * fully implement defense counters * battles can now be attacked * [MOM] Implement Invasion of Dominaria / Serra Faithkeeper * [MOM] Implement Invasion of Innistrad / Deluge of the Dead * [MOM] Implement Invasion of Kaladesh / Aetherwing, Golden-Scale Flagship * [MOM] Implement Invasion of Kamigawa / Rooftop Saboteurs * [MOM] Implement Invasion of Karsus / Refraction Elemental * [MOM] Implement Invasion of Tolvada / The Broken Sky * simplify battle info ability * fix verify failure * some more fixes for attacking battles * [MOM] Implement Invasion of Kaldheim / Pyre of the World Tree * [MOM] Implement Invasion of Lorwyn / Winnowing Forces * [MOM] Implement Invasion of Moag / Bloomwielder Dryads * [MOM] Implement Invasion of Shandalar / Leyline Surge * [MOM] Implement Invasion of Belenon / Belenon War Anthem * [MOM] Implement Invasion of Pyrulea / Gargantuan Slabhorn * [MOM] Implement Invasion of Vryn / Overloaded Mage-Ring * [MOM] Implement Marshal of Zhalfir * [MOM] Implement Sunfall * implement protectors for sieges * partially implement siege defeated trigger * fix verify failure * some updates to blocking * [MOM] Implement Invasion of Mercadia / Kyren Flamewright * [MOM] Implement Invasion of Theros / Ephara, Ever-Sheltering * [MOM] Implement Invasion of Ulgrotha / Grandmother Ravi Sengir * [MOM] Implement Invasion of Xerex / Vertex Paladin * add initial battle test * fix verify failure * [MOM] Implement Invasion of Amonkhet / Lazotep Convert * [MOM] update spoiler * update how protectors are chosen * update text * battles can't block * add control change test * rename battle test for duel * add multiplayer test * [MOM] Implement Invasion of Alara / Awaken the Maelstrom * [MOM] Implement Invasion of Eldraine * [MOM] Implement Invasion of Ergamon / Truga Cliffhanger * [MOM] Implement Invasion of Ixalan / Belligerent Regisaur * battles now cast transformed (this is super hacky but we need to refactor TDFCs anyway) * add TODO * add ignore for randomly failing test * a few small fixes * add defense to MtgJsonCard (unused like loyalty) * implement ProtectorIdPredicate * small fixes
2023-04-14 00:03:16 +00:00
if ($planeswalker eq 'true' || $battle eq 'true') {
}else {
$OUT .= "\nimport mage.MageInt;"
}
2017-09-08 21:02:50 +00:00
}
if ($hasSubTypes eq 'true') {
$OUT .="\nimport mage.constants.SubType;"
}
2017-09-07 22:20:16 +00:00
if ($hasSuperTypes eq 'true') {
$OUT .="\nimport mage.constants.SuperType;"
}
=][=$abilitiesImports=]
2010-11-24 13:54:31 +00:00
import mage.cards.CardImpl;
2016-10-18 04:45:47 +00:00
import mage.cards.CardSetInfo;
import mage.constants.CardType;
2010-11-24 13:54:31 +00:00
/**
*
* @author [=$author=]
2010-11-24 13:54:31 +00:00
*/
2018-05-21 15:14:45 +00:00
public final class [=$className=] extends CardImpl {
2010-11-24 13:54:31 +00:00
2016-10-18 04:45:47 +00:00
public [=$className=](UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{[=$type=]}, "[=$manaCost=]");
[=$subType=][=$colors=][=
2011-07-25 19:27:27 +00:00
if ($power || $power eq 0) {
2017-07-03 06:58:48 +00:00
if ($planeswalker eq 'true') {
$OUT .= "\n this.setStartingLoyalty($power);";
Ready for Review: Implementing Battles (#10156) * add types and subtypes * add startingDefense attribute * [MOM] Implement Invasion of Ravnica / Guildpact Paragon * fix two small errors * refactor various instances of "any target" * fully implement defense counters * battles can now be attacked * [MOM] Implement Invasion of Dominaria / Serra Faithkeeper * [MOM] Implement Invasion of Innistrad / Deluge of the Dead * [MOM] Implement Invasion of Kaladesh / Aetherwing, Golden-Scale Flagship * [MOM] Implement Invasion of Kamigawa / Rooftop Saboteurs * [MOM] Implement Invasion of Karsus / Refraction Elemental * [MOM] Implement Invasion of Tolvada / The Broken Sky * simplify battle info ability * fix verify failure * some more fixes for attacking battles * [MOM] Implement Invasion of Kaldheim / Pyre of the World Tree * [MOM] Implement Invasion of Lorwyn / Winnowing Forces * [MOM] Implement Invasion of Moag / Bloomwielder Dryads * [MOM] Implement Invasion of Shandalar / Leyline Surge * [MOM] Implement Invasion of Belenon / Belenon War Anthem * [MOM] Implement Invasion of Pyrulea / Gargantuan Slabhorn * [MOM] Implement Invasion of Vryn / Overloaded Mage-Ring * [MOM] Implement Marshal of Zhalfir * [MOM] Implement Sunfall * implement protectors for sieges * partially implement siege defeated trigger * fix verify failure * some updates to blocking * [MOM] Implement Invasion of Mercadia / Kyren Flamewright * [MOM] Implement Invasion of Theros / Ephara, Ever-Sheltering * [MOM] Implement Invasion of Ulgrotha / Grandmother Ravi Sengir * [MOM] Implement Invasion of Xerex / Vertex Paladin * add initial battle test * fix verify failure * [MOM] Implement Invasion of Amonkhet / Lazotep Convert * [MOM] update spoiler * update how protectors are chosen * update text * battles can't block * add control change test * rename battle test for duel * add multiplayer test * [MOM] Implement Invasion of Alara / Awaken the Maelstrom * [MOM] Implement Invasion of Eldraine * [MOM] Implement Invasion of Ergamon / Truga Cliffhanger * [MOM] Implement Invasion of Ixalan / Belligerent Regisaur * battles now cast transformed (this is super hacky but we need to refactor TDFCs anyway) * add TODO * add ignore for randomly failing test * a few small fixes * add defense to MtgJsonCard (unused like loyalty) * implement ProtectorIdPredicate * small fixes
2023-04-14 00:03:16 +00:00
} elsif ($battle eq 'true') {
$OUT .= "\n this.setStartingDefense($power);";
} else {
$OUT .= "\n this.power = new MageInt($power);";
$OUT .= "\n this.toughness = new MageInt($toughness);";
}
}
=][=$abilities=]
2010-11-24 13:54:31 +00:00
}
2018-12-21 00:22:11 +00:00
private [=$className=](final [=$className=] card) {
2010-11-24 13:54:31 +00:00
super(card);
}
@Override
public [=$className=] copy() {
return new [=$className=](this);
2010-11-24 13:54:31 +00:00
}
}