mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
- The "DiscardValid" parameter in AF Discard now also works if the mode is "TgtChoose".
- Converted Krovikan Sorcerer to script.
This commit is contained in:
@@ -4,6 +4,10 @@ Types:Creature Human Wizard
|
||||
Text:no text
|
||||
PT:1/1
|
||||
A:AB$ Draw | Cost$ T Discard<1/Card.nonBlack> | NumCards$ 1 | CostDesc$ Tap, Discard a non black card: | SpellDescription$ Draw a card.
|
||||
A:AB$ Draw | Cost$ T Discard<1/Card.Black> | NumCards$ 2 | CostDesc$ Tap, Discard a black card: | RememberDrawn$ True | SubAbility$ DBDiscard | SpellDescription$ Draw two cards, then discard one of them.
|
||||
SVar:DBDiscard:DB$Discard | Defined$ You | Mode$ TgtChoose | DiscardValid$ Card.IsRemembered | NumCards$ 1 | SubAbility$ DBCleanup
|
||||
SVar:DBCleanup:DB$Cleanup | ClearRemembered$ True
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/krovikan_sorcerer.jpg
|
||||
SetInfo:5ED|Common|http://magiccards.info/scans/en/5e/96.jpg
|
||||
|
||||
@@ -3,7 +3,7 @@ ManaCost:1 U
|
||||
Types:Creature Merfolk Rogue
|
||||
Text:no text
|
||||
PT:1/1
|
||||
A:AB$ Draw | Cost$ T | NumCards$ 1 | SpellDescription$ Draw a card, then discard a card. | SubAbility$ SVar=DBDiscard
|
||||
A:AB$ Draw | Cost$ T | NumCards$ 1 | SpellDescription$ Draw a card, then discard a card. | SubAbility$ DBDiscard
|
||||
SVar:DBDiscard:DB$Discard | Defined$ You | Mode$ TgtChoose | NumCards$ 1
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/merfolk_looter.jpg
|
||||
|
||||
@@ -1129,12 +1129,8 @@ public class AbilityFactoryZoneAffecting {
|
||||
if (mode.equals("Random")) {
|
||||
final String valid = params.containsKey("DiscardValid") ? params.get("DiscardValid") : "Card";
|
||||
discarded.addAll(p.discardRandom(numCards, sa, valid));
|
||||
} else if (mode.equals("TgtChoose")) {
|
||||
if (params.containsKey("UnlessType")) {
|
||||
p.discardUnless(numCards, params.get("UnlessType"), sa);
|
||||
} else {
|
||||
discarded.addAll(p.discard(numCards, sa, true));
|
||||
}
|
||||
} else if (mode.equals("TgtChoose") && params.containsKey("UnlessType")) {
|
||||
p.discardUnless(numCards, params.get("UnlessType"), sa);
|
||||
} else if (mode.equals("RevealDiscardAll")) {
|
||||
// Reveal
|
||||
final CardList dPHand = p.getCardsIn(Zone.Hand);
|
||||
@@ -1160,7 +1156,8 @@ public class AbilityFactoryZoneAffecting {
|
||||
p.discard(c, sa);
|
||||
discarded.add(c);
|
||||
}
|
||||
} else if (mode.equals("RevealYouChoose") || mode.equals("RevealOppChoose")) {
|
||||
} else if (mode.equals("RevealYouChoose") || mode.equals("RevealOppChoose")
|
||||
|| mode.equals("TgtChoose")) {
|
||||
// Is Reveal you choose right? I think the wrong player is
|
||||
// being used?
|
||||
final CardList dPHand = p.getCardsIn(Zone.Hand);
|
||||
@@ -1173,10 +1170,10 @@ public class AbilityFactoryZoneAffecting {
|
||||
final String[] dValid = params.get("DiscardValid").split(",");
|
||||
dPChHand = dPHand.getValidCards(dValid, source.getController(), source);
|
||||
}
|
||||
Player chooser = null;
|
||||
Player chooser = p;
|
||||
if (mode.equals("RevealYouChoose")) {
|
||||
chooser = source.getController();
|
||||
} else {
|
||||
} else if (mode.equals("RevealOppChoose")){
|
||||
chooser = source.getController().getOpponent();
|
||||
}
|
||||
|
||||
@@ -1203,10 +1200,12 @@ public class AbilityFactoryZoneAffecting {
|
||||
|
||||
final Card dC = dChoices.get(CardUtil.getRandomIndex(dChoices));
|
||||
dPChHand.remove(dC);
|
||||
|
||||
final CardList dCs = new CardList();
|
||||
dCs.add(dC);
|
||||
GuiUtils.getChoiceOptional("Computer has chosen", dCs.toArray());
|
||||
|
||||
if (mode.startsWith("Reveal")) {
|
||||
final CardList dCs = new CardList();
|
||||
dCs.add(dC);
|
||||
GuiUtils.getChoiceOptional("Computer has chosen", dCs.toArray());
|
||||
}
|
||||
discarded.add(dC);
|
||||
AllZone.getComputerPlayer().discard(dC, sa); // is
|
||||
// this
|
||||
@@ -1215,7 +1214,9 @@ public class AbilityFactoryZoneAffecting {
|
||||
}
|
||||
} else {
|
||||
// human
|
||||
GuiUtils.getChoiceOptional("Revealed computer hand", dPHand.toArray());
|
||||
if (mode.startsWith("Reveal")) {
|
||||
GuiUtils.getChoiceOptional("Revealed computer hand", dPHand.toArray());
|
||||
}
|
||||
|
||||
for (int i = 0; i < numCards; i++) {
|
||||
if (dPChHand.size() > 0) {
|
||||
|
||||
@@ -2644,7 +2644,7 @@ public class CardFactoryCreatures {
|
||||
} // *************** END ************ END **************************
|
||||
|
||||
// *************** START *********** START **************************
|
||||
else if (cardName.equals("Krovikan Sorcerer")) {
|
||||
/*else if (cardName.equals("Krovikan Sorcerer")) {
|
||||
final Cost abCost = new Cost("T Discard<1/Card.Black>", cardName, true);
|
||||
final AbilityActivated ability = new AbilityActivated(card, abCost, null) {
|
||||
private static final long serialVersionUID = 3689290210743241201L;
|
||||
@@ -2695,7 +2695,7 @@ public class CardFactoryCreatures {
|
||||
final StringBuilder sbStack = new StringBuilder();
|
||||
sbStack.append(card).append(" - Draw two cards, then discard one of them.");
|
||||
ability.setStackDescription(sbStack.toString());
|
||||
} // *************** END ************ END **************************
|
||||
}*/ // *************** END ************ END **************************
|
||||
|
||||
// ***************************************************
|
||||
// end of card specific code
|
||||
|
||||
Reference in New Issue
Block a user