Merge branch 'pagefaultgames:main' into FusionItemFix

This commit is contained in:
Benjamin Odom 2024-05-03 11:23:41 -05:00 committed by GitHub
commit 0b9392f21b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 237 additions and 191 deletions

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);
}
});
}
@ -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

@ -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;
@ -2590,6 +2591,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

@ -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,13 +2329,14 @@ 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))
if (this.pokemon.getTag(BattlerTagType.RECHARGING || BattlerTagType.INTERRUPTED))
return;
this.scene.queueMessage(getPokemonMessage(this.pokemon, ` used\n${this.move.getName()}!`), 500);

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));
}