Compare commits

..

12 Commits

Author SHA1 Message Date
Madi Simpson
cbf06ffa2c bugfix: ensure direct stat modifying moves update both pokemon's stat info 2024-05-03 15:12:48 -04:00
Madmadness65
9a559c8d6a Update passive abilities for legendaries
This is the first batch of passive ability revisions, this one directed at legendary and mythical Pokémon.
2024-05-03 14:04:43 -05:00
Flashfyre
71705dd6d4 Add candy popup sound 2024-05-03 15:03:11 -04:00
Flashfyre
9fc6bdde21 Revert "Rework - Inputs management to include all gamepad mapping (#390)"
This reverts commit 70324c4159.
2024-05-03 13:04:32 -04:00
Greenlamp2
70324c4159
Rework - Inputs management to include all gamepad mapping (#390)
* rework of the input handling, including different gamepad and keyboard

* rework of the input handling, including different gamepad and keyboard

* first version of a too complex inputHandler based on phaser3-merged-input

* removed useless control management and kept it simple for our use case, investigating to put out button_XX()

* renamed inputHandler to inputController

* aggregate directions and some action into a same method + fix menu return value

* added back repeated input feature on keeping down a key

* cleanup + return type

* fix submit/action doing two things simultaneously, still same behaviour as before

* extracted UI inputs out of battle-scene

* tab -> spaces

* tab -> spaces what about now github ?
2024-05-03 12:59:10 -04:00
Dario Krause
c44ec421b0 Update pokemon.ts 2024-05-03 12:05:45 -04:00
Xavion3
c7c4deb416 Implement Sniper 2024-05-03 12:05:20 -04:00
Lugiad
e082dd9089
Minor correction to apostrophes in French menu-ui-handler.ts (#415) 2024-05-03 09:51:00 -05:00
Xavion3
bc319a8eda Fix eggs during dailies 2024-05-03 10:28:40 -04:00
Paul Beslin
24a9dba2c4 Fix attacks with charge (solar beam, dig...) allowing to switch target on second turn 2024-05-03 08:35:31 -04:00
Benjamin Odom
b84a4b4ee5 Fix Shedinja PPused Share
Fixed having Shedinja share PP usage with the Ninjask it evolved from and vice versa.

The solution was to make a deep copy of each move in the moveset array rather than copying the array itself.
2024-05-03 08:33:33 -04:00
Jaime
f7b391746e Fix Gyro Ball only checking base stat 2024-05-03 08:32:39 -04:00
14 changed files with 300 additions and 251 deletions

BIN
public/audio/se/shing.wav Normal file

Binary file not shown.

View File

@ -1609,6 +1609,27 @@ export class BonusCritAbAttr extends AbAttr {
}
}
export class MultCritAbAttr extends AbAttr {
public multAmount: number;
constructor(multAmount: number) {
super(true);
this.multAmount = multAmount;
}
apply(pokemon: Pokemon, passive: boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean {
const critMult = args[0] as Utils.NumberHolder;
if (critMult.value > 1){
critMult.value *= this.multAmount;
return true;
}
return false;
}
}
export class BlockNonDirectDamageAbAttr extends AbAttr {
apply(pokemon: Pokemon, passive: boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean {
cancelled.value = true;
@ -2776,7 +2797,7 @@ export function initAbilities() {
.attr(MoveTypeChangeAttr, Type.NORMAL, 1.2, (user, target, move) => move.id !== Moves.HIDDEN_POWER && move.id !== Moves.WEATHER_BALL &&
move.id !== Moves.NATURAL_GIFT && move.id !== Moves.JUDGMENT && move.id !== Moves.TECHNO_BLAST),
new Ability(Abilities.SNIPER, 4)
.unimplemented(),
.attr(MultCritAbAttr, 1.5),
new Ability(Abilities.MAGIC_GUARD, 4)
.attr(BlockNonDirectDamageAbAttr),
new Ability(Abilities.NO_GUARD, 4)

View File

@ -391,6 +391,12 @@ export class FrenzyTag extends BattlerTag {
}
}
export class ChargingTag extends BattlerTag {
constructor(sourceMove: Moves, sourceId: integer) {
super(BattlerTagType.CHARGING, BattlerTagLapseType.CUSTOM, 1, sourceMove, sourceId);
}
}
export class EncoreTag extends BattlerTag {
public moveId: Moves;
@ -1116,6 +1122,8 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: integer, sourc
return new NightmareTag();
case BattlerTagType.FRENZY:
return new FrenzyTag(sourceMove, sourceId);
case BattlerTagType.CHARGING:
return new ChargingTag(sourceMove, sourceId);
case BattlerTagType.ENCORE:
return new EncoreTag(sourceId);
case BattlerTagType.HELPING_HAND:

View File

@ -9,6 +9,7 @@ export enum BattlerTagType {
SEEDED = "SEEDED",
NIGHTMARE = "NIGHTMARE",
FRENZY = "FRENZY",
CHARGING = "CHARGING",
ENCORE = "ENCORE",
HELPING_HAND = "HELPING_HAND",
INGRAIN = "INGRAIN",

View File

@ -1325,10 +1325,13 @@ export class ChargeAttr extends OverrideMoveEffectAttr {
user.getMoveQueue().push({ move: move.id, targets: [ target.getBattlerIndex() ], ignorePP: true });
if (this.sameTurn)
user.scene.pushMovePhase(new MovePhase(user.scene, user, [ target.getBattlerIndex() ], user.moveset.find(m => m.moveId === move.id), true), this.followUpPriority);
user.addTag(BattlerTagType.CHARGING, 1, move.id, user.id);
resolve(true);
});
} else
} else {
user.lapseTag(BattlerTagType.CHARGING);
resolve(false);
}
});
}
@ -1570,7 +1573,7 @@ export class CopyStatsAttr extends MoveEffectAttr {
user.addTag(BattlerTagType.CRIT_BOOST, 0, move.id);
else
user.removeTag(BattlerTagType.CRIT_BOOST);
target.updateInfo();
user.updateInfo();
target.scene.queueMessage(getPokemonMessage(user, 'copied\n') + getPokemonMessage(target, `'s stat changes!`));
@ -1586,7 +1589,7 @@ export class InvertStatsAttr extends MoveEffectAttr {
for (let s = 0; s < target.summonData.battleStats.length; s++)
target.summonData.battleStats[s] *= -1;
target.updateInfo();
user.updateInfo();
target.scene.queueMessage(getPokemonMessage(target, `'s stat changes\nwere all reversed!`));
@ -1602,7 +1605,7 @@ export class ResetStatsAttr extends MoveEffectAttr {
for (let s = 0; s < target.summonData.battleStats.length; s++)
target.summonData.battleStats[s] = 0;
target.updateInfo();
user.updateInfo();
target.scene.queueMessage(getPokemonMessage(target, `'s stat changes\nwere eliminated!`));
@ -1770,13 +1773,13 @@ export class BattleStatRatioPowerAttr extends VariablePowerAttr {
if (this.invert) {
// Gyro ball uses a specific formula
let userSpeed = user.getStat(this.stat);
let userSpeed = user.getBattleStat(this.stat);
if (userSpeed < 1) {
// Gen 6+ always have 1 base power
power.value = 1;
return true;
}
let bp = Math.floor(Math.min(150, 25 * target.getStat(this.stat) / userSpeed + 1));
let bp = Math.floor(Math.min(150, 25 * target.getBattleStat(this.stat) / userSpeed + 1));
power.value = bp;
return true;
}

View File

@ -3300,7 +3300,7 @@ export const starterPassiveAbilities = {
[Species.ENTEI]: Abilities.MOXIE,
[Species.SUICUNE]: Abilities.UNAWARE,
[Species.LARVITAR]: Abilities.SAND_FORCE,
[Species.LUGIA]: Abilities.STORM_DRAIN,
[Species.LUGIA]: Abilities.DELTA_STREAM,
[Species.HO_OH]: Abilities.MAGIC_GUARD,
[Species.CELEBI]: Abilities.GRASSY_SURGE,
[Species.TREECKO]: Abilities.GRASSY_SURGE,
@ -3366,13 +3366,13 @@ export const starterPassiveAbilities = {
[Species.LUVDISC]: Abilities.PICKUP,
[Species.BAGON]: Abilities.GALE_WINGS,
[Species.BELDUM]: Abilities.IRON_FIST,
[Species.REGIROCK]: Abilities.REGENERATOR,
[Species.REGICE]: Abilities.ICE_SCALES,
[Species.REGISTEEL]: Abilities.STEELY_SPIRIT,
[Species.LATIAS]: Abilities.SERENE_GRACE,
[Species.LATIOS]: Abilities.SERENE_GRACE,
[Species.REGIROCK]: Abilities.SAND_STREAM,
[Species.REGICE]: Abilities.SNOW_WARNING,
[Species.REGISTEEL]: Abilities.FILTER,
[Species.LATIAS]: Abilities.SOUL_HEART,
[Species.LATIOS]: Abilities.TINTED_LENS,
[Species.KYOGRE]: Abilities.HYDRATION,
[Species.GROUDON]: Abilities.EARTH_EATER,
[Species.GROUDON]: Abilities.FLAME_BODY,
[Species.RAYQUAZA]: Abilities.UNNERVE,
[Species.JIRACHI]: Abilities.COMATOSE,
[Species.DEOXYS]: Abilities.PROTEAN,
@ -3414,16 +3414,16 @@ export const starterPassiveAbilities = {
[Species.MANTYKE]: Abilities.STORM_DRAIN,
[Species.SNOVER]: Abilities.SNOW_CLOAK,
[Species.ROTOM]: Abilities.HADRON_ENGINE,
[Species.UXIE]: Abilities.ILLUSION,
[Species.UXIE]: Abilities.UNAWARE,
[Species.MESPRIT]: Abilities.MOODY,
[Species.AZELF]: Abilities.NEUROFORCE,
[Species.DIALGA]: Abilities.SPEED_BOOST,
[Species.PALKIA]: Abilities.MAGIC_BOUNCE,
[Species.HEATRAN]: Abilities.ROUGH_SKIN,
[Species.PALKIA]: Abilities.MULTISCALE,
[Species.HEATRAN]: Abilities.FILTER,
[Species.REGIGIGAS]: Abilities.MINDS_EYE,
[Species.GIRATINA]: Abilities.SHADOW_TAG,
[Species.GIRATINA]: Abilities.SHADOW_SHIELD,
[Species.CRESSELIA]: Abilities.MAGIC_BOUNCE,
[Species.PHIONE]: Abilities.SWIFT_SWIM,
[Species.PHIONE]: Abilities.SIMPLE,
[Species.MANAPHY]: Abilities.SIMPLE,
[Species.DARKRAI]: Abilities.UNNERVE,
[Species.SHAYMIN]: Abilities.FLOWER_VEIL,
@ -3500,16 +3500,16 @@ export const starterPassiveAbilities = {
[Species.LARVESTA]: Abilities.DROUGHT,
[Species.COBALION]: Abilities.INTREPID_SWORD,
[Species.TERRAKION]: Abilities.ROCKY_PAYLOAD,
[Species.VIRIZION]: Abilities.SYMBIOSIS,
[Species.TORNADUS]: Abilities.DELTA_STREAM,
[Species.VIRIZION]: Abilities.SHARPNESS,
[Species.TORNADUS]: Abilities.DRIZZLE,
[Species.THUNDURUS]: Abilities.DRIZZLE,
[Species.RESHIRAM]: Abilities.ORICHALCUM_PULSE,
[Species.ZEKROM]: Abilities.HADRON_ENGINE,
[Species.LANDORUS]: Abilities.PRANKSTER,
[Species.LANDORUS]: Abilities.STORM_DRAIN,
[Species.KYUREM]: Abilities.SNOW_WARNING,
[Species.KELDEO]: Abilities.SHARPNESS,
[Species.MELOETTA]: Abilities.PUNK_ROCK,
[Species.GENESECT]: Abilities.MEGA_LAUNCHER,
[Species.KELDEO]: Abilities.GRIM_NEIGH,
[Species.MELOETTA]: Abilities.MINDS_EYE,
[Species.GENESECT]: Abilities.REGENERATOR,
[Species.CHESPIN]: Abilities.IRON_BARBS,
[Species.FENNEKIN]: Abilities.MAGIC_BOUNCE,
[Species.FROAKIE]: Abilities.ADAPTABILITY,
@ -3541,11 +3541,11 @@ export const starterPassiveAbilities = {
[Species.PUMPKABOO]: Abilities.FLASH_FIRE,
[Species.BERGMITE]: Abilities.MIRROR_ARMOR,
[Species.NOIBAT]: Abilities.PUNK_ROCK,
[Species.XERNEAS]: Abilities.COMPETITIVE,
[Species.YVELTAL]: Abilities.DEFIANT,
[Species.ZYGARDE]: Abilities.REGENERATOR,
[Species.DIANCIE]: Abilities.QUEENLY_MAJESTY,
[Species.HOOPA]: Abilities.TRACE,
[Species.XERNEAS]: Abilities.MISTY_SURGE,
[Species.YVELTAL]: Abilities.SOUL_HEART,
[Species.ZYGARDE]: Abilities.HUGE_POWER,
[Species.DIANCIE]: Abilities.LEVITATE,
[Species.HOOPA]: Abilities.OPPORTUNIST,
[Species.VOLCANION]: Abilities.FILTER,
[Species.ROWLET]: Abilities.SNIPER,
[Species.LITTEN]: Abilities.PRANKSTER,
@ -3582,26 +3582,26 @@ export const starterPassiveAbilities = {
[Species.DRAMPA]: Abilities.FLASH_FIRE,
[Species.DHELMISE]: Abilities.INFILTRATOR,
[Species.JANGMO_O]: Abilities.DANCER,
[Species.TAPU_KOKO]: Abilities.GALVANIZE,
[Species.TAPU_LELE]: Abilities.BERSERK,
[Species.TAPU_BULU]: Abilities.FLOWER_VEIL,
[Species.TAPU_KOKO]: Abilities.TRANSISTOR,
[Species.TAPU_LELE]: Abilities.SHEER_FORCE,
[Species.TAPU_BULU]: Abilities.GRASS_PELT,
[Species.TAPU_FINI]: Abilities.FAIRY_AURA,
[Species.COSMOG]: Abilities.BEAST_BOOST,
[Species.NIHILEGO]: Abilities.POISON_PUPPETEER,
[Species.NIHILEGO]: Abilities.LEVITATE,
[Species.BUZZWOLE]: Abilities.MOXIE,
[Species.PHEROMOSA]: Abilities.MOXIE,
[Species.XURKITREE]: Abilities.LIGHTNING_ROD,
[Species.CELESTEELA]: Abilities.CHLOROPHYLL,
[Species.PHEROMOSA]: Abilities.TINTED_LENS,
[Species.XURKITREE]: Abilities.TRANSISTOR,
[Species.CELESTEELA]: Abilities.HEATPROOF,
[Species.KARTANA]: Abilities.SHARPNESS,
[Species.GUZZLORD]: Abilities.GLUTTONY,
[Species.GUZZLORD]: Abilities.INNARDS_OUT,
[Species.NECROZMA]: Abilities.BEAST_BOOST,
[Species.MAGEARNA]: Abilities.STEELY_SPIRIT,
[Species.MARSHADOW]: Abilities.IRON_FIST,
[Species.POIPOLE]: Abilities.MERCILESS,
[Species.STAKATAKA]: Abilities.DAUNTLESS_SHIELD,
[Species.POIPOLE]: Abilities.SHEER_FORCE,
[Species.STAKATAKA]: Abilities.SOLID_ROCK,
[Species.BLACEPHALON]: Abilities.MAGIC_GUARD,
[Species.ZERAORA]: Abilities.MOTOR_DRIVE,
[Species.MELTAN]: Abilities.FULL_METAL_BODY,
[Species.ZERAORA]: Abilities.TOUGH_CLAWS,
[Species.MELTAN]: Abilities.STEELY_SPIRIT,
[Species.GROOKEY]: Abilities.GRASS_PELT,
[Species.SCORBUNNY]: Abilities.RECKLESS,
[Species.SOBBLE]: Abilities.SUPER_LUCK,
@ -3639,17 +3639,17 @@ export const starterPassiveAbilities = {
[Species.ARCTOVISH]: Abilities.STRONG_JAW,
[Species.DURALUDON]: Abilities.MEGA_LAUNCHER,
[Species.DREEPY]: Abilities.PARENTAL_BOND,
[Species.ZACIAN]: Abilities.GUARD_DOG,
[Species.ZAMAZENTA]: Abilities.GUARD_DOG,
[Species.ZACIAN]: Abilities.UNNERVE,
[Species.ZAMAZENTA]: Abilities.STAMINA,
[Species.ETERNATUS]: Abilities.SUPREME_OVERLORD,
[Species.KUBFU]: Abilities.IRON_FIST,
[Species.ZARUDE]: Abilities.PRANKSTER,
[Species.REGIELEKI]: Abilities.LEVITATE,
[Species.REGIDRAGO]: Abilities.INTIMIDATE,
[Species.ZARUDE]: Abilities.GRASSY_SURGE,
[Species.REGIELEKI]: Abilities.ELECTRIC_SURGE,
[Species.REGIDRAGO]: Abilities.MULTISCALE,
[Species.GLASTRIER]: Abilities.FILTER,
[Species.SPECTRIER]: Abilities.PERISH_BODY,
[Species.SPECTRIER]: Abilities.SHADOW_SHIELD,
[Species.CALYREX]: Abilities.HARVEST,
[Species.ENAMORUS]: Abilities.PRANKSTER,
[Species.ENAMORUS]: Abilities.FAIRY_AURA,
[Species.SPRIGATITO]: Abilities.MAGICIAN,
[Species.FUECOCO]: Abilities.EARTH_EATER,
[Species.QUAXLY]: Abilities.DANCER,
@ -3688,40 +3688,40 @@ export const starterPassiveAbilities = {
[Species.DONDOZO]: Abilities.GLUTTONY,
[Species.TATSUGIRI]: Abilities.WATER_BUBBLE,
[Species.GREAT_TUSK]: Abilities.INTIMIDATE,
[Species.SCREAM_TAIL]: Abilities.PIXILATE,
[Species.SCREAM_TAIL]: Abilities.UNAWARE,
[Species.BRUTE_BONNET]: Abilities.BEAST_BOOST,
[Species.FLUTTER_MANE]: Abilities.DAZZLING,
[Species.SLITHER_WING]: Abilities.MOXIE,
[Species.SLITHER_WING]: Abilities.SCRAPPY,
[Species.SANDY_SHOCKS]: Abilities.EARTH_EATER,
[Species.IRON_TREADS]: Abilities.BULLETPROOF,
[Species.IRON_TREADS]: Abilities.STEELY_SPIRIT,
[Species.IRON_BUNDLE]: Abilities.SNOW_WARNING,
[Species.IRON_HANDS]: Abilities.IRON_FIST,
[Species.IRON_JUGULIS]: Abilities.NO_GUARD,
[Species.IRON_JUGULIS]: Abilities.AERILATE,
[Species.IRON_MOTH]: Abilities.LEVITATE,
[Species.IRON_THORNS]: Abilities.SAND_STREAM,
[Species.FRIGIBAX]: Abilities.THICK_FAT,
[Species.GIMMIGHOUL]: Abilities.SUPER_LUCK,
[Species.WO_CHIEN]: Abilities.TRIAGE,
[Species.CHIEN_PAO]: Abilities.REFRIGERATE,
[Species.WO_CHIEN]: Abilities.GRASSY_SURGE,
[Species.CHIEN_PAO]: Abilities.INTREPID_SWORD,
[Species.TING_LU]: Abilities.STAMINA,
[Species.CHI_YU]: Abilities.BLAZE,
[Species.ROARING_MOON]: Abilities.AERILATE,
[Species.CHI_YU]: Abilities.DROUGHT,
[Species.ROARING_MOON]: Abilities.TOUGH_CLAWS,
[Species.IRON_VALIANT]: Abilities.DOWNLOAD,
[Species.KORAIDON]: Abilities.PROTOSYNTHESIS,
[Species.MIRAIDON]: Abilities.QUARK_DRIVE,
[Species.WALKING_WAKE]: Abilities.BEAST_BOOST,
[Species.IRON_LEAVES]: Abilities.SHARPNESS,
[Species.POLTCHAGEIST]: Abilities.FLAME_BODY,
[Species.OKIDOGI]: Abilities.INTIMIDATE,
[Species.MUNKIDORI]: Abilities.PRANKSTER,
[Species.FEZANDIPITI]: Abilities.DAZZLING,
[Species.OKIDOGI]: Abilities.FUR_COAT,
[Species.MUNKIDORI]: Abilities.NEUROFORCE,
[Species.FEZANDIPITI]: Abilities.LEVITATE,
[Species.OGERPON]: Abilities.OPPORTUNIST,
[Species.GOUGING_FIRE]: Abilities.BEAST_BOOST,
[Species.RAGING_BOLT]: Abilities.BEAST_BOOST,
[Species.IRON_BOULDER]: Abilities.SHARPNESS,
[Species.IRON_CROWN]: Abilities.SHARPNESS,
[Species.TERAPAGOS]: Abilities.PROTEAN,
[Species.PECHARUNT]: Abilities.CORROSION,
[Species.TERAPAGOS]: Abilities.REGENERATOR,
[Species.PECHARUNT]: Abilities.TOXIC_CHAIN,
[Species.ALOLA_RATTATA]: Abilities.CHEEK_POUCH,
[Species.ALOLA_SANDSHREW]: Abilities.ICE_BODY,
[Species.ALOLA_VULPIX]: Abilities.ICE_BODY,
@ -3736,7 +3736,7 @@ export const starterPassiveAbilities = {
[Species.GALAR_FARFETCHD]: Abilities.SUPER_LUCK,
[Species.GALAR_ARTICUNO]: Abilities.SERENE_GRACE,
[Species.GALAR_ZAPDOS]: Abilities.TOUGH_CLAWS,
[Species.GALAR_MOLTRES]: Abilities.REGENERATOR,
[Species.GALAR_MOLTRES]: Abilities.DARK_AURA,
[Species.GALAR_CORSOLA]: Abilities.SHADOW_TAG,
[Species.GALAR_ZIGZAGOON]: Abilities.PICKPOCKET,
[Species.GALAR_DARUMAKA]: Abilities.FLASH_FIRE,

View File

@ -27,7 +27,7 @@ import { TempBattleStat } from '../data/temp-battle-stat';
import { ArenaTagSide, WeakenMoveScreenTag, WeakenMoveTypeTag } from '../data/arena-tag';
import { ArenaTagType } from "../data/enums/arena-tag-type";
import { Biome } from "../data/enums/biome";
import { Ability, AbAttr, BattleStatMultiplierAbAttr, BlockCritAbAttr, BonusCritAbAttr, BypassBurnDamageReductionAbAttr, FieldPriorityMoveImmunityAbAttr, FieldVariableMovePowerAbAttr, IgnoreOpponentStatChangesAbAttr, MoveImmunityAbAttr, MoveTypeChangeAttr, NonSuperEffectiveImmunityAbAttr, PreApplyBattlerTagAbAttr, PreDefendFullHpEndureAbAttr, ReceivedMoveDamageMultiplierAbAttr, ReduceStatusEffectDurationAbAttr, StabBoostAbAttr, StatusEffectImmunityAbAttr, TypeImmunityAbAttr, VariableMovePowerAbAttr, VariableMoveTypeAbAttr, WeightMultiplierAbAttr, allAbilities, applyAbAttrs, applyBattleStatMultiplierAbAttrs, applyPostDefendAbAttrs, applyPreApplyBattlerTagAbAttrs, applyPreAttackAbAttrs, applyPreDefendAbAttrs, applyPreSetStatusAbAttrs, UnsuppressableAbilityAbAttr, SuppressFieldAbilitiesAbAttr, NoFusionAbilityAbAttr } from '../data/ability';
import { Ability, AbAttr, BattleStatMultiplierAbAttr, BlockCritAbAttr, BonusCritAbAttr, BypassBurnDamageReductionAbAttr, FieldPriorityMoveImmunityAbAttr, FieldVariableMovePowerAbAttr, IgnoreOpponentStatChangesAbAttr, MoveImmunityAbAttr, MoveTypeChangeAttr, NonSuperEffectiveImmunityAbAttr, PreApplyBattlerTagAbAttr, PreDefendFullHpEndureAbAttr, ReceivedMoveDamageMultiplierAbAttr, ReduceStatusEffectDurationAbAttr, StabBoostAbAttr, StatusEffectImmunityAbAttr, TypeImmunityAbAttr, VariableMovePowerAbAttr, VariableMoveTypeAbAttr, WeightMultiplierAbAttr, allAbilities, applyAbAttrs, applyBattleStatMultiplierAbAttrs, applyPostDefendAbAttrs, applyPreApplyBattlerTagAbAttrs, applyPreAttackAbAttrs, applyPreDefendAbAttrs, applyPreSetStatusAbAttrs, UnsuppressableAbilityAbAttr, SuppressFieldAbilitiesAbAttr, NoFusionAbilityAbAttr, MultCritAbAttr } from '../data/ability';
import { Abilities } from "#app/data/enums/abilities";
import PokemonData from '../system/pokemon-data';
import Battle, { BattlerIndex } from '../battle';
@ -1332,7 +1332,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
}
const sourceAtk = new Utils.IntegerHolder(source.getBattleStat(isPhysical ? Stat.ATK : Stat.SPATK, this, null, isCritical));
const targetDef = new Utils.IntegerHolder(this.getBattleStat(isPhysical ? Stat.DEF : Stat.SPDEF, source, move, isCritical));
const criticalMultiplier = isCritical ? 1.5 : 1;
const criticalMultiplier = new Utils.NumberHolder(isCritical ? 1.5 : 1);
applyAbAttrs(MultCritAbAttr, source, null, criticalMultiplier);
const screenMultiplier = new Utils.NumberHolder(1);
if (!isCritical) {
this.scene.arena.applyTagsForSide(WeakenMoveScreenTag, this.isPlayer() ? ArenaTagSide.PLAYER : ArenaTagSide.ENEMY, move.category, this.scene.currentBattle.double, screenMultiplier);
@ -1355,7 +1356,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
applyMoveAttrs(VariableDefAttr, source, this, move, targetDef);
if (!isTypeImmune) {
damage.value = Math.ceil(((((2 * source.level / 5 + 2) * power.value * sourceAtk.value / targetDef.value) / 50) + 2) * stabMultiplier.value * typeMultiplier.value * arenaAttackTypeMultiplier * screenMultiplier.value * ((this.scene.randBattleSeedInt(15) + 85) / 100) * criticalMultiplier);
damage.value = Math.ceil(((((2 * source.level / 5 + 2) * power.value * sourceAtk.value / targetDef.value) / 50) + 2) * stabMultiplier.value * typeMultiplier.value * arenaAttackTypeMultiplier * screenMultiplier.value * ((this.scene.randBattleSeedInt(15) + 85) / 100) * criticalMultiplier.value);
if (isPhysical && source.status && source.status.effect === StatusEffect.BURN) {
const burnDamageReductionCancelled = new Utils.BooleanHolder(false);
applyAbAttrs(BypassBurnDamageReductionAbAttr, source, burnDamageReductionCancelled);
@ -2473,7 +2474,7 @@ export class PlayerPokemon extends Pokemon {
if (newEvolution.condition.predicate(this)) {
const newPokemon = this.scene.addPlayerPokemon(this.species, this.level, this.abilityIndex, this.formIndex, undefined, this.shiny, this.variant, this.ivs, this.nature);
newPokemon.natureOverride = this.natureOverride;
newPokemon.moveset = this.moveset.slice();
newPokemon.moveset = this.copyMoveset();
newPokemon.luck = this.luck;
newPokemon.fusionSpecies = this.fusionSpecies;
@ -2583,6 +2584,15 @@ export class PlayerPokemon extends Pokemon {
this.updateFusionPalette();
});
}
/** Returns a deep copy of this Pokemon's moveset array */
copyMoveset(): PokemonMove[] {
let newMoveset = [];
this.moveset.forEach(move =>
newMoveset.push(new PokemonMove(move.moveId, 0, move.ppUp, move.virtual)));
return newMoveset;
}
}
export class EnemyPokemon extends Pokemon {

View File

@ -223,6 +223,7 @@ export class LoadingScene extends SceneBase {
this.loadSe('sparkle');
this.loadSe('restore');
this.loadSe('shine');
this.loadSe('shing');
this.loadSe('charge');
this.loadSe('beam');
this.loadSe('upgrade');

View File

@ -605,208 +605,208 @@ export const pokemon: SimpleTranslationEntries = {
"tynamo": "Zapplardin",
"eelektrik": "Zapplalek",
"eelektross": "Zapplarang",
"elgyem": "Elgyem",
"beheeyem": "Beheeyem",
"litwick": "Litwick",
"lampent": "Lampent",
"chandelure": "Chandelure",
"axew": "Axew",
"fraxure": "Fraxure",
"haxorus": "Haxorus",
"cubchoo": "Cubchoo",
"beartic": "Beartic",
"cryogonal": "Cryogonal",
"shelmet": "Shelmet",
"accelgor": "Accelgor",
"stunfisk": "Stunfisk",
"mienfoo": "Mienfoo",
"mienshao": "Mienshao",
"druddigon": "Druddigon",
"golett": "Golett",
"golurk": "Golurk",
"pawniard": "Pawniard",
"bisharp": "Bisharp",
"bouffalant": "Bouffalant",
"rufflet": "Rufflet",
"braviary": "Braviary",
"vullaby": "Vullaby",
"mandibuzz": "Mandibuzz",
"heatmor": "Heatmor",
"durant": "Durant",
"deino": "Deino",
"zweilous": "Zweilous",
"hydreigon": "Hydreigon",
"larvesta": "Larvesta",
"volcarona": "Volcarona",
"cobalion": "Cobalion",
"terrakion": "Terrakion",
"virizion": "Virizion",
"tornadus": "Tornadus",
"thundurus": "Thundurus",
"elgyem": "Pygraulon",
"beheeyem": "Megalon",
"litwick": "Lichtel",
"lampent": "Laternecto",
"chandelure": "Skelabra",
"axew": "Milza",
"fraxure": "Scharfax",
"haxorus": "Maxax",
"cubchoo": "Petznief",
"beartic": "Siberio",
"cryogonal": "Frigometri",
"shelmet": "Schnuthelm",
"accelgor": "Hydragil",
"stunfisk": "Flunschlik",
"mienfoo": "Lin-Fu",
"mienshao": "Wie-Shu",
"druddigon": "Shardrago",
"golett": "Golbit",
"golurk": "Golgantes",
"pawniard": "Gladiantri",
"bisharp": "Ceasurio",
"bouffalant": "Bisofank",
"rufflet": "Geronimatz",
"braviary": "Washakwil",
"vullaby": "Skallyk",
"mandibuzz": "Grypheldis",
"heatmor": "Furnifraß",
"durant": "Fermicula",
"deino": "Kapuno",
"zweilous": "Duodino",
"hydreigon": "Trikephalo",
"larvesta": "Ignivor",
"volcarona": "Ramoth",
"cobalion": "Kobalium",
"terrakion": "Terrakium",
"virizion": "Viridium",
"tornadus": "Boreos",
"thundurus": "Voltolos",
"reshiram": "Reshiram",
"zekrom": "Zekrom",
"landorus": "Landorus",
"landorus": "Dementeros",
"kyurem": "Kyurem",
"keldeo": "Keldeo",
"meloetta": "Meloetta",
"genesect": "Genesect",
"chespin": "Chespin",
"quilladin": "Quilladin",
"chesnaught": "Chesnaught",
"fennekin": "Fennekin",
"braixen": "Braixen",
"delphox": "Delphox",
"froakie": "Froakie",
"frogadier": "Frogadier",
"greninja": "Greninja",
"bunnelby": "Bunnelby",
"diggersby": "Diggersby",
"fletchling": "Fletchling",
"fletchinder": "Fletchinder",
"talonflame": "Talonflame",
"scatterbug": "Scatterbug",
"spewpa": "Spewpa",
"chespin": "Igamaro",
"quilladin": "Igastarnish",
"chesnaught": "Brigaron",
"fennekin": "Fynx",
"braixen": "Rutena",
"delphox": "Fennexis",
"froakie": "Froxy",
"frogadier": "Amphizel",
"greninja": "Quajutsu",
"bunnelby": "Scoppel",
"diggersby": "Grebbit",
"fletchling": "Dartiri",
"fletchinder": "Dartignis",
"talonflame": "Fiaro",
"scatterbug": "Purmel",
"spewpa": "Puponcho",
"vivillon": "Vivillon",
"litleo": "Litleo",
"pyroar": "Pyroar",
"litleo": "Leufeo",
"pyroar": "Pyroleo",
"flabebe": "Flabébé",
"floette": "Floette",
"florges": "Florges",
"skiddo": "Skiddo",
"gogoat": "Gogoat",
"pancham": "Pancham",
"pangoro": "Pangoro",
"furfrou": "Furfrou",
"espurr": "Espurr",
"meowstic": "Meowstic",
"honedge": "Honedge",
"doublade": "Doublade",
"aegislash": "Aegislash",
"spritzee": "Spritzee",
"aromatisse": "Aromatisse",
"swirlix": "Swirlix",
"slurpuff": "Slurpuff",
"inkay": "Inkay",
"malamar": "Malamar",
"binacle": "Binacle",
"barbaracle": "Barbaracle",
"skrelp": "Skrelp",
"dragalge": "Dragalge",
"clauncher": "Clauncher",
"clawitzer": "Clawitzer",
"helioptile": "Helioptile",
"heliolisk": "Heliolisk",
"tyrunt": "Tyrunt",
"tyrantrum": "Tyrantrum",
"amaura": "Amaura",
"aurorus": "Aurorus",
"sylveon": "Sylveon",
"hawlucha": "Hawlucha",
"skiddo": "Mähikel",
"gogoat": "Chevrumm",
"pancham": "Pam-Pam",
"pangoro": "Pandrago",
"furfrou": "Coiffwaff",
"espurr": "Psiau",
"meowstic": "Psiaugon",
"honedge": "Gramokles",
"doublade": "Duokles",
"aegislash": "Durengard",
"spritzee": "Parfi",
"aromatisse": "Parfinesse",
"swirlix": "Flauschling",
"slurpuff": "Sabbaione",
"inkay": "Iscalar",
"malamar": "Calamanero",
"binacle": "Bithora",
"barbaracle": "Thanathora",
"skrelp": "Algitt",
"dragalge": "Tandrak",
"clauncher": "Scampisto",
"clawitzer": "Wummer",
"helioptile": "Eguana",
"heliolisk": "Elezard",
"tyrunt": "Balgoras",
"tyrantrum": "Monargoras",
"amaura": "Amarino",
"aurorus": "Amagarga",
"sylveon": "Feelinara",
"hawlucha": "Resladero",
"dedenne": "Dedenne",
"carbink": "Carbink",
"goomy": "Goomy",
"sliggoo": "Sliggoo",
"goodra": "Goodra",
"klefki": "Klefki",
"phantump": "Phantump",
"trevenant": "Trevenant",
"pumpkaboo": "Pumpkaboo",
"gourgeist": "Gourgeist",
"bergmite": "Bergmite",
"avalugg": "Avalugg",
"noibat": "Noibat",
"noivern": "Noivern",
"carbink": "Rocara",
"goomy": "Viscora",
"sliggoo": "Viscargot",
"goodra": "Viscogon",
"klefki": "Clavion",
"phantump": "Paragoni",
"trevenant": "Trombork",
"pumpkaboo": "Irrbis",
"gourgeist": "Pumpdjinn",
"bergmite": "Arktip",
"avalugg": "Arktilas",
"noibat": "eF-eM",
"noivern": "UHaFnir",
"xerneas": "Xerneas",
"yveltal": "Yveltal",
"zygarde": "Zygarde",
"diancie": "Diancie",
"hoopa": "Hoopa",
"volcanion": "Volcanion",
"rowlet": "Rowlet",
"dartrix": "Dartrix",
"decidueye": "Decidueye",
"litten": "Litten",
"torracat": "Torracat",
"incineroar": "Incineroar",
"popplio": "Popplio",
"brionne": "Brionne",
"primarina": "Primarina",
"pikipek": "Pikipek",
"trumbeak": "Trumbeak",
"toucannon": "Toucannon",
"yungoos": "Yungoos",
"gumshoos": "Gumshoos",
"grubbin": "Grubbin",
"charjabug": "Charjabug",
"vikavolt": "Vikavolt",
"crabrawler": "Crabrawler",
"crabominable": "Crabominable",
"oricorio": "Oricorio",
"cutiefly": "Cutiefly",
"ribombee": "Ribombee",
"rockruff": "Rockruff",
"lycanroc": "Lycanroc",
"wishiwashi": "Wishiwashi",
"mareanie": "Mareanie",
"toxapex": "Toxapex",
"mudbray": "Mudbray",
"mudsdale": "Mudsdale",
"dewpider": "Dewpider",
"araquanid": "Araquanid",
"fomantis": "Fomantis",
"lurantis": "Lurantis",
"morelull": "Morelull",
"shiinotic": "Shiinotic",
"salandit": "Salandit",
"salazzle": "Salazzle",
"stufful": "Stufful",
"bewear": "Bewear",
"bounsweet": "Bounsweet",
"steenee": "Steenee",
"tsareena": "Tsareena",
"comfey": "Comfey",
"oranguru": "Oranguru",
"passimian": "Passimian",
"wimpod": "Wimpod",
"golisopod": "Golisopod",
"sandygast": "Sandygast",
"palossand": "Palossand",
"pyukumuku": "Pyukumuku",
"type_null": "Type: Null",
"silvally": "Silvally",
"minior": "Minior",
"komala": "Komala",
"rowlet": "Bauz",
"dartrix": "Arboretoss",
"decidueye": "Silvarro",
"litten": "Flamiau",
"torracat": "Miezunder",
"incineroar": "Fuegro",
"popplio": "Robball",
"brionne": "Marikeck",
"primarina": "Primarene",
"pikipek": "Peppeck",
"trumbeak": "Trompeck",
"toucannon": "Tukanon",
"yungoos": "Mangunior",
"gumshoos": "Manguspektor",
"grubbin": "Mabula",
"charjabug": "Akkup",
"vikavolt": "Donarion",
"crabrawler": "Krabbox",
"crabominable": "Krawell",
"oricorio": "Choreogel",
"cutiefly": "Wommel",
"ribombee": "Bandelby",
"rockruff": "Wuffels",
"lycanroc": "Wolwerock",
"wishiwashi": "Lusardin",
"mareanie": "Garstella",
"toxapex": "Aggrostella",
"mudbray": "Pampuli",
"mudsdale": "Pampross",
"dewpider": "Araqua",
"araquanid": "Aranestro",
"fomantis": "Imantis",
"lurantis": "Mantidea",
"morelull": "Bubungus",
"shiinotic": "Lamellus",
"salandit": "Molunk",
"salazzle": "Amfira",
"stufful": "Velursi",
"bewear": "Kosturso",
"bounsweet": "Frubberl",
"steenee": "Frubaila",
"tsareena": "Fruyal",
"comfey": "Curelei",
"oranguru": "Kommandutan",
"passimian": "Quartermak",
"wimpod": "Reißlaus",
"golisopod": "Tectass",
"sandygast": "Sankabuh",
"palossand": "Colossand",
"pyukumuku": "Gufa",
"type_null": "Typ:Null",
"silvally": "Amigento",
"minior": "Meteno",
"komala": "Koalelu",
"turtonator": "Turtonator",
"togedemaru": "Togedemaru",
"mimikyu": "Mimikyu",
"bruxish": "Bruxish",
"drampa": "Drampa",
"dhelmise": "Dhelmise",
"jangmo_o": "Jangmo-o",
"hakamo_o": "Hakamo-o",
"kommo_o": "Kommo-o",
"tapu_koko": "Tapu Koko",
"tapu_lele": "Tapu Lele",
"tapu_bulu": "Tapu Bulu",
"tapu_fini": "Tapu Fini",
"mimikyu": "Mimigma",
"bruxish": "Knirfish",
"drampa": "Sen-Long",
"dhelmise": "Moruda",
"jangmo_o": "Miniras",
"hakamo_o": "Mediras",
"kommo_o": "Grandiras",
"tapu_koko": "Kapu-Riki",
"tapu_lele": "Kapu-Fala",
"tapu_bulu": "Kapu-Toro",
"tapu_fini": "Kapu-Kime",
"cosmog": "Cosmog",
"cosmoem": "Cosmoem",
"cosmoem": "Cosmovum",
"solgaleo": "Solgaleo",
"lunala": "Lunala",
"nihilego": "Nihilego",
"buzzwole": "Buzzwole",
"pheromosa": "Pheromosa",
"xurkitree": "Xurkitree",
"celesteela": "Celesteela",
"kartana": "Kartana",
"guzzlord": "Guzzlord",
"nihilego": "Anego",
"buzzwole": "Masskito",
"pheromosa": "Schabelle",
"xurkitree": "Voltriant",
"celesteela": "Kaguron",
"kartana": "Katagami",
"guzzlord": "Schlingking",
"necrozma": "Necrozma",
"magearna": "Magearna",
"marshadow": "Marshadow",
"poipole": "Poipole",
"naganadel": "Naganadel",
"stakataka": "Stakataka",
"blacephalon": "Blacephalon",
"poipole": "Venicro",
"naganadel": "Agoyon",
"stakataka": "Muramura",
"blacephalon": "Kopplosio",
"zeraora": "Zeraora",
"meltan": "Meltan",
"melmetal": "Melmetal",

View File

@ -13,9 +13,9 @@ export const menuUiHandler: SimpleTranslationEntries = {
"LOG_OUT": "Déconnexion",
"slot": "Emplacement {{slotNumber}}",
"importSession": "Importer session",
"importSlotSelect": "Sélectionnez l'emplacement vers lequel importer les données.",
"importSlotSelect": "Sélectionnez lemplacement vers lequel importer les données.",
"exportSession": "Exporter session",
"exportSlotSelect": "Sélectionnez l'emplacement depuis lequel exporter les données.",
"exportSlotSelect": "Sélectionnez lemplacement depuis lequel exporter les données.",
"importData": "Importer données",
"exportData": "Exporter données",
"cancel": "Retour",

View File

@ -1686,6 +1686,8 @@ export class CommandPhase extends FieldPhase {
console.log(moveTargets, playerPokemon.name);
if (moveTargets.targets.length <= 1 || moveTargets.multiple)
turnCommand.move.targets = moveTargets.targets;
else if(playerPokemon.getTag(BattlerTagType.CHARGING) && playerPokemon.getMoveQueue().length >= 1)
turnCommand.move.targets = playerPokemon.getMoveQueue()[0].targets;
else
this.scene.unshiftPhase(new SelectTargetPhase(this.scene, this.fieldIndex));
this.scene.currentBattle.turnCommands[this.fieldIndex] = turnCommand;
@ -2327,11 +2329,12 @@ export class MovePhase extends BattlePhase {
showMoveText(): void {
if (this.move.getMove().getAttrs(ChargeAttr).length) {
this.scene.queueMessage(getPokemonMessage(this.pokemon, ` used\n${this.move.getName()}!`), 500);
const lastMove = this.pokemon.getLastXMoves() as TurnMove[];
if (!lastMove.length || lastMove[0].move !== this.move.getMove().id || lastMove[0].result !== MoveResult.OTHER)
if (!lastMove.length || lastMove[0].move !== this.move.getMove().id || lastMove[0].result !== MoveResult.OTHER){
this.scene.queueMessage(getPokemonMessage(this.pokemon, ` used\n${this.move.getName()}!`), 500);
return;
}
}
if (this.pokemon.getTag(BattlerTagType.RECHARGING || BattlerTagType.INTERRUPTED))
return;

View File

@ -1060,7 +1060,7 @@ export class GameData {
this.gameStats.shinyPokemonHatched++;
}
if (!hasPrevolution && (!pokemon.scene.gameMode.isDaily || hasNewAttr))
if (!hasPrevolution && (!pokemon.scene.gameMode.isDaily || hasNewAttr || fromEgg))
this.addStarterCandy(species, (1 * (pokemon.isShiny() ? 5 * Math.pow(2, pokemon.variant || 0) : 1)) * (fromEgg || pokemon.isBoss() ? 2 : 1));
}

View File

@ -69,6 +69,8 @@ export default class CandyBar extends Phaser.GameObjects.Container {
if (this.tween)
this.tween.stop();
(this.scene as BattleScene).playSound('shing');
this.tween = this.scene.tweens.add({
targets: this,
x: (this.scene.game.canvas.width / 6) - (this.bg.width - 5),

View File

@ -258,7 +258,7 @@ class SessionSlot extends Phaser.GameObjects.Container {
async setupWithData(data: SessionSaveData) {
this.remove(this.loadingLabel, true);
const gameModeLabel = addTextObject(this.scene, 8, 5, `${gameModes[data.gameMode].getName()} - Wave ${data.waveIndex}`, TextStyle.WINDOW);
const gameModeLabel = addTextObject(this.scene, 8, 5, `${gameModes[data.gameMode]?.getName() || 'Unknown'} - Wave ${data.waveIndex}`, TextStyle.WINDOW);
this.add(gameModeLabel);
const timestampLabel = addTextObject(this.scene, 8, 19, new Date(data.timestamp).toLocaleString(), TextStyle.WINDOW);