Merge branch 'pagefaultgames:main' into splash-messages-literals
commit
b3cc3feb76
|
@ -0,0 +1,55 @@
|
||||||
|
import re
|
||||||
|
|
||||||
|
filenames = [['src/data/enums/moves.ts', 'move'], ['src/data/enums/abilities.ts', 'ability'], ['src/data/enums/species.ts', 'Pokémon']]
|
||||||
|
|
||||||
|
commentBlockStart = re.compile('\/\*[^\*].*') # Regex for the start of a comment block
|
||||||
|
commentBlockEnd = re.compile('.*,\*\/') # Regex for the end of a comment block
|
||||||
|
|
||||||
|
commentExp = re.compile('(?:\/\*\*.*\*\/)') # Regex for a url comment that already existed in the file
|
||||||
|
enumExp = re.compile('.*,') # Regex for a regular enum line
|
||||||
|
|
||||||
|
numberExp = re.compile(' +\= +\d+,')
|
||||||
|
|
||||||
|
replaceList = ['ALOLA', 'ETERNAL', 'GALAR', 'HISUI', 'PALDEA', 'BLOODMOON']
|
||||||
|
|
||||||
|
for args in filenames:
|
||||||
|
|
||||||
|
output = ''
|
||||||
|
|
||||||
|
skip = False # True when we should completely stop adding url comments for any reason
|
||||||
|
blockComment = False # True when currently reading a comment block
|
||||||
|
|
||||||
|
file = open(args[0], 'r')
|
||||||
|
line = file.readline()
|
||||||
|
|
||||||
|
while line:
|
||||||
|
if(skip): # Appends the next line in the file and moves on if we already hit the end of the enum
|
||||||
|
output += line
|
||||||
|
line = file.readline()
|
||||||
|
continue
|
||||||
|
|
||||||
|
skip = line.find('};') != -1 # True if we reached the end of an enum definition
|
||||||
|
|
||||||
|
# Determines when a comment block has started and we should stop adding url comments
|
||||||
|
if (commentBlockStart.findall(line)):
|
||||||
|
blockComment = True
|
||||||
|
|
||||||
|
if(not commentExp.findall(line)):
|
||||||
|
urlInsert = numberExp.sub('', line).strip().rstrip('\n').rstrip(',').title() # Clean up the enum line to only the enum
|
||||||
|
for replace in replaceList:
|
||||||
|
urlInsert = urlInsert.replace(replace.title() + '_', '')
|
||||||
|
if (not blockComment and enumExp.findall(line)):
|
||||||
|
output += ' /**{@link https://bulbapedia.bulbagarden.net/wiki/' + urlInsert + '_(' + args[1] + ') | Source} */\n'
|
||||||
|
output += line # Add the line to output since it isn't an existing url comment
|
||||||
|
|
||||||
|
# Determines if we're at the end of a comment block and can resume adding url comments
|
||||||
|
if (blockComment):
|
||||||
|
blockComment = not commentBlockEnd.findall(line)
|
||||||
|
|
||||||
|
line = file.readline()
|
||||||
|
|
||||||
|
file.close()
|
||||||
|
|
||||||
|
file = open(args[0], 'w', encoding='utf-8')
|
||||||
|
file.write(output,)
|
||||||
|
file.close
|
|
@ -2496,11 +2496,11 @@ export class IgnoreTypeImmunityAbAttr extends AbAttr {
|
||||||
}
|
}
|
||||||
|
|
||||||
apply(pokemon: Pokemon, passive: boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean {
|
apply(pokemon: Pokemon, passive: boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean {
|
||||||
if (this.defenderType !== (args[1] as Type)) {
|
if (this.defenderType === (args[1] as Type) && this.allowedMoveTypes.includes(args[0] as Type)) {
|
||||||
return false;
|
cancelled.value = true;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
return this.allowedMoveTypes.some(type => type === (args[0] as Type));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3035,7 +3035,7 @@ export function initAbilities() {
|
||||||
new Ability(Abilities.FRISK, 4)
|
new Ability(Abilities.FRISK, 4)
|
||||||
.attr(FriskAbAttr),
|
.attr(FriskAbAttr),
|
||||||
new Ability(Abilities.RECKLESS, 4)
|
new Ability(Abilities.RECKLESS, 4)
|
||||||
.attr(MovePowerBoostAbAttr, (user, target, move) => move.getAttrs(RecoilAttr).length && move.id !== Moves.STRUGGLE, 1.2),
|
.attr(MovePowerBoostAbAttr, (user, target, move) => move.hasFlag(MoveFlags.RECKLESS_MOVE), 1.2),
|
||||||
new Ability(Abilities.MULTITYPE, 4)
|
new Ability(Abilities.MULTITYPE, 4)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
.attr(UncopiableAbilityAbAttr)
|
||||||
.attr(UnswappableAbilityAbAttr)
|
.attr(UnswappableAbilityAbAttr)
|
||||||
|
@ -3606,7 +3606,8 @@ export function initAbilities() {
|
||||||
.partial(),
|
.partial(),
|
||||||
new Ability(Abilities.MINDS_EYE, 9)
|
new Ability(Abilities.MINDS_EYE, 9)
|
||||||
.attr(IgnoreTypeImmunityAbAttr, Type.GHOST, [Type.NORMAL, Type.FIGHTING])
|
.attr(IgnoreTypeImmunityAbAttr, Type.GHOST, [Type.NORMAL, Type.FIGHTING])
|
||||||
.ignorable(), // TODO: evasiveness bypass should not be ignored, but accuracy immunity should
|
.ignorable() // TODO: evasiveness bypass should not be ignored, but accuracy immunity should
|
||||||
|
.partial(),
|
||||||
new Ability(Abilities.SUPERSWEET_SYRUP, 9)
|
new Ability(Abilities.SUPERSWEET_SYRUP, 9)
|
||||||
.attr(PostSummonStatChangeAbAttr, BattleStat.EVA, -1)
|
.attr(PostSummonStatChangeAbAttr, BattleStat.EVA, -1)
|
||||||
.condition(getOncePerBattleCondition(Abilities.SUPERSWEET_SYRUP)),
|
.condition(getOncePerBattleCondition(Abilities.SUPERSWEET_SYRUP)),
|
||||||
|
|
|
@ -1639,7 +1639,8 @@ export const trainerTypeDialogue = {
|
||||||
},
|
},
|
||||||
[TrainerType.HAU]: {
|
[TrainerType.HAU]: {
|
||||||
encounter: [
|
encounter: [
|
||||||
`I wonder if a Trainer battles differently depending on whether they're from a warm region or a cold region. Let's test it out!`,
|
`I wonder if a Trainer battles differently depending on whether they're from a warm region or a cold region.
|
||||||
|
$Let's test it out!`,
|
||||||
],
|
],
|
||||||
victory: [
|
victory: [
|
||||||
`That was awesome! I think I kinda understand your vibe a little better now!`,
|
`That was awesome! I think I kinda understand your vibe a little better now!`,
|
||||||
|
|
|
@ -1,313 +1,624 @@
|
||||||
export enum Abilities {
|
export enum Abilities {
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/None_(ability) | Source} */
|
||||||
NONE,
|
NONE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Stench_(ability) | Source} */
|
||||||
STENCH,
|
STENCH,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Drizzle_(ability) | Source} */
|
||||||
DRIZZLE,
|
DRIZZLE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Speed_Boost_(ability) | Source} */
|
||||||
SPEED_BOOST,
|
SPEED_BOOST,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Battle_Armor_(ability) | Source} */
|
||||||
BATTLE_ARMOR,
|
BATTLE_ARMOR,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Sturdy_(ability) | Source} */
|
||||||
STURDY,
|
STURDY,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Damp_(ability) | Source} */
|
||||||
DAMP,
|
DAMP,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Limber_(ability) | Source} */
|
||||||
LIMBER,
|
LIMBER,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Sand_Veil_(ability) | Source} */
|
||||||
SAND_VEIL,
|
SAND_VEIL,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Static_(ability) | Source} */
|
||||||
STATIC,
|
STATIC,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Volt_Absorb_(ability) | Source} */
|
||||||
VOLT_ABSORB,
|
VOLT_ABSORB,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Water_Absorb_(ability) | Source} */
|
||||||
WATER_ABSORB,
|
WATER_ABSORB,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Oblivious_(ability) | Source} */
|
||||||
OBLIVIOUS,
|
OBLIVIOUS,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Cloud_Nine_(ability) | Source} */
|
||||||
CLOUD_NINE,
|
CLOUD_NINE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Compound_Eyes_(ability) | Source} */
|
||||||
COMPOUND_EYES,
|
COMPOUND_EYES,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Insomnia_(ability) | Source} */
|
||||||
INSOMNIA,
|
INSOMNIA,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Color_Change_(ability) | Source} */
|
||||||
COLOR_CHANGE,
|
COLOR_CHANGE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Immunity_(ability) | Source} */
|
||||||
IMMUNITY,
|
IMMUNITY,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Flash_Fire_(ability) | Source} */
|
||||||
FLASH_FIRE,
|
FLASH_FIRE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Shield_Dust_(ability) | Source} */
|
||||||
SHIELD_DUST,
|
SHIELD_DUST,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Own_Tempo_(ability) | Source} */
|
||||||
OWN_TEMPO,
|
OWN_TEMPO,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Suction_Cups_(ability) | Source} */
|
||||||
SUCTION_CUPS,
|
SUCTION_CUPS,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Intimidate_(ability) | Source} */
|
||||||
INTIMIDATE,
|
INTIMIDATE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Shadow_Tag_(ability) | Source} */
|
||||||
SHADOW_TAG,
|
SHADOW_TAG,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Rough_Skin_(ability) | Source} */
|
||||||
ROUGH_SKIN,
|
ROUGH_SKIN,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Wonder_Guard_(ability) | Source} */
|
||||||
WONDER_GUARD,
|
WONDER_GUARD,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Levitate_(ability) | Source} */
|
||||||
LEVITATE,
|
LEVITATE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Effect_Spore_(ability) | Source} */
|
||||||
EFFECT_SPORE,
|
EFFECT_SPORE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Synchronize_(ability) | Source} */
|
||||||
SYNCHRONIZE,
|
SYNCHRONIZE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Clear_Body_(ability) | Source} */
|
||||||
CLEAR_BODY,
|
CLEAR_BODY,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Natural_Cure_(ability) | Source} */
|
||||||
NATURAL_CURE,
|
NATURAL_CURE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Lightning_Rod_(ability) | Source} */
|
||||||
LIGHTNING_ROD,
|
LIGHTNING_ROD,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Serene_Grace_(ability) | Source} */
|
||||||
SERENE_GRACE,
|
SERENE_GRACE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Swift_Swim_(ability) | Source} */
|
||||||
SWIFT_SWIM,
|
SWIFT_SWIM,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Chlorophyll_(ability) | Source} */
|
||||||
CHLOROPHYLL,
|
CHLOROPHYLL,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Illuminate_(ability) | Source} */
|
||||||
ILLUMINATE,
|
ILLUMINATE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Trace_(ability) | Source} */
|
||||||
TRACE,
|
TRACE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Huge_Power_(ability) | Source} */
|
||||||
HUGE_POWER,
|
HUGE_POWER,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Poison_Point_(ability) | Source} */
|
||||||
POISON_POINT,
|
POISON_POINT,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Inner_Focus_(ability) | Source} */
|
||||||
INNER_FOCUS,
|
INNER_FOCUS,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Magma_Armor_(ability) | Source} */
|
||||||
MAGMA_ARMOR,
|
MAGMA_ARMOR,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Water_Veil_(ability) | Source} */
|
||||||
WATER_VEIL,
|
WATER_VEIL,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Magnet_Pull_(ability) | Source} */
|
||||||
MAGNET_PULL,
|
MAGNET_PULL,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Soundproof_(ability) | Source} */
|
||||||
SOUNDPROOF,
|
SOUNDPROOF,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Rain_Dish_(ability) | Source} */
|
||||||
RAIN_DISH,
|
RAIN_DISH,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Sand_Stream_(ability) | Source} */
|
||||||
SAND_STREAM,
|
SAND_STREAM,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Pressure_(ability) | Source} */
|
||||||
PRESSURE,
|
PRESSURE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Thick_Fat_(ability) | Source} */
|
||||||
THICK_FAT,
|
THICK_FAT,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Early_Bird_(ability) | Source} */
|
||||||
EARLY_BIRD,
|
EARLY_BIRD,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Flame_Body_(ability) | Source} */
|
||||||
FLAME_BODY,
|
FLAME_BODY,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Run_Away_(ability) | Source} */
|
||||||
RUN_AWAY,
|
RUN_AWAY,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Keen_Eye_(ability) | Source} */
|
||||||
KEEN_EYE,
|
KEEN_EYE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Hyper_Cutter_(ability) | Source} */
|
||||||
HYPER_CUTTER,
|
HYPER_CUTTER,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Pickup_(ability) | Source} */
|
||||||
PICKUP,
|
PICKUP,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Truant_(ability) | Source} */
|
||||||
TRUANT,
|
TRUANT,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Hustle_(ability) | Source} */
|
||||||
HUSTLE,
|
HUSTLE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Cute_Charm_(ability) | Source} */
|
||||||
CUTE_CHARM,
|
CUTE_CHARM,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Plus_(ability) | Source} */
|
||||||
PLUS,
|
PLUS,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Minus_(ability) | Source} */
|
||||||
MINUS,
|
MINUS,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Forecast_(ability) | Source} */
|
||||||
FORECAST,
|
FORECAST,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Sticky_Hold_(ability) | Source} */
|
||||||
STICKY_HOLD,
|
STICKY_HOLD,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Shed_Skin_(ability) | Source} */
|
||||||
SHED_SKIN,
|
SHED_SKIN,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Guts_(ability) | Source} */
|
||||||
GUTS,
|
GUTS,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Marvel_Scale_(ability) | Source} */
|
||||||
MARVEL_SCALE,
|
MARVEL_SCALE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Liquid_Ooze_(ability) | Source} */
|
||||||
LIQUID_OOZE,
|
LIQUID_OOZE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Overgrow_(ability) | Source} */
|
||||||
OVERGROW,
|
OVERGROW,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Blaze_(ability) | Source} */
|
||||||
BLAZE,
|
BLAZE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Torrent_(ability) | Source} */
|
||||||
TORRENT,
|
TORRENT,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Swarm_(ability) | Source} */
|
||||||
SWARM,
|
SWARM,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Rock_Head_(ability) | Source} */
|
||||||
ROCK_HEAD,
|
ROCK_HEAD,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Drought_(ability) | Source} */
|
||||||
DROUGHT,
|
DROUGHT,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Arena_Trap_(ability) | Source} */
|
||||||
ARENA_TRAP,
|
ARENA_TRAP,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Vital_Spirit_(ability) | Source} */
|
||||||
VITAL_SPIRIT,
|
VITAL_SPIRIT,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/White_Smoke_(ability) | Source} */
|
||||||
WHITE_SMOKE,
|
WHITE_SMOKE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Pure_Power_(ability) | Source} */
|
||||||
PURE_POWER,
|
PURE_POWER,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Shell_Armor_(ability) | Source} */
|
||||||
SHELL_ARMOR,
|
SHELL_ARMOR,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Air_Lock_(ability) | Source} */
|
||||||
AIR_LOCK,
|
AIR_LOCK,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Tangled_Feet_(ability) | Source} */
|
||||||
TANGLED_FEET,
|
TANGLED_FEET,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Motor_Drive_(ability) | Source} */
|
||||||
MOTOR_DRIVE,
|
MOTOR_DRIVE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Rivalry_(ability) | Source} */
|
||||||
RIVALRY,
|
RIVALRY,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Steadfast_(ability) | Source} */
|
||||||
STEADFAST,
|
STEADFAST,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Snow_Cloak_(ability) | Source} */
|
||||||
SNOW_CLOAK,
|
SNOW_CLOAK,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Gluttony_(ability) | Source} */
|
||||||
GLUTTONY,
|
GLUTTONY,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Anger_Point_(ability) | Source} */
|
||||||
ANGER_POINT,
|
ANGER_POINT,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Unburden_(ability) | Source} */
|
||||||
UNBURDEN,
|
UNBURDEN,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Heatproof_(ability) | Source} */
|
||||||
HEATPROOF,
|
HEATPROOF,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Simple_(ability) | Source} */
|
||||||
SIMPLE,
|
SIMPLE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Dry_Skin_(ability) | Source} */
|
||||||
DRY_SKIN,
|
DRY_SKIN,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Download_(ability) | Source} */
|
||||||
DOWNLOAD,
|
DOWNLOAD,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Iron_Fist_(ability) | Source} */
|
||||||
IRON_FIST,
|
IRON_FIST,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Poison_Heal_(ability) | Source} */
|
||||||
POISON_HEAL,
|
POISON_HEAL,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Adaptability_(ability) | Source} */
|
||||||
ADAPTABILITY,
|
ADAPTABILITY,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Skill_Link_(ability) | Source} */
|
||||||
SKILL_LINK,
|
SKILL_LINK,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Hydration_(ability) | Source} */
|
||||||
HYDRATION,
|
HYDRATION,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Solar_Power_(ability) | Source} */
|
||||||
SOLAR_POWER,
|
SOLAR_POWER,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Quick_Feet_(ability) | Source} */
|
||||||
QUICK_FEET,
|
QUICK_FEET,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Normalize_(ability) | Source} */
|
||||||
NORMALIZE,
|
NORMALIZE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Sniper_(ability) | Source} */
|
||||||
SNIPER,
|
SNIPER,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Magic_Guard_(ability) | Source} */
|
||||||
MAGIC_GUARD,
|
MAGIC_GUARD,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/No_Guard_(ability) | Source} */
|
||||||
NO_GUARD,
|
NO_GUARD,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Stall_(ability) | Source} */
|
||||||
STALL,
|
STALL,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Technician_(ability) | Source} */
|
||||||
TECHNICIAN,
|
TECHNICIAN,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Leaf_Guard_(ability) | Source} */
|
||||||
LEAF_GUARD,
|
LEAF_GUARD,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Klutz_(ability) | Source} */
|
||||||
KLUTZ,
|
KLUTZ,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Mold_Breaker_(ability) | Source} */
|
||||||
MOLD_BREAKER,
|
MOLD_BREAKER,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Super_Luck_(ability) | Source} */
|
||||||
SUPER_LUCK,
|
SUPER_LUCK,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Aftermath_(ability) | Source} */
|
||||||
AFTERMATH,
|
AFTERMATH,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Anticipation_(ability) | Source} */
|
||||||
ANTICIPATION,
|
ANTICIPATION,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Forewarn_(ability) | Source} */
|
||||||
FOREWARN,
|
FOREWARN,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Unaware_(ability) | Source} */
|
||||||
UNAWARE,
|
UNAWARE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Tinted_Lens_(ability) | Source} */
|
||||||
TINTED_LENS,
|
TINTED_LENS,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Filter_(ability) | Source} */
|
||||||
FILTER,
|
FILTER,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Slow_Start_(ability) | Source} */
|
||||||
SLOW_START,
|
SLOW_START,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Scrappy_(ability) | Source} */
|
||||||
SCRAPPY,
|
SCRAPPY,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Storm_Drain_(ability) | Source} */
|
||||||
STORM_DRAIN,
|
STORM_DRAIN,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Ice_Body_(ability) | Source} */
|
||||||
ICE_BODY,
|
ICE_BODY,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Solid_Rock_(ability) | Source} */
|
||||||
SOLID_ROCK,
|
SOLID_ROCK,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Snow_Warning_(ability) | Source} */
|
||||||
SNOW_WARNING,
|
SNOW_WARNING,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Honey_Gather_(ability) | Source} */
|
||||||
HONEY_GATHER,
|
HONEY_GATHER,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Frisk_(ability) | Source} */
|
||||||
FRISK,
|
FRISK,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Reckless_(ability) | Source} */
|
||||||
RECKLESS,
|
RECKLESS,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Multitype_(ability) | Source} */
|
||||||
MULTITYPE,
|
MULTITYPE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Flower_Gift_(ability) | Source} */
|
||||||
FLOWER_GIFT,
|
FLOWER_GIFT,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Bad_Dreams_(ability) | Source} */
|
||||||
BAD_DREAMS,
|
BAD_DREAMS,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Pickpocket_(ability) | Source} */
|
||||||
PICKPOCKET,
|
PICKPOCKET,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Sheer_Force_(ability) | Source} */
|
||||||
SHEER_FORCE,
|
SHEER_FORCE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Contrary_(ability) | Source} */
|
||||||
CONTRARY,
|
CONTRARY,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Unnerve_(ability) | Source} */
|
||||||
UNNERVE,
|
UNNERVE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Defiant_(ability) | Source} */
|
||||||
DEFIANT,
|
DEFIANT,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Defeatist_(ability) | Source} */
|
||||||
DEFEATIST,
|
DEFEATIST,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Cursed_Body_(ability) | Source} */
|
||||||
CURSED_BODY,
|
CURSED_BODY,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Healer_(ability) | Source} */
|
||||||
HEALER,
|
HEALER,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Friend_Guard_(ability) | Source} */
|
||||||
FRIEND_GUARD,
|
FRIEND_GUARD,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Weak_Armor_(ability) | Source} */
|
||||||
WEAK_ARMOR,
|
WEAK_ARMOR,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Heavy_Metal_(ability) | Source} */
|
||||||
HEAVY_METAL,
|
HEAVY_METAL,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Light_Metal_(ability) | Source} */
|
||||||
LIGHT_METAL,
|
LIGHT_METAL,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Multiscale_(ability) | Source} */
|
||||||
MULTISCALE,
|
MULTISCALE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Toxic_Boost_(ability) | Source} */
|
||||||
TOXIC_BOOST,
|
TOXIC_BOOST,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Flare_Boost_(ability) | Source} */
|
||||||
FLARE_BOOST,
|
FLARE_BOOST,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Harvest_(ability) | Source} */
|
||||||
HARVEST,
|
HARVEST,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Telepathy_(ability) | Source} */
|
||||||
TELEPATHY,
|
TELEPATHY,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Moody_(ability) | Source} */
|
||||||
MOODY,
|
MOODY,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Overcoat_(ability) | Source} */
|
||||||
OVERCOAT,
|
OVERCOAT,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Poison_Touch_(ability) | Source} */
|
||||||
POISON_TOUCH,
|
POISON_TOUCH,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Regenerator_(ability) | Source} */
|
||||||
REGENERATOR,
|
REGENERATOR,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Big_Pecks_(ability) | Source} */
|
||||||
BIG_PECKS,
|
BIG_PECKS,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Sand_Rush_(ability) | Source} */
|
||||||
SAND_RUSH,
|
SAND_RUSH,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Wonder_Skin_(ability) | Source} */
|
||||||
WONDER_SKIN,
|
WONDER_SKIN,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Analytic_(ability) | Source} */
|
||||||
ANALYTIC,
|
ANALYTIC,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Illusion_(ability) | Source} */
|
||||||
ILLUSION,
|
ILLUSION,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Imposter_(ability) | Source} */
|
||||||
IMPOSTER,
|
IMPOSTER,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Infiltrator_(ability) | Source} */
|
||||||
INFILTRATOR,
|
INFILTRATOR,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Mummy_(ability) | Source} */
|
||||||
MUMMY,
|
MUMMY,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Moxie_(ability) | Source} */
|
||||||
MOXIE,
|
MOXIE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Justified_(ability) | Source} */
|
||||||
JUSTIFIED,
|
JUSTIFIED,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Rattled_(ability) | Source} */
|
||||||
RATTLED,
|
RATTLED,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Magic_Bounce_(ability) | Source} */
|
||||||
MAGIC_BOUNCE,
|
MAGIC_BOUNCE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Sap_Sipper_(ability) | Source} */
|
||||||
SAP_SIPPER,
|
SAP_SIPPER,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Prankster_(ability) | Source} */
|
||||||
PRANKSTER,
|
PRANKSTER,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Sand_Force_(ability) | Source} */
|
||||||
SAND_FORCE,
|
SAND_FORCE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Iron_Barbs_(ability) | Source} */
|
||||||
IRON_BARBS,
|
IRON_BARBS,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Zen_Mode_(ability) | Source} */
|
||||||
ZEN_MODE,
|
ZEN_MODE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Victory_Star_(ability) | Source} */
|
||||||
VICTORY_STAR,
|
VICTORY_STAR,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Turboblaze_(ability) | Source} */
|
||||||
TURBOBLAZE,
|
TURBOBLAZE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Teravolt_(ability) | Source} */
|
||||||
TERAVOLT,
|
TERAVOLT,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Aroma_Veil_(ability) | Source} */
|
||||||
AROMA_VEIL,
|
AROMA_VEIL,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Flower_Veil_(ability) | Source} */
|
||||||
FLOWER_VEIL,
|
FLOWER_VEIL,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Cheek_Pouch_(ability) | Source} */
|
||||||
CHEEK_POUCH,
|
CHEEK_POUCH,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Protean_(ability) | Source} */
|
||||||
PROTEAN,
|
PROTEAN,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Fur_Coat_(ability) | Source} */
|
||||||
FUR_COAT,
|
FUR_COAT,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Magician_(ability) | Source} */
|
||||||
MAGICIAN,
|
MAGICIAN,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Bulletproof_(ability) | Source} */
|
||||||
BULLETPROOF,
|
BULLETPROOF,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Competitive_(ability) | Source} */
|
||||||
COMPETITIVE,
|
COMPETITIVE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Strong_Jaw_(ability) | Source} */
|
||||||
STRONG_JAW,
|
STRONG_JAW,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Refrigerate_(ability) | Source} */
|
||||||
REFRIGERATE,
|
REFRIGERATE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Sweet_Veil_(ability) | Source} */
|
||||||
SWEET_VEIL,
|
SWEET_VEIL,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Stance_Change_(ability) | Source} */
|
||||||
STANCE_CHANGE,
|
STANCE_CHANGE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Gale_Wings_(ability) | Source} */
|
||||||
GALE_WINGS,
|
GALE_WINGS,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Mega_Launcher_(ability) | Source} */
|
||||||
MEGA_LAUNCHER,
|
MEGA_LAUNCHER,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Grass_Pelt_(ability) | Source} */
|
||||||
GRASS_PELT,
|
GRASS_PELT,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Symbiosis_(ability) | Source} */
|
||||||
SYMBIOSIS,
|
SYMBIOSIS,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Tough_Claws_(ability) | Source} */
|
||||||
TOUGH_CLAWS,
|
TOUGH_CLAWS,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Pixilate_(ability) | Source} */
|
||||||
PIXILATE,
|
PIXILATE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Gooey_(ability) | Source} */
|
||||||
GOOEY,
|
GOOEY,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Aerilate_(ability) | Source} */
|
||||||
AERILATE,
|
AERILATE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Parental_Bond_(ability) | Source} */
|
||||||
PARENTAL_BOND,
|
PARENTAL_BOND,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Dark_Aura_(ability) | Source} */
|
||||||
DARK_AURA,
|
DARK_AURA,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Fairy_Aura_(ability) | Source} */
|
||||||
FAIRY_AURA,
|
FAIRY_AURA,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Aura_Break_(ability) | Source} */
|
||||||
AURA_BREAK,
|
AURA_BREAK,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Primordial_Sea_(ability) | Source} */
|
||||||
PRIMORDIAL_SEA,
|
PRIMORDIAL_SEA,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Desolate_Land_(ability) | Source} */
|
||||||
DESOLATE_LAND,
|
DESOLATE_LAND,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Delta_Stream_(ability) | Source} */
|
||||||
DELTA_STREAM,
|
DELTA_STREAM,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Stamina_(ability) | Source} */
|
||||||
STAMINA,
|
STAMINA,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Wimp_Out_(ability) | Source} */
|
||||||
WIMP_OUT,
|
WIMP_OUT,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Emergency_Exit_(ability) | Source} */
|
||||||
EMERGENCY_EXIT,
|
EMERGENCY_EXIT,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Water_Compaction_(ability) | Source} */
|
||||||
WATER_COMPACTION,
|
WATER_COMPACTION,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Merciless_(ability) | Source} */
|
||||||
MERCILESS,
|
MERCILESS,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Shields_Down_(ability) | Source} */
|
||||||
SHIELDS_DOWN,
|
SHIELDS_DOWN,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Stakeout_(ability) | Source} */
|
||||||
STAKEOUT,
|
STAKEOUT,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Water_Bubble_(ability) | Source} */
|
||||||
WATER_BUBBLE,
|
WATER_BUBBLE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Steelworker_(ability) | Source} */
|
||||||
STEELWORKER,
|
STEELWORKER,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Berserk_(ability) | Source} */
|
||||||
BERSERK,
|
BERSERK,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Slush_Rush_(ability) | Source} */
|
||||||
SLUSH_RUSH,
|
SLUSH_RUSH,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Long_Reach_(ability) | Source} */
|
||||||
LONG_REACH,
|
LONG_REACH,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Liquid_Voice_(ability) | Source} */
|
||||||
LIQUID_VOICE,
|
LIQUID_VOICE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Triage_(ability) | Source} */
|
||||||
TRIAGE,
|
TRIAGE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Galvanize_(ability) | Source} */
|
||||||
GALVANIZE,
|
GALVANIZE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Surge_Surfer_(ability) | Source} */
|
||||||
SURGE_SURFER,
|
SURGE_SURFER,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Schooling_(ability) | Source} */
|
||||||
SCHOOLING,
|
SCHOOLING,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Disguise_(ability) | Source} */
|
||||||
DISGUISE,
|
DISGUISE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Battle_Bond_(ability) | Source} */
|
||||||
BATTLE_BOND,
|
BATTLE_BOND,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Power_Construct_(ability) | Source} */
|
||||||
POWER_CONSTRUCT,
|
POWER_CONSTRUCT,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Corrosion_(ability) | Source} */
|
||||||
CORROSION,
|
CORROSION,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Comatose_(ability) | Source} */
|
||||||
COMATOSE,
|
COMATOSE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Queenly_Majesty_(ability) | Source} */
|
||||||
QUEENLY_MAJESTY,
|
QUEENLY_MAJESTY,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Innards_Out_(ability) | Source} */
|
||||||
INNARDS_OUT,
|
INNARDS_OUT,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Dancer_(ability) | Source} */
|
||||||
DANCER,
|
DANCER,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Battery_(ability) | Source} */
|
||||||
BATTERY,
|
BATTERY,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Fluffy_(ability) | Source} */
|
||||||
FLUFFY,
|
FLUFFY,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Dazzling_(ability) | Source} */
|
||||||
DAZZLING,
|
DAZZLING,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Soul_Heart_(ability) | Source} */
|
||||||
SOUL_HEART,
|
SOUL_HEART,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Tangling_Hair_(ability) | Source} */
|
||||||
TANGLING_HAIR,
|
TANGLING_HAIR,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Receiver_(ability) | Source} */
|
||||||
RECEIVER,
|
RECEIVER,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Power_Of_Alchemy_(ability) | Source} */
|
||||||
POWER_OF_ALCHEMY,
|
POWER_OF_ALCHEMY,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Beast_Boost_(ability) | Source} */
|
||||||
BEAST_BOOST,
|
BEAST_BOOST,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Rks_System_(ability) | Source} */
|
||||||
RKS_SYSTEM,
|
RKS_SYSTEM,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Electric_Surge_(ability) | Source} */
|
||||||
ELECTRIC_SURGE,
|
ELECTRIC_SURGE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Psychic_Surge_(ability) | Source} */
|
||||||
PSYCHIC_SURGE,
|
PSYCHIC_SURGE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Misty_Surge_(ability) | Source} */
|
||||||
MISTY_SURGE,
|
MISTY_SURGE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Grassy_Surge_(ability) | Source} */
|
||||||
GRASSY_SURGE,
|
GRASSY_SURGE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Full_Metal_Body_(ability) | Source} */
|
||||||
FULL_METAL_BODY,
|
FULL_METAL_BODY,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Shadow_Shield_(ability) | Source} */
|
||||||
SHADOW_SHIELD,
|
SHADOW_SHIELD,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Prism_Armor_(ability) | Source} */
|
||||||
PRISM_ARMOR,
|
PRISM_ARMOR,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Neuroforce_(ability) | Source} */
|
||||||
NEUROFORCE,
|
NEUROFORCE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Intrepid_Sword_(ability) | Source} */
|
||||||
INTREPID_SWORD,
|
INTREPID_SWORD,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Dauntless_Shield_(ability) | Source} */
|
||||||
DAUNTLESS_SHIELD,
|
DAUNTLESS_SHIELD,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Libero_(ability) | Source} */
|
||||||
LIBERO,
|
LIBERO,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Ball_Fetch_(ability) | Source} */
|
||||||
BALL_FETCH,
|
BALL_FETCH,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Cotton_Down_(ability) | Source} */
|
||||||
COTTON_DOWN,
|
COTTON_DOWN,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Propeller_Tail_(ability) | Source} */
|
||||||
PROPELLER_TAIL,
|
PROPELLER_TAIL,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Mirror_Armor_(ability) | Source} */
|
||||||
MIRROR_ARMOR,
|
MIRROR_ARMOR,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Gulp_Missile_(ability) | Source} */
|
||||||
GULP_MISSILE,
|
GULP_MISSILE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Stalwart_(ability) | Source} */
|
||||||
STALWART,
|
STALWART,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Steam_Engine_(ability) | Source} */
|
||||||
STEAM_ENGINE,
|
STEAM_ENGINE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Punk_Rock_(ability) | Source} */
|
||||||
PUNK_ROCK,
|
PUNK_ROCK,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Sand_Spit_(ability) | Source} */
|
||||||
SAND_SPIT,
|
SAND_SPIT,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Ice_Scales_(ability) | Source} */
|
||||||
ICE_SCALES,
|
ICE_SCALES,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Ripen_(ability) | Source} */
|
||||||
RIPEN,
|
RIPEN,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Ice_Face_(ability) | Source} */
|
||||||
ICE_FACE,
|
ICE_FACE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Power_Spot_(ability) | Source} */
|
||||||
POWER_SPOT,
|
POWER_SPOT,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Mimicry_(ability) | Source} */
|
||||||
MIMICRY,
|
MIMICRY,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Screen_Cleaner_(ability) | Source} */
|
||||||
SCREEN_CLEANER,
|
SCREEN_CLEANER,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Steely_Spirit_(ability) | Source} */
|
||||||
STEELY_SPIRIT,
|
STEELY_SPIRIT,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Perish_Body_(ability) | Source} */
|
||||||
PERISH_BODY,
|
PERISH_BODY,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Wandering_Spirit_(ability) | Source} */
|
||||||
WANDERING_SPIRIT,
|
WANDERING_SPIRIT,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Gorilla_Tactics_(ability) | Source} */
|
||||||
GORILLA_TACTICS,
|
GORILLA_TACTICS,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Neutralizing_Gas_(ability) | Source} */
|
||||||
NEUTRALIZING_GAS,
|
NEUTRALIZING_GAS,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Pastel_Veil_(ability) | Source} */
|
||||||
PASTEL_VEIL,
|
PASTEL_VEIL,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Hunger_Switch_(ability) | Source} */
|
||||||
HUNGER_SWITCH,
|
HUNGER_SWITCH,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Quick_Draw_(ability) | Source} */
|
||||||
QUICK_DRAW,
|
QUICK_DRAW,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Unseen_Fist_(ability) | Source} */
|
||||||
UNSEEN_FIST,
|
UNSEEN_FIST,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Curious_Medicine_(ability) | Source} */
|
||||||
CURIOUS_MEDICINE,
|
CURIOUS_MEDICINE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Transistor_(ability) | Source} */
|
||||||
TRANSISTOR,
|
TRANSISTOR,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Dragons_Maw_(ability) | Source} */
|
||||||
DRAGONS_MAW,
|
DRAGONS_MAW,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Chilling_Neigh_(ability) | Source} */
|
||||||
CHILLING_NEIGH,
|
CHILLING_NEIGH,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Grim_Neigh_(ability) | Source} */
|
||||||
GRIM_NEIGH,
|
GRIM_NEIGH,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/As_One_Glastrier_(ability) | Source} */
|
||||||
AS_ONE_GLASTRIER,
|
AS_ONE_GLASTRIER,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/As_One_Spectrier_(ability) | Source} */
|
||||||
AS_ONE_SPECTRIER,
|
AS_ONE_SPECTRIER,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Lingering_Aroma_(ability) | Source} */
|
||||||
LINGERING_AROMA,
|
LINGERING_AROMA,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Seed_Sower_(ability) | Source} */
|
||||||
SEED_SOWER,
|
SEED_SOWER,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Thermal_Exchange_(ability) | Source} */
|
||||||
THERMAL_EXCHANGE,
|
THERMAL_EXCHANGE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Anger_Shell_(ability) | Source} */
|
||||||
ANGER_SHELL,
|
ANGER_SHELL,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Purifying_Salt_(ability) | Source} */
|
||||||
PURIFYING_SALT,
|
PURIFYING_SALT,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Well_Baked_Body_(ability) | Source} */
|
||||||
WELL_BAKED_BODY,
|
WELL_BAKED_BODY,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Wind_Rider_(ability) | Source} */
|
||||||
WIND_RIDER,
|
WIND_RIDER,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Guard_Dog_(ability) | Source} */
|
||||||
GUARD_DOG,
|
GUARD_DOG,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Rocky_Payload_(ability) | Source} */
|
||||||
ROCKY_PAYLOAD,
|
ROCKY_PAYLOAD,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Wind_Power_(ability) | Source} */
|
||||||
WIND_POWER,
|
WIND_POWER,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Zero_To_Hero_(ability) | Source} */
|
||||||
ZERO_TO_HERO,
|
ZERO_TO_HERO,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Commander_(ability) | Source} */
|
||||||
COMMANDER,
|
COMMANDER,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Electromorphosis_(ability) | Source} */
|
||||||
ELECTROMORPHOSIS,
|
ELECTROMORPHOSIS,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Protosynthesis_(ability) | Source} */
|
||||||
PROTOSYNTHESIS,
|
PROTOSYNTHESIS,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Quark_Drive_(ability) | Source} */
|
||||||
QUARK_DRIVE,
|
QUARK_DRIVE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Good_As_Gold_(ability) | Source} */
|
||||||
GOOD_AS_GOLD,
|
GOOD_AS_GOLD,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Vessel_Of_Ruin_(ability) | Source} */
|
||||||
VESSEL_OF_RUIN,
|
VESSEL_OF_RUIN,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Sword_Of_Ruin_(ability) | Source} */
|
||||||
SWORD_OF_RUIN,
|
SWORD_OF_RUIN,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Tablets_Of_Ruin_(ability) | Source} */
|
||||||
TABLETS_OF_RUIN,
|
TABLETS_OF_RUIN,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Beads_Of_Ruin_(ability) | Source} */
|
||||||
BEADS_OF_RUIN,
|
BEADS_OF_RUIN,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Orichalcum_Pulse_(ability) | Source} */
|
||||||
ORICHALCUM_PULSE,
|
ORICHALCUM_PULSE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Hadron_Engine_(ability) | Source} */
|
||||||
HADRON_ENGINE,
|
HADRON_ENGINE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Opportunist_(ability) | Source} */
|
||||||
OPPORTUNIST,
|
OPPORTUNIST,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Cud_Chew_(ability) | Source} */
|
||||||
CUD_CHEW,
|
CUD_CHEW,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Sharpness_(ability) | Source} */
|
||||||
SHARPNESS,
|
SHARPNESS,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Supreme_Overlord_(ability) | Source} */
|
||||||
SUPREME_OVERLORD,
|
SUPREME_OVERLORD,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Costar_(ability) | Source} */
|
||||||
COSTAR,
|
COSTAR,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Toxic_Debris_(ability) | Source} */
|
||||||
TOXIC_DEBRIS,
|
TOXIC_DEBRIS,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Armor_Tail_(ability) | Source} */
|
||||||
ARMOR_TAIL,
|
ARMOR_TAIL,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Earth_Eater_(ability) | Source} */
|
||||||
EARTH_EATER,
|
EARTH_EATER,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Mycelium_Might_(ability) | Source} */
|
||||||
MYCELIUM_MIGHT,
|
MYCELIUM_MIGHT,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Minds_Eye_(ability) | Source} */
|
||||||
MINDS_EYE,
|
MINDS_EYE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Supersweet_Syrup_(ability) | Source} */
|
||||||
SUPERSWEET_SYRUP,
|
SUPERSWEET_SYRUP,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Hospitality_(ability) | Source} */
|
||||||
HOSPITALITY,
|
HOSPITALITY,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Toxic_Chain_(ability) | Source} */
|
||||||
TOXIC_CHAIN,
|
TOXIC_CHAIN,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Embody_Aspect_Teal_(ability) | Source} */
|
||||||
EMBODY_ASPECT_TEAL,
|
EMBODY_ASPECT_TEAL,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Embody_Aspect_Wellspring_(ability) | Source} */
|
||||||
EMBODY_ASPECT_WELLSPRING,
|
EMBODY_ASPECT_WELLSPRING,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Embody_Aspect_Hearthflame_(ability) | Source} */
|
||||||
EMBODY_ASPECT_HEARTHFLAME,
|
EMBODY_ASPECT_HEARTHFLAME,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Embody_Aspect_Cornerstone_(ability) | Source} */
|
||||||
EMBODY_ASPECT_CORNERSTONE,
|
EMBODY_ASPECT_CORNERSTONE,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Tera_Shift_(ability) | Source} */
|
||||||
TERA_SHIFT,
|
TERA_SHIFT,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Tera_Shell_(ability) | Source} */
|
||||||
TERA_SHELL,
|
TERA_SHELL,
|
||||||
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Teraform_Zero_(ability) | Source} */
|
||||||
TERAFORM_ZERO,
|
TERAFORM_ZERO,
|
||||||
POISON_PUPPETEER
|
/**{@link https://bulbapedia.bulbagarden.net/wiki/Poison_Puppeteer_(ability) | Source} */
|
||||||
|
POISON_PUPPETEER,
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
127
src/data/move.ts
127
src/data/move.ts
|
@ -54,22 +54,28 @@ export enum MoveTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum MoveFlags {
|
export enum MoveFlags {
|
||||||
MAKES_CONTACT = 1,
|
NONE = 0,
|
||||||
IGNORE_PROTECT = 2,
|
MAKES_CONTACT = 1 << 0,
|
||||||
IGNORE_VIRTUAL = 4,
|
IGNORE_PROTECT = 1 << 1,
|
||||||
SOUND_BASED = 8,
|
IGNORE_VIRTUAL = 1 << 2,
|
||||||
HIDE_USER = 16,
|
SOUND_BASED = 1 << 3,
|
||||||
HIDE_TARGET = 32,
|
HIDE_USER = 1 << 4,
|
||||||
BITING_MOVE = 64,
|
HIDE_TARGET = 1 << 5,
|
||||||
PULSE_MOVE = 128,
|
BITING_MOVE = 1 << 6,
|
||||||
PUNCHING_MOVE = 256,
|
PULSE_MOVE = 1 << 7,
|
||||||
SLICING_MOVE = 512,
|
PUNCHING_MOVE = 1 << 8,
|
||||||
BALLBOMB_MOVE = 1024,
|
SLICING_MOVE = 1 << 9,
|
||||||
POWDER_MOVE = 2048,
|
/**
|
||||||
DANCE_MOVE = 4096,
|
* Indicates a move should be affected by {@link Abilities.RECKLESS}
|
||||||
WIND_MOVE = 8192,
|
* @see {@link Move.recklessMove()}
|
||||||
TRIAGE_MOVE = 16384,
|
*/
|
||||||
IGNORE_ABILITIES = 32768
|
RECKLESS_MOVE = 1 << 10,
|
||||||
|
BALLBOMB_MOVE = 1 << 11,
|
||||||
|
POWDER_MOVE = 1 << 12,
|
||||||
|
DANCE_MOVE = 1 << 13,
|
||||||
|
WIND_MOVE = 1 << 14,
|
||||||
|
TRIAGE_MOVE = 1 << 15,
|
||||||
|
IGNORE_ABILITIES = 1 << 16,
|
||||||
}
|
}
|
||||||
|
|
||||||
type MoveConditionFunc = (user: Pokemon, target: Pokemon, move: Move) => boolean;
|
type MoveConditionFunc = (user: Pokemon, target: Pokemon, move: Move) => boolean;
|
||||||
|
@ -269,6 +275,17 @@ export default class Move implements Localizable {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the {@link MoveFlags.RECKLESS_MOVE} flag for the calling Move
|
||||||
|
* @see {@link Abilities.RECKLESS}
|
||||||
|
* @param {boolean} recklessMove The value to set the flag to
|
||||||
|
* @returns {Move} The {@link Move} that called this function
|
||||||
|
*/
|
||||||
|
recklessMove(recklessMove?: boolean): this {
|
||||||
|
this.setFlag(MoveFlags.RECKLESS_MOVE, recklessMove);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
ballBombMove(ballBombMove?: boolean): this {
|
ballBombMove(ballBombMove?: boolean): this {
|
||||||
this.setFlag(MoveFlags.BALLBOMB_MOVE, ballBombMove);
|
this.setFlag(MoveFlags.BALLBOMB_MOVE, ballBombMove);
|
||||||
return this;
|
return this;
|
||||||
|
@ -1544,6 +1561,29 @@ export class StatChangeAttr extends MoveEffectAttr {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class PostVictoryStatChangeAttr extends MoveAttr {
|
||||||
|
private stats: BattleStat[];
|
||||||
|
private levels: integer;
|
||||||
|
private condition: MoveConditionFunc;
|
||||||
|
private showMessage: boolean;
|
||||||
|
|
||||||
|
constructor(stats: BattleStat | BattleStat[], levels: integer, selfTarget?: boolean, condition?: MoveConditionFunc, showMessage: boolean = true, firstHitOnly: boolean = false) {
|
||||||
|
super();
|
||||||
|
this.stats = typeof(stats) === 'number'
|
||||||
|
? [ stats as BattleStat ]
|
||||||
|
: stats as BattleStat[];
|
||||||
|
this.levels = levels;
|
||||||
|
this.condition = condition || null;
|
||||||
|
this.showMessage = showMessage;
|
||||||
|
}
|
||||||
|
applyPostVictory(user: Pokemon, target: Pokemon, move: Move): void {
|
||||||
|
if(this.condition && !this.condition(user, target, move))
|
||||||
|
return false;
|
||||||
|
const statChangeAttr = new StatChangeAttr(this.stats, this.levels, this.showMessage);
|
||||||
|
statChangeAttr.apply(user, target, move);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export class AcupressureStatChangeAttr extends MoveEffectAttr {
|
export class AcupressureStatChangeAttr extends MoveEffectAttr {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
|
@ -1558,7 +1598,7 @@ export class AcupressureStatChangeAttr extends MoveEffectAttr {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GrowthStatChangeAttr extends StatChangeAttr {
|
export class GrowthStatChangeAttr extends StatChangeAttr {
|
||||||
|
@ -4073,7 +4113,8 @@ export function initMoves() {
|
||||||
new AttackMove(Moves.JUMP_KICK, Type.FIGHTING, MoveCategory.PHYSICAL, 100, 95, 10, -1, 0, 1)
|
new AttackMove(Moves.JUMP_KICK, Type.FIGHTING, MoveCategory.PHYSICAL, 100, 95, 10, -1, 0, 1)
|
||||||
.attr(MissEffectAttr, crashDamageFunc)
|
.attr(MissEffectAttr, crashDamageFunc)
|
||||||
.attr(NoEffectAttr, crashDamageFunc)
|
.attr(NoEffectAttr, crashDamageFunc)
|
||||||
.condition(failOnGravityCondition),
|
.condition(failOnGravityCondition)
|
||||||
|
.recklessMove(),
|
||||||
new AttackMove(Moves.ROLLING_KICK, Type.FIGHTING, MoveCategory.PHYSICAL, 60, 85, 15, 30, 0, 1)
|
new AttackMove(Moves.ROLLING_KICK, Type.FIGHTING, MoveCategory.PHYSICAL, 60, 85, 15, 30, 0, 1)
|
||||||
.attr(FlinchAttr),
|
.attr(FlinchAttr),
|
||||||
new StatusMove(Moves.SAND_ATTACK, Type.GROUND, 100, 15, -1, 0, 1)
|
new StatusMove(Moves.SAND_ATTACK, Type.GROUND, 100, 15, -1, 0, 1)
|
||||||
|
@ -4092,13 +4133,15 @@ export function initMoves() {
|
||||||
new AttackMove(Moves.WRAP, Type.NORMAL, MoveCategory.PHYSICAL, 15, 90, 20, 100, 0, 1)
|
new AttackMove(Moves.WRAP, Type.NORMAL, MoveCategory.PHYSICAL, 15, 90, 20, 100, 0, 1)
|
||||||
.attr(TrapAttr, BattlerTagType.WRAP),
|
.attr(TrapAttr, BattlerTagType.WRAP),
|
||||||
new AttackMove(Moves.TAKE_DOWN, Type.NORMAL, MoveCategory.PHYSICAL, 90, 85, 20, -1, 0, 1)
|
new AttackMove(Moves.TAKE_DOWN, Type.NORMAL, MoveCategory.PHYSICAL, 90, 85, 20, -1, 0, 1)
|
||||||
.attr(RecoilAttr),
|
.attr(RecoilAttr)
|
||||||
|
.recklessMove(),
|
||||||
new AttackMove(Moves.THRASH, Type.NORMAL, MoveCategory.PHYSICAL, 120, 100, 10, -1, 0, 1)
|
new AttackMove(Moves.THRASH, Type.NORMAL, MoveCategory.PHYSICAL, 120, 100, 10, -1, 0, 1)
|
||||||
.attr(FrenzyAttr)
|
.attr(FrenzyAttr)
|
||||||
.attr(MissEffectAttr, frenzyMissFunc)
|
.attr(MissEffectAttr, frenzyMissFunc)
|
||||||
.target(MoveTarget.RANDOM_NEAR_ENEMY),
|
.target(MoveTarget.RANDOM_NEAR_ENEMY),
|
||||||
new AttackMove(Moves.DOUBLE_EDGE, Type.NORMAL, MoveCategory.PHYSICAL, 120, 100, 15, -1, 0, 1)
|
new AttackMove(Moves.DOUBLE_EDGE, Type.NORMAL, MoveCategory.PHYSICAL, 120, 100, 15, -1, 0, 1)
|
||||||
.attr(RecoilAttr, false, 0.33),
|
.attr(RecoilAttr, false, 0.33)
|
||||||
|
.recklessMove(),
|
||||||
new StatusMove(Moves.TAIL_WHIP, Type.NORMAL, 100, 30, -1, 0, 1)
|
new StatusMove(Moves.TAIL_WHIP, Type.NORMAL, 100, 30, -1, 0, 1)
|
||||||
.attr(StatChangeAttr, BattleStat.DEF, -1)
|
.attr(StatChangeAttr, BattleStat.DEF, -1)
|
||||||
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
||||||
|
@ -4170,7 +4213,8 @@ export function initMoves() {
|
||||||
new AttackMove(Moves.PECK, Type.FLYING, MoveCategory.PHYSICAL, 35, 100, 35, -1, 0, 1),
|
new AttackMove(Moves.PECK, Type.FLYING, MoveCategory.PHYSICAL, 35, 100, 35, -1, 0, 1),
|
||||||
new AttackMove(Moves.DRILL_PECK, Type.FLYING, MoveCategory.PHYSICAL, 80, 100, 20, -1, 0, 1),
|
new AttackMove(Moves.DRILL_PECK, Type.FLYING, MoveCategory.PHYSICAL, 80, 100, 20, -1, 0, 1),
|
||||||
new AttackMove(Moves.SUBMISSION, Type.FIGHTING, MoveCategory.PHYSICAL, 80, 80, 20, -1, 0, 1)
|
new AttackMove(Moves.SUBMISSION, Type.FIGHTING, MoveCategory.PHYSICAL, 80, 80, 20, -1, 0, 1)
|
||||||
.attr(RecoilAttr),
|
.attr(RecoilAttr)
|
||||||
|
.recklessMove(),
|
||||||
new AttackMove(Moves.LOW_KICK, Type.FIGHTING, MoveCategory.PHYSICAL, -1, 100, 20, -1, 0, 1)
|
new AttackMove(Moves.LOW_KICK, Type.FIGHTING, MoveCategory.PHYSICAL, -1, 100, 20, -1, 0, 1)
|
||||||
.attr(WeightPowerAttr)
|
.attr(WeightPowerAttr)
|
||||||
.condition(failOnMaxCondition),
|
.condition(failOnMaxCondition),
|
||||||
|
@ -4358,7 +4402,8 @@ export function initMoves() {
|
||||||
new AttackMove(Moves.HIGH_JUMP_KICK, Type.FIGHTING, MoveCategory.PHYSICAL, 130, 90, 10, -1, 0, 1)
|
new AttackMove(Moves.HIGH_JUMP_KICK, Type.FIGHTING, MoveCategory.PHYSICAL, 130, 90, 10, -1, 0, 1)
|
||||||
.attr(MissEffectAttr, crashDamageFunc)
|
.attr(MissEffectAttr, crashDamageFunc)
|
||||||
.attr(NoEffectAttr, crashDamageFunc)
|
.attr(NoEffectAttr, crashDamageFunc)
|
||||||
.condition(failOnGravityCondition),
|
.condition(failOnGravityCondition)
|
||||||
|
.recklessMove(),
|
||||||
new StatusMove(Moves.GLARE, Type.NORMAL, 100, 30, -1, 0, 1)
|
new StatusMove(Moves.GLARE, Type.NORMAL, 100, 30, -1, 0, 1)
|
||||||
.attr(StatusEffectAttr, StatusEffect.PARALYSIS),
|
.attr(StatusEffectAttr, StatusEffect.PARALYSIS),
|
||||||
new AttackMove(Moves.DREAM_EATER, Type.PSYCHIC, MoveCategory.SPECIAL, 100, 100, 15, -1, 0, 1)
|
new AttackMove(Moves.DREAM_EATER, Type.PSYCHIC, MoveCategory.SPECIAL, 100, 100, 15, -1, 0, 1)
|
||||||
|
@ -4943,7 +4988,8 @@ export function initMoves() {
|
||||||
.attr(StealHeldItemChanceAttr, 0.3),
|
.attr(StealHeldItemChanceAttr, 0.3),
|
||||||
new AttackMove(Moves.VOLT_TACKLE, Type.ELECTRIC, MoveCategory.PHYSICAL, 120, 100, 15, 10, 0, 3)
|
new AttackMove(Moves.VOLT_TACKLE, Type.ELECTRIC, MoveCategory.PHYSICAL, 120, 100, 15, 10, 0, 3)
|
||||||
.attr(RecoilAttr, false, 0.33)
|
.attr(RecoilAttr, false, 0.33)
|
||||||
.attr(StatusEffectAttr, StatusEffect.PARALYSIS),
|
.attr(StatusEffectAttr, StatusEffect.PARALYSIS)
|
||||||
|
.recklessMove(),
|
||||||
new AttackMove(Moves.MAGICAL_LEAF, Type.GRASS, MoveCategory.SPECIAL, 60, -1, 20, -1, 0, 3),
|
new AttackMove(Moves.MAGICAL_LEAF, Type.GRASS, MoveCategory.SPECIAL, 60, -1, 20, -1, 0, 3),
|
||||||
new StatusMove(Moves.WATER_SPORT, Type.WATER, -1, 15, -1, 0, 3)
|
new StatusMove(Moves.WATER_SPORT, Type.WATER, -1, 15, -1, 0, 3)
|
||||||
.attr(AddArenaTagAttr, ArenaTagType.WATER_SPORT, 5)
|
.attr(AddArenaTagAttr, ArenaTagType.WATER_SPORT, 5)
|
||||||
|
@ -5086,7 +5132,8 @@ export function initMoves() {
|
||||||
.attr(RecoilAttr, false, 0.33)
|
.attr(RecoilAttr, false, 0.33)
|
||||||
.attr(HealStatusEffectAttr, true, StatusEffect.FREEZE)
|
.attr(HealStatusEffectAttr, true, StatusEffect.FREEZE)
|
||||||
.attr(StatusEffectAttr, StatusEffect.BURN)
|
.attr(StatusEffectAttr, StatusEffect.BURN)
|
||||||
.condition(failOnGravityCondition),
|
.condition(failOnGravityCondition)
|
||||||
|
.recklessMove(),
|
||||||
new AttackMove(Moves.FORCE_PALM, Type.FIGHTING, MoveCategory.PHYSICAL, 60, 100, 10, 30, 0, 4)
|
new AttackMove(Moves.FORCE_PALM, Type.FIGHTING, MoveCategory.PHYSICAL, 60, 100, 10, 30, 0, 4)
|
||||||
.attr(StatusEffectAttr, StatusEffect.PARALYSIS),
|
.attr(StatusEffectAttr, StatusEffect.PARALYSIS),
|
||||||
new AttackMove(Moves.AURA_SPHERE, Type.FIGHTING, MoveCategory.SPECIAL, 80, -1, 20, -1, 0, 4)
|
new AttackMove(Moves.AURA_SPHERE, Type.FIGHTING, MoveCategory.SPECIAL, 80, -1, 20, -1, 0, 4)
|
||||||
|
@ -5131,7 +5178,8 @@ export function initMoves() {
|
||||||
.attr(StatChangeAttr, BattleStat.SPDEF, -1)
|
.attr(StatChangeAttr, BattleStat.SPDEF, -1)
|
||||||
.ballBombMove(),
|
.ballBombMove(),
|
||||||
new AttackMove(Moves.BRAVE_BIRD, Type.FLYING, MoveCategory.PHYSICAL, 120, 100, 15, -1, 0, 4)
|
new AttackMove(Moves.BRAVE_BIRD, Type.FLYING, MoveCategory.PHYSICAL, 120, 100, 15, -1, 0, 4)
|
||||||
.attr(RecoilAttr, false, 0.33),
|
.attr(RecoilAttr, false, 0.33)
|
||||||
|
.recklessMove(),
|
||||||
new AttackMove(Moves.EARTH_POWER, Type.GROUND, MoveCategory.SPECIAL, 90, 100, 10, 10, 0, 4)
|
new AttackMove(Moves.EARTH_POWER, Type.GROUND, MoveCategory.SPECIAL, 90, 100, 10, 10, 0, 4)
|
||||||
.attr(StatChangeAttr, BattleStat.SPDEF, -1),
|
.attr(StatChangeAttr, BattleStat.SPDEF, -1),
|
||||||
new StatusMove(Moves.SWITCHEROO, Type.DARK, 100, 10, -1, 0, 4)
|
new StatusMove(Moves.SWITCHEROO, Type.DARK, 100, 10, -1, 0, 4)
|
||||||
|
@ -5237,7 +5285,8 @@ export function initMoves() {
|
||||||
new AttackMove(Moves.CHARGE_BEAM, Type.ELECTRIC, MoveCategory.SPECIAL, 50, 90, 10, 70, 0, 4)
|
new AttackMove(Moves.CHARGE_BEAM, Type.ELECTRIC, MoveCategory.SPECIAL, 50, 90, 10, 70, 0, 4)
|
||||||
.attr(StatChangeAttr, BattleStat.SPATK, 1, true),
|
.attr(StatChangeAttr, BattleStat.SPATK, 1, true),
|
||||||
new AttackMove(Moves.WOOD_HAMMER, Type.GRASS, MoveCategory.PHYSICAL, 120, 100, 15, -1, 0, 4)
|
new AttackMove(Moves.WOOD_HAMMER, Type.GRASS, MoveCategory.PHYSICAL, 120, 100, 15, -1, 0, 4)
|
||||||
.attr(RecoilAttr, false, 0.33),
|
.attr(RecoilAttr, false, 0.33)
|
||||||
|
.recklessMove(),
|
||||||
new AttackMove(Moves.AQUA_JET, Type.WATER, MoveCategory.PHYSICAL, 40, 100, 20, -1, 1, 4),
|
new AttackMove(Moves.AQUA_JET, Type.WATER, MoveCategory.PHYSICAL, 40, 100, 20, -1, 1, 4),
|
||||||
new AttackMove(Moves.ATTACK_ORDER, Type.BUG, MoveCategory.PHYSICAL, 90, 100, 15, -1, 0, 4)
|
new AttackMove(Moves.ATTACK_ORDER, Type.BUG, MoveCategory.PHYSICAL, 90, 100, 15, -1, 0, 4)
|
||||||
.attr(HighCritAttr)
|
.attr(HighCritAttr)
|
||||||
|
@ -5248,7 +5297,8 @@ export function initMoves() {
|
||||||
.attr(HealAttr, 0.5)
|
.attr(HealAttr, 0.5)
|
||||||
.triageMove(),
|
.triageMove(),
|
||||||
new AttackMove(Moves.HEAD_SMASH, Type.ROCK, MoveCategory.PHYSICAL, 150, 80, 5, -1, 0, 4)
|
new AttackMove(Moves.HEAD_SMASH, Type.ROCK, MoveCategory.PHYSICAL, 150, 80, 5, -1, 0, 4)
|
||||||
.attr(RecoilAttr, false, 0.5),
|
.attr(RecoilAttr, false, 0.5)
|
||||||
|
.recklessMove(),
|
||||||
new AttackMove(Moves.DOUBLE_HIT, Type.NORMAL, MoveCategory.PHYSICAL, 35, 90, 10, -1, 0, 4)
|
new AttackMove(Moves.DOUBLE_HIT, Type.NORMAL, MoveCategory.PHYSICAL, 35, 90, 10, -1, 0, 4)
|
||||||
.attr(MultiHitAttr, MultiHitType._2),
|
.attr(MultiHitAttr, MultiHitType._2),
|
||||||
new AttackMove(Moves.ROAR_OF_TIME, Type.DRAGON, MoveCategory.SPECIAL, 150, 90, 5, -1, 0, 4)
|
new AttackMove(Moves.ROAR_OF_TIME, Type.DRAGON, MoveCategory.SPECIAL, 150, 90, 5, -1, 0, 4)
|
||||||
|
@ -5436,7 +5486,8 @@ export function initMoves() {
|
||||||
.attr(StatChangeAttr, BattleStat.SPD, -1)
|
.attr(StatChangeAttr, BattleStat.SPD, -1)
|
||||||
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
||||||
new AttackMove(Moves.WILD_CHARGE, Type.ELECTRIC, MoveCategory.PHYSICAL, 90, 100, 15, -1, 0, 5)
|
new AttackMove(Moves.WILD_CHARGE, Type.ELECTRIC, MoveCategory.PHYSICAL, 90, 100, 15, -1, 0, 5)
|
||||||
.attr(RecoilAttr),
|
.attr(RecoilAttr)
|
||||||
|
.recklessMove(),
|
||||||
new AttackMove(Moves.DRILL_RUN, Type.GROUND, MoveCategory.PHYSICAL, 80, 95, 10, -1, 0, 5)
|
new AttackMove(Moves.DRILL_RUN, Type.GROUND, MoveCategory.PHYSICAL, 80, 95, 10, -1, 0, 5)
|
||||||
.attr(HighCritAttr),
|
.attr(HighCritAttr),
|
||||||
new AttackMove(Moves.DUAL_CHOP, Type.DRAGON, MoveCategory.PHYSICAL, 40, 90, 15, -1, 0, 5)
|
new AttackMove(Moves.DUAL_CHOP, Type.DRAGON, MoveCategory.PHYSICAL, 40, 90, 15, -1, 0, 5)
|
||||||
|
@ -5473,7 +5524,8 @@ export function initMoves() {
|
||||||
.attr(HitsTagAttr, BattlerTagType.FLYING, false)
|
.attr(HitsTagAttr, BattlerTagType.FLYING, false)
|
||||||
.windMove(),
|
.windMove(),
|
||||||
new AttackMove(Moves.HEAD_CHARGE, Type.NORMAL, MoveCategory.PHYSICAL, 120, 100, 15, -1, 0, 5)
|
new AttackMove(Moves.HEAD_CHARGE, Type.NORMAL, MoveCategory.PHYSICAL, 120, 100, 15, -1, 0, 5)
|
||||||
.attr(RecoilAttr),
|
.attr(RecoilAttr)
|
||||||
|
.recklessMove(),
|
||||||
new AttackMove(Moves.GEAR_GRIND, Type.STEEL, MoveCategory.PHYSICAL, 50, 85, 15, -1, 0, 5)
|
new AttackMove(Moves.GEAR_GRIND, Type.STEEL, MoveCategory.PHYSICAL, 50, 85, 15, -1, 0, 5)
|
||||||
.attr(MultiHitAttr, MultiHitType._2),
|
.attr(MultiHitAttr, MultiHitType._2),
|
||||||
new AttackMove(Moves.SEARING_SHOT, Type.FIRE, MoveCategory.SPECIAL, 100, 100, 5, 30, 0, 5)
|
new AttackMove(Moves.SEARING_SHOT, Type.FIRE, MoveCategory.SPECIAL, 100, 100, 5, 30, 0, 5)
|
||||||
|
@ -5536,7 +5588,7 @@ export function initMoves() {
|
||||||
.attr(AddArenaTrapTagAttr, ArenaTagType.STICKY_WEB)
|
.attr(AddArenaTrapTagAttr, ArenaTagType.STICKY_WEB)
|
||||||
.target(MoveTarget.ENEMY_SIDE),
|
.target(MoveTarget.ENEMY_SIDE),
|
||||||
new AttackMove(Moves.FELL_STINGER, Type.BUG, MoveCategory.PHYSICAL, 50, 100, 25, -1, 0, 6)
|
new AttackMove(Moves.FELL_STINGER, Type.BUG, MoveCategory.PHYSICAL, 50, 100, 25, -1, 0, 6)
|
||||||
.partial(),
|
.attr(PostVictoryStatChangeAttr, BattleStat.ATK, 3, true ),
|
||||||
new AttackMove(Moves.PHANTOM_FORCE, Type.GHOST, MoveCategory.PHYSICAL, 90, 100, 10, -1, 0, 6)
|
new AttackMove(Moves.PHANTOM_FORCE, Type.GHOST, MoveCategory.PHYSICAL, 90, 100, 10, -1, 0, 6)
|
||||||
.attr(ChargeAttr, ChargeAnim.PHANTOM_FORCE_CHARGING, 'vanished\ninstantly!', BattlerTagType.HIDDEN)
|
.attr(ChargeAttr, ChargeAnim.PHANTOM_FORCE_CHARGING, 'vanished\ninstantly!', BattlerTagType.HIDDEN)
|
||||||
.ignoresProtect()
|
.ignoresProtect()
|
||||||
|
@ -5687,7 +5739,8 @@ export function initMoves() {
|
||||||
.makesContact(false)
|
.makesContact(false)
|
||||||
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
||||||
new AttackMove(Moves.LIGHT_OF_RUIN, Type.FAIRY, MoveCategory.SPECIAL, 140, 90, 5, -1, 0, 6)
|
new AttackMove(Moves.LIGHT_OF_RUIN, Type.FAIRY, MoveCategory.SPECIAL, 140, 90, 5, -1, 0, 6)
|
||||||
.attr(RecoilAttr, false, 0.5),
|
.attr(RecoilAttr, false, 0.5)
|
||||||
|
.recklessMove(),
|
||||||
new AttackMove(Moves.ORIGIN_PULSE, Type.WATER, MoveCategory.SPECIAL, 110, 85, 10, -1, 0, 6)
|
new AttackMove(Moves.ORIGIN_PULSE, Type.WATER, MoveCategory.SPECIAL, 110, 85, 10, -1, 0, 6)
|
||||||
.pulseMove()
|
.pulseMove()
|
||||||
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
||||||
|
@ -5978,7 +6031,8 @@ export function initMoves() {
|
||||||
.attr(FriendshipPowerAttr),
|
.attr(FriendshipPowerAttr),
|
||||||
new AttackMove(Moves.BOUNCY_BUBBLE, Type.WATER, MoveCategory.SPECIAL, 60, 100, 20, -1, 0, 7)
|
new AttackMove(Moves.BOUNCY_BUBBLE, Type.WATER, MoveCategory.SPECIAL, 60, 100, 20, -1, 0, 7)
|
||||||
.attr(HitHealAttr, 1.0)
|
.attr(HitHealAttr, 1.0)
|
||||||
.triageMove(),
|
.triageMove()
|
||||||
|
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
||||||
new AttackMove(Moves.BUZZY_BUZZ, Type.ELECTRIC, MoveCategory.SPECIAL, 60, 100, 20, 100, 0, 7)
|
new AttackMove(Moves.BUZZY_BUZZ, Type.ELECTRIC, MoveCategory.SPECIAL, 60, 100, 20, 100, 0, 7)
|
||||||
.attr(StatusEffectAttr, StatusEffect.PARALYSIS),
|
.attr(StatusEffectAttr, StatusEffect.PARALYSIS),
|
||||||
new AttackMove(Moves.SIZZLY_SLIDE, Type.FIRE, MoveCategory.PHYSICAL, 60, 100, 20, 100, 0, 7)
|
new AttackMove(Moves.SIZZLY_SLIDE, Type.FIRE, MoveCategory.PHYSICAL, 60, 100, 20, 100, 0, 7)
|
||||||
|
@ -6267,7 +6321,8 @@ export function initMoves() {
|
||||||
.attr(MissEffectAttr, frenzyMissFunc)
|
.attr(MissEffectAttr, frenzyMissFunc)
|
||||||
.target(MoveTarget.RANDOM_NEAR_ENEMY),
|
.target(MoveTarget.RANDOM_NEAR_ENEMY),
|
||||||
new AttackMove(Moves.WAVE_CRASH, Type.WATER, MoveCategory.PHYSICAL, 120, 100, 10, -1, 0, 8)
|
new AttackMove(Moves.WAVE_CRASH, Type.WATER, MoveCategory.PHYSICAL, 120, 100, 10, -1, 0, 8)
|
||||||
.attr(RecoilAttr, false, 0.33),
|
.attr(RecoilAttr, false, 0.33)
|
||||||
|
.recklessMove(),
|
||||||
new AttackMove(Moves.CHLOROBLAST, Type.GRASS, MoveCategory.SPECIAL, 150, 95, 5, -1, 0, 8)
|
new AttackMove(Moves.CHLOROBLAST, Type.GRASS, MoveCategory.SPECIAL, 150, 95, 5, -1, 0, 8)
|
||||||
.attr(RecoilAttr, true, 0.5),
|
.attr(RecoilAttr, true, 0.5),
|
||||||
new AttackMove(Moves.MOUNTAIN_GALE, Type.ICE, MoveCategory.PHYSICAL, 100, 85, 10, 30, 0, 8)
|
new AttackMove(Moves.MOUNTAIN_GALE, Type.ICE, MoveCategory.PHYSICAL, 100, 85, 10, 30, 0, 8)
|
||||||
|
@ -6431,7 +6486,8 @@ export function initMoves() {
|
||||||
new AttackMove(Moves.AXE_KICK, Type.FIGHTING, MoveCategory.PHYSICAL, 120, 90, 10, 30, 0, 9)
|
new AttackMove(Moves.AXE_KICK, Type.FIGHTING, MoveCategory.PHYSICAL, 120, 90, 10, 30, 0, 9)
|
||||||
.attr(MissEffectAttr, crashDamageFunc)
|
.attr(MissEffectAttr, crashDamageFunc)
|
||||||
.attr(NoEffectAttr, crashDamageFunc)
|
.attr(NoEffectAttr, crashDamageFunc)
|
||||||
.attr(ConfuseAttr),
|
.attr(ConfuseAttr)
|
||||||
|
.recklessMove(),
|
||||||
new AttackMove(Moves.LAST_RESPECTS, Type.GHOST, MoveCategory.PHYSICAL, 50, 100, 10, -1, 0, 9)
|
new AttackMove(Moves.LAST_RESPECTS, Type.GHOST, MoveCategory.PHYSICAL, 50, 100, 10, -1, 0, 9)
|
||||||
.attr(MovePowerMultiplierAttr, (user, target, move) => {
|
.attr(MovePowerMultiplierAttr, (user, target, move) => {
|
||||||
return user.scene.getParty().reduce((acc, pokemonInParty) => acc + (pokemonInParty.status?.effect == StatusEffect.FAINT ? 1 : 0),
|
return user.scene.getParty().reduce((acc, pokemonInParty) => acc + (pokemonInParty.status?.effect == StatusEffect.FAINT ? 1 : 0),
|
||||||
|
@ -6635,7 +6691,8 @@ export function initMoves() {
|
||||||
.attr(MovePowerMultiplierAttr, (user, target, move) => user.getLastXMoves(2)[1]?.result == MoveResult.MISS || user.getLastXMoves(2)[1]?.result == MoveResult.FAIL ? 2 : 1),
|
.attr(MovePowerMultiplierAttr, (user, target, move) => user.getLastXMoves(2)[1]?.result == MoveResult.MISS || user.getLastXMoves(2)[1]?.result == MoveResult.FAIL ? 2 : 1),
|
||||||
new AttackMove(Moves.SUPERCELL_SLAM, Type.ELECTRIC, MoveCategory.PHYSICAL, 100, 95, 15, -1, 0, 9)
|
new AttackMove(Moves.SUPERCELL_SLAM, Type.ELECTRIC, MoveCategory.PHYSICAL, 100, 95, 15, -1, 0, 9)
|
||||||
.attr(MissEffectAttr, crashDamageFunc)
|
.attr(MissEffectAttr, crashDamageFunc)
|
||||||
.attr(NoEffectAttr, crashDamageFunc),
|
.attr(NoEffectAttr, crashDamageFunc)
|
||||||
|
.recklessMove(),
|
||||||
new AttackMove(Moves.PSYCHIC_NOISE, Type.PSYCHIC, MoveCategory.SPECIAL, 75, 100, 10, -1, 0, 9)
|
new AttackMove(Moves.PSYCHIC_NOISE, Type.PSYCHIC, MoveCategory.SPECIAL, 75, 100, 10, -1, 0, 9)
|
||||||
.soundBased()
|
.soundBased()
|
||||||
.partial(),
|
.partial(),
|
||||||
|
|
|
@ -4305,12 +4305,12 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
|
||||||
[Species.GROVYLE]: [
|
[Species.GROVYLE]: [
|
||||||
[ 1, Moves.POUND ],
|
[ 1, Moves.POUND ],
|
||||||
[ 1, Moves.LEER ],
|
[ 1, Moves.LEER ],
|
||||||
|
[ 1, Moves.LEAFAGE ],
|
||||||
[ 1, Moves.QUICK_ATTACK ],
|
[ 1, Moves.QUICK_ATTACK ],
|
||||||
[ 1, Moves.FALSE_SWIPE ],
|
[ 1, Moves.FALSE_SWIPE ],
|
||||||
[ 1, Moves.FURY_CUTTER ],
|
[ 1, Moves.FURY_CUTTER ],
|
||||||
[ 1, Moves.X_SCISSOR ],
|
[ 1, Moves.X_SCISSOR ],
|
||||||
[ 1, Moves.ENERGY_BALL ],
|
[ 1, Moves.ENERGY_BALL ],
|
||||||
[ 1, Moves.LEAFAGE ],
|
|
||||||
[ 9, Moves.MEGA_DRAIN ],
|
[ 9, Moves.MEGA_DRAIN ],
|
||||||
[ 12, Moves.DETECT ],
|
[ 12, Moves.DETECT ],
|
||||||
[ 15, Moves.QUICK_GUARD ],
|
[ 15, Moves.QUICK_GUARD ],
|
||||||
|
@ -4324,15 +4324,16 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
|
||||||
[ 55, Moves.LEAF_STORM ],
|
[ 55, Moves.LEAF_STORM ],
|
||||||
],
|
],
|
||||||
[Species.SCEPTILE]: [
|
[Species.SCEPTILE]: [
|
||||||
[ 0, Moves.DUAL_CHOP ],
|
[ 0, Moves.LEAF_BLADE ],
|
||||||
[ 1, Moves.POUND ],
|
[ 1, Moves.POUND ],
|
||||||
[ 1, Moves.LEER ],
|
[ 1, Moves.LEER ],
|
||||||
|
[ 1, Moves.LEAFAGE ],
|
||||||
[ 1, Moves.QUICK_ATTACK ],
|
[ 1, Moves.QUICK_ATTACK ],
|
||||||
[ 1, Moves.FALSE_SWIPE ],
|
[ 1, Moves.FALSE_SWIPE ],
|
||||||
[ 1, Moves.FURY_CUTTER ],
|
[ 1, Moves.FURY_CUTTER ],
|
||||||
[ 1, Moves.X_SCISSOR ],
|
[ 1, Moves.X_SCISSOR ],
|
||||||
[ 1, Moves.ENERGY_BALL ],
|
[ 1, Moves.ENERGY_BALL ],
|
||||||
[ 1, Moves.LEAFAGE ],
|
[ 1, Moves.SHED_TAIL ],
|
||||||
[ 5, Moves.MEGA_DRAIN ],
|
[ 5, Moves.MEGA_DRAIN ],
|
||||||
[ 12, Moves.DETECT ],
|
[ 12, Moves.DETECT ],
|
||||||
[ 15, Moves.QUICK_GUARD ],
|
[ 15, Moves.QUICK_GUARD ],
|
||||||
|
@ -4340,10 +4341,9 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
|
||||||
[ 25, Moves.GIGA_DRAIN ],
|
[ 25, Moves.GIGA_DRAIN ],
|
||||||
[ 30, Moves.SLAM ],
|
[ 30, Moves.SLAM ],
|
||||||
[ 35, Moves.DOUBLE_TEAM ],
|
[ 35, Moves.DOUBLE_TEAM ],
|
||||||
[ 42, Moves.LEAF_BLADE ],
|
[ 42, Moves.SCREECH ],
|
||||||
[ 49, Moves.SCREECH ],
|
[ 49, Moves.ENDEAVOR ],
|
||||||
[ 56, Moves.ENDEAVOR ],
|
[ 56, Moves.LEAF_STORM ],
|
||||||
[ 63, Moves.LEAF_STORM ],
|
|
||||||
],
|
],
|
||||||
[Species.TORCHIC]: [
|
[Species.TORCHIC]: [
|
||||||
[ 1, Moves.SCRATCH ],
|
[ 1, Moves.SCRATCH ],
|
||||||
|
@ -4367,9 +4367,9 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
|
||||||
[ 1, Moves.SCRATCH ],
|
[ 1, Moves.SCRATCH ],
|
||||||
[ 1, Moves.GROWL ],
|
[ 1, Moves.GROWL ],
|
||||||
[ 1, Moves.EMBER ],
|
[ 1, Moves.EMBER ],
|
||||||
|
[ 1, Moves.QUICK_ATTACK ],
|
||||||
[ 1, Moves.FLAMETHROWER ],
|
[ 1, Moves.FLAMETHROWER ],
|
||||||
[ 1, Moves.QUICK_ATTACK ],
|
[ 1, Moves.FEATHER_DANCE ],
|
||||||
[ 1, Moves.FEATHER_DANCE ],
|
|
||||||
[ 9, Moves.FLAME_CHARGE ],
|
[ 9, Moves.FLAME_CHARGE ],
|
||||||
[ 12, Moves.DETECT ],
|
[ 12, Moves.DETECT ],
|
||||||
[ 15, Moves.SAND_ATTACK ],
|
[ 15, Moves.SAND_ATTACK ],
|
||||||
|
@ -4399,10 +4399,10 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
|
||||||
[ 25, Moves.SLASH ],
|
[ 25, Moves.SLASH ],
|
||||||
[ 30, Moves.BOUNCE ],
|
[ 30, Moves.BOUNCE ],
|
||||||
[ 35, Moves.FOCUS_ENERGY ],
|
[ 35, Moves.FOCUS_ENERGY ],
|
||||||
[ 42, Moves.BLAZE_KICK ],
|
[ 42, Moves.BULK_UP ],
|
||||||
[ 49, Moves.BULK_UP ],
|
[ 49, Moves.REVERSAL ],
|
||||||
[ 56, Moves.REVERSAL ],
|
[ 56, Moves.FLARE_BLITZ ],
|
||||||
[ 63, Moves.FLARE_BLITZ ],
|
[ 63, Moves.BRAVE_BIRD ],
|
||||||
],
|
],
|
||||||
[Species.MUDKIP]: [
|
[Species.MUDKIP]: [
|
||||||
[ 1, Moves.TACKLE ],
|
[ 1, Moves.TACKLE ],
|
||||||
|
@ -4426,8 +4426,6 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
|
||||||
[ 1, Moves.TACKLE ],
|
[ 1, Moves.TACKLE ],
|
||||||
[ 1, Moves.GROWL ],
|
[ 1, Moves.GROWL ],
|
||||||
[ 1, Moves.WATER_GUN ],
|
[ 1, Moves.WATER_GUN ],
|
||||||
[ 1, Moves.SURF ],
|
|
||||||
[ 1, Moves.EARTHQUAKE ],
|
|
||||||
[ 1, Moves.ROCK_SMASH ],
|
[ 1, Moves.ROCK_SMASH ],
|
||||||
[ 9, Moves.ROCK_THROW ],
|
[ 9, Moves.ROCK_THROW ],
|
||||||
[ 12, Moves.PROTECT ],
|
[ 12, Moves.PROTECT ],
|
||||||
|
@ -4442,13 +4440,13 @@ export const pokemonSpeciesLevelMoves: PokemonSpeciesLevelMoves = {
|
||||||
[ 55, Moves.HYDRO_PUMP ],
|
[ 55, Moves.HYDRO_PUMP ],
|
||||||
],
|
],
|
||||||
[Species.SWAMPERT]: [
|
[Species.SWAMPERT]: [
|
||||||
|
[ 1, Moves.MUD_SHOT ],
|
||||||
[ 1, Moves.TACKLE ],
|
[ 1, Moves.TACKLE ],
|
||||||
[ 1, Moves.GROWL ],
|
[ 1, Moves.GROWL ],
|
||||||
[ 1, Moves.WATER_GUN ],
|
[ 1, Moves.WATER_GUN ],
|
||||||
[ 1, Moves.SURF ],
|
[ 1, Moves.SURF ],
|
||||||
[ 1, Moves.EARTHQUAKE ],
|
[ 1, Moves.EARTHQUAKE ],
|
||||||
[ 1, Moves.ROCK_SMASH ],
|
[ 1, Moves.ROCK_SMASH ],
|
||||||
[ 1, Moves.MUD_SHOT ],
|
|
||||||
[ 1, Moves.HAMMER_ARM ],
|
[ 1, Moves.HAMMER_ARM ],
|
||||||
[ 9, Moves.ROCK_THROW ],
|
[ 9, Moves.ROCK_THROW ],
|
||||||
[ 12, Moves.PROTECT ],
|
[ 12, Moves.PROTECT ],
|
||||||
|
|
|
@ -908,14 +908,16 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
return this.isTerastallized() ? 2 : 1;
|
return this.isTerastallized() ? 2 : 1;
|
||||||
const types = this.getTypes(true, true);
|
const types = this.getTypes(true, true);
|
||||||
|
|
||||||
const ignorableImmunities = source?.getAbility()?.getAttrs(IgnoreTypeImmunityAbAttr) || [];
|
let multiplier = types.map(defType => {
|
||||||
const cancelled = new Utils.BooleanHolder(false);
|
if (source) {
|
||||||
|
const ignoreImmunity = new Utils.BooleanHolder(false);
|
||||||
|
applyAbAttrs(IgnoreTypeImmunityAbAttr, source, ignoreImmunity, moveType, defType);
|
||||||
|
if (ignoreImmunity.value)
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
let multiplier = types.map(defType =>
|
return getTypeDamageMultiplier(moveType, defType);
|
||||||
ignorableImmunities.some(attr => attr.apply(source, false, cancelled, [moveType, defType]))
|
}).reduce((acc, cur) => acc * cur, 1) as TypeDamageMultiplier;
|
||||||
? 1
|
|
||||||
: getTypeDamageMultiplier(moveType, defType)
|
|
||||||
).reduce((acc, cur) => acc * cur, 1) as TypeDamageMultiplier;
|
|
||||||
|
|
||||||
// Handle strong winds lowering effectiveness of types super effective against pure flying
|
// Handle strong winds lowering effectiveness of types super effective against pure flying
|
||||||
if (this.scene.arena.weather?.weatherType === WeatherType.STRONG_WINDS && !this.scene.arena.weather.isEffectSuppressed(this.scene) && multiplier >= 2 && this.isOfType(Type.FLYING) && getTypeDamageMultiplier(moveType, Type.FLYING) === 2)
|
if (this.scene.arena.weather?.weatherType === WeatherType.STRONG_WINDS && !this.scene.arena.weather.isEffectSuppressed(this.scene) && multiplier >= 2 && this.isOfType(Type.FLYING) && getTypeDamageMultiplier(moveType, Type.FLYING) === 2)
|
||||||
|
|
|
@ -2,7 +2,7 @@ import BattleScene, { AnySound, bypassLogin, startingWave } from "./battle-scene
|
||||||
import { default as Pokemon, PlayerPokemon, EnemyPokemon, PokemonMove, MoveResult, DamageResult, FieldPosition, HitResult, TurnMove } from "./field/pokemon";
|
import { default as Pokemon, PlayerPokemon, EnemyPokemon, PokemonMove, MoveResult, DamageResult, FieldPosition, HitResult, TurnMove } from "./field/pokemon";
|
||||||
import * as Utils from './utils';
|
import * as Utils from './utils';
|
||||||
import { Moves } from "./data/enums/moves";
|
import { Moves } from "./data/enums/moves";
|
||||||
import { allMoves, applyMoveAttrs, BypassSleepAttr, ChargeAttr, applyFilteredMoveAttrs, HitsTagAttr, MissEffectAttr, MoveAttr, MoveEffectAttr, MoveFlags, MultiHitAttr, OverrideMoveEffectAttr, VariableAccuracyAttr, MoveTarget, OneHitKOAttr, getMoveTargets, MoveTargetSet, MoveEffectTrigger, CopyMoveAttr, AttackMove, SelfStatusMove, DelayedAttackAttr, RechargeAttr, PreMoveMessageAttr, HealStatusEffectAttr, IgnoreOpponentStatChangesAttr, NoEffectAttr, FixedDamageAttr, OneHitKOAccuracyAttr, ForceSwitchOutAttr, VariableTargetAttr } from "./data/move";
|
import { allMoves, applyMoveAttrs, BypassSleepAttr, ChargeAttr, applyFilteredMoveAttrs, HitsTagAttr, MissEffectAttr, MoveAttr, MoveEffectAttr, MoveFlags, MultiHitAttr, OverrideMoveEffectAttr, VariableAccuracyAttr, MoveTarget, OneHitKOAttr, getMoveTargets, MoveTargetSet, MoveEffectTrigger, CopyMoveAttr, AttackMove, SelfStatusMove, DelayedAttackAttr, RechargeAttr, PreMoveMessageAttr, HealStatusEffectAttr, IgnoreOpponentStatChangesAttr, NoEffectAttr, FixedDamageAttr, PostVictoryStatChangeAttr, OneHitKOAccuracyAttr, ForceSwitchOutAttr, VariableTargetAttr } from "./data/move";
|
||||||
import { Mode } from './ui/ui';
|
import { Mode } from './ui/ui';
|
||||||
import { Command } from "./ui/command-ui-handler";
|
import { Command } from "./ui/command-ui-handler";
|
||||||
import { Stat } from "./data/pokemon-stat";
|
import { Stat } from "./data/pokemon-stat";
|
||||||
|
@ -3142,8 +3142,16 @@ export class FaintPhase extends PokemonPhase {
|
||||||
alivePlayField.forEach(p => applyPostKnockOutAbAttrs(PostKnockOutAbAttr, p, pokemon));
|
alivePlayField.forEach(p => applyPostKnockOutAbAttrs(PostKnockOutAbAttr, p, pokemon));
|
||||||
if (pokemon.turnData?.attacksReceived?.length) {
|
if (pokemon.turnData?.attacksReceived?.length) {
|
||||||
const defeatSource = this.scene.getPokemonById(pokemon.turnData.attacksReceived[0].sourceId);
|
const defeatSource = this.scene.getPokemonById(pokemon.turnData.attacksReceived[0].sourceId);
|
||||||
if (defeatSource?.isOnField())
|
if (defeatSource?.isOnField()) {
|
||||||
applyPostVictoryAbAttrs(PostVictoryAbAttr, defeatSource);
|
applyPostVictoryAbAttrs(PostVictoryAbAttr, defeatSource);
|
||||||
|
const pvmove = allMoves[pokemon.turnData.attacksReceived[0].move];
|
||||||
|
const pvattrs = pvmove.getAttrs(PostVictoryStatChangeAttr);
|
||||||
|
if (pvattrs.length) {
|
||||||
|
for (let pvattr of pvattrs) {
|
||||||
|
pvattr.applyPostVictory(defeatSource, defeatSource, pvmove);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.player) {
|
if (this.player) {
|
||||||
|
|
|
@ -250,58 +250,52 @@ export class GameData {
|
||||||
public saveSystem(): Promise<boolean> {
|
public saveSystem(): Promise<boolean> {
|
||||||
return new Promise<boolean>(resolve => {
|
return new Promise<boolean>(resolve => {
|
||||||
this.scene.ui.savingIcon.show();
|
this.scene.ui.savingIcon.show();
|
||||||
updateUserInfo().then(response => {
|
const data: SystemSaveData = {
|
||||||
if (!response[0]) {
|
trainerId: this.trainerId,
|
||||||
this.scene.ui.savingIcon.hide();
|
secretId: this.secretId,
|
||||||
return resolve(false);
|
gender: this.gender,
|
||||||
}
|
dexData: this.dexData,
|
||||||
const data: SystemSaveData = {
|
starterData: this.starterData,
|
||||||
trainerId: this.trainerId,
|
gameStats: this.gameStats,
|
||||||
secretId: this.secretId,
|
unlocks: this.unlocks,
|
||||||
gender: this.gender,
|
achvUnlocks: this.achvUnlocks,
|
||||||
dexData: this.dexData,
|
voucherUnlocks: this.voucherUnlocks,
|
||||||
starterData: this.starterData,
|
voucherCounts: this.voucherCounts,
|
||||||
gameStats: this.gameStats,
|
eggs: this.eggs.map(e => new EggData(e)),
|
||||||
unlocks: this.unlocks,
|
gameVersion: this.scene.game.config.gameVersion,
|
||||||
achvUnlocks: this.achvUnlocks,
|
timestamp: new Date().getTime()
|
||||||
voucherUnlocks: this.voucherUnlocks,
|
};
|
||||||
voucherCounts: this.voucherCounts,
|
|
||||||
eggs: this.eggs.map(e => new EggData(e)),
|
|
||||||
gameVersion: this.scene.game.config.gameVersion,
|
|
||||||
timestamp: new Date().getTime()
|
|
||||||
};
|
|
||||||
|
|
||||||
const maxIntAttrValue = Math.pow(2, 31);
|
const maxIntAttrValue = Math.pow(2, 31);
|
||||||
const systemData = JSON.stringify(data, (k: any, v: any) => typeof v === 'bigint' ? v <= maxIntAttrValue ? Number(v) : v.toString() : v);
|
const systemData = JSON.stringify(data, (k: any, v: any) => typeof v === 'bigint' ? v <= maxIntAttrValue ? Number(v) : v.toString() : v);
|
||||||
|
|
||||||
if (!bypassLogin) {
|
if (!bypassLogin) {
|
||||||
Utils.apiPost(`savedata/update?datatype=${GameDataType.SYSTEM}`, systemData, undefined, true)
|
Utils.apiPost(`savedata/update?datatype=${GameDataType.SYSTEM}`, systemData, undefined, true)
|
||||||
.then(response => response.text())
|
.then(response => response.text())
|
||||||
.then(error => {
|
.then(error => {
|
||||||
this.scene.ui.savingIcon.hide();
|
this.scene.ui.savingIcon.hide();
|
||||||
if (error) {
|
if (error) {
|
||||||
if (error.startsWith('client version out of date')) {
|
if (error.startsWith('client version out of date')) {
|
||||||
this.scene.clearPhaseQueue();
|
this.scene.clearPhaseQueue();
|
||||||
this.scene.unshiftPhase(new OutdatedPhase(this.scene));
|
this.scene.unshiftPhase(new OutdatedPhase(this.scene));
|
||||||
} else if (error.startsWith('session out of date')) {
|
} else if (error.startsWith('session out of date')) {
|
||||||
this.scene.clearPhaseQueue();
|
this.scene.clearPhaseQueue();
|
||||||
this.scene.unshiftPhase(new ReloadSessionPhase(this.scene));
|
this.scene.unshiftPhase(new ReloadSessionPhase(this.scene));
|
||||||
}
|
|
||||||
console.error(error);
|
|
||||||
return resolve(false);
|
|
||||||
}
|
}
|
||||||
resolve(true);
|
console.error(error);
|
||||||
});
|
return resolve(false);
|
||||||
} else {
|
}
|
||||||
localStorage.setItem('data_bak', localStorage.getItem('data'));
|
resolve(true);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
localStorage.setItem('data_bak', localStorage.getItem('data'));
|
||||||
|
|
||||||
localStorage.setItem('data', btoa(systemData));
|
localStorage.setItem('data', btoa(systemData));
|
||||||
|
|
||||||
this.scene.ui.savingIcon.hide();
|
this.scene.ui.savingIcon.hide();
|
||||||
|
|
||||||
resolve(true);
|
resolve(true);
|
||||||
}
|
}
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ export class GameStats {
|
||||||
this.legendaryPokemonHatched = source?.legendaryPokemonHatched || 0;
|
this.legendaryPokemonHatched = source?.legendaryPokemonHatched || 0;
|
||||||
this.mythicalPokemonSeen = source?.mythicalPokemonSeen || 0;
|
this.mythicalPokemonSeen = source?.mythicalPokemonSeen || 0;
|
||||||
this.mythicalPokemonCaught = source?.mythicalPokemonCaught || 0;
|
this.mythicalPokemonCaught = source?.mythicalPokemonCaught || 0;
|
||||||
this.mythicalPokemonHatched = source?.mythicalPokemonCaught || 0;
|
this.mythicalPokemonHatched = source?.mythicalPokemonHatched || 0;
|
||||||
this.shinyPokemonSeen = source?.shinyPokemonSeen || 0;
|
this.shinyPokemonSeen = source?.shinyPokemonSeen || 0;
|
||||||
this.shinyPokemonCaught = source?.shinyPokemonCaught || 0;
|
this.shinyPokemonCaught = source?.shinyPokemonCaught || 0;
|
||||||
this.shinyPokemonHatched = source?.shinyPokemonHatched || 0;
|
this.shinyPokemonHatched = source?.shinyPokemonHatched || 0;
|
||||||
|
|
31
src/utils.ts
31
src/utils.ts
|
@ -222,7 +222,8 @@ export function executeIf<T>(condition: boolean, promiseFunc: () => Promise<T>):
|
||||||
export const sessionIdKey = 'pokerogue_sessionId';
|
export const sessionIdKey = 'pokerogue_sessionId';
|
||||||
export const isLocal = window.location.hostname === 'localhost';
|
export const isLocal = window.location.hostname === 'localhost';
|
||||||
export const serverUrl = isLocal ? 'http://localhost:8001' : '';
|
export const serverUrl = isLocal ? 'http://localhost:8001' : '';
|
||||||
export const apiUrl = isLocal ? serverUrl : 'api';
|
export const apiUrl = isLocal ? serverUrl : 'https://api.pokerogue.net';
|
||||||
|
export const fallbackApiUrl = isLocal ? serverUrl : 'api';
|
||||||
|
|
||||||
export function setCookie(cName: string, cValue: string): void {
|
export function setCookie(cName: string, cValue: string): void {
|
||||||
const expiration = new Date();
|
const expiration = new Date();
|
||||||
|
@ -243,7 +244,7 @@ export function getCookie(cName: string): string {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
export function apiFetch(path: string, authed: boolean = false): Promise<Response> {
|
export function apiFetch(path: string, authed: boolean = false, fallback: boolean = false): Promise<Response> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const request = {};
|
const request = {};
|
||||||
if (authed) {
|
if (authed) {
|
||||||
|
@ -251,13 +252,22 @@ export function apiFetch(path: string, authed: boolean = false): Promise<Respons
|
||||||
if (sId)
|
if (sId)
|
||||||
request['headers'] = { 'Authorization': sId };
|
request['headers'] = { 'Authorization': sId };
|
||||||
}
|
}
|
||||||
fetch(`${apiUrl}/${path}`, request)
|
fetch(`${!fallback ? apiUrl : fallbackApiUrl}/${path}`, request)
|
||||||
.then(response => resolve(response))
|
.then(response => {
|
||||||
.catch(err => reject(err));
|
if (!response.ok && response.status === 404 && !fallback)
|
||||||
|
return apiFetch(path, authed, true).then(res => resolve(res));
|
||||||
|
resolve(response);
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
if (fallback)
|
||||||
|
reject(err);
|
||||||
|
else
|
||||||
|
apiFetch(path, authed, true).then(res => resolve(res));
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function apiPost(path: string, data?: any, contentType: string = 'application/json', authed: boolean = false): Promise<Response> {
|
export function apiPost(path: string, data?: any, contentType: string = 'application/json', authed: boolean = false, fallback: boolean = false): Promise<Response> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const headers = {
|
const headers = {
|
||||||
'Accept': contentType,
|
'Accept': contentType,
|
||||||
|
@ -268,9 +278,14 @@ export function apiPost(path: string, data?: any, contentType: string = 'applica
|
||||||
if (sId)
|
if (sId)
|
||||||
headers['Authorization'] = sId;
|
headers['Authorization'] = sId;
|
||||||
}
|
}
|
||||||
fetch(`${apiUrl}/${path}`, { method: 'POST', headers: headers, body: data })
|
fetch(`${!fallback ? apiUrl : fallbackApiUrl}/${path}`, { method: 'POST', headers: headers, body: data })
|
||||||
.then(response => resolve(response))
|
.then(response => resolve(response))
|
||||||
.catch(err => reject(err));
|
.catch(err => {
|
||||||
|
if (fallback)
|
||||||
|
reject(err);
|
||||||
|
else
|
||||||
|
apiPost(path, data, contentType, authed, true).then(res => resolve(res));
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue