summaryrefslogtreecommitdiff
path: root/src/com/dabomstew/pkrandom/newgui
diff options
context:
space:
mode:
authortom-overton <tom.overton@outlook.com>2020-11-04 13:24:33 -0800
committertom-overton <tom.overton@outlook.com>2020-11-04 13:24:33 -0800
commita19206593ad8aae1b031fd2929680ec1c29dcc7b (patch)
tree09664956c9b24d520c150b52717b53a0ed12558a /src/com/dabomstew/pkrandom/newgui
parent79c74c3ab959a90b05c9220bf38ac3d92b937634 (diff)
Special Shops: add Guarantee X Items setting
Diffstat (limited to 'src/com/dabomstew/pkrandom/newgui')
-rw-r--r--src/com/dabomstew/pkrandom/newgui/Bundle.properties2
-rw-r--r--src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.form14
-rw-r--r--src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.java13
3 files changed, 25 insertions, 4 deletions
diff --git a/src/com/dabomstew/pkrandom/newgui/Bundle.properties b/src/com/dabomstew/pkrandom/newgui/Bundle.properties
index 027bd23..600e758 100644
--- a/src/com/dabomstew/pkrandom/newgui/Bundle.properties
+++ b/src/com/dabomstew/pkrandom/newgui/Bundle.properties
@@ -305,6 +305,8 @@ GUI.shBalanceShopItemPricesCheckBox.toolTipText=<html>Checking this will change
GUI.shBalanceShopItemPricesCheckBox.text=Balance Shop Item Prices
GUI.shGuaranteeEvolutionItemsCheckBox.toolTipText=<html>Checking this will ensure all evolution items appear in at least one shop.
GUI.shGuaranteeEvolutionItemsCheckBox.text=Guarantee Evolution Items
+GUI.shGuaranteeXItemsCheckbox.tooltipText=<html>Checking this will ensure all X items (including Guard Spec. and Dire Hit) appear in at least one shop.
+GUI.shGuaranteeXItemsCheckbox.text=Guarantee X Items
GUI.miscTweaksPanel.title=Misc. Tweaks
GUI.miscPanel.title=Misc. Tweaks
GUI.miscNoneAvailableLabel.text=There are no tweaks available for the currently loaded game.
diff --git a/src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.form b/src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.form
index 5ec703a..0843864 100644
--- a/src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.form
+++ b/src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.form
@@ -2964,7 +2964,7 @@
</hspacer>
<vspacer id="2f864">
<constraints>
- <grid row="6" column="1" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
+ <grid row="7" column="1" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
<gridbag weightx="0.0" weighty="0.0"/>
</constraints>
</vspacer>
@@ -3057,6 +3057,18 @@
<toolTipText resource-bundle="com/dabomstew/pkrandom/newgui/Bundle" key="GUI.shGuaranteeEvolutionItemsCheckBox.toolTipText"/>
</properties>
</component>
+ <component id="f7f02" class="javax.swing.JCheckBox" binding="shGuaranteeXItemsCheckBox">
+ <constraints>
+ <grid row="6" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <gridbag weightx="0.0" weighty="0.0"/>
+ </constraints>
+ <properties>
+ <enabled value="false"/>
+ <selected value="false"/>
+ <text resource-bundle="com/dabomstew/pkrandom/newgui/Bundle" key="GUI.shGuaranteeXItemsCheckbox.text"/>
+ <toolTipText resource-bundle="com/dabomstew/pkrandom/newgui/Bundle" key="GUI.shGuaranteeXItemsCheckbox.tooltipText"/>
+ </properties>
+ </component>
</children>
</grid>
</children>
diff --git a/src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.java b/src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.java
index f68cd9c..b9c963b 100644
--- a/src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.java
+++ b/src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.java
@@ -195,6 +195,7 @@ public class NewRandomizerGUI {
private JCheckBox shBanRegularShopItemsCheckBox;
private JCheckBox shBalanceShopItemPricesCheckBox;
private JCheckBox shGuaranteeEvolutionItemsCheckBox;
+ private JCheckBox shGuaranteeXItemsCheckBox;
private JCheckBox miscBWExpPatchCheckBox;
private JCheckBox miscNerfXAccuracyCheckBox;
private JCheckBox miscFixCritRateCheckBox;
@@ -1425,6 +1426,7 @@ public class NewRandomizerGUI {
shBanOverpoweredShopItemsCheckBox.setSelected(settings.isBanOPShopItems());
shBalanceShopItemPricesCheckBox.setSelected(settings.isBalanceShopPrices());
shGuaranteeEvolutionItemsCheckBox.setSelected(settings.isGuaranteeEvolutionItems());
+ shGuaranteeXItemsCheckBox.setSelected(settings.isGuaranteeXItems());
int mtsSelected = settings.getCurrentMiscTweaks();
@@ -1597,7 +1599,7 @@ public class NewRandomizerGUI {
settings.setBanOPShopItems(shBanOverpoweredShopItemsCheckBox.isSelected());
settings.setBalanceShopPrices(shBalanceShopItemPricesCheckBox.isSelected());
settings.setGuaranteeEvolutionItems(shGuaranteeEvolutionItemsCheckBox.isSelected());
-
+ settings.setGuaranteeXItems(shGuaranteeXItemsCheckBox.isSelected());
int currentMiscTweaks = 0;
@@ -2250,6 +2252,9 @@ public class NewRandomizerGUI {
shGuaranteeEvolutionItemsCheckBox.setVisible(true);
shGuaranteeEvolutionItemsCheckBox.setEnabled(false);
shGuaranteeEvolutionItemsCheckBox.setSelected(false);
+ shGuaranteeXItemsCheckBox.setVisible(true);
+ shGuaranteeXItemsCheckBox.setEnabled(false);
+ shGuaranteeXItemsCheckBox.setSelected(false);
miscBWExpPatchCheckBox.setVisible(true);
miscBWExpPatchCheckBox.setEnabled(false);
miscBWExpPatchCheckBox.setSelected(false);
@@ -2836,14 +2841,13 @@ public class NewRandomizerGUI {
tpDontUseLegendariesCheckBox.setEnabled(true);
tpNoEarlyWonderGuardCheckBox.setEnabled(true);
tpAllowAlternateFormesCheckBox.setEnabled(true);
-
- tpRandomShinyTrainerPokemonCheckBox.setEnabled(true);
if (currentRestrictions == null || currentRestrictions.megaEvolutionsAreInPool(romHandler.forceSwapStaticMegaEvos())) {
tpSwapMegaEvosCheckBox.setEnabled(true);
} else {
tpSwapMegaEvosCheckBox.setEnabled(false);
tpSwapMegaEvosCheckBox.setSelected(false);
}
+ tpRandomShinyTrainerPokemonCheckBox.setEnabled(true);
}
if (tpForceFullyEvolvedAtCheckBox.isSelected()) {
@@ -3084,6 +3088,7 @@ public class NewRandomizerGUI {
shBanOverpoweredShopItemsCheckBox.setEnabled(true);
shBalanceShopItemPricesCheckBox.setEnabled(true);
shGuaranteeEvolutionItemsCheckBox.setEnabled(true);
+ shGuaranteeXItemsCheckBox.setEnabled(true);
} else {
shBanBadItemsCheckBox.setEnabled(false);
shBanBadItemsCheckBox.setSelected(false);
@@ -3095,6 +3100,8 @@ public class NewRandomizerGUI {
shBalanceShopItemPricesCheckBox.setSelected(false);
shGuaranteeEvolutionItemsCheckBox.setEnabled(false);
shGuaranteeEvolutionItemsCheckBox.setSelected(false);
+ shGuaranteeXItemsCheckBox.setEnabled(false);
+ shGuaranteeXItemsCheckBox.setSelected(false);
}
}