mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- Added Unearth + a bunch of Unearth cards.
This commit is contained in:
@@ -38,6 +38,7 @@ snow_covered_mountain.jpg http://www.wizards.com/global/images/magic/gene
|
||||
snow_covered_mountain1.jpg http://www.wizards.com/global/images/magic/general/snow_covered_mountain.jpg
|
||||
snow_covered_mountain2.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg
|
||||
snow_covered_mountain3.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg
|
||||
plated_geopede.jpg http://www.wizards.com/global/images/magic/general/plated_geopede.jpg
|
||||
borderland_ranger.jpg http://www.wizards.com/global/images/magic/general/borderland_ranger.jpg
|
||||
city_of_brass.jpg http://www.wizards.com/global/images/magic/general/city_of_brass.jpg
|
||||
channel_the_suns.jpg http://www.wizards.com/global/images/magic/general/channel_the_suns.jpg
|
||||
|
||||
@@ -1,3 +1,93 @@
|
||||
Vithian Stinger
|
||||
2 R
|
||||
Creature Human Shaman
|
||||
no text
|
||||
0/1
|
||||
abDamageTgtCP T:1
|
||||
Unearth:1 R
|
||||
|
||||
Viscera Dragger
|
||||
3 B
|
||||
Creature Zombie Ogre Warrior
|
||||
no text
|
||||
3/3
|
||||
Cycling:2
|
||||
Unearth:1 B
|
||||
|
||||
Undead Leotau
|
||||
5 B
|
||||
Creature Zombie Cat
|
||||
no text
|
||||
3/4
|
||||
abPump R:+1/-1
|
||||
Unearth:2 B
|
||||
|
||||
Shambling Remains
|
||||
1 B R
|
||||
Creature Zombie Horror
|
||||
no text
|
||||
4/3
|
||||
This creature cannot block
|
||||
Unearth:B R
|
||||
|
||||
Sedraxis Specter
|
||||
U B R
|
||||
Creature
|
||||
Whenever Sedraxis Specter deals combat damage to a player, that player discards a card.
|
||||
2/2
|
||||
Flying
|
||||
Unearth:1 B
|
||||
|
||||
Kathari Screecher
|
||||
2 U
|
||||
Creature Bird Soldier
|
||||
no text
|
||||
2/2
|
||||
Flying
|
||||
Unearth:2 U
|
||||
|
||||
Hell's Thunder
|
||||
1 R R
|
||||
Creature Elemental
|
||||
no text
|
||||
4/4
|
||||
Flying
|
||||
Haste
|
||||
At the beginning of the end step, sacrifice CARDNAME.
|
||||
Unearth:4 R
|
||||
|
||||
Fire-Field Ogre
|
||||
1 U B R
|
||||
Creature Ogre Mutant
|
||||
no text
|
||||
4/2
|
||||
First Strike
|
||||
Unearth:1 U B R
|
||||
|
||||
Etherium Abomination
|
||||
3 U B
|
||||
Artifact Creature Horror
|
||||
no text
|
||||
4/3
|
||||
Unearth:1 U B
|
||||
|
||||
Dregscape Zombie
|
||||
1 B
|
||||
Creature Zombie
|
||||
no text
|
||||
2/1
|
||||
Unearth:B
|
||||
|
||||
Hellspark Elemental
|
||||
1 R
|
||||
Creature Elemental
|
||||
no text
|
||||
3/1
|
||||
Trample
|
||||
Haste
|
||||
At the beginning of the end step, sacrifice CARDNAME.
|
||||
Unearth:1 R
|
||||
|
||||
Borderland Ranger
|
||||
2 G
|
||||
Creature Human Scout
|
||||
|
||||
@@ -57,6 +57,8 @@ public class Card extends MyObservable {
|
||||
private boolean doubleStrike = false;
|
||||
|
||||
private boolean flashback = false;
|
||||
private boolean unearth = false;
|
||||
private boolean unearthed;
|
||||
|
||||
private int exaltedMagnitude = 0;
|
||||
|
||||
@@ -1516,6 +1518,24 @@ public class Card extends MyObservable {
|
||||
flashback = b;
|
||||
}
|
||||
|
||||
public boolean hasUnearth() {
|
||||
return unearth;
|
||||
}
|
||||
|
||||
public void setUnearth(boolean b) {
|
||||
unearth = b;
|
||||
}
|
||||
|
||||
public boolean isUnearthed()
|
||||
{
|
||||
return unearthed;
|
||||
}
|
||||
|
||||
public void setUnearthed(boolean b)
|
||||
{
|
||||
unearthed = b;
|
||||
}
|
||||
|
||||
public void setKicked(boolean b) {
|
||||
kicked = b;
|
||||
}
|
||||
|
||||
@@ -2763,6 +2763,20 @@ public class CardFactory implements NewConstants {
|
||||
}
|
||||
}//flashback
|
||||
|
||||
if(hasKeyword(card, "Unearth") != -1) {
|
||||
int n = hasKeyword(card, "Unearth");
|
||||
if(n != -1) {
|
||||
String parse = card.getKeyword().get(n).toString();
|
||||
//card.removeIntrinsicKeyword(parse);
|
||||
|
||||
String k[] = parse.split(":");
|
||||
|
||||
final String manacost = k[1];
|
||||
|
||||
card.addSpellAbility(CardFactoryUtil.ability_Unearth(card, manacost));
|
||||
card.setUnearth(true);
|
||||
}
|
||||
}//unearth
|
||||
|
||||
if(hasKeyword(card, "Devour") != -1) {
|
||||
int n = hasKeyword(card, "Devour");
|
||||
|
||||
@@ -651,6 +651,74 @@ public class CardFactoryUtil {
|
||||
|
||||
}//ability_Flashback()
|
||||
|
||||
public static Ability ability_Unearth(final Card sourceCard, String manaCost) {
|
||||
|
||||
final Ability unearth = new Ability(sourceCard, manaCost) {
|
||||
|
||||
private static final long serialVersionUID = -5633945565395478009L;
|
||||
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, sourceCard.getController());
|
||||
//PlayerZone removed = AllZone.getZone(Constant.Zone.Removed_From_Play, sourceCard.getController());
|
||||
PlayerZone play = AllZone.getZone(Constant.Zone.Play, sourceCard.getController());
|
||||
|
||||
grave.remove(sourceCard);
|
||||
play.add(sourceCard);
|
||||
|
||||
sourceCard.addIntrinsicKeyword("At the beginning of the end step, sacrifice CARDNAME.");
|
||||
sourceCard.addIntrinsicKeyword("Haste");
|
||||
sourceCard.setUnearthed(true);
|
||||
/*
|
||||
final Command entersPlay = new Command()
|
||||
{
|
||||
public void execute()
|
||||
{
|
||||
sourceCard.setUnearthed(true);
|
||||
}
|
||||
};
|
||||
sourceCard.addComesIntoPlayCommand(entersPlay);
|
||||
|
||||
|
||||
final Command leavesPlay = new Command()
|
||||
{
|
||||
private static final long serialVersionUID = -8640915882354670864L;
|
||||
|
||||
public void execute()
|
||||
{
|
||||
AllZone.GameAction.removeUnearth(sourceCard);
|
||||
}
|
||||
};
|
||||
sourceCard.addLeavesPlayCommand(leavesPlay);
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canPlay() {
|
||||
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, sourceCard.getController());
|
||||
String phase = AllZone.Phase.getPhase();
|
||||
String activePlayer = AllZone.Phase.getActivePlayer();
|
||||
|
||||
return AllZone.GameAction.isCardInZone(sourceCard, grave)
|
||||
&& ((phase.equals(Constant.Phase.Main1) || phase.equals(Constant.Phase.Main2))
|
||||
&& sourceCard.getController().equals(activePlayer) && AllZone.Stack.size() == 0);
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
unearth.setFlashBackAbility(true);
|
||||
//unearth.setManaCost(manaCost);
|
||||
unearth.setDescription("Unearth: " + manaCost);
|
||||
unearth.setStackDescription("Unearth: " + sourceCard.getName());
|
||||
|
||||
return unearth;
|
||||
|
||||
}//ability_Unearth()
|
||||
|
||||
public static SpellAbility ability_Spore_Saproling(final Card sourceCard) {
|
||||
final SpellAbility ability = new Ability(sourceCard, "0") {
|
||||
@Override
|
||||
@@ -2649,7 +2717,6 @@ public class CardFactoryUtil {
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
public static CardList getFlashbackCards(String player) {
|
||||
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, player);
|
||||
CardList cl = new CardList(grave.getCards());
|
||||
@@ -2661,6 +2728,17 @@ public class CardFactoryUtil {
|
||||
return cl;
|
||||
}
|
||||
|
||||
public static CardList getFlashbackUnearthCards(String player) {
|
||||
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, player);
|
||||
CardList cl = new CardList(grave.getCards());
|
||||
cl = cl.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return c.hasFlashback() || c.hasUnearth();
|
||||
}
|
||||
});
|
||||
return cl;
|
||||
}
|
||||
|
||||
public static int countOccurrences(String arg1, String arg2) {
|
||||
|
||||
int count = 0;
|
||||
|
||||
@@ -108,7 +108,7 @@ public class ComputerUtil
|
||||
}
|
||||
}//play()
|
||||
|
||||
//gets Spell's of cards in hand and Abilities of cards in play
|
||||
//gets Spells of cards in hand and Abilities of cards in play
|
||||
//checks to see
|
||||
//1. if canPlay() returns true, 2. can pay for mana
|
||||
static public SpellAbility[] getSpellAbility()
|
||||
@@ -116,7 +116,7 @@ public class ComputerUtil
|
||||
CardList all = new CardList();
|
||||
all.addAll(AllZone.Computer_Play.getCards());
|
||||
all.addAll(AllZone.Computer_Hand.getCards());
|
||||
all.addAll(CardFactoryUtil.getFlashbackCards(Constant.Player.Computer).toArray());
|
||||
all.addAll(CardFactoryUtil.getFlashbackUnearthCards(Constant.Player.Computer).toArray());
|
||||
|
||||
all = all.filter(new CardListFilter()
|
||||
{
|
||||
|
||||
@@ -33,6 +33,16 @@ public class DefaultPlayerZone extends PlayerZone implements java.io.Serializabl
|
||||
AllZone.GameAction.shuffle(c.getOwner());
|
||||
return;
|
||||
}
|
||||
|
||||
if (c.isUnearthed() && (is("Graveyard") || is("Hand")))
|
||||
{
|
||||
PlayerZone removed = AllZone.getZone(Constant.Zone.Removed_From_Play, c.getOwner());
|
||||
removed.add(c);
|
||||
c.setUnearthed(false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
c.addObserver(this);
|
||||
|
||||
c.setTurnInZone(AllZone.Phase.getTurn());
|
||||
|
||||
@@ -63,9 +63,17 @@ public class GameAction {
|
||||
//used by Input_Instant
|
||||
if(p != null) p.remove(c);
|
||||
|
||||
//hack: do not reset unearthed
|
||||
boolean unearthed = false;
|
||||
if (c.isUnearthed())
|
||||
unearthed = true;
|
||||
|
||||
//create new Card, which resets stats and anything that might have changed during play
|
||||
if(!c.isToken()) c = AllZone.CardFactory.copyCard(c);
|
||||
|
||||
if (unearthed)
|
||||
c.setUnearthed(true);
|
||||
|
||||
zone.add(c);
|
||||
return c;
|
||||
}
|
||||
@@ -751,6 +759,12 @@ public class GameAction {
|
||||
|
||||
}
|
||||
|
||||
public void removeUnearth(Card c)
|
||||
{
|
||||
PlayerZone removed = AllZone.getZone(Constant.Zone.Removed_From_Play, c.getOwner());
|
||||
removed.add(c);
|
||||
}
|
||||
|
||||
|
||||
private boolean shouldDraw = true;
|
||||
private String lastPlayerToDraw = Constant.Player.Human;
|
||||
|
||||
@@ -154,7 +154,7 @@ public class GuiDisplay3 extends JFrame implements CardContainer, Display, NewCo
|
||||
|
||||
@Override
|
||||
protected Card[] getCards() {
|
||||
return CardFactoryUtil.getFlashbackCards(Constant.Player.Human).toArray();
|
||||
return CardFactoryUtil.getFlashbackUnearthCards(Constant.Player.Human).toArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -461,7 +461,7 @@ public class GuiDisplay3 extends JFrame implements CardContainer, Display, NewCo
|
||||
playerHandValue.setText("" + AllZone.Human_Hand.getCards().length);
|
||||
playerGraveValue.setText("" + AllZone.Human_Graveyard.getCards().length);
|
||||
playerLibraryValue.setText("" + AllZone.Human_Library.getCards().length);
|
||||
playerFBValue.setText("" + CardFactoryUtil.getFlashbackCards(Constant.Player.Human).size());
|
||||
playerFBValue.setText("" + CardFactoryUtil.getFlashbackUnearthCards(Constant.Player.Human).size());
|
||||
playerRemovedValue.setText("" + AllZone.Human_Removed.getCards().length);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user