mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
These cards were converted to keyword in the past. The original code objects were commented out when they were keyword-ed. I have deleted these commented out code objects:
Thoughtseize through Distress Path of Anger's Flame Kjeldoran War Cry Wandering Stream Festival of Trokin Duress Ostracize Titanic Ultimatum Black Lotus
This commit is contained in:
@@ -9291,65 +9291,6 @@ public class CardFactory implements NewConstants {
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
/*
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Thoughtseize") || cardName.equals("Distress")) {
|
||||
final SpellAbility spell = new Spell(card) {
|
||||
private static final long serialVersionUID = 5338238621454661783L;
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
if(cardName.equals("Thoughtseize")) AllZone.GameAction.getPlayerLife(card.getController()).subtractLife(
|
||||
2,card);
|
||||
|
||||
Card choice = null;
|
||||
|
||||
//check for no cards in hand on resolve
|
||||
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, getTargetPlayer());
|
||||
CardList fullHand = new CardList(hand.getCards());
|
||||
Card[] handChoices = removeLand(hand.getCards());
|
||||
|
||||
if(fullHand.size() > 0 && card.getController().equals(Constant.Player.Human)) AllZone.Display.getChoice(
|
||||
"Revealing hand", fullHand.toArray());
|
||||
|
||||
if(handChoices.length == 0) return;
|
||||
|
||||
//human chooses
|
||||
if(card.getController().equals(Constant.Player.Human)) {
|
||||
choice = AllZone.Display.getChoice("Choose", handChoices);
|
||||
} else//computer chooses
|
||||
{
|
||||
choice = CardUtil.getRandom(handChoices);
|
||||
}
|
||||
|
||||
AllZone.GameAction.discard(choice);
|
||||
}//resolve()
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
Card[] c = removeLand(AllZone.Human_Hand.getCards());
|
||||
return 0 < c.length;
|
||||
}
|
||||
|
||||
Card[] removeLand(Card[] in) {
|
||||
CardList c = new CardList(in);
|
||||
c = c.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return !c.isLand();
|
||||
}
|
||||
});
|
||||
return c.toArray();
|
||||
}//removeLand()
|
||||
};//SpellAbility spell
|
||||
spell.setChooseTargetAI(CardFactoryUtil.AI_targetHuman());
|
||||
card.clearSpellAbility();
|
||||
card.addSpellAbility(spell);
|
||||
|
||||
spell.setBeforePayMana(CardFactoryUtil.input_targetPlayer(spell));
|
||||
}//*************** END ************ END **************************
|
||||
*/
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Echoing Decay")) {
|
||||
final SpellAbility spell = new Spell(card) {
|
||||
@@ -10522,119 +10463,7 @@ public class CardFactory implements NewConstants {
|
||||
card.addSpellAbility(spell);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
/*
|
||||
//*************** START *********** START **************************
|
||||
// TODO: use spAllPump keyword when ready
|
||||
else if(cardName.equals("Path of Anger's Flame")) {
|
||||
final SpellAbility spell = new Spell(card) {
|
||||
private static final long serialVersionUID = -4070937328002003491L;
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
return getAttacker() != null;
|
||||
}
|
||||
|
||||
public Card getAttacker() {
|
||||
//target creature that is going to attack
|
||||
Combat c = ComputerUtil.getAttackers();
|
||||
Card[] att = c.getAttackers();
|
||||
if(att.length != 0) return att[0];
|
||||
else return null;
|
||||
}//getAttacker()
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
|
||||
CardList start = new CardList(play.getCards());
|
||||
final CardList list = start.getType("Creature");
|
||||
|
||||
for(int i = 0; i < list.size(); i++)
|
||||
list.get(i).addTempAttackBoost(2);
|
||||
|
||||
play.updateObservers();
|
||||
|
||||
Command untilEOT = new Command() {
|
||||
private static final long serialVersionUID = 6078548097470388679L;
|
||||
|
||||
public void execute() {
|
||||
for(int i = 0; i < list.size(); i++)
|
||||
if(AllZone.GameAction.isCardInPlay(list.get(i))) list.get(i).addTempAttackBoost(-2);
|
||||
}
|
||||
};
|
||||
AllZone.EndOfTurn.addUntil(untilEOT);
|
||||
}//resolve()
|
||||
};//SpellAbility
|
||||
card.clearSpellAbility();
|
||||
card.addSpellAbility(spell);
|
||||
|
||||
card.setSVar("PlayMain1", "TRUE");
|
||||
}//*************** END ************ END **************************
|
||||
*/
|
||||
|
||||
/*
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Kjeldoran War Cry")) {
|
||||
final SpellAbility spell = new Spell(card) {
|
||||
private static final long serialVersionUID = -7384618531690849205L;
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
return getAttacker() != null;
|
||||
}
|
||||
|
||||
public Card getAttacker() {
|
||||
//target creature that is going to attack
|
||||
Combat c = ComputerUtil.getAttackers();
|
||||
Card[] att = c.getAttackers();
|
||||
if(att.length != 0) return att[0];
|
||||
else return null;
|
||||
}//getAttacker()
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
|
||||
CardList start = new CardList(play.getCards());
|
||||
final CardList list = start.getType("Creature");
|
||||
|
||||
final int boost = countCards();
|
||||
|
||||
for(int i = 0; i < list.size(); i++) {
|
||||
list.get(i).addTempAttackBoost(boost);
|
||||
list.get(i).addTempDefenseBoost(boost);
|
||||
}
|
||||
|
||||
play.updateObservers();
|
||||
|
||||
Command untilEOT = new Command() {
|
||||
private static final long serialVersionUID = -2803160667440730370L;
|
||||
|
||||
public void execute() {
|
||||
for(int i = 0; i < list.size(); i++)
|
||||
if(AllZone.GameAction.isCardInPlay(list.get(i))) {
|
||||
list.get(i).addTempAttackBoost(-boost);
|
||||
list.get(i).addTempDefenseBoost(-boost);
|
||||
}
|
||||
}
|
||||
};
|
||||
AllZone.EndOfTurn.addUntil(untilEOT);
|
||||
}//resolve()
|
||||
|
||||
int countCards() {
|
||||
CardList all = new CardList();
|
||||
all.addAll(AllZone.Human_Graveyard.getCards());
|
||||
all.addAll(AllZone.Computer_Graveyard.getCards());
|
||||
|
||||
all = all.getName("Kjeldoran War Cry");
|
||||
return all.size() + 1;
|
||||
}
|
||||
};//SpellAbility
|
||||
card.clearSpellAbility();
|
||||
card.addSpellAbility(spell);
|
||||
}//*************** END ************ END **************************
|
||||
*/
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Akroma's Vengeance") || cardName.equals("Devastation")
|
||||
|| cardName.equals("Jokulhaups") || cardName.equals("Purify") || cardName.equals("Shatterstorm")
|
||||
@@ -11671,39 +11500,6 @@ public class CardFactory implements NewConstants {
|
||||
card.setSVar("PlayMain1", "TRUE");
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
/*
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Wandering Stream")) {
|
||||
SpellAbility spell = new Spell(card) {
|
||||
private static final long serialVersionUID = 8777120667537357240L;
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
PlayerLife life = AllZone.GameAction.getPlayerLife(card.getController());
|
||||
life.addLife(countLandTypes() * 2);
|
||||
}//resolve()
|
||||
|
||||
int countLandTypes() {
|
||||
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
|
||||
CardList land = new CardList(play.getCards());
|
||||
|
||||
String basic[] = {"Forest", "Plains", "Mountain", "Island", "Swamp"};
|
||||
int count = 0;
|
||||
|
||||
for(int i = 0; i < basic.length; i++) {
|
||||
CardList c = land.getType(basic[i]);
|
||||
if(!c.isEmpty()) count++;
|
||||
}
|
||||
|
||||
return count;
|
||||
}//countLandTypes()
|
||||
};
|
||||
card.clearSpellAbility();
|
||||
card.addSpellAbility(spell);
|
||||
}//*************** END ************ END **************************
|
||||
*/
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Worldly Tutor") || cardName.equals("Sylvan Tutor")) {
|
||||
@@ -13072,48 +12868,6 @@ public class CardFactory implements NewConstants {
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
/*
|
||||
//*************** START *********** START **************************
|
||||
if(cardName.equals("Festival of Trokin")) {
|
||||
final SpellAbility spell = new Spell(card) {
|
||||
private static final long serialVersionUID = 1140489859175764227L;
|
||||
|
||||
@Override
|
||||
public boolean canPlay() {
|
||||
setStackDescription(card.getName() + " - " + card.getController() + " gains "
|
||||
+ calculateLife() + " life.");
|
||||
|
||||
return super.canPlay();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
CardList creatureList = new CardList(AllZone.Computer_Play.getCards());
|
||||
creatureList = creatureList.getType("Creature");
|
||||
|
||||
return creatureList.size() > 0;
|
||||
}
|
||||
|
||||
int calculateLife() {
|
||||
PlayerZone zone = AllZone.getZone(Constant.Zone.Play, card.getController());
|
||||
|
||||
CardList creatureList = new CardList(zone.getCards());
|
||||
creatureList = creatureList.getType("Creature");
|
||||
|
||||
return 2 * creatureList.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
AllZone.GameAction.getPlayerLife(card.getController()).addLife(calculateLife());
|
||||
}
|
||||
};//SpellAbility
|
||||
card.clearSpellAbility();
|
||||
card.addSpellAbility(spell);
|
||||
}//*************** END ************ END **************************
|
||||
*/
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Absorb")) {
|
||||
SpellAbility spell = new Spell(card) {
|
||||
@@ -14119,142 +13873,6 @@ public class CardFactory implements NewConstants {
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
/*
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Duress")) {
|
||||
final SpellAbility spell = new Spell(card) {
|
||||
private static final long serialVersionUID = 2180416205027322268L;
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
|
||||
Card choice = null;
|
||||
|
||||
//check for no cards in hand on resolve
|
||||
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, getTargetPlayer());
|
||||
CardList cards = new CardList(hand.getCards());
|
||||
|
||||
CardList nonCreatureCards = new CardList();
|
||||
|
||||
|
||||
for(int i = 0; i < cards.size(); i++) {
|
||||
if(!cards.get(i).getType().contains("Creature")
|
||||
&& !cards.get(i).getType().contains("Land")) //remove land + creats
|
||||
{
|
||||
//System.out.println("Duress: " + cards.get(i).getType());
|
||||
//cards.remove(i);
|
||||
nonCreatureCards.add(cards.get(i));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(cards.size() == 0) return;
|
||||
|
||||
//human chooses
|
||||
if(card.getController().equals(Constant.Player.Human)) {
|
||||
AllZone.Display.getChoice("Revealing hand", cards.toArray());
|
||||
if(nonCreatureCards.size() == 0) return;
|
||||
choice = AllZone.Display.getChoice("Choose", nonCreatureCards.toArray());
|
||||
} else//computer chooses
|
||||
{
|
||||
if(nonCreatureCards.size() == 0) return;
|
||||
choice = CardUtil.getRandom(nonCreatureCards.toArray());
|
||||
}
|
||||
|
||||
AllZone.GameAction.discard(choice);
|
||||
}//resolve()
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
Card[] c = removeLandAndCreats(AllZone.Human_Hand.getCards());
|
||||
return 0 < c.length;
|
||||
}
|
||||
|
||||
Card[] removeLandAndCreats(Card[] in) {
|
||||
CardList c = new CardList(in);
|
||||
c = c.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
//return !c.isLand();
|
||||
if(!c.isLand() && !c.isCreature()) return true;
|
||||
else return false;
|
||||
}
|
||||
});
|
||||
return c.toArray();
|
||||
}//removeLand()
|
||||
};//SpellAbility spell
|
||||
spell.setChooseTargetAI(CardFactoryUtil.AI_targetHuman());
|
||||
card.clearSpellAbility();
|
||||
card.addSpellAbility(spell);
|
||||
|
||||
spell.setBeforePayMana(CardFactoryUtil.input_targetPlayer(spell));
|
||||
}//*************** END ************ END **************************
|
||||
*/
|
||||
|
||||
/*
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Ostracize")) {
|
||||
final SpellAbility spell = new Spell(card) {
|
||||
private static final long serialVersionUID = -8919895406095857866L;
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
|
||||
Card choice = null;
|
||||
|
||||
//check for no cards in hand on resolve
|
||||
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, getTargetPlayer());
|
||||
CardList cards = new CardList(hand.getCards());
|
||||
CardList creatureCards = new CardList();
|
||||
|
||||
|
||||
for(int i = 0; i < cards.size(); i++) {
|
||||
if(cards.get(i).getType().contains("Creature")) {
|
||||
//System.out.println("ostracize: " + cards.get(i).getType());
|
||||
creatureCards.add(cards.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
if(cards.size() == 0) return;
|
||||
|
||||
//human chooses
|
||||
if(card.getController().equals(Constant.Player.Human)) {
|
||||
AllZone.Display.getChoice("Revealing hand", cards.toArray());
|
||||
if(creatureCards.size() == 0) return;
|
||||
choice = AllZone.Display.getChoice("Choose", creatureCards.toArray());
|
||||
} else//computer chooses
|
||||
{
|
||||
if(creatureCards.size() == 0) return;
|
||||
choice = CardUtil.getRandom(creatureCards.toArray());
|
||||
}
|
||||
|
||||
AllZone.GameAction.discard(choice);
|
||||
}//resolve()
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
Card[] c = removeNonCreats(AllZone.Human_Hand.getCards());
|
||||
return 0 < c.length;
|
||||
}
|
||||
|
||||
Card[] removeNonCreats(Card[] in) {
|
||||
CardList c = new CardList(in);
|
||||
c = c.filter(new CardListFilter() {
|
||||
public boolean addCard(Card c) {
|
||||
return c.isCreature();
|
||||
}
|
||||
});
|
||||
return c.toArray();
|
||||
}//removeLand()
|
||||
};//SpellAbility spell
|
||||
spell.setChooseTargetAI(CardFactoryUtil.AI_targetHuman());
|
||||
card.clearSpellAbility();
|
||||
card.addSpellAbility(spell);
|
||||
|
||||
spell.setBeforePayMana(CardFactoryUtil.input_targetPlayer(spell));
|
||||
}//*************** END ************ END **************************
|
||||
*/
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Hoofprints of the Stag")) {
|
||||
Command intoPlay = new Command() {
|
||||
@@ -15678,68 +15296,6 @@ public class CardFactory implements NewConstants {
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
/*
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Titanic Ultimatum")) {
|
||||
SpellAbility spell = new Spell(card) {
|
||||
private static final long serialVersionUID = 4920407567000133514L;
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
return getAttacker() != null;
|
||||
}
|
||||
|
||||
public Card getAttacker() {
|
||||
//target creature that is going to attack
|
||||
Combat c = ComputerUtil.getAttackers();
|
||||
Card[] att = c.getAttackers();
|
||||
if(att.length != 0) return att[0];
|
||||
else return null;
|
||||
}//getAttacker()
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController());
|
||||
CardList list = new CardList(play.getCards());
|
||||
|
||||
for(int i = 0; i < list.size(); i++) {
|
||||
final Card[] target = new Card[1];
|
||||
target[0] = list.get(i);
|
||||
|
||||
final Command untilEOT = new Command() {
|
||||
private static final long serialVersionUID = -3807842003906681893L;
|
||||
|
||||
public void execute() {
|
||||
if(AllZone.GameAction.isCardInPlay(target[0])) {
|
||||
target[0].addTempAttackBoost(-5);
|
||||
target[0].addTempDefenseBoost(-5);
|
||||
|
||||
target[0].removeExtrinsicKeyword("Trample");
|
||||
target[0].removeExtrinsicKeyword("First Strike");
|
||||
target[0].removeExtrinsicKeyword("Lifelink");
|
||||
}
|
||||
}
|
||||
};//Command
|
||||
|
||||
if(AllZone.GameAction.isCardInPlay(target[0])) {
|
||||
target[0].addTempAttackBoost(5);
|
||||
target[0].addTempDefenseBoost(5);
|
||||
|
||||
target[0].addExtrinsicKeyword("Trample");
|
||||
target[0].addExtrinsicKeyword("First Strike");
|
||||
target[0].addExtrinsicKeyword("Lifelink");
|
||||
|
||||
AllZone.EndOfTurn.addUntil(untilEOT);
|
||||
}//if
|
||||
}//for
|
||||
}//resolve()
|
||||
};
|
||||
card.clearSpellAbility();
|
||||
card.addSpellAbility(spell);
|
||||
}//*************** END ************ END **************************
|
||||
*/
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Primal Boost")) {
|
||||
SpellAbility spell = new Spell(card) {
|
||||
@@ -16390,65 +15946,7 @@ public class CardFactory implements NewConstants {
|
||||
return card;
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
/*
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Black Lotus")) {
|
||||
final Ability_Tap ability = new Ability_Tap(card, "0") {
|
||||
private static final long serialVersionUID = 8394047173115959008L;
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
if(card.getController().equals(Constant.Player.Human)) {
|
||||
//CardList list = new CardList(AllZone.getZone(Constant.Zone.Play, Constant.Player.Human).getCards());
|
||||
//list = list.getName("Mana Pool");
|
||||
Card mp = AllZone.ManaPool;//list.getCard(0);
|
||||
|
||||
String color = "";
|
||||
|
||||
Object o = AllZone.Display.getChoice("Choose mana color", Constant.Color.Colors);
|
||||
color = (String) o;
|
||||
|
||||
if(color.equals("white")) color = "W";
|
||||
else if(color.equals("blue")) color = "U";
|
||||
else if(color.equals("black")) color = "B";
|
||||
else if(color.equals("red")) color = "R";
|
||||
else if(color.equals("green")) color = "G";
|
||||
else color = "1";
|
||||
|
||||
|
||||
//System.out.println("ManaPool:"+color+":");
|
||||
for(int i = 0; i < 3; i++)
|
||||
mp.addExtrinsicKeyword("ManaPool:" + color);
|
||||
|
||||
//AllZone.GameAction.sacrifice(card);
|
||||
}
|
||||
}
|
||||
};
|
||||
ability.setDescription("tap, Sacrifice Black Lotus: Add three mana of any one color to your mana pool.");
|
||||
ability.setStackDescription("Adds 3 mana of any one color to your mana pool");
|
||||
|
||||
|
||||
Input sac = new Input() {
|
||||
private static final long serialVersionUID = -4503945947115838818L;
|
||||
|
||||
@Override
|
||||
public void showMessage() {
|
||||
AllZone.GameAction.sacrifice(card);
|
||||
ability.resolve();
|
||||
stop();
|
||||
}
|
||||
};//Input
|
||||
ability.setBeforePayMana(sac);
|
||||
|
||||
card.addSpellAbility(ability);
|
||||
}//*************** END ************ END **************************
|
||||
*/
|
||||
|
||||
|
||||
//**************************Equipment*****************************
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user