mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- Added an alternate way of sacrificing multiple tokens using Nemata, Grove Guardian (experimental).
- Fixed Wort, Boggart Auntie / Squee, Goblin Nabob card duplication bug. - Hopefully fixed a bug with the AI using Ajani Vengeant, and not being able to target any permanents. - Hardcoded NOT to grab Ball Lightning with Bribery for the AI (since it has been reported so many times). - Fixed Korlash, Heir to Blackblade (should be able to fetch any 2 swamps now - select with CTRL + click).
This commit is contained in:
@@ -2888,7 +2888,7 @@ public class CardFactory implements NewConstants {
|
|||||||
//System.out.println("Creats size: " + creats.size());
|
//System.out.println("Creats size: " + creats.size());
|
||||||
|
|
||||||
if(card.getController().equals(Constant.Player.Human)) {
|
if(card.getController().equals(Constant.Player.Human)) {
|
||||||
List<Card> selection = AllZone.Display.getChoices("Select creature to sacrifice", creats.toArray());
|
List<Card> selection = AllZone.Display.getChoices("Select creatures to sacrifice", creats.toArray());
|
||||||
|
|
||||||
numCreatures[0] = selection.size();
|
numCreatures[0] = selection.size();
|
||||||
for(int m = 0; m < selection.size(); m++) {
|
for(int m = 0; m < selection.size(); m++) {
|
||||||
@@ -9131,7 +9131,12 @@ public class CardFactory implements NewConstants {
|
|||||||
|
|
||||||
public void computerResolve() {
|
public void computerResolve() {
|
||||||
CardList all = new CardList(AllZone.Human_Library.getCards());
|
CardList all = new CardList(AllZone.Human_Library.getCards());
|
||||||
all = all.getType("Creature");
|
all = all.filter(new CardListFilter(){
|
||||||
|
public boolean addCard(Card c)
|
||||||
|
{
|
||||||
|
return c.isCreature() && !c.getName().equals("Ball Lightning");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
CardList flying = all.filter(new CardListFilter() {
|
CardList flying = all.filter(new CardListFilter() {
|
||||||
public boolean addCard(Card c) {
|
public boolean addCard(Card c) {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ package forge;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import javax.swing.JOptionPane;
|
import javax.swing.JOptionPane;
|
||||||
|
|
||||||
@@ -1079,6 +1080,7 @@ public class CardFactory_Creatures {
|
|||||||
CardList list = new CardList(library.getCards());
|
CardList list = new CardList(library.getCards());
|
||||||
CardList swamp = list.getType("Swamp");
|
CardList swamp = list.getType("Swamp");
|
||||||
|
|
||||||
|
/*
|
||||||
for(int i = 0; i < 2 && (!swamp.isEmpty()); i++) {
|
for(int i = 0; i < 2 && (!swamp.isEmpty()); i++) {
|
||||||
Card c = swamp.get(0);
|
Card c = swamp.get(0);
|
||||||
swamp.remove(c);
|
swamp.remove(c);
|
||||||
@@ -1087,6 +1089,18 @@ public class CardFactory_Creatures {
|
|||||||
play.add(c);
|
play.add(c);
|
||||||
c.tap();
|
c.tap();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
List<Card> selection = AllZone.Display.getChoices("Select up to two swamps", swamp.toArray());
|
||||||
|
|
||||||
|
for(int i = 0; i < selection.size(); i++) {
|
||||||
|
Card c = selection.get(i);
|
||||||
|
|
||||||
|
library.remove(c);
|
||||||
|
play.add(c);
|
||||||
|
c.tap();
|
||||||
|
}
|
||||||
|
|
||||||
for(String effect:AllZone.StaticEffects.getStateBasedMap().keySet()) {
|
for(String effect:AllZone.StaticEffects.getStateBasedMap().keySet()) {
|
||||||
Command com = GameActionUtil.commands.get(effect);
|
Command com = GameActionUtil.commands.get(effect);
|
||||||
com.execute();
|
com.execute();
|
||||||
@@ -12185,8 +12199,7 @@ public class CardFactory_Creatures {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void showMessage() {
|
public void showMessage() {
|
||||||
CardList saps = new CardList(
|
CardList saps = new CardList(AllZone.getZone(Constant.Zone.Play, card.getController()).getCards());
|
||||||
AllZone.getZone(Constant.Zone.Play, card.getController()).getCards());
|
|
||||||
saps = saps.getType("Saproling");
|
saps = saps.getType("Saproling");
|
||||||
|
|
||||||
stopSetNext(CardFactoryUtil.input_targetSpecific(a2, saps, "Select a Saproling to sacrifice.",
|
stopSetNext(CardFactoryUtil.input_targetSpecific(a2, saps, "Select a Saproling to sacrifice.",
|
||||||
@@ -12194,11 +12207,61 @@ public class CardFactory_Creatures {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
final int[] numCreatures = new int[1];
|
||||||
final Ability a3 = new Ability(card,"0")
|
final Ability a3 = new Ability(card,"0")
|
||||||
{
|
{
|
||||||
public void resolve()
|
public void resolve()
|
||||||
{
|
{
|
||||||
|
CardList creats = new CardList(AllZone.getZone(Constant.Zone.Play, card.getController()).getCards());
|
||||||
|
creats = creats.getType("Saproling");
|
||||||
|
|
||||||
|
List<Card> selection = AllZone.Display.getChoices("Select Saprolings to sacrifice", creats.toArray());
|
||||||
|
|
||||||
|
numCreatures[0] = selection.size();
|
||||||
|
for(int m = 0; m < selection.size(); m++) {
|
||||||
|
AllZone.GameAction.sacrifice(selection.get(m));
|
||||||
|
}
|
||||||
|
|
||||||
|
final Command eot1 = new Command() {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 5732420491509961333L;
|
||||||
|
|
||||||
|
public void execute() {
|
||||||
|
CardList saps = new CardList();
|
||||||
|
saps.addAll(AllZone.Human_Play.getCards());
|
||||||
|
saps.addAll(AllZone.Computer_Play.getCards());
|
||||||
|
|
||||||
|
saps = saps.getType("Saproling");
|
||||||
|
|
||||||
|
for(int i = 0; i < saps.size(); i++) {
|
||||||
|
Card sap = saps.get(i);
|
||||||
|
|
||||||
|
sap.addTempAttackBoost(-numCreatures[0]);
|
||||||
|
sap.addTempDefenseBoost(-numCreatures[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
CardList saps = new CardList();
|
||||||
|
saps.addAll(AllZone.Human_Play.getCards());
|
||||||
|
saps.addAll(AllZone.Computer_Play.getCards());
|
||||||
|
|
||||||
|
saps = saps.getType("Saproling");
|
||||||
|
for(int i = 0; i < saps.size(); i++) {
|
||||||
|
Card sap = saps.get(i);
|
||||||
|
|
||||||
|
sap.addTempAttackBoost(numCreatures[0]);
|
||||||
|
sap.addTempDefenseBoost(numCreatures[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
AllZone.EndOfTurn.addUntil(eot1);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean canPlayAI()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
a1.setDescription("2G: Put a 1/1 green Saproling creature token into play.");
|
a1.setDescription("2G: Put a 1/1 green Saproling creature token into play.");
|
||||||
@@ -12209,12 +12272,13 @@ public class CardFactory_Creatures {
|
|||||||
card.addSpellAbility(a2);
|
card.addSpellAbility(a2);
|
||||||
a2.setDescription("Sacrifice a Saproling: Saproling creatures get +1/+1 until end of turn");
|
a2.setDescription("Sacrifice a Saproling: Saproling creatures get +1/+1 until end of turn");
|
||||||
a2.setStackDescription("Saprolings get +1/+1 until end of turn.");
|
a2.setStackDescription("Saprolings get +1/+1 until end of turn.");
|
||||||
|
a2.setBeforePayMana(runtime);
|
||||||
|
|
||||||
card.addSpellAbility(a3);
|
card.addSpellAbility(a3);
|
||||||
a3.setDescription("(Alternate way of sacrificing multiple creatures).");
|
a3.setDescription("(Alternate way of sacrificing multiple creatures).");
|
||||||
a3.setStackDescription("Saprolings get +X/+X until end of turn.");
|
a3.setStackDescription("Saprolings get +X/+X until end of turn.");
|
||||||
|
|
||||||
a2.setBeforePayMana(runtime);
|
|
||||||
}//*************** END ************ END **************************
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
//*************** START *********** START **************************
|
||||||
|
|||||||
@@ -1923,16 +1923,26 @@ class CardFactory_Planeswalkers {
|
|||||||
final SpellAbility ability1 = new Ability(card2, "0") {
|
final SpellAbility ability1 = new Ability(card2, "0") {
|
||||||
@Override
|
@Override
|
||||||
public void resolve() {
|
public void resolve() {
|
||||||
card2.addCounterFromNonEffect(Counters.LOYALTY, 1);
|
Card c = getTargetCard();
|
||||||
turn[0] = AllZone.Phase.getTurn();
|
if (c != null)
|
||||||
|
{
|
||||||
Card c = getTargetCard();
|
card2.addCounterFromNonEffect(Counters.LOYALTY, 1);
|
||||||
c.addExtrinsicKeyword("This card doesn't untap during your next untap step.");
|
turn[0] = AllZone.Phase.getTurn();
|
||||||
|
c.addExtrinsicKeyword("This card doesn't untap during your next untap step.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canPlayAI() {
|
public boolean canPlayAI() {
|
||||||
return card2.getCounters(Counters.LOYALTY) < 8;
|
CardList list = new CardList(AllZone.getZone(Constant.Zone.Play, Constant.Player.Human).getCards());
|
||||||
|
list = list.filter(new CardListFilter()
|
||||||
|
{
|
||||||
|
public boolean addCard(Card c)
|
||||||
|
{
|
||||||
|
return CardFactoryUtil.canTarget(card2, c);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return card2.getCounters(Counters.LOYALTY) < 8 && list.size() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ public class GameActionUtil {
|
|||||||
upkeep_Honden_of_Infinite_Rage();
|
upkeep_Honden_of_Infinite_Rage();
|
||||||
upkeep_Land_Tax();
|
upkeep_Land_Tax();
|
||||||
upkeep_Greener_Pastures();
|
upkeep_Greener_Pastures();
|
||||||
|
upkeep_Wort();
|
||||||
upkeep_Squee();
|
upkeep_Squee();
|
||||||
upkeep_Sporesower_Thallid();
|
upkeep_Sporesower_Thallid();
|
||||||
upkeep_Dragonmaster_Outcast();
|
upkeep_Dragonmaster_Outcast();
|
||||||
@@ -48,7 +49,6 @@ public class GameActionUtil {
|
|||||||
upkeep_Reya();
|
upkeep_Reya();
|
||||||
upkeep_Emeria();
|
upkeep_Emeria();
|
||||||
upkeep_Oversold_Cemetery();
|
upkeep_Oversold_Cemetery();
|
||||||
upkeep_Wort();
|
|
||||||
upkeep_Nether_Spirit();
|
upkeep_Nether_Spirit();
|
||||||
upkeep_Nettletooth_Djinn();
|
upkeep_Nettletooth_Djinn();
|
||||||
upkeep_Fledgling_Djinn();
|
upkeep_Fledgling_Djinn();
|
||||||
|
|||||||
Reference in New Issue
Block a user