Fix Slack Off healing 100% HP

pull/16/head
Flashfyre 2024-02-20 18:05:17 -05:00
parent d4eae67768
commit 6460e736a7
2 changed files with 3 additions and 2 deletions

View File

@ -284,11 +284,12 @@ export class SelectStarterPhase extends BattlePhase {
const loadPokemonAssets: Promise<void>[] = []; const loadPokemonAssets: Promise<void>[] = [];
for (let starter of starters) { for (let starter of starters) {
const starterProps = this.scene.gameData.getSpeciesDexAttrProps(starter.species, starter.dexAttr); const starterProps = this.scene.gameData.getSpeciesDexAttrProps(starter.species, starter.dexAttr);
const starterFormIndex = Math.min(starterProps.formIndex, starter.species.forms.length - 1);
const starterGender = starter.species.malePercent !== null const starterGender = starter.species.malePercent !== null
? !starterProps.female ? Gender.MALE : Gender.FEMALE ? !starterProps.female ? Gender.MALE : Gender.FEMALE
: Gender.GENDERLESS; : Gender.GENDERLESS;
const starterIvs = this.scene.gameData.dexData[starter.species.speciesId].ivs.slice(0); const starterIvs = this.scene.gameData.dexData[starter.species.speciesId].ivs.slice(0);
const starterPokemon = this.scene.addPlayerPokemon(starter.species, startingLevel, starterProps.abilityIndex, starterProps.formIndex, starterGender, starterProps.shiny, starterIvs, starter.nature); const starterPokemon = this.scene.addPlayerPokemon(starter.species, startingLevel, starterProps.abilityIndex, starterFormIndex, starterGender, starterProps.shiny, starterIvs, starter.nature);
if (starter.pokerus) if (starter.pokerus)
starterPokemon.pokerus = true; starterPokemon.pokerus = true;
if (this.scene.gameMode === GameMode.SPLICED_ENDLESS) if (this.scene.gameMode === GameMode.SPLICED_ENDLESS)

View File

@ -2944,7 +2944,7 @@ export function initMoves() {
new AttackMove(Moves.NEEDLE_ARM, "Needle Arm", Type.GRASS, MoveCategory.PHYSICAL, 60, 100, 15, -1, "The user attacks by wildly swinging its thorny arms. This may also make the target flinch.", 30, 0, 3) new AttackMove(Moves.NEEDLE_ARM, "Needle Arm", Type.GRASS, MoveCategory.PHYSICAL, 60, 100, 15, -1, "The user attacks by wildly swinging its thorny arms. This may also make the target flinch.", 30, 0, 3)
.attr(FlinchAttr), .attr(FlinchAttr),
new SelfStatusMove(Moves.SLACK_OFF, "Slack Off", Type.NORMAL, -1, 10, -1, "The user slacks off, restoring its own HP by up to half of its max HP.", -1, 0, 3) new SelfStatusMove(Moves.SLACK_OFF, "Slack Off", Type.NORMAL, -1, 10, -1, "The user slacks off, restoring its own HP by up to half of its max HP.", -1, 0, 3)
.attr(HealAttr), .attr(HealAttr, 0.5),
new AttackMove(Moves.HYPER_VOICE, "Hyper Voice", Type.NORMAL, MoveCategory.SPECIAL, 90, 100, 10, 117, "The user lets loose a horribly echoing shout with the power to inflict damage.", -1, 0, 3) new AttackMove(Moves.HYPER_VOICE, "Hyper Voice", Type.NORMAL, MoveCategory.SPECIAL, 90, 100, 10, 117, "The user lets loose a horribly echoing shout with the power to inflict damage.", -1, 0, 3)
.soundBased() .soundBased()
.target(MoveTarget.ALL_NEAR_ENEMIES), .target(MoveTarget.ALL_NEAR_ENEMIES),