mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
- Converted Favor of the Mighty to script.
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
Name:Favor of the Mighty
|
Name:Favor of the Mighty
|
||||||
ManaCost:1 W
|
ManaCost:1 W
|
||||||
Types:Tribal Enchantment Giant
|
Types:Tribal Enchantment Giant
|
||||||
Text:Each creature with the highest converted mana cost has protection from all colors.
|
Text:no text
|
||||||
|
S:Mode$ Continuous | Affected$ Creature.greatestCMC | AddKeyword$ Protection from white & Protection from blue & Protection from black & Protection from red & Protection from green | Description$ Each creature with the highest converted mana cost has protection from all colors.
|
||||||
SVar:RemRandomDeck:True
|
SVar:RemRandomDeck:True
|
||||||
SVar:Rarity:Rare
|
SVar:Rarity:Rare
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/favor_of_the_mighty.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/favor_of_the_mighty.jpg
|
||||||
|
|||||||
@@ -4844,6 +4844,13 @@ public class Card extends MyObservable implements Comparable<Card> {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (Property.startsWith("greatestCMC")) {
|
||||||
|
CardList list = AllZoneUtil.getCreaturesInPlay();
|
||||||
|
for (Card crd : list) {
|
||||||
|
if (crd.getCMC() > getCMC()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
} else if (Property.startsWith("enchanted")) {
|
} else if (Property.startsWith("enchanted")) {
|
||||||
if (!isEnchanted()) return false;
|
if (!isEnchanted()) return false;
|
||||||
} else if (Property.startsWith("unenchanted")) {
|
} else if (Property.startsWith("unenchanted")) {
|
||||||
|
|||||||
@@ -1600,46 +1600,6 @@ public class GameActionUtil {
|
|||||||
}// execute()
|
}// execute()
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Constant <code>Favor_of_the_Mighty</code> */
|
|
||||||
public static Command Favor_of_the_Mighty = new Command() {
|
|
||||||
private static final long serialVersionUID = 2920036758177137722L;
|
|
||||||
private CardList pumped = new CardList();
|
|
||||||
|
|
||||||
public void execute() {
|
|
||||||
//Reset old cards
|
|
||||||
for (Card c : pumped) {
|
|
||||||
c.removeIntrinsicKeyword("Protection from white");
|
|
||||||
c.removeIntrinsicKeyword("Protection from blue");
|
|
||||||
c.removeIntrinsicKeyword("Protection from black");
|
|
||||||
c.removeIntrinsicKeyword("Protection from red");
|
|
||||||
c.removeIntrinsicKeyword("Protection from green");
|
|
||||||
}
|
|
||||||
pumped.clear();
|
|
||||||
|
|
||||||
//Find creature(s) with highest cmc
|
|
||||||
int maxCMC = -1;
|
|
||||||
//boolean keepLooping = true;
|
|
||||||
CardList creats = AllZoneUtil.getCreaturesInPlay();
|
|
||||||
for (Card c : creats) {
|
|
||||||
if (c.getCMC() > maxCMC) {
|
|
||||||
pumped.clear();
|
|
||||||
pumped.add(c);
|
|
||||||
maxCMC = c.getCMC();
|
|
||||||
} else if (c.getCMC() == maxCMC) {
|
|
||||||
pumped.add(c);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Pump new cards
|
|
||||||
for (Card c : pumped) {
|
|
||||||
c.addIntrinsicKeyword("Protection from white");
|
|
||||||
c.addIntrinsicKeyword("Protection from blue");
|
|
||||||
c.addIntrinsicKeyword("Protection from black");
|
|
||||||
c.addIntrinsicKeyword("Protection from red");
|
|
||||||
c.addIntrinsicKeyword("Protection from green");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/** Constant <code>Koth_Emblem</code> */
|
/** Constant <code>Koth_Emblem</code> */
|
||||||
public static Command Koth_Emblem = new Command() {
|
public static Command Koth_Emblem = new Command() {
|
||||||
@@ -2430,9 +2390,7 @@ public class GameActionUtil {
|
|||||||
|
|
||||||
commands.put("Ajani_Avatar_Token", Ajani_Avatar_Token);
|
commands.put("Ajani_Avatar_Token", Ajani_Avatar_Token);
|
||||||
commands.put("Coat_of_Arms", Coat_of_Arms);
|
commands.put("Coat_of_Arms", Coat_of_Arms);
|
||||||
//commands.put("Conspiracy", Conspiracy);
|
|
||||||
commands.put("Elspeth_Emblem", Elspeth_Emblem);
|
commands.put("Elspeth_Emblem", Elspeth_Emblem);
|
||||||
commands.put("Favor_of_the_Mighty", Favor_of_the_Mighty);
|
|
||||||
commands.put("Gaddock_Teeg", Gaddock_Teeg);
|
commands.put("Gaddock_Teeg", Gaddock_Teeg);
|
||||||
commands.put("Homarid", Homarid);
|
commands.put("Homarid", Homarid);
|
||||||
commands.put("Iona_Shield_of_Emeria", Iona_Shield_of_Emeria);
|
commands.put("Iona_Shield_of_Emeria", Iona_Shield_of_Emeria);
|
||||||
|
|||||||
@@ -135,8 +135,6 @@ public class StaticEffects {
|
|||||||
|
|
||||||
cardToEffectsList.put("Avatar", new String[]{"Ajani_Avatar_Token"});
|
cardToEffectsList.put("Avatar", new String[]{"Ajani_Avatar_Token"});
|
||||||
cardToEffectsList.put("Coat of Arms", new String[]{"Coat_of_Arms"});
|
cardToEffectsList.put("Coat of Arms", new String[]{"Coat_of_Arms"});
|
||||||
//cardToEffectsList.put("Conspiracy", new String[]{"Conspiracy"});
|
|
||||||
cardToEffectsList.put("Favor of the Mighty", new String[]{"Favor_of_the_Mighty"});
|
|
||||||
cardToEffectsList.put("Gaddock Teeg", new String[]{"Gaddock_Teeg"});
|
cardToEffectsList.put("Gaddock Teeg", new String[]{"Gaddock_Teeg"});
|
||||||
|
|
||||||
cardToEffectsList.put("Homarid", new String[]{"Homarid"});
|
cardToEffectsList.put("Homarid", new String[]{"Homarid"});
|
||||||
|
|||||||
Reference in New Issue
Block a user