From a19206593ad8aae1b031fd2929680ec1c29dcc7b Mon Sep 17 00:00:00 2001 From: tom-overton Date: Wed, 4 Nov 2020 13:24:33 -0800 Subject: Special Shops: add Guarantee X Items setting --- src/com/dabomstew/pkrandom/newgui/Bundle.properties | 2 ++ src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.form | 14 +++++++++++++- src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.java | 13 ++++++++++--- 3 files changed, 25 insertions(+), 4 deletions(-) (limited to 'src/com/dabomstew/pkrandom/newgui') 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=Checking this will change GUI.shBalanceShopItemPricesCheckBox.text=Balance Shop Item Prices GUI.shGuaranteeEvolutionItemsCheckBox.toolTipText=Checking this will ensure all evolution items appear in at least one shop. GUI.shGuaranteeEvolutionItemsCheckBox.text=Guarantee Evolution Items +GUI.shGuaranteeXItemsCheckbox.tooltipText=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 @@ - + @@ -3057,6 +3057,18 @@ + + + + + + + + + + + + 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); } } -- cgit v1.2.3