mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Convert Hatchlings to etbCounter
- Small cleanup in CardFactory_Creatures
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
Name:Belligerent Hatchling
|
||||
ManaCost:3 RW
|
||||
Types:Creature Elemental
|
||||
Text:Belligerent Hatchling enters the battlefield with four -1/-1 counters on it.\r\nWhenever you cast a red spell, remove a -1/-1 counter from Belligerent Hatchling.\r\nWhenever you cast a white spell, remove a -1/-1 counter from Belligerent Hatchling.
|
||||
Text:Whenever you cast a red spell, remove a -1/-1 counter from Belligerent Hatchling.\r\nWhenever you cast a white spell, remove a -1/-1 counter from Belligerent Hatchling.
|
||||
PT:6/6
|
||||
K:etbCounter:M1M1:4
|
||||
K:First Strike
|
||||
SVar:BuffedBy:Spell.Red,Spell.White
|
||||
SVar:Rarity:Uncommon
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
Name:Noxious Hatchling
|
||||
ManaCost:3 BG
|
||||
Types:Creature Elemental
|
||||
Text:Noxious Hatchling enters the battlefield with four -1/-1 counters on it.\r\nWhenever you cast a black spell, remove a -1/-1 counter from Noxious Hatchling.\r\nWhenever you cast a green spell, remove a -1/-1 counter from Noxious Hatchling.
|
||||
Text:Whenever you cast a black spell, remove a -1/-1 counter from Noxious Hatchling.\r\nWhenever you cast a green spell, remove a -1/-1 counter from Noxious Hatchling.
|
||||
PT:6/6
|
||||
K:etbCounter:M1M1:4
|
||||
K:Wither
|
||||
SVar:BuffedBy:Spell.Black,Spell.Green
|
||||
SVar:Rarity:Uncommon
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
Name:Sturdy Hatchling
|
||||
ManaCost:3 GU
|
||||
Types:Creature Elemental
|
||||
Text:Sturdy Hatchling enters the battlefield with four -1/-1 counters on it.\r\nWhenever you cast a green spell, remove a -1/-1 counter from Sturdy Hatchling.\r\nWhenever you cast a blue spell, remove a -1/-1 counter from Sturdy Hatchling.
|
||||
Text:Whenever you cast a green spell, remove a -1/-1 counter from Sturdy Hatchling.\r\nWhenever you cast a blue spell, remove a -1/-1 counter from Sturdy Hatchling.
|
||||
PT:6/6
|
||||
K:etbCounter:M1M1:4
|
||||
A:AB$Pump | Cost$ GU | KW$ Shroud | SpellDescription$ Sturdy Hatchling gains shroud until end of turn.
|
||||
SVar:BuffedBy:Spell.Blue,Spell.Green
|
||||
SVar:Rarity:Uncommon
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
Name:Voracious Hatchling
|
||||
ManaCost:3 WB
|
||||
Types:Creature Elemental
|
||||
Text:Voracious Hatchling enters the battlefield with four -1/-1 counters on it.\r\nWhenever you cast a white spell, remove a -1/-1 counter from Voracious Hatchling.\r\nWhenever you cast a black spell, remove a -1/-1 counter from Voracious Hatchling.
|
||||
Text:Whenever you cast a white spell, remove a -1/-1 counter from Voracious Hatchling.\r\nWhenever you cast a black spell, remove a -1/-1 counter from Voracious Hatchling.
|
||||
PT:6/6
|
||||
K:etbCounter:M1M1:4
|
||||
K:Lifelink
|
||||
SVar:BuffedBy:Spell.White,Spell.Black
|
||||
SVar:Rarity:Uncommon
|
||||
|
||||
@@ -56,45 +56,7 @@ public class CardFactory_Creatures {
|
||||
|
||||
|
||||
public static Card getCard(final Card card, String cardName, Player owner, CardFactory cf) {
|
||||
/*
|
||||
//*************** START *********** START **************************
|
||||
if(cardName.equals("Filthy Cur")) {
|
||||
final Card newCard = new Card() {
|
||||
@Override
|
||||
public void addDamage(final int n, Card source) {
|
||||
super.addDamage(n, source);
|
||||
SpellAbility ability = new Ability(card, "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
getController().loseLife(n,card);
|
||||
}
|
||||
};
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Filthy Cur - ").append(getController()).append(" loses ").append(n).append(" life.");
|
||||
ability.setStackDescription(sb.toString());
|
||||
AllZone.Stack.add(ability);
|
||||
}//addDamage()
|
||||
};//Card
|
||||
|
||||
newCard.setOwner(card.getOwner());
|
||||
newCard.setController(card.getController());
|
||||
|
||||
newCard.setManaCost(card.getManaCost());
|
||||
newCard.setName(card.getName());
|
||||
newCard.addType("Creature");
|
||||
newCard.addType("Hound");
|
||||
newCard.setText(card.getSpellText());
|
||||
newCard.setBaseAttack(card.getBaseAttack());
|
||||
newCard.setBaseDefense(card.getBaseDefense());
|
||||
|
||||
newCard.addSpellAbility(new Spell_Permanent(newCard));
|
||||
|
||||
newCard.setSVars(card.getSVars());
|
||||
|
||||
return newCard;
|
||||
}//*************** END ************ END **************************
|
||||
*/
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
if(cardName.equals("Stone Giant")) {
|
||||
@@ -159,31 +121,6 @@ public class CardFactory_Creatures {
|
||||
card.addSpellAbility(ability);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Belligerent Hatchling") || cardName.equals("Noxious Hatchling")
|
||||
|| cardName.equals("Shrewd Hatchling") || cardName.equals("Sturdy Hatchling")
|
||||
|| cardName.equals("Voracious Hatchling")) {
|
||||
final SpellAbility ability = new Ability_Static(card, "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
card.addCounter(Counters.M1M1, 4);
|
||||
}//resolve()
|
||||
};//SpellAbility
|
||||
Command intoPlay = new Command() {
|
||||
private static final long serialVersionUID = 4757054648163014149L;
|
||||
|
||||
public void execute() {
|
||||
AllZone.Stack.add(ability);
|
||||
}
|
||||
};
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(cardName).append(" enters the battlefield with four -1/-1 counters on it.");
|
||||
ability.setStackDescription(sb.toString());
|
||||
|
||||
card.addComesIntoPlayCommand(intoPlay);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Lurking Informant")) {
|
||||
final SpellAbility a1 = new Ability_Tap(card, "2") {
|
||||
@@ -243,161 +180,6 @@ public class CardFactory_Creatures {
|
||||
a1.setBeforePayMana(new Input_PayManaCost(a1));
|
||||
a1.setBeforePayMana(CardFactoryUtil.input_targetPlayer(a1));
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
/*
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Shinka Gatekeeper")) {
|
||||
final Card newCard = new Card() {
|
||||
@Override
|
||||
public void addDamage(final int n, Card source) {
|
||||
super.addDamage(n, source);
|
||||
SpellAbility ability = new Ability(card, "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
getController().addDamage(n, card);
|
||||
}
|
||||
};
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Shinka Gatekeeper - causes ").append(n).append(" damage to ").append(getController());
|
||||
ability.setStackDescription(sb.toString());
|
||||
|
||||
AllZone.Stack.add(ability);
|
||||
}//addDamage()
|
||||
};//Card
|
||||
|
||||
newCard.setOwner(card.getOwner());
|
||||
newCard.setController(card.getController());
|
||||
|
||||
newCard.setManaCost(card.getManaCost());
|
||||
newCard.setName(card.getName());
|
||||
newCard.addType("Creature");
|
||||
newCard.addType("Ogre");
|
||||
newCard.addType("Warrior");
|
||||
newCard.setText(card.getSpellText());
|
||||
newCard.setBaseAttack(card.getBaseAttack());
|
||||
newCard.setBaseDefense(card.getBaseDefense());
|
||||
|
||||
newCard.addSpellAbility(new Spell_Permanent(newCard));
|
||||
|
||||
newCard.setSVars(card.getSVars());
|
||||
|
||||
return newCard;
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Jackal Pup")) {
|
||||
final Card newCard = new Card() {
|
||||
@Override
|
||||
public void addDamage(final int n, final Card source) {
|
||||
super.addDamage(n, source);
|
||||
SpellAbility ability = new Ability(card, "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
getController().addDamage(n, card);
|
||||
}
|
||||
};
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Jackal Pup - causes ").append(n).append(" damage to ").append(getController());
|
||||
ability.setStackDescription(sb.toString());
|
||||
|
||||
AllZone.Stack.add(ability);
|
||||
}//addDamage()
|
||||
};//Card
|
||||
|
||||
newCard.setOwner(card.getOwner());
|
||||
newCard.setController(card.getController());
|
||||
|
||||
newCard.setManaCost(card.getManaCost());
|
||||
newCard.setName(card.getName());
|
||||
newCard.addType("Creature");
|
||||
newCard.addType("Hound");
|
||||
newCard.setText(card.getSpellText());
|
||||
newCard.setBaseAttack(card.getBaseAttack());
|
||||
newCard.setBaseDefense(card.getBaseDefense());
|
||||
|
||||
newCard.addSpellAbility(new Spell_Permanent(newCard));
|
||||
|
||||
newCard.setSVars(card.getSVars());
|
||||
|
||||
return newCard;
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Stuffy Doll")) {
|
||||
/
|
||||
final Card newCard = new Card() {
|
||||
Card c = this;
|
||||
|
||||
@Override
|
||||
public void addDamage(final int n, final Card source) {
|
||||
super.addDamage(n, source);
|
||||
final Player opponent = card.getOwner().getOpponent();
|
||||
|
||||
SpellAbility ability = new Ability(c, "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
//AllZone.GameAction.addDamage(opponent, c, n);
|
||||
opponent.addDamage(n, c);
|
||||
}
|
||||
};
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Stuffy Doll - causes ").append(n).append(" damage to ").append(opponent);
|
||||
ability.setStackDescription(sb.toString());
|
||||
|
||||
AllZone.Stack.add(ability);
|
||||
}//addDamage()
|
||||
};//Card
|
||||
|
||||
newCard.setOwner(card.getOwner());
|
||||
newCard.setController(card.getController());
|
||||
|
||||
newCard.setManaCost(card.getManaCost());
|
||||
newCard.setName(card.getName());
|
||||
newCard.addType("Artifact");
|
||||
newCard.addType("Creature");
|
||||
newCard.addType("Construct");
|
||||
newCard.setText("Whenever damage is dealt to Stuffy Doll, it deals that much damage to your opponent.");
|
||||
newCard.setBaseAttack(0);
|
||||
newCard.setBaseDefense(1);
|
||||
|
||||
newCard.addIntrinsicKeyword("Indestructible");
|
||||
*
|
||||
|
||||
Ability_Cost abilCost = new Ability_Cost("T", cardName, true);
|
||||
|
||||
final Ability_Activated ability = new Ability_Activated(card, abilCost, null){
|
||||
private static final long serialVersionUID = 577739727089395613L;
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
card.addDamage(1, card);
|
||||
}
|
||||
};//SpellAbility
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(abilCost.toString()).append("Stuffy Doll deals 1 damage to itself.");
|
||||
ability.setDescription(sb.toString());
|
||||
ability.setStackDescription("Stuffy Doll - deals 1 damage to itself.");
|
||||
|
||||
card.addSpellAbility(ability);
|
||||
/*
|
||||
ability.setStackDescription("Stuffy Doll - deals 1 damage to itself.");
|
||||
|
||||
newCard.addSpellAbility(new Spell_Permanent(newCard));
|
||||
newCard.addSpellAbility(ability);
|
||||
|
||||
newCard.addSpellAbility(ability);
|
||||
|
||||
newCard.setSVars(card.getSVars());
|
||||
|
||||
return newCard;*
|
||||
}//*************** END ************ END **************************
|
||||
*/
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Serra Avenger")) {
|
||||
@@ -679,201 +461,6 @@ public class CardFactory_Creatures {
|
||||
ability.setBeforePayMana(runtime);
|
||||
card.addSpellAbility(ability);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
/*
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Sliver Overlord")) {
|
||||
//final String player = card.getController();
|
||||
final SpellAbility ability = new Ability(card, "3") {
|
||||
@Override
|
||||
public boolean canPlay() {
|
||||
SpellAbility sa;
|
||||
for(int i = 0; i < AllZone.Stack.size(); i++) {
|
||||
sa = AllZone.Stack.peek(i);
|
||||
if(sa.getSourceCard().equals(card)) return false;
|
||||
}
|
||||
|
||||
if(AllZone.GameAction.isCardInPlay(card) && super.canPlay()) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, card.getController());
|
||||
CardList list = new CardList(lib.getCards());
|
||||
list = list.getType("Sliver");
|
||||
|
||||
if(list.size() == 0) return false;
|
||||
|
||||
if(AllZone.Phase.getPhase().equals(Constant.Phase.Main2) && list.size() > 0) return true;
|
||||
else return false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, card.getController());
|
||||
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, card.getController());
|
||||
Player player = card.getController();
|
||||
|
||||
CardList list = new CardList(lib.getCards());
|
||||
list = list.getType("Sliver");
|
||||
|
||||
if(list.size() == 0) return;
|
||||
|
||||
if(player.equals(AllZone.ComputerPlayer)) {
|
||||
Card sliver = CardFactoryUtil.AI_getBestCreature(list);
|
||||
lib.remove(sliver);
|
||||
hand.add(sliver);
|
||||
} else //human
|
||||
{
|
||||
Object o = AllZone.Display.getChoiceOptional("Select target Sliver", list.toArray());
|
||||
Card sliver = (Card) o;
|
||||
lib.remove(sliver);
|
||||
hand.add(sliver);
|
||||
}
|
||||
player.shuffle();
|
||||
}
|
||||
};
|
||||
|
||||
final SpellAbility ability2 = new Ability(card, "3") {
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
|
||||
|
||||
Card c = getTargetCard();
|
||||
if(AllZone.GameAction.isCardInPlay(c)
|
||||
&& (c.getType().contains("Sliver") || c.getKeyword().contains("Changeling"))
|
||||
&& CardFactoryUtil.canTarget(card, c)) {
|
||||
//set summoning sickness
|
||||
if(c.getKeyword().contains("Haste")) {
|
||||
c.setSickness(false);
|
||||
} else {
|
||||
c.setSickness(true);
|
||||
}
|
||||
|
||||
((PlayerZone_ComesIntoPlay) AllZone.Human_Play).setTriggers(false);
|
||||
((PlayerZone_ComesIntoPlay) AllZone.Computer_Play).setTriggers(false);
|
||||
|
||||
PlayerZone from = AllZone.getZone(c);
|
||||
from.remove(c);
|
||||
|
||||
c.setController(card.getController());
|
||||
|
||||
PlayerZone to = AllZone.getZone(Constant.Zone.Play, card.getController());
|
||||
to.add(c);
|
||||
|
||||
((PlayerZone_ComesIntoPlay) AllZone.Human_Play).setTriggers(true);
|
||||
((PlayerZone_ComesIntoPlay) AllZone.Computer_Play).setTriggers(true);
|
||||
}//if
|
||||
|
||||
|
||||
}//resolve()
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
|
||||
CardList c = CardFactoryUtil.AI_getHumanCreature(card, true);
|
||||
CardListUtil.sortAttack(c);
|
||||
CardListUtil.sortFlying(c);
|
||||
c = c.filter(new CardListFilter() {
|
||||
|
||||
public boolean addCard(Card c) {
|
||||
return c.getType().contains("Sliver") || c.getKeyword().contains("Changeling");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
if(c.isEmpty()) return false;
|
||||
|
||||
if(2 <= c.get(0).getNetAttack() && c.get(0).getKeyword().contains("Flying")
|
||||
&& c.get(0).getKeyword().contains("Sliver")) {
|
||||
setTargetCard(c.get(0));
|
||||
return true;
|
||||
}
|
||||
|
||||
CardListUtil.sortAttack(c);
|
||||
if(4 <= c.get(0).getNetAttack() && c.get(0).getKeyword().contains("Sliver")) {
|
||||
setTargetCard(c.get(0));
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}//canPlayAI()
|
||||
|
||||
@Override
|
||||
public boolean canPlay() {
|
||||
return AllZone.GameAction.isCardInPlay(card) && super.canPlay();
|
||||
|
||||
}//canPlay()
|
||||
};//SpellAbility ability2
|
||||
|
||||
ability2.setBeforePayMana(new Input() {
|
||||
private static final long serialVersionUID = 1489433384490805477L;
|
||||
|
||||
@Override
|
||||
public void showMessage() {
|
||||
Player opponent = card.getController().getOpponent();
|
||||
CardList slivers = new CardList(AllZone.getZone(Constant.Zone.Play, opponent).getCards());
|
||||
slivers = slivers.getType("Sliver");
|
||||
|
||||
stopSetNext(CardFactoryUtil.input_targetSpecific(ability2, slivers, "Select a Sliver", true,
|
||||
false));
|
||||
}
|
||||
});
|
||||
|
||||
ability.setDescription("3: Search your library for a Sliver card, reveal that card, and put it into your hand. Then shuffle your library.");
|
||||
StringBuilder sb1 = new StringBuilder();
|
||||
sb1.append(card.getName()).append(" - search for a Sliver card and put it into your hand.");
|
||||
ability.setStackDescription(sb1.toString());
|
||||
|
||||
ability2.setDescription("3: Gain control of target Sliver.");
|
||||
StringBuilder sb2 = new StringBuilder();
|
||||
sb2.append(card.getName()).append(" - Gain control of target Sliver.");
|
||||
ability2.setStackDescription(sb2.toString());
|
||||
|
||||
card.addSpellAbility(ability);
|
||||
card.addSpellAbility(ability2);
|
||||
}//*************** END ************ END **************************
|
||||
*/
|
||||
|
||||
/*
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Sliver Queen")) {
|
||||
final SpellAbility a1 = new Ability(card, "2") {
|
||||
|
||||
@Override
|
||||
public boolean canPlay() {
|
||||
SpellAbility sa;
|
||||
//this is a hack, check the stack to see if this card has an ability on the stack
|
||||
//if so, we can't use the ability
|
||||
for(int i = 0; i < AllZone.Stack.size(); i++) {
|
||||
sa = AllZone.Stack.peek(i);
|
||||
if(sa.getSourceCard().equals(card)) return false;
|
||||
}
|
||||
return AllZone.GameAction.isCardInPlay(card) && super.canPlay();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
CardFactoryUtil.makeToken("Sliver", "C 1 1 Sliver", card, "", new String[] {
|
||||
"Creature", "Sliver"}, 1, 1, new String[] {""});
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
return AllZone.Phase.getPhase().equals(Constant.Phase.Main2);
|
||||
}
|
||||
};//SpellAbility
|
||||
card.addSpellAbility(a1);
|
||||
a1.setDescription("2: Put a 1/1 colorless Sliver creature token into play.");
|
||||
a1.setStackDescription("Put a 1/1 colorless Sliver creature token into play.");
|
||||
|
||||
a1.setBeforePayMana(new Input_PayManaCost(a1));
|
||||
}//*************** END ************ END **************************
|
||||
*/
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Korlash, Heir to Blackblade")) {
|
||||
@@ -904,17 +491,6 @@ public class CardFactory_Creatures {
|
||||
CardList list = new CardList(library.getCards());
|
||||
CardList swamp = list.getType("Swamp");
|
||||
|
||||
/*
|
||||
for(int i = 0; i < 2 && (!swamp.isEmpty()); i++) {
|
||||
Card c = swamp.get(0);
|
||||
swamp.remove(c);
|
||||
|
||||
library.remove(c);
|
||||
play.add(c);
|
||||
c.tap();
|
||||
}
|
||||
*/
|
||||
|
||||
if (swamp.size() > 0)
|
||||
{
|
||||
if (card.getController().equals(AllZone.HumanPlayer))
|
||||
@@ -1274,31 +850,7 @@ public class CardFactory_Creatures {
|
||||
}
|
||||
}));
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
/*
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Springjack Shepherd")) {
|
||||
final SpellAbility ability = new Ability(card, "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
int number = CardFactoryUtil.getNumberOfManaSymbolsControlledByColor("W", card.getController());
|
||||
for(int i = 0; i < number; i++)
|
||||
CardFactoryUtil.makeToken("Goat", "W 0 1 Goat", card, "W", new String[] {
|
||||
"Creature", "Goat"}, 0, 1, new String[] {""});
|
||||
|
||||
}//resolve()
|
||||
};
|
||||
Command intoPlay = new Command() {
|
||||
private static final long serialVersionUID = -5515684113290670830L;
|
||||
|
||||
public void execute() {
|
||||
ability.setStackDescription("Springjack Shepherd - put a 0/1 white Goat creature token into play for each white mana symbol of permanents you control");
|
||||
AllZone.Stack.add(ability);
|
||||
}
|
||||
};
|
||||
card.addComesIntoPlayCommand(intoPlay);
|
||||
}//*************** END ************ END **************************
|
||||
*/
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Gilder Bairn")) {
|
||||
|
||||
Reference in New Issue
Block a user