summaryrefslogtreecommitdiff
path: root/src/com/dabomstew/pkrandom/newgui
diff options
context:
space:
mode:
authorunknown <cleartonic@gmail.com>2022-03-16 15:52:52 -0500
committerAjarmar <axel.jarmar@gmail.com>2022-04-29 23:47:24 +0200
commitd7d36245e4a916222a16546acef5898a3329b79b (patch)
treefeb3ae5e5782360aaa6c728216d73080afb094e6 /src/com/dabomstew/pkrandom/newgui
parentac885894938925b5b3cc7023c05eb72403fc0e02 (diff)
elite4 unique pkmn setting commit
Diffstat (limited to 'src/com/dabomstew/pkrandom/newgui')
-rw-r--r--src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.form43
-rw-r--r--src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.java24
2 files changed, 55 insertions, 12 deletions
diff --git a/src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.form b/src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.form
index f6bb3eb..661fa69 100644
--- a/src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.form
+++ b/src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.form
@@ -2,7 +2,7 @@
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.dabomstew.pkrandom.newgui.NewRandomizerGUI">
<grid id="27dc6" binding="mainPanel" layout-manager="GridBagLayout">
<constraints>
- <xy x="7" y="20" width="1084" height="929"/>
+ <xy x="7" y="20" width="1084" height="1103"/>
</constraints>
<properties/>
<border type="none">
@@ -1819,7 +1819,7 @@
</component>
<component id="181e" class="javax.swing.JSpinner" binding="tpBossTrainersSpinner">
<constraints>
- <grid row="10" column="1" row-span="1" col-span="2" vsize-policy="0" hsize-policy="6" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <grid row="11" column="1" row-span="1" col-span="2" vsize-policy="0" hsize-policy="6" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<gridbag top="0" left="4" bottom="0" right="0" weightx="0.0" weighty="0.0" ipadx="10"/>
</constraints>
<properties>
@@ -1828,7 +1828,7 @@
</component>
<component id="e7a99" class="javax.swing.JSpinner" binding="tpImportantTrainersSpinner">
<constraints>
- <grid row="10" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <grid row="11" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<gridbag top="0" left="4" bottom="0" right="0" weightx="0.0" weighty="0.0" ipadx="10"/>
</constraints>
<properties>
@@ -1837,7 +1837,7 @@
</component>
<component id="da8e4" class="javax.swing.JSpinner" binding="tpRegularTrainersSpinner">
<constraints>
- <grid row="10" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <grid row="11" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<gridbag top="0" left="4" bottom="0" right="0" weightx="0.0" weighty="0.0" ipadx="10"/>
</constraints>
<properties>
@@ -1857,7 +1857,7 @@
</component>
<component id="2918f" class="javax.swing.JLabel" binding="tpHeldItemsLabel">
<constraints>
- <grid row="11" column="1" row-span="1" col-span="4" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <grid row="12" column="1" row-span="1" col-span="4" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<gridbag weightx="0.0" weighty="0.0"/>
</constraints>
<properties>
@@ -1866,7 +1866,7 @@
</component>
<component id="dad16" class="javax.swing.JCheckBox" binding="tpBossTrainersItemsCheckBox">
<constraints>
- <grid row="12" column="1" row-span="1" col-span="2" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <grid row="13" column="1" row-span="1" col-span="2" 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>
@@ -1877,7 +1877,7 @@
</component>
<component id="d7d93" class="javax.swing.JCheckBox" binding="tpImportantTrainersItemsCheckBox">
<constraints>
- <grid row="12" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <grid row="13" column="3" 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>
@@ -1888,7 +1888,7 @@
</component>
<component id="7fddd" class="javax.swing.JCheckBox" binding="tpRegularTrainersItemsCheckBox">
<constraints>
- <grid row="12" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <grid row="13" column="4" 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>
@@ -1899,7 +1899,7 @@
</component>
<component id="31e9a" class="javax.swing.JCheckBox" binding="tpConsumableItemsOnlyCheckBox">
<constraints>
- <grid row="13" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <grid row="14" 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>
@@ -1910,7 +1910,7 @@
</component>
<component id="79d6a" class="javax.swing.JCheckBox" binding="tpSensibleItemsCheckBox">
<constraints>
- <grid row="13" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <grid row="14" column="3" 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>
@@ -1921,7 +1921,7 @@
</component>
<component id="f3c52" class="javax.swing.JCheckBox" binding="tpHighestLevelGetsItemCheckBox">
<constraints>
- <grid row="13" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+ <grid row="14" column="4" 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>
@@ -1932,10 +1932,29 @@
</component>
<vspacer id="2342a">
<constraints>
- <grid row="14" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
+ <grid row="15" column="0" 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>
+ <component id="28e4c" class="javax.swing.JCheckBox" binding="tpEliteFourUniquePokemonCheckBox">
+ <constraints>
+ <grid row="10" column="6" 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"/>
+ <text value="Elite Four have unique Pokemon:"/>
+ </properties>
+ </component>
+ <component id="727d5" class="javax.swing.JSpinner" binding="tpEliteFourUniquePokemonSpinner">
+ <constraints>
+ <grid row="11" column="6" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
+ <gridbag weightx="0.0" weighty="0.0"/>
+ </constraints>
+ <properties>
+ <enabled value="false"/>
+ </properties>
+ </component>
</children>
</grid>
<hspacer id="66d2">
diff --git a/src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.java b/src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.java
index 0396d26..a65230d 100644
--- a/src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.java
+++ b/src/com/dabomstew/pkrandom/newgui/NewRandomizerGUI.java
@@ -143,6 +143,8 @@ public class NewRandomizerGUI {
private JCheckBox tpForceFullyEvolvedAtCheckBox;
private JSlider tpForceFullyEvolvedAtSlider;
private JSlider tpPercentageLevelModifierSlider;
+ private JCheckBox tpEliteFourUniquePokemonCheckBox;
+ private JSpinner tpEliteFourUniquePokemonSpinner;
private JCheckBox tpPercentageLevelModifierCheckBox;
private JRadioButton wpUnchangedRadioButton;
private JRadioButton wpRandomRadioButton;
@@ -436,6 +438,7 @@ public class NewRandomizerGUI {
tpRandomEvenDistributionMainRadioButton.addActionListener(e -> enableOrDisableSubControls());
tpForceFullyEvolvedAtCheckBox.addActionListener(e -> enableOrDisableSubControls());
tpPercentageLevelModifierCheckBox.addActionListener(e -> enableOrDisableSubControls());
+ tpEliteFourUniquePokemonCheckBox.addActionListener(e -> enableOrDisableSubControls());
wpUnchangedRadioButton.addActionListener(e -> enableOrDisableSubControls());
wpRandomRadioButton.addActionListener(e -> enableOrDisableSubControls());
wpArea1To1RadioButton.addActionListener(e -> enableOrDisableSubControls());
@@ -663,9 +666,17 @@ public class NewRandomizerGUI {
1
);
+ SpinnerModel eliteFourUniquePokemonModel = new SpinnerNumberModel(
+ 1,
+ 0,
+ 2,
+ 1
+ );
+
tpBossTrainersSpinner.setModel(bossTrainerModel);
tpImportantTrainersSpinner.setModel(importantTrainerModel);
tpRegularTrainersSpinner.setModel(regularTrainerModel);
+ tpEliteFourUniquePokemonSpinner.setModel(eliteFourUniquePokemonModel);
customNamesEditorMenuItem = new JMenuItem();
customNamesEditorMenuItem.setText(bundle.getString("GUI.customNamesEditorMenuItem.text"));
@@ -1081,6 +1092,7 @@ public class NewRandomizerGUI {
}
+
private enum SaveType {
FILE, DIRECTORY, INVALID
}
@@ -1413,6 +1425,8 @@ public class NewRandomizerGUI {
tpForceFullyEvolvedAtSlider.setValue(settings.getTrainersForceFullyEvolvedLevel());
tpPercentageLevelModifierCheckBox.setSelected(settings.isTrainersLevelModified());
tpPercentageLevelModifierSlider.setValue(settings.getTrainersLevelModifier());
+ tpEliteFourUniquePokemonCheckBox.setSelected(settings.isEliteFourUniquePokemon());
+ tpEliteFourUniquePokemonSpinner.setValue(settings.getEliteFourUniquePokemonModifier() > 0 ? settings.getEliteFourUniquePokemonModifier() : 1);
tpAllowAlternateFormesCheckBox.setSelected(settings.isAllowTrainerAlternateFormes());
tpSwapMegaEvosCheckBox.setSelected(settings.isSwapTrainerMegaEvos());
tpDoubleBattleModeCheckBox.setSelected(settings.isDoubleBattleMode());
@@ -1647,6 +1661,8 @@ public class NewRandomizerGUI {
settings.setTrainersForceFullyEvolvedLevel(tpForceFullyEvolvedAtSlider.getValue());
settings.setTrainersLevelModified(tpPercentageLevelModifierCheckBox.isSelected());
settings.setTrainersLevelModifier(tpPercentageLevelModifierSlider.getValue());
+ settings.setEliteFourUniquePokemon(tpEliteFourUniquePokemonCheckBox.isSelected());
+ settings.setEliteFourUniquePokemonModifier(tpEliteFourUniquePokemonCheckBox.isVisible() && tpEliteFourUniquePokemonCheckBox.isSelected() ? (int)tpEliteFourUniquePokemonSpinner.getValue() : 0);
settings.setAllowTrainerAlternateFormes(tpAllowAlternateFormesCheckBox.isSelected() && tpAllowAlternateFormesCheckBox.isVisible());
settings.setSwapTrainerMegaEvos(tpSwapMegaEvosCheckBox.isSelected() && tpSwapMegaEvosCheckBox.isVisible());
settings.setDoubleBattleMode(tpDoubleBattleModeCheckBox.isVisible() && tpDoubleBattleModeCheckBox.isSelected());
@@ -2189,6 +2205,14 @@ public class NewRandomizerGUI {
tpPercentageLevelModifierCheckBox.setVisible(true);
tpPercentageLevelModifierCheckBox.setEnabled(false);
tpPercentageLevelModifierCheckBox.setSelected(false);
+
+ tpEliteFourUniquePokemonCheckBox.setVisible(true);
+ tpEliteFourUniquePokemonCheckBox.setEnabled(false);
+ tpEliteFourUniquePokemonCheckBox.setSelected(false);
+ tpEliteFourUniquePokemonSpinner.setVisible(true);
+ tpEliteFourUniquePokemonSpinner.setEnabled(false);
+ tpEliteFourUniquePokemonSpinner.setValue(1);
+
tpAllowAlternateFormesCheckBox.setVisible(true);
tpAllowAlternateFormesCheckBox.setEnabled(false);
tpAllowAlternateFormesCheckBox.setSelected(false);