- Added an AILogic parameter to AF ChoseColor.

- Converted Curse of Wizardry to script.
This commit is contained in:
Sloth
2011-10-04 10:46:02 +00:00
parent 10b203de68
commit 78d2cb58e9
4 changed files with 23 additions and 10 deletions

View File

@@ -1,7 +1,11 @@
Name:Curse of Wizardry
ManaCost:2 B B
Types:Enchantment
Text:As Curse of Wizardry enters the battlefield, choose a color.\r\nWhenever a player casts a spell of the chosen color, that player loses 1 life.
Text:no text
T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ ChooseColor | Static$ True| TriggerDescription$ As CARDNAME enters the battlefield, choose a color.
SVar:ChooseColor:AB$ ChooseColor | Cost$ 0 | Defined$ You | AILogic$ MostProminentInHumanDeck
T:Mode$ SpellCast | ValidCard$ Card.ChosenColor | TriggerZones$ Battlefield | Execute$ TrigLoseLife | TriggerDescription$ Whenever a player casts a spell of the chosen color, that player loses 1 life.
SVar:TrigLoseLife:AB$LoseLife | Cost$ 0 | Defined$ TriggeredCardController | LifeAmount$ 1
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/curse_of_wizardry.jpg
SetInfo:ROE|Uncommon|http://magiccards.info/scans/en/roe/104.jpg

View File

@@ -52,7 +52,7 @@ public final class GameActionUtil {
//playCard_Storm(sa);
playCard_Vengevine(c);
playCard_Curse_of_Wizardry(c);
//playCard_Curse_of_Wizardry(c);
playCard_Venser_Emblem(c);
playCard_Ichneumon_Druid(c);
@@ -455,7 +455,7 @@ public final class GameActionUtil {
*
* @param c a {@link forge.Card} object.
*/
public static void playCard_Curse_of_Wizardry(final Card c) {
/*public static void playCard_Curse_of_Wizardry(final Card c) {
CardList list = AllZoneUtil.getCardsIn(Zone.Battlefield, "Curse of Wizardry");
if (list.size() > 0) {
@@ -481,7 +481,7 @@ public final class GameActionUtil {
}
} //if
} //if
} //Curse of Wizardry
}*/ //Curse of Wizardry
/**
* <p>payManaDuringAbilityResolve.</p>

View File

@@ -578,10 +578,19 @@ public class AbilityFactory_Choose {
String choice = (String) o;
card.setChosenColor(choice);
} else {
//TODO - needs improvement
card.setChosenColor(Constant.Color.Black);
String message = "Computer chooses " + Constant.Color.Black;
JOptionPane.showMessageDialog(null, message, "" + card, JOptionPane.PLAIN_MESSAGE);
String chosen = "";
if (params.containsKey("AILogic")) {
String logic = params.get("AILogic");
if (logic.equals("MostProminentInHumanDeck")) {
chosen = CardFactoryUtil.getMostProminentColor(
AllZoneUtil.getCardsInGame().getController(AllZone.getHumanPlayer()));
}
}
if (chosen.equals("")) {
chosen = Constant.Color.Green;
}
GuiUtils.getChoice("Computer picked: ", chosen);
card.setChosenColor(chosen);
}
}
}

View File

@@ -1137,7 +1137,7 @@ public abstract class AbstractCardFactory implements NewConstants, CardFactoryIn
//*************** START *********** START **************************
else if (cardName.equals("Curse of Wizardry")) {
/*else if (cardName.equals("Curse of Wizardry")) {
final Ability ability = new Ability(card, "0") {
@Override
public void resolve() {
@@ -1181,7 +1181,7 @@ public abstract class AbstractCardFactory implements NewConstants, CardFactoryIn
ability.setStackDescription(sb.toString());
card.addComesIntoPlayCommand(comesIntoPlay);
} //*************** END ************ END **************************
}*/ //*************** END ************ END **************************
//*************** START *********** START **************************