- Added Liar's Pendulum

This commit is contained in:
swordshine
2013-11-20 13:00:06 +00:00
parent 22caa0a408
commit f8fe7e41b4
6 changed files with 35 additions and 11 deletions

1
.gitattributes vendored
View File

@@ -6547,6 +6547,7 @@ forge-gui/res/cardsfolder/l/leyline_of_vitality.txt svneol=native#text/plain
forge-gui/res/cardsfolder/l/leyline_phantom.txt -text
forge-gui/res/cardsfolder/l/lhurgoyf.txt svneol=native#text/plain
forge-gui/res/cardsfolder/l/liability.txt svneol=native#text/plain
forge-gui/res/cardsfolder/l/liars_pendulum.txt -text
forge-gui/res/cardsfolder/l/liberate.txt svneol=native#text/plain
forge-gui/res/cardsfolder/l/liberated_dwarf.txt svneol=native#text/plain
forge-gui/res/cardsfolder/l/library_of_alexandria.txt svneol=native#text/plain

View File

@@ -0,0 +1,14 @@
Name:Liar's Pendulum
ManaCost:1
Types:Artifact
A:AB$ NameCard | Cost$ 2 T | Defined$ You | SubAbility$ DBGuess | SpellDescription$ Name a card. Target opponent guesses whether a card with that name is in your hand. You may reveal your hand. If you do and your opponent guessed wrong, draw a card.
SVar:DBGuess:DB$ GenericChoice | ValidTgts$ Opponent | Choices$ GuessInHand,GuessNotInHand | AILogic$ Random | ShowChoice$ True
SVar:GuessInHand:DB$ RevealHand | Defined$ You | Optional$ True | RememberRevealedPlayer$ True | SubAbility$ DBInHandDraw | ChoiceDescription$ A card with that name is in that player's hand
SVar:GuessNotInHand:DB$ RevealHand | Defined$ You | Optional$ True | RememberRevealedPlayer$ True | SubAbility$ DBNotInHandDraw | ChoiceDescription$ A card with that name is not in that player's hand
SVar:DBInHandDraw:DB$ Draw | Defined$ You | ConditionPlayerDefined$ Remembered | ConditionPlayerContains$ You | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ0 | References$ X | SubAbility$ DBCleanup
SVar:DBNotInHandDraw:DB$ Draw | Defined$ You | ConditionPlayerDefined$ Remembered | ConditionPlayerContains$ You | ConditionCheckSVar$ X | ConditionSVarCompare$ GE1 | References$ X | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Count$ValidHand Card.NamedCard
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/liars_pendulum.jpg
Oracle:{2}, {T}: Name a card. Target opponent guesses whether a card with that name is in your hand. You may reveal your hand. If you do and your opponent guessed wrong, draw a card.

View File

@@ -2,6 +2,6 @@ Name:Walking Atlas
ManaCost:2
Types:Artifact Creature Construct
PT:1/1
A:AB$ ChangeZone | Cost$ T | Origin$ Hand | Destination$ Battlefield | ChangeType$ Land | ChangeNum$ 1 | OptionalDecider$ You | SpellDescription$ You may put a land card from your hand onto the battlefield.
A:AB$ ChangeZone | Cost$ T | Origin$ Hand | Destination$ Battlefield | ChangeType$ Land | ChangeNum$ 1 | Optional$ You | SpellDescription$ You may put a land card from your hand onto the battlefield.
SVar:Picture:http://www.wizards.com/global/images/magic/general/Walking_Atlas.jpg
Oracle:{T}: You may put a land card from your hand onto the battlefield.

View File

@@ -50,16 +50,24 @@ public class ChooseGenericEffect extends SpellAbilityEffect {
continue;
}
SpellAbility chosenSA = null;
String choice;
if (sa.hasParam("AtRandom")) {
chosenSA = AbilityFactory.getAbility(host.getSVar(Aggregates.random(choices.keySet())), host);
choice = Aggregates.random(choices.keySet());
} else {
if (p.isHuman()) {
String choice = GuiChoose.one("Choose one", choices.values());
chosenSA = AbilityFactory.getAbility(host.getSVar(choices.inverse().get(choice)), host);
choice = choices.inverse().get(GuiChoose.one("Choose one", choices.values()));
} else { //Computer AI
chosenSA = AbilityFactory.getAbility(host.getSVar(sa.getParam("Choices").split(",")[0]), host);
if ("Random".equals(sa.getParam("AILogic"))) {
choice = Aggregates.random(choices.keySet());
} else {
choice = sa.getParam("Choices").split(",")[0];
}
}
}
chosenSA = AbilityFactory.getAbility(host.getSVar(choice), host);
if (sa.hasParam("ShowChoice")) {
p.getGame().getAction().nofityOfValue(sa, p, choices.get(choice), null);
}
chosenSA.setActivatingPlayer(sa.getSourceCard().getController());
((AbilitySub) chosenSA).setParent(sa);
AbilityUtils.resolve(chosenSA);

View File

@@ -36,9 +36,13 @@ public class RevealHandEffect extends SpellAbilityEffect {
final Card host = sa.getSourceCard();
final TargetRestrictions tgt = sa.getTargetRestrictions();
final boolean optional = sa.hasParam("Optional");
for (final Player p : getTargetPlayers(sa)) {
if ((tgt == null) || p.canBeTargetedBy(sa)) {
if (optional && !p.getController().confirmAction(sa, null, "Do you want to reveal your hand?")) {
continue;
}
final List<Card> hand = p.getCardsIn(ZoneType.Hand);
sa.getActivatingPlayer().getController().reveal(p.getName() + "'s hand", hand, ZoneType.Hand, p);
if (sa.hasParam("RememberRevealed")) {
@@ -46,6 +50,9 @@ public class RevealHandEffect extends SpellAbilityEffect {
host.addRemembered(c);
}
}
if (sa.hasParam("RememberRevealedPlayer")) {
host.addRemembered(p);
}
}
}
}

View File

@@ -1,8 +1,5 @@
package forge.gui.workshop.controllers;
import java.io.File;
import java.io.PrintWriter;
import javax.swing.JOptionPane;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
@@ -11,15 +8,12 @@ import forge.Command;
import forge.Singletons;
import forge.gui.framework.FScreen;
import forge.gui.framework.ICDoc;
import forge.gui.match.controllers.CDetail;
import forge.gui.match.controllers.CPicture;
import forge.gui.toolbox.FTextEditor;
import forge.gui.workshop.menus.WorkshopFileMenu;
import forge.gui.workshop.views.VCardDesigner;
import forge.gui.workshop.views.VCardScript;
import forge.gui.workshop.views.VWorkshopCatalog;
import forge.item.PaperCard;
import forge.util.FileUtil;
/**