- Added the "Optional" parameter to AF Discard.

- Added Lim-Dul's Paladin by Jeff.
This commit is contained in:
Sloth
2012-02-09 11:34:16 +00:00
parent 4949869a17
commit 2c0058c43d
3 changed files with 37 additions and 11 deletions

1
.gitattributes vendored
View File

@@ -5001,6 +5001,7 @@ res/cardsfolder/l/lilting_refrain.txt svneol=native#text/plain
res/cardsfolder/l/lim_dul_the_necromancer.txt svneol=native#text/plain res/cardsfolder/l/lim_dul_the_necromancer.txt svneol=native#text/plain
res/cardsfolder/l/lim_duls_cohort.txt svneol=native#text/plain res/cardsfolder/l/lim_duls_cohort.txt svneol=native#text/plain
res/cardsfolder/l/lim_duls_high_guard.txt svneol=native#text/plain res/cardsfolder/l/lim_duls_high_guard.txt svneol=native#text/plain
res/cardsfolder/l/lim_duls_paladin.txt -text
res/cardsfolder/l/limestone_golem.txt svneol=native#text/plain res/cardsfolder/l/limestone_golem.txt svneol=native#text/plain
res/cardsfolder/l/lin_sivvi_defiant_hero.txt svneol=native#text/plain res/cardsfolder/l/lin_sivvi_defiant_hero.txt svneol=native#text/plain
res/cardsfolder/l/linessa_zephyr_mage.txt svneol=native#text/plain res/cardsfolder/l/linessa_zephyr_mage.txt svneol=native#text/plain

View File

@@ -0,0 +1,23 @@
Name:Lim-Dul's Paladin
ManaCost:2 B R
Types:Creature Human Knight
Text:no text
PT:0/3
K:Trample
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | Execute$ TrigDiscard | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of your upkeep, you may discard a card. If you don't, sacrifice CARDNAME and draw a card.
SVar:TrigDiscard:AB$ Discard | Cost$ 0 | NumCards$ 1 | Mode$ TgtChoose | Optional$ True | RememberDiscarded$ True | SubAbility$ DBSacrifice
SVar:DBSacrifice:DB$ Sacrifice | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ0 | SubAbility$ DBDraw
SVar:DBDraw:DB$ Draw | NumCards$ 1 | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ0 | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
T:Mode$ Blocks | ValidCard$ Creature | ValidBlocked$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigBlockedPump | TriggerDescription$ Whenever CARDNAME becomes blocked by a creature, CARDNAME get +6/+3 until end of turn.
SVar:TrigBlockedPump:AB$Pump | Cost$ 0 | Defined$ Self | NumAtt$ 6 | NumDef$ 3
T:Mode$ AttackerUnblocked | ValidCard$ Card.Self | Execute$ TrigUnBlockedPump | TriggerZones$ Battlefield | TriggerDescription$ Whenever CARDNAME attacks and isn't blocked, it assigns no combat damage to defending player this turn and that player loses 4 life.
SVar:TrigUnBlockedPump:AB$ Pump | Cost$ 0 | KW$ HIDDEN Prevent all combat damage that would be dealt by CARDNAME. | SubAbility$ DBLoseLife
SVar:DBLoseLife:DB$ LoseLife | Defined$ Opponent | LifeAmount$ 4
SVar:X:Remembered$Amount
SVar:RemAIDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/lim_duls_paladin.jpg
SetInfo:ALL|Uncommon|http://magiccards.info/scans/en/ai/191.jpg
Oracle:Trample\nAt the beginning of your upkeep, you may discard a card. If you don't, sacrifice Lim-Dul's Paladin and draw a card.\nWhenever Lim-Dul's Paladin becomes blocked, it gets +6/+3 until end of turn.\nWhenever Lim-Dul's Paladin attacks and isn't blocked, it assigns no combat damage to defending player this turn and that player loses 4 life.
End

View File

@@ -1267,27 +1267,29 @@ public class AbilityFactoryZoneAffecting {
GuiUtils.getChoiceOptional("Computer has chosen", dCs.toArray()); GuiUtils.getChoiceOptional("Computer has chosen", dCs.toArray());
} }
discarded.add(dC); discarded.add(dC);
AllZone.getComputerPlayer().discard(dC, sa); // is p.discard(dC, sa);
// this
// right?
} }
} }
} else { } else {
// human // human
if (mode.startsWith("Reveal")) { if (mode.startsWith("Reveal")) {
GuiUtils.getChoiceOptional("Revealed computer hand", dPHand.toArray()); GuiUtils.getChoiceOptional("Revealed " + p + " hand", dPHand.toArray());
} }
for (int i = 0; i < numCards; i++) { for (int i = 0; i < numCards; i++) {
if (dPChHand.size() > 0) { if (dPChHand.size() > 0) {
final Card dC = GuiUtils.getChoice("Choose a card to be discarded", Card dC = null;
if(params.containsKey("Optional")) {
dC = GuiUtils.getChoiceOptional("Choose a card to be discarded",
dPChHand.toArray()); dPChHand.toArray());
} else {
dC = GuiUtils.getChoice("Choose a card to be discarded",
dPChHand.toArray());
} if (dC != null) {
dPChHand.remove(dC); dPChHand.remove(dC);
discarded.add(dC); discarded.add(dC);
AllZone.getHumanPlayer().discard(dC, sa); // is p.discard(dC, sa);
// this }
// right?
} }
} }
} }