mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
- Adding Amulet of Vim to allow 1 game matches to be played in quest mode
This commit is contained in:
@@ -103,11 +103,14 @@ public enum CSubmenuChallenges implements ICDoc {
|
||||
}
|
||||
});
|
||||
|
||||
view.getCbCharm().addActionListener(new ActionListener() {
|
||||
view.getCbxMatchLength().addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(final ActionEvent arg0) {
|
||||
quest.setCharmState(view.getCbCharm().isSelected());
|
||||
quest.save();
|
||||
String match = view.getCbxMatchLength().getSelectedItem();
|
||||
if (match != null) {
|
||||
quest.setMatchLength(match.substring(match.length() - 1));
|
||||
quest.save();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -154,6 +157,10 @@ public enum CSubmenuChallenges implements ICDoc {
|
||||
|
||||
final JXButtonPanel grpPanel = new JXButtonPanel();
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Match - Best of ").append(FModel.getQuest().getMatchLength());
|
||||
view.getCbxMatchLength().setSelectedItem(sb.toString());
|
||||
|
||||
boolean haveAnyChallenges = true;
|
||||
for (final QuestEventChallenge qc : challenges) {
|
||||
final PnlEvent temp = new PnlEvent(qc);
|
||||
|
||||
@@ -71,11 +71,14 @@ public enum CSubmenuDuels implements ICDoc {
|
||||
}
|
||||
});
|
||||
|
||||
view.getCbCharm().addActionListener(new ActionListener() {
|
||||
view.getCbxMatchLength().addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(final ActionEvent arg0) {
|
||||
quest.setCharmState(view.getCbCharm().isSelected());
|
||||
quest.save();
|
||||
String match = view.getCbxMatchLength().getSelectedItem();
|
||||
if (match != null) {
|
||||
quest.setMatchLength(match.substring(match.length() - 1));
|
||||
quest.save();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -153,6 +156,10 @@ public enum CSubmenuDuels implements ICDoc {
|
||||
grpPanel.add(temp, rad, "w 100%!, h 135px!, gapy 15px");
|
||||
}
|
||||
view.getPnlDuels().add(grpPanel, "w 100%!");
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Match - Best of ").append(FModel.getQuest().getMatchLength());
|
||||
view.getCbxMatchLength().setSelectedItem(sb.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,9 @@ public enum VSubmenuChallenges implements IVSubmenu<CSubmenuChallenges>, IVQuest
|
||||
private final StartButton btnStart = new StartButton();
|
||||
private final FComboBoxWrapper<String> cbxPet = new FComboBoxWrapper<String>();
|
||||
private final FCheckBox cbPlant = new FCheckBox("Summon Plant");
|
||||
private final FCheckBox cbCharm = new FCheckBox("Use Charm of Vigor");
|
||||
|
||||
private final FComboBoxWrapper<String> cbxMatchLength = new FComboBoxWrapper<String>();
|
||||
|
||||
private final FLabel lblZep = new FLabel.Builder().text("<html>Launch<br>Zeppelin</html>")
|
||||
.hoverable(true).icon(FSkin.getIcon(FSkinProp.ICO_QUEST_ZEP))
|
||||
.fontSize(16).build();
|
||||
@@ -106,7 +108,7 @@ public enum VSubmenuChallenges implements IVSubmenu<CSubmenuChallenges>, IVQuest
|
||||
pnlStats.add(lblLife, constraints);
|
||||
pnlStats.add(lblWorld, constraints);
|
||||
pnlStats.add(cbPlant, constraints);
|
||||
pnlStats.add(cbCharm, constraints);
|
||||
cbxMatchLength.addTo(pnlStats, constraints);
|
||||
cbxPet.addTo(pnlStats, constraints);
|
||||
pnlStats.add(lblZep, "w 130px!, h 60px!, gap 0 0 0 5px");
|
||||
pnlStats.setOpaque(false);
|
||||
@@ -292,12 +294,9 @@ public enum VSubmenuChallenges implements IVSubmenu<CSubmenuChallenges>, IVQuest
|
||||
return parentCell;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the cbCharm
|
||||
*/
|
||||
@Override
|
||||
public FCheckBox getCbCharm() {
|
||||
return cbCharm;
|
||||
public FComboBoxWrapper<String> getCbxMatchLength() {
|
||||
return cbxMatchLength;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -46,7 +46,7 @@ public enum VSubmenuDuels implements IVSubmenu<CSubmenuDuels>, IVQuestStats {
|
||||
|
||||
private final StartButton btnStart = new StartButton();
|
||||
private final FComboBoxWrapper<String> cbxPet = new FComboBoxWrapper<String>();
|
||||
private final FCheckBox cbCharm = new FCheckBox("Use Charm of Vigor");
|
||||
private final FComboBoxWrapper<String> cbxMatchLength = new FComboBoxWrapper<String>();
|
||||
private final FCheckBox cbPlant = new FCheckBox("Summon Plant");
|
||||
private final FLabel lblZep = new FLabel.Builder().text("Launch Zeppelin").fontSize(14).build();
|
||||
|
||||
@@ -107,7 +107,7 @@ public enum VSubmenuDuels implements IVSubmenu<CSubmenuDuels>, IVQuestStats {
|
||||
pnlStats.add(lblLife, constraints);
|
||||
pnlStats.add(lblWorld, constraints);
|
||||
pnlStats.add(cbPlant, constraints);
|
||||
pnlStats.add(cbCharm, constraints);
|
||||
cbxMatchLength.addTo(pnlStats, constraints);
|
||||
cbxPet.addTo(pnlStats, constraints);
|
||||
pnlStats.setOpaque(false);
|
||||
|
||||
@@ -297,12 +297,9 @@ public enum VSubmenuDuels implements IVSubmenu<CSubmenuDuels>, IVQuestStats {
|
||||
return parentCell;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the cbCharm
|
||||
*/
|
||||
@Override
|
||||
public FCheckBox getCbCharm() {
|
||||
return cbCharm;
|
||||
public FComboBoxWrapper<String> getCbxMatchLength() {
|
||||
return cbxMatchLength;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user