mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 10:40:06 -08:00
refactor a daybound/nightbound card
This commit is contained in:
parent
2c77c54107
commit
b5bbc592c1
2 changed files with 19 additions and 25 deletions
|
|
@ -1,9 +1,9 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.DayboundAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.abilities.keyword.NightboundAbility;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.TransformingDoubleFacedCard;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
|
|
@ -12,21 +12,27 @@ import java.util.UUID;
|
|||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class TavernRuffian extends CardImpl {
|
||||
public final class TavernRuffian extends TransformingDoubleFacedCard {
|
||||
|
||||
public TavernRuffian(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.WARRIOR);
|
||||
this.subtype.add(SubType.WEREWOLF);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(5);
|
||||
super(
|
||||
ownerId, setInfo,
|
||||
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.HUMAN, SubType.WARRIOR, SubType.WEREWOLF}, "{3}{R}",
|
||||
"Tavern Smasher",
|
||||
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.WEREWOLF}, "R"
|
||||
);
|
||||
this.getLeftHalfCard().setPT(2, 5);
|
||||
this.getRightHalfCard().setPT(6, 5);
|
||||
|
||||
this.secondSideCardClazz = mage.cards.t.TavernSmasher.class;
|
||||
|
||||
// Daybound
|
||||
this.addAbility(new DayboundAbility());
|
||||
this.getLeftHalfCard().addAbility(new DayboundAbility());
|
||||
|
||||
// Nightbound
|
||||
this.getRightHalfCard().addAbility(new NightboundAbility());
|
||||
|
||||
this.finalizeDFC();
|
||||
}
|
||||
|
||||
private TavernRuffian(final TavernRuffian card) {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.NightboundAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.TransformingDoubleFacedCard;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -16,18 +14,8 @@ public final class TavernSmasher extends CardImpl {
|
|||
|
||||
public TavernSmasher(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
|
||||
|
||||
this.subtype.add(SubType.WEREWOLF);
|
||||
|
||||
this.color.setRed(true);
|
||||
|
||||
this.nightCard = true;
|
||||
|
||||
this.power = new MageInt(6);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Nightbound
|
||||
this.addAbility(new NightboundAbility());
|
||||
TransformingDoubleFacedCard.copyToBackFace(new mage.cards.t.TavernRuffian(ownerId, setInfo), this);
|
||||
}
|
||||
|
||||
private TavernSmasher(final TavernSmasher card) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue