mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- Converted Favor of the Mighty to script.
This commit is contained in:
@@ -4844,6 +4844,13 @@ public class Card extends MyObservable implements Comparable<Card> {
|
||||
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")) {
|
||||
if (!isEnchanted()) return false;
|
||||
} else if (Property.startsWith("unenchanted")) {
|
||||
|
||||
@@ -1599,47 +1599,7 @@ public class GameActionUtil {
|
||||
}
|
||||
}// 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> */
|
||||
public static Command Koth_Emblem = new Command() {
|
||||
@@ -2430,9 +2390,7 @@ public class GameActionUtil {
|
||||
|
||||
commands.put("Ajani_Avatar_Token", Ajani_Avatar_Token);
|
||||
commands.put("Coat_of_Arms", Coat_of_Arms);
|
||||
//commands.put("Conspiracy", Conspiracy);
|
||||
commands.put("Elspeth_Emblem", Elspeth_Emblem);
|
||||
commands.put("Favor_of_the_Mighty", Favor_of_the_Mighty);
|
||||
commands.put("Gaddock_Teeg", Gaddock_Teeg);
|
||||
commands.put("Homarid", Homarid);
|
||||
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("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("Homarid", new String[]{"Homarid"});
|
||||
|
||||
Reference in New Issue
Block a user