- Added Condition to AF Sacrifice .

- Added Feast of Worms.
This commit is contained in:
jendave
2011-08-07 00:14:43 +00:00
parent b507263549
commit 50a83c94fb
3 changed files with 19 additions and 0 deletions

1
.gitattributes vendored
View File

@@ -2352,6 +2352,7 @@ res/cardsfolder/fear.txt -text svneol=native#text/plain
res/cardsfolder/feast_of_blood.txt -text svneol=native#text/plain
res/cardsfolder/feast_of_flesh.txt -text svneol=native#text/plain
res/cardsfolder/feast_of_the_unicorn.txt -text svneol=native#text/plain
res/cardsfolder/feast_of_worms.txt -text svneol=native#text/plain
res/cardsfolder/feast_or_famine.txt -text svneol=native#text/plain
res/cardsfolder/fecundity.txt -text svneol=native#text/plain
res/cardsfolder/feebleness.txt -text svneol=native#text/plain

View File

@@ -0,0 +1,9 @@
Name:Feast of Worms
ManaCost:3 G G
Types:Sorcery Arcane
Text:no text
A:SP$ Destroy | Cost$ 3 G G | ValidTgts$ Land | TgtPrompt$ Select target land | SubAbility$ SVar=DBSacrifice | SpellDescription$ Destroy target land. If that land was legendary, its controller sacrifices another land.
SVar:DBSacrifice:DB$ Sacrifice | Defined$ TargetedController | SacValid$ Land | ConditionDefined$ Targeted | ConditionPresent$ Land.Legendary | ConditionCompare$ EQ1 | ConditionDescription$ If that land was legendary,
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/feast_of_worms.jpg
End

View File

@@ -109,6 +109,10 @@ public class AbilityFactory_Sacrifice {
else
sb.append(sa.getSourceCard().getName()).append(" - ");
String conditionDesc = af.getMapParams().get("ConditionDescription");
if (conditionDesc != null)
sb.append(conditionDesc).append(" ");
Target tgt = af.getAbTgt();
ArrayList<Player> tgts;
if (tgt != null)
@@ -272,6 +276,11 @@ public class AbilityFactory_Sacrifice {
Card card = sa.getSourceCard();
String DrawBack = params.get("SubAbility");
if (!AbilityFactory.checkConditional(params, sa)){
AbilityFactory.resolveSubAbility(sa);
return;
}
// Expand Sacrifice keyword here depending on what we need out of it.
String num = params.containsKey("Amount") ? params.get("Amount") : "1";
int amount = AbilityFactory.calculateAmount(card, num, sa);