- Converted Well-Laid Plans to script

This commit is contained in:
swordshine
2014-02-26 11:28:03 +00:00
parent 94a916be8c
commit a20686d9cd
2 changed files with 11 additions and 1 deletions

View File

@@ -71,6 +71,16 @@ public class StaticAbilityPreventDamage {
return restDamage; return restDamage;
} }
if (params.containsKey("SourceSharesColorWithTarget")) {
if (!(target instanceof Card) || source.equals(target)) {
return restDamage;
}
Card targetCard = (Card) target;
if (!source.sharesColorWith(targetCard)) {
return restDamage;
}
}
if (params.containsKey("Optional")) { //Assume if param is present it should be optional if (params.containsKey("Optional")) { //Assume if param is present it should be optional
if (!isTest) { if (!isTest) {
final String logic = params.containsKey("AILogic") ? params.get("AILogic") : ""; final String logic = params.containsKey("AILogic") ? params.get("AILogic") : "";

View File

@@ -1,7 +1,7 @@
Name:Well-Laid Plans Name:Well-Laid Plans
ManaCost:2 U ManaCost:2 U
Types:Enchantment Types:Enchantment
Text:Prevent all damage that would be dealt to a creature by another creature if they share a color. S:Mode$ PreventDamage | Source$ Creature | Target$ Creature | SourceSharesColorWithTarget$ True | Description$ Prevent all damage that would be dealt to a creature by another creature if they share a color.
SVar:NonStackingEffect:True SVar:NonStackingEffect:True
SVar:RemRandomDeck:True SVar:RemRandomDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/well_laid_plans.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/well_laid_plans.jpg