mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- Added Liar's Pendulum
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user