mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Added High Tide, Painter's Servant and Grindstone (AI even combos with Painter's Servant (: )
This commit is contained in:
@@ -38,6 +38,9 @@ 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
|
||||
painters_servant.jpg http://www.wizards.com/global/images/magic/general/painters_servant.jpg
|
||||
grindstone.jpg http://www.wizards.com/global/images/magic/general/grindstone.jpg
|
||||
high_tide.jpg http://www.wizards.com/global/images/magic/general/high_tide.jpg
|
||||
abyssal_persecutor.jpg http://www.wizards.com/global/images/magic/general/abyssal_persecutor.jpg
|
||||
platinum_angel.jpg http://www.wizards.com/global/images/magic/general/platinum_angel.jpg
|
||||
mayael_the_anima.jpg http://www.wizards.com/global/images/magic/general/mayael_the_anima.jpg
|
||||
|
||||
@@ -1,3 +1,19 @@
|
||||
Painter's Servant
|
||||
2
|
||||
Artifact Creature Scarecrow
|
||||
As Painter's Servant enters the battlefield, choose a color. All cards that aren't on the battlefield, spells, and permanents are the chosen color in addition to their other colors.
|
||||
1/3
|
||||
|
||||
Grindstone
|
||||
1
|
||||
Artifact
|
||||
3, Tap: Put the top two cards of target player's library into that player's graveyard. If both cards share a color, repeat this process.
|
||||
|
||||
High Tide
|
||||
U
|
||||
Instant
|
||||
Until end of turn, whenever a player taps an Island for mana, that player adds Blue to his or her mana pool (in addition to the mana the land produces).
|
||||
|
||||
Abyssal Persecutor
|
||||
2 B B
|
||||
Creature Demon
|
||||
|
||||
@@ -252,6 +252,13 @@ abstract public class Ability_Mana extends SpellAbility implements java.io.Seria
|
||||
}
|
||||
}
|
||||
// Nirkana Revenant Code
|
||||
// High Tide Code
|
||||
if(Phase.HighTideCount > 0 && sourceCard.getType().contains("Island") && sourceCard.getController().equals("Human")) {
|
||||
for(int i = 0; i < Phase.HighTideCount; i++) {
|
||||
AllZone.ManaPool.addMana("U");
|
||||
}
|
||||
}
|
||||
// High Tide Code
|
||||
if(!runcommands.isEmpty()) for(Command c:runcommands)
|
||||
c.execute();
|
||||
}
|
||||
|
||||
@@ -14669,7 +14669,25 @@ public class CardFactory implements NewConstants {
|
||||
card.addSpellAbility(spell);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("High Tide")) {
|
||||
SpellAbility spell = new Spell(card) {
|
||||
private static final long serialVersionUID = -4997834721261916L;
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
return false;
|
||||
}//canPlay()
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
Phase.HighTideCount = Phase.HighTideCount + 1;
|
||||
}//resolve()
|
||||
};//SpellAbility
|
||||
card.clearSpellAbility();
|
||||
card.addSpellAbility(spell);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Gift of Estates")) {
|
||||
SpellAbility spell = new Spell(card) {
|
||||
@@ -20353,6 +20371,62 @@ public class CardFactory implements NewConstants {
|
||||
card.addSpellAbility(spell);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Grindstone")) {
|
||||
Ability_Tap ab1 = new Ability_Tap(card, "3") {
|
||||
private static final long serialVersionUID = -6281219446216L;
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
String player = getTargetPlayer();
|
||||
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, player);
|
||||
CardList libList = new CardList(lib.getCards());
|
||||
CardList list = AllZoneUtil.getCardsInPlay("Painter's Servant");
|
||||
return libList.size() > 0 && list.size() > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, getTargetPlayer());
|
||||
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, getTargetPlayer());
|
||||
CardList libList = new CardList(lib.getCards());
|
||||
int count = 0;
|
||||
int broken = 0;
|
||||
for(int i = 0; i < libList.size(); i = i + 2) {
|
||||
Card c1 = null;
|
||||
Card c2 = null;
|
||||
if(i < libList.size()) c1 = libList.get(i);
|
||||
else broken = 1;
|
||||
if(i + 1 < libList.size()) c2 = libList.get(i + 1);
|
||||
else broken = 1;
|
||||
if(broken == 0) {
|
||||
ArrayList<String> C2Color = CardUtil.getColors(c2);
|
||||
broken = 1;
|
||||
for(int x = 0; x < C2Color.size(); x++) {
|
||||
if(CardUtil.getColors(c1).contains(C2Color.get(x)) && C2Color.get(x) != Constant.Color.Colorless) {
|
||||
count = count + 1;
|
||||
broken = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
count = (count * 2) + 2;
|
||||
int max = count;
|
||||
if(libList.size() < count) max = libList.size();
|
||||
|
||||
for(int j = 0; j < max; j++) {
|
||||
Card c = libList.get(j);
|
||||
lib.remove(c);
|
||||
grave.add(c);
|
||||
}
|
||||
}
|
||||
};
|
||||
ab1.setChooseTargetAI(CardFactoryUtil.AI_targetHuman());
|
||||
ab1.setBeforePayMana(CardFactoryUtil.input_targetPlayer(ab1));
|
||||
card.addSpellAbility(ab1);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Keening Stone")) {
|
||||
/*
|
||||
|
||||
@@ -8074,7 +8074,48 @@ public class CardFactory_Creatures {
|
||||
ability.setStackDescription(card.getName() + " - " + card.getController() + " gains 3 life.");
|
||||
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Painter's Servant")) {
|
||||
final Ability ability = new Ability(card, "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
if(card.getController().equals(Constant.Player.Human)) {
|
||||
|
||||
String color = "";
|
||||
String[] colors = Constant.Color.Colors;
|
||||
colors[colors.length - 1] = null;
|
||||
|
||||
Object o = AllZone.Display.getChoice("Choose color", colors);
|
||||
color = (String) o;
|
||||
card.setChosenColor(color);
|
||||
} else {
|
||||
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, Constant.Player.Human);
|
||||
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, Constant.Player.Human);
|
||||
CardList list = new CardList();
|
||||
list.addAll(lib.getCards());
|
||||
list.addAll(hand.getCards());
|
||||
|
||||
if(list.size() > 0) {
|
||||
String color = CardFactoryUtil.getMostProminentColor(list);
|
||||
if(!color.equals("")) card.setChosenColor(color);
|
||||
else card.setChosenColor("black");
|
||||
} else {
|
||||
card.setChosenColor("black");
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
Command comesIntoPlay = new Command() {
|
||||
private static final long serialVersionUID = 333134223161L;
|
||||
|
||||
public void execute() {
|
||||
AllZone.Stack.add(ability);
|
||||
}
|
||||
};//Command
|
||||
ability.setStackDescription("As Painter's Servant enters the battlefield, choose a color.");
|
||||
card.addComesIntoPlayCommand(comesIntoPlay);
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Mogg Fanatic")) {
|
||||
|
||||
@@ -131,6 +131,12 @@ public class CardUtil {
|
||||
colors.add(color);
|
||||
if(colors.contains(Constant.Color.Colorless))
|
||||
colors.clear();
|
||||
// Painter's
|
||||
CardList list = AllZoneUtil.getCardsInPlay("Painter's Servant");
|
||||
if(list.size() > 0){
|
||||
for(int i = 0; i < list.size(); i++) colors.add(list.get(i).getChosenColor());
|
||||
}
|
||||
//Painter's
|
||||
if(colors.isEmpty()) colors.add(Constant.Color.Colorless);
|
||||
|
||||
return new ArrayList<String>(colors);
|
||||
|
||||
@@ -111,6 +111,50 @@ public class Input_PayManaCostUtil
|
||||
}
|
||||
}
|
||||
// Nirkana Revenant Code
|
||||
// High Tide Code
|
||||
if(Phase.HighTideCount > 0 && card.getType().contains("Island") && card.getController().equals("Human")) {
|
||||
for(int x = 0; x < Phase.HighTideCount; x++) {
|
||||
for(int i = 0; i < abilities.size(); i++) {
|
||||
if(abilities.get(i).mana().contains("U") == true) {
|
||||
if(card.isSnow() == false) {
|
||||
chosen = abilities.get(i);
|
||||
manaCost = AllZone.ManaPool.subtractMana(manaCost, chosen);
|
||||
} else {
|
||||
|
||||
if(manaCost.toString().trim() != "") {
|
||||
if(manaCost.toString().contains("U")) {
|
||||
manaCost.subtractMana("U");
|
||||
if(AllZone.ManaPool.has == "") {
|
||||
AllZone.ManaPool.paid = AllZone.ManaPool.paid.replaceFirst("U", "");
|
||||
mp.removeExtrinsicKeyword("ManaPool:U");
|
||||
}
|
||||
else {
|
||||
AllZone.ManaPool.has = AllZone.ManaPool.has.replaceFirst("U", "");
|
||||
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(manaCost.toString().length() > 0) {
|
||||
manaCost.subtractMana("1");
|
||||
|
||||
if(AllZone.ManaPool.has == "") {
|
||||
AllZone.ManaPool.paid = AllZone.ManaPool.paid.replaceFirst("U", "");
|
||||
mp.removeExtrinsicKeyword("ManaPool:U");
|
||||
}
|
||||
else {
|
||||
AllZone.ManaPool.has = AllZone.ManaPool.has.replaceFirst("U", "");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// High Tide Code
|
||||
AllZone.Human_Play.updateObservers();//DO NOT REMOVE THIS, otherwise the cards don't always tap (copied)
|
||||
return manaCost;
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ public class Phase extends MyObservable
|
||||
private int turn;
|
||||
static int GameBegins = 0; // Omnath
|
||||
static int StormCount;
|
||||
static int HighTideCount = 0;
|
||||
static int PlayerSpellCount;
|
||||
static int PlayerCreatureSpellCount;
|
||||
static int ComputerSpellCount;
|
||||
@@ -230,6 +231,7 @@ public class Phase extends MyObservable
|
||||
//if(getPhase().equals(Constant.Phase.Untap)) {
|
||||
if(is(Constant.Phase.Untap, Constant.Player.Human)) {
|
||||
StormCount = 0;
|
||||
HighTideCount = 0;
|
||||
PlayerSpellCount = 0;
|
||||
PlayerCreatureSpellCount = 0;
|
||||
ComputerSpellCount = 0;
|
||||
@@ -243,6 +245,7 @@ public class Phase extends MyObservable
|
||||
*/
|
||||
} else if(is(Constant.Phase.Untap, Constant.Player.Computer)) {
|
||||
StormCount = 0;
|
||||
HighTideCount = 0;
|
||||
PlayerSpellCount = 0;
|
||||
PlayerCreatureSpellCount = 0;
|
||||
ComputerSpellCount = 0;
|
||||
|
||||
Reference in New Issue
Block a user