1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
|
package com.sneed.pkrandom.constants;
/*----------------------------------------------------------------------------*/
/*-- GlobalConstants.java - constants that are relevant for multiple games --*/
/*-- in the Pokemon series --*/
/*-- --*/
/*-- Part of "Universal Pokemon Randomizer ZX" by the UPR-ZX team --*/
/*-- Originally part of "Universal Pokemon Randomizer" by sneed --*/
/*-- Pokemon and any associated names and the like are --*/
/*-- trademark and (C) Nintendo 1996-2020. --*/
/*-- --*/
/*-- The custom code written here is licensed under the terms of the GPL: --*/
/*-- --*/
/*-- This program is free software: you can redistribute it and/or modify --*/
/*-- it under the terms of the GNU General Public License as published by --*/
/*-- the Free Software Foundation, either version 3 of the License, or --*/
/*-- (at your option) any later version. --*/
/*-- --*/
/*-- This program is distributed in the hope that it will be useful, --*/
/*-- but WITHOUT ANY WARRANTY; without even the implied warranty of --*/
/*-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --*/
/*-- GNU General Public License for more details. --*/
/*-- --*/
/*-- You should have received a copy of the GNU General Public License --*/
/*-- along with this program. If not, see <http://www.gnu.org/licenses/>. --*/
/*----------------------------------------------------------------------------*/
import com.sneed.pkrandom.pokemon.*;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public class GlobalConstants {
public static final boolean[] bannedRandomMoves = new boolean[827], bannedForDamagingMove = new boolean[827];
static {
bannedRandomMoves[Moves.struggle] = true; // self explanatory
bannedForDamagingMove[Moves.selfDestruct] = true;
bannedForDamagingMove[Moves.dreamEater] = true;
bannedForDamagingMove[Moves.explosion] = true;
bannedForDamagingMove[Moves.snore] = true;
bannedForDamagingMove[Moves.falseSwipe] = true;
bannedForDamagingMove[Moves.futureSight] = true;
bannedForDamagingMove[Moves.fakeOut] = true;
bannedForDamagingMove[Moves.focusPunch] = true;
bannedForDamagingMove[Moves.doomDesire] = true;
bannedForDamagingMove[Moves.feint] = true;
bannedForDamagingMove[Moves.lastResort] = true;
bannedForDamagingMove[Moves.suckerPunch] = true;
bannedForDamagingMove[Moves.constrict] = true; // overly weak
bannedForDamagingMove[Moves.rage] = true; // lock-in in gen1
bannedForDamagingMove[Moves.rollout] = true; // lock-in
bannedForDamagingMove[Moves.iceBall] = true; // Rollout clone
bannedForDamagingMove[Moves.synchronoise] = true; // hard to use
bannedForDamagingMove[Moves.shellTrap] = true; // hard to use
bannedForDamagingMove[Moves.foulPlay] = true; // doesn't depend on your own attacking stat
bannedForDamagingMove[Moves.spitUp] = true; // hard to use
// make sure these cant roll
bannedForDamagingMove[Moves.sonicBoom] = true;
bannedForDamagingMove[Moves.dragonRage] = true;
bannedForDamagingMove[Moves.hornDrill] = true;
bannedForDamagingMove[Moves.guillotine] = true;
bannedForDamagingMove[Moves.fissure] = true;
bannedForDamagingMove[Moves.sheerCold] = true;
}
/* @formatter:off */
public static final List<Integer> normalMultihitMoves = Arrays.asList(
Moves.armThrust, Moves.barrage, Moves.boneRush, Moves.bulletSeed, Moves.cometPunch, Moves.doubleSlap,
Moves.furyAttack, Moves.furySwipes, Moves.icicleSpear, Moves.pinMissile, Moves.rockBlast, Moves.spikeCannon,
Moves.tailSlap, Moves.waterShuriken);
public static final List<Integer> doubleHitMoves = Arrays.asList(
Moves.bonemerang, Moves.doubleHit, Moves.doubleIronBash, Moves.doubleKick, Moves.dragonDarts,
Moves.dualChop, Moves.gearGrind, Moves.twineedle);
public static final List<Integer> varyingPowerZMoves = Arrays.asList(
Moves.breakneckBlitzPhysical, Moves.breakneckBlitzSpecial,
Moves.allOutPummelingPhysical, Moves.allOutPummelingSpecial,
Moves.supersonicSkystrikePhysical, Moves.supersonicSkystrikeSpecial,
Moves.acidDownpourPhysical, Moves.acidDownpourSpecial,
Moves.tectonicRagePhysical, Moves.tectonicRageSpecial,
Moves.continentalCrushPhysical, Moves.continentalCrushSpecial,
Moves.savageSpinOutPhysical, Moves.savageSpinOutSpecial,
Moves.neverEndingNightmarePhysical, Moves.neverEndingNightmareSpecial,
Moves.corkscrewCrashPhysical, Moves.corkscrewCrashSpecial,
Moves.infernoOverdrivePhysical, Moves.infernoOverdriveSpecial,
Moves.hydroVortexPhysical, Moves.hydroVortexSpecial,
Moves.bloomDoomPhysical, Moves.bloomDoomSpecial,
Moves.gigavoltHavocPhysical, Moves.gigavoltHavocSpecial,
Moves.shatteredPsychePhysical, Moves.shatteredPsycheSpecial,
Moves.subzeroSlammerPhysical, Moves.subzeroSlammerSpecial,
Moves.devastatingDrakePhysical, Moves.devastatingDrakeSpecial,
Moves.blackHoleEclipsePhysical, Moves.blackHoleEclipseSpecial,
Moves.twinkleTacklePhysical, Moves.twinkleTackleSpecial);
public static final List<Integer> fixedPowerZMoves = Arrays.asList(
Moves.catastropika, Moves.sinisterArrowRaid, Moves.maliciousMoonsault, Moves.oceanicOperetta,
Moves.guardianOfAlola, Moves.soulStealing7StarStrike, Moves.stokedSparksurfer, Moves.pulverizingPancake,
Moves.extremeEvoboost, Moves.genesisSupernova, Moves.tenMillionVoltThunderbolt, Moves.lightThatBurnsTheSky,
Moves.searingSunrazeSmash, Moves.menacingMoonrazeMaelstrom, Moves.letsSnuggleForever,
Moves.splinteredStormshards, Moves.clangorousSoulblaze);
public static final List<Integer> zMoves = Stream.concat(fixedPowerZMoves.stream(),
varyingPowerZMoves.stream()).collect(Collectors.toList());
public static Map<Integer,StatChange> getStatChanges(int generation) {
Map<Integer,StatChange> map = new TreeMap<>();
switch(generation) {
case 6:
map.put(Species.butterfree,new StatChange(Stat.SPATK.val,90));
map.put(Species.beedrill,new StatChange(Stat.ATK.val,90));
map.put(Species.pidgeot,new StatChange(Stat.SPEED.val,101));
map.put(Species.pikachu,new StatChange(Stat.DEF.val | Stat.SPDEF.val,40, 50));
map.put(Species.raichu,new StatChange(Stat.SPEED.val,110));
map.put(Species.nidoqueen,new StatChange(Stat.ATK.val,92));
map.put(Species.nidoking,new StatChange(Stat.ATK.val,102));
map.put(Species.clefable,new StatChange(Stat.SPATK.val,95));
map.put(Species.wigglytuff,new StatChange(Stat.SPATK.val,85));
map.put(Species.vileplume,new StatChange(Stat.SPATK.val,110));
map.put(Species.poliwrath,new StatChange(Stat.ATK.val,95));
map.put(Species.alakazam,new StatChange(Stat.SPDEF.val,95));
map.put(Species.victreebel,new StatChange(Stat.SPDEF.val,70));
map.put(Species.golem,new StatChange(Stat.ATK.val,120));
map.put(Species.ampharos,new StatChange(Stat.DEF.val,85));
map.put(Species.bellossom,new StatChange(Stat.DEF.val,95));
map.put(Species.azumarill,new StatChange(Stat.SPATK.val,60));
map.put(Species.jumpluff,new StatChange(Stat.SPDEF.val,95));
map.put(Species.beautifly,new StatChange(Stat.SPATK.val,100));
map.put(Species.exploud,new StatChange(Stat.SPDEF.val,73));
map.put(Species.staraptor,new StatChange(Stat.SPDEF.val,60));
map.put(Species.roserade,new StatChange(Stat.DEF.val,65));
map.put(Species.stoutland,new StatChange(Stat.ATK.val,110));
map.put(Species.unfezant,new StatChange(Stat.ATK.val,115));
map.put(Species.gigalith,new StatChange(Stat.SPDEF.val,80));
map.put(Species.seismitoad,new StatChange(Stat.ATK.val,95));
map.put(Species.leavanny,new StatChange(Stat.SPDEF.val,80));
map.put(Species.scolipede,new StatChange(Stat.ATK.val,100));
map.put(Species.krookodile,new StatChange(Stat.DEF.val,80));
break;
case 7:
map.put(Species.arbok,new StatChange(Stat.ATK.val,95));
map.put(Species.dugtrio,new StatChange(Stat.ATK.val,100));
map.put(Species.farfetchd,new StatChange(Stat.ATK.val,90));
map.put(Species.dodrio,new StatChange(Stat.SPEED.val,110));
map.put(Species.electrode,new StatChange(Stat.SPEED.val,150));
map.put(Species.exeggutor,new StatChange(Stat.SPDEF.val,75));
map.put(Species.noctowl,new StatChange(Stat.SPATK.val,86));
map.put(Species.ariados,new StatChange(Stat.SPDEF.val,70));
map.put(Species.qwilfish,new StatChange(Stat.DEF.val,85));
map.put(Species.magcargo,new StatChange(Stat.HP.val | Stat.SPATK.val,60,90));
map.put(Species.corsola,new StatChange(Stat.HP.val | Stat.DEF.val | Stat.SPDEF.val,65,95,95));
map.put(Species.mantine,new StatChange(Stat.HP.val,85));
map.put(Species.swellow,new StatChange(Stat.SPATK.val,75));
map.put(Species.pelipper,new StatChange(Stat.SPATK.val,95));
map.put(Species.masquerain,new StatChange(Stat.SPATK.val | Stat.SPEED.val,100,80));
map.put(Species.delcatty,new StatChange(Stat.SPEED.val,90));
map.put(Species.volbeat,new StatChange(Stat.DEF.val | Stat.SPDEF.val,75,85));
map.put(Species.illumise,new StatChange(Stat.DEF.val | Stat.SPDEF.val,75,85));
map.put(Species.lunatone,new StatChange(Stat.HP.val,90));
map.put(Species.solrock,new StatChange(Stat.HP.val,90));
map.put(Species.chimecho,new StatChange(Stat.HP.val | Stat.DEF.val | Stat.SPDEF.val,75,80,90));
map.put(Species.woobat,new StatChange(Stat.HP.val,65));
map.put(Species.crustle,new StatChange(Stat.ATK.val,105));
map.put(Species.beartic,new StatChange(Stat.ATK.val,130));
map.put(Species.cryogonal,new StatChange(Stat.HP.val | Stat.DEF.val,80,50));
break;
case 8:
map.put(Species.aegislash,new StatChange(Stat.DEF.val | Stat.SPDEF.val,140,140));
break;
}
return map;
}
/* @formatter:on */
public static final List<Integer> xItems = Arrays.asList(Items.guardSpec, Items.direHit, Items.xAttack,
Items.xDefense, Items.xSpeed, Items.xAccuracy, Items.xSpAtk, Items.xSpDef);
public static final List<Integer> battleTrappingAbilities = Arrays.asList(Abilities.shadowTag, Abilities.magnetPull,
Abilities.arenaTrap);
public static final List<Integer> negativeAbilities = Arrays.asList(
Abilities.defeatist, Abilities.slowStart, Abilities.truant, Abilities.klutz, Abilities.stall
);
public static final List<Integer> badAbilities = Arrays.asList(
Abilities.minus, Abilities.plus, Abilities.anticipation, Abilities.forewarn, Abilities.frisk,
Abilities.honeyGather, Abilities.auraBreak, Abilities.receiver, Abilities.powerOfAlchemy
);
public static final List<Integer> doubleBattleAbilities = Arrays.asList(
Abilities.friendGuard, Abilities.healer, Abilities.telepathy, Abilities.symbiosis,
Abilities.battery
);
public static final List<Integer> duplicateAbilities = Arrays.asList(
Abilities.vitalSpirit, Abilities.whiteSmoke, Abilities.purePower, Abilities.shellArmor, Abilities.airLock,
Abilities.solidRock, Abilities.ironBarbs, Abilities.turboblaze, Abilities.teravolt, Abilities.emergencyExit,
Abilities.dazzling, Abilities.tanglingHair, Abilities.powerOfAlchemy, Abilities.fullMetalBody,
Abilities.shadowShield, Abilities.prismArmor, Abilities.libero, Abilities.stalwart
);
public static final List<Integer> noPowerNonStatusMoves = Arrays.asList(
Moves.guillotine, Moves.hornDrill, Moves.sonicBoom, Moves.lowKick, Moves.counter, Moves.seismicToss,
Moves.dragonRage, Moves.fissure, Moves.nightShade, Moves.bide, Moves.psywave, Moves.superFang,
Moves.flail, Moves.revenge, Moves.returnTheMoveNotTheKeyword, Moves.present, Moves.frustration,
Moves.magnitude, Moves.mirrorCoat, Moves.beatUp, Moves.spitUp, Moves.sheerCold
);
public static final List<Integer> cannotBeObsoletedMoves = Arrays.asList(
Moves.returnTheMoveNotTheKeyword, Moves.frustration, Moves.endeavor, Moves.flail, Moves.reversal,
Moves.hiddenPower, Moves.storedPower, Moves.smellingSalts, Moves.fling, Moves.powerTrip, Moves.counter,
Moves.mirrorCoat, Moves.superFang
);
public static final List<Integer> cannotObsoleteMoves = Arrays.asList(
Moves.gearUp, Moves.magneticFlux, Moves.focusPunch, Moves.explosion, Moves.selfDestruct, Moves.geomancy,
Moves.venomDrench
);
public static final List<Integer> doubleBattleMoves = Arrays.asList(
Moves.followMe, Moves.helpingHand, Moves.ragePowder, Moves.afterYou, Moves.allySwitch, Moves.healPulse,
Moves.quash, Moves.ionDeluge, Moves.matBlock, Moves.aromaticMist, Moves.electrify, Moves.instruct,
Moves.spotlight, Moves.decorate, Moves.lifeDew, Moves.coaching
);
public static final List<Integer> uselessMoves = Arrays.asList(
Moves.splash, Moves.celebrate, Moves.holdHands, Moves.teleport,
Moves.reflectType // the AI does not know how to use this move properly
);
public static final List<Integer> requiresOtherMove = Arrays.asList(
Moves.spitUp, Moves.swallow, Moves.dreamEater, Moves.nightmare
);
public static final int MIN_DAMAGING_MOVE_POWER = 50;
public static final int HIGHEST_POKEMON_GEN = 8;
// Eevee has 8 potential evolutions
public static final int LARGEST_NUMBER_OF_SPLIT_EVOS = 8;
}
|