Added Omnath, Locus of Mana (Not usable by the AI)

This commit is contained in:
jendave
2011-08-06 04:46:52 +00:00
parent 189750a0e7
commit 82fd741c92
6 changed files with 121 additions and 1 deletions

View File

@@ -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
omnath_locus_of_mana.jpg http://www.wizards.com/global/images/magic/general/omnath_locus_of_mana.jpg
implements_of_sacrifice.jpg http://www.wizards.com/global/images/magic/general/implements_of_sacrifice.jpg
talon_sliver.jpg http://www.wizards.com/global/images/magic/general/talon_sliver.jpg
grave_shell_scarab.jpg http://www.wizards.com/global/images/magic/general/grave_shell_scarab.jpg

View File

@@ -1,3 +1,9 @@
Omnath, Locus of Mana
2 G
Legendary Creature Elemental
Green mana doesn't empty from your mana pool as steps and phases end. Omnath, Locus of Mana gets +1/+1 for each green mana in your mana pool.
1/1
Fear
B B
Enchantment Aura

View File

@@ -12455,6 +12455,41 @@ public class GameActionUtil {
}
};
public static Command Omnath = new Command() {
private static final long serialVersionUID = -22045167326100804L;
public void execute() {
CardList list = AllZoneUtil.getCardsInPlay("Omnath, Locus of Mana");
for(int i = 0; i < list.size(); i++) { // Should be 1.
Card c = list.get(i);
if(c.getController() == "Human") {
String Mana = AllZone.ManaPool.has + AllZone.ManaPool.smp.getText();
int Count = 0;
if(Mana != null) Count = Mana.length();
int Bonus = 0;
if(Count > 0) {
for(int x = 0; x < Count; x++) {
if(Mana.contains("G") == true) {
Mana = Mana.replaceFirst("G", "");
Bonus = Bonus + 1;
}
}
c.setBaseAttack(Bonus + 1);
c.setBaseDefense(Bonus + 1);
}
} else {
c.setBaseAttack(1);
c.setBaseDefense(1);
}
}
}// execute()
};
public static Command Dauntless_Escort = new Command() {
private static final long serialVersionUID = -2201201455269804L;
CardList old = new CardList();
@@ -18084,6 +18119,7 @@ public class GameActionUtil {
commands.put("Kor_Duelist", Kor_Duelist);
commands.put("Keldon_Warlord", Keldon_Warlord);
commands.put("Heedless_One", Heedless_One);
commands.put("Omnath", Omnath);
commands.put("Arena_of_the_Ancients", Arena_of_the_Ancients);
//System.out.println("size of commands: " + commands.size());

View File

@@ -227,6 +227,18 @@ public class ManaPool extends Card {
} else Colorless += s;
}
addOne(cless + "");
//Omnath, Locus of Mana Pump Trigger
if(Phase.GameBegins == 1) {
CardList Omnath_Human = new CardList();
PlayerZone play = AllZone.getZone(Constant.Zone.Play, Constant.Player.Human);
Omnath_Human.addAll(play.getCards());
Omnath_Human = Omnath_Human.getName("Omnath, Locus of Mana");
if(Omnath_Human.size() > 0) {
Command com = GameActionUtil.commands.get("Omnath");
com.execute();
}
}
//Omnath, Locus of Mana Pump Trigger
//has[0]+=cless;
}
@@ -242,6 +254,18 @@ public class ManaPool extends Card {
} catch(NumberFormatException ex) {
throw new RuntimeException("Mana_Pool.AddOne : Error, noncolor mana cost is not a number - " + Mana);
}
//Omnath, Locus of Mana Pump Trigger
if(Phase.GameBegins == 1) {
CardList Omnath_Human = new CardList();
PlayerZone play = AllZone.getZone(Constant.Zone.Play, Constant.Player.Human);
Omnath_Human.addAll(play.getCards());
Omnath_Human = Omnath_Human.getName("Omnath, Locus of Mana");
if(Omnath_Human.size() > 0) {
Command com = GameActionUtil.commands.get("Omnath");
com.execute();
}
}
//Omnath, Locus of Mana Pump Trigger
}
public static String[] getManaParts(Ability_Mana manaAbility) {
@@ -332,6 +356,18 @@ public class ManaPool extends Card {
}
}
}
//Omnath, Locus of Mana Pump Trigger
if(Phase.GameBegins == 1) {
CardList Omnath_Human = new CardList();
PlayerZone play = AllZone.getZone(Constant.Zone.Play, Constant.Player.Human);
Omnath_Human.addAll(play.getCards());
Omnath_Human = Omnath_Human.getName("Omnath, Locus of Mana");
if(Omnath_Human.size() > 0) {
Command com = GameActionUtil.commands.get("Omnath");
com.execute();
}
}
//Omnath, Locus of Mana Pump Trigger
return m;
}
@@ -403,6 +439,18 @@ public class ManaPool extends Card {
}
}
}
//Omnath, Locus of Mana Pump Trigger
if(Phase.GameBegins == 1) {
CardList Omnath_Human = new CardList();
PlayerZone play = AllZone.getZone(Constant.Zone.Play, Constant.Player.Human);
Omnath_Human.addAll(play.getCards());
Omnath_Human = Omnath_Human.getName("Omnath, Locus of Mana");
if(Omnath_Human.size() > 0) {
Command com = GameActionUtil.commands.get("Omnath");
com.execute();
}
}
//Omnath, Locus of Mana Pump Trigger
return manaCost;
}
@@ -430,7 +478,32 @@ public class ManaPool extends Card {
if(!isSnow()) smp.clear();
used.clear();
paid = "";//Arrays.fill(paid, 0);
has = "";//Arrays.fill(has, 0);
//Omnath, Locus of Mana Mana Storage
if(Phase.GameBegins == 1) {
CardList Omnath_Human = new CardList();
PlayerZone play = AllZone.getZone(Constant.Zone.Play, Constant.Player.Human);
Omnath_Human.addAll(play.getCards());
Omnath_Human = Omnath_Human.getName("Omnath, Locus of Mana");
String New_ManaPool = "";
if(Omnath_Human.size() > 0) {
String Human_ManaPool = has;
int Count = Human_ManaPool.length();
for(int i = 0; i < Count; i++) {
if(Human_ManaPool.contains("G") == true) {
Human_ManaPool = Human_ManaPool.replaceFirst("G", "");
New_ManaPool = New_ManaPool + "G";
}
}
New_ManaPool = New_ManaPool.trim();
has = New_ManaPool;
//Omnath, Locus of Mana Mana Storage
} else {
has = "";//Arrays.fill(has, 0);
}
} else {
has = "";//Arrays.fill(has, 0); // This is required to prevent crashing on the first turn.
}
}
public void paid() {

View File

@@ -9,6 +9,7 @@ public class Phase extends MyObservable
{
private int phaseIndex;
private int turn;
static int GameBegins = 0; // Omnath
static int StormCount;
static int PlayerSpellCount;
static int PlayerCreatureSpellCount;
@@ -75,6 +76,7 @@ public class Phase extends MyObservable
public void reset() {
turn = 1;
GameBegins = 0;
phaseIndex = 0;
humanExtraTurns = 0;
computerExtraTurns = 0;
@@ -256,6 +258,7 @@ public class Phase extends MyObservable
}
if(is(Constant.Phase.Main1, Constant.Player.Human)) {
if(turn == 1) {
GameBegins = 1; // Omnath
StormCount = 0;
PlayerSpellCount = 0;
PlayerCreatureSpellCount = 0;

View File

@@ -211,6 +211,7 @@ public class StaticEffects
cardToEffectsList.put("Kor Duelist", new String[] {"Kor_Duelist"});
cardToEffectsList.put("Keldon Warlord", new String[] {"Keldon_Warlord"});
cardToEffectsList.put("Heedless One", new String[] {"Heedless_One"});
cardToEffectsList.put("Omnath, Locus of Mana", new String[] {"Omnath"});
cardToEffectsList.put("Arena of the Ancients", new String[] {"Arena_of_the_Ancients"});
}