-
Notifications
You must be signed in to change notification settings - Fork 48
Fast healing Nurse Joy
By PCG.
Another simple tutorial to speed up Nurse Joy (like in Radical Red).
In data/scripts/pkmn_center_nurse.inc
Common_EventScript_PkmnCenterNurse::
lock
faceplayer
- setvar VAR_0x8004, 0
- specialvar VAR_RESULT, CountPlayerTrainerStars
- goto_if_eq VAR_RESULT, 4, EventScript_PkmnCenterNurse_GoldCard
- msgbox gText_WouldYouLikeToRestYourPkmn, MSGBOX_YESNO
- goto_if_eq VAR_RESULT, YES, EventScript_PkmnCenterNurse_HealPkmn
- goto_if_eq VAR_RESULT, NO, EventScript_PkmnCenterNurse_Goodbye
+ incrementgamestat GAME_STAT_USED_POKECENTER
+ call EventScript_PkmnCenterNurse_TakeAndHealPkmn
+ applymovement VAR_0x800B, Movement_PkmnCenterNurse_Bow
+ waitmovement 0
+ applymovement OBJ_EVENT_ID_PLAYER, Common_Movement_FaceDown
+ waitmovement 0
end
This will remove all the long text interactions. It also skips Gold Trainer Card, Union Room and Pokérus check.
In src/field_effect.c
Here, all we need to do is reduce the timer of placing the Poké Balls and healing, and account for the healing sound effect.
Search for PokeballGlowEffect_PlaceBalls(struct Sprite *sprite)
.
static void PokeballGlowEffect_PlaceBalls(struct Sprite *sprite)
{
u8 spriteId;
if (sprite->sTimer == 0 || (--sprite->sTimer) == 0)
{
- sprite->sTimer = 25;
+ sprite->sTimer = 12;
spriteId = CreateSpriteAtEnd(&sSpriteTemplate_PokeballGlow, sPokeballCoordOffsets[sprite->sCounter].x + sprite->x2, sPokeballCoordOffsets[sprite->sCounter].y + sprite->y2, 0);
gSprites[spriteId].oam.priority = 2;
gSprites[spriteId].sEffectSpriteId = sprite->sSpriteId;
sprite->sCounter++;
sprite->sNumMons--;
PlaySE(SE_BALL);
}
if (sprite->sNumMons == 0)
{
- sprite->sTimer = 32;
+ sprite->sTimer = 16;
sprite->sState++;
}
}
static void PokeballGlowEffect_TryPlaySe(struct Sprite *sprite)
{
if ((--sprite->sTimer) == 0)
{
sprite->sState++;
- sprite->sTimer = 8;
+ sprite->sTimer = 4;
sprite->sCounter = 0;
sprite->data[3] = 0;
if (sprite->sPlayHealSe)
{
PlayFanfare(MUS_HEAL);
}
}
}
static void PokeballGlowEffect_Flash1(struct Sprite *sprite)
{
u8 phase;
if ((--sprite->sTimer) == 0)
{
- sprite->sTimer = 8;
+ sprite->sTimer = 4;
sprite->sCounter++;
sprite->sCounter &= 3;
if (sprite->sCounter == 0)
sprite->data[3]++;
}
phase = (sprite->sCounter + 3) & 3;
MultiplyInvertedPaletteRGBComponents(OBJ_PLTT_ID(IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW)) + 8, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
phase = (sprite->sCounter + 2) & 3;
MultiplyInvertedPaletteRGBComponents(OBJ_PLTT_ID(IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW)) + 6, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
phase = (sprite->sCounter + 1) & 3;
MultiplyInvertedPaletteRGBComponents(OBJ_PLTT_ID(IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW)) + 2, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
phase = sprite->sCounter;
MultiplyInvertedPaletteRGBComponents(OBJ_PLTT_ID(IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW)) + 5, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
MultiplyInvertedPaletteRGBComponents(OBJ_PLTT_ID(IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW)) + 3, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
if (sprite->data[3] > 2)
{
sprite->sState++;
- sprite->sTimer = 8;
+ sprite->sTimer = 4;
sprite->sCounter = 0;
}
}
static void PokeballGlowEffect_Flash2(struct Sprite *sprite)
{
u8 phase;
if ((--sprite->sTimer) == 0)
{
- sprite->sTimer = 8;
+ sprite->sTimer = 4;
sprite->sCounter++;
sprite->sCounter &= 3;
if (sprite->sCounter == 3)
{
sprite->sState++;
sprite->sTimer = 15;
}
}
phase = sprite->sCounter;
MultiplyInvertedPaletteRGBComponents(OBJ_PLTT_ID(IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW)) + 8, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
MultiplyInvertedPaletteRGBComponents(OBJ_PLTT_ID(IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW)) + 6, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
MultiplyInvertedPaletteRGBComponents(OBJ_PLTT_ID(IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW)) + 2, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
MultiplyInvertedPaletteRGBComponents(OBJ_PLTT_ID(IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW)) + 5, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
MultiplyInvertedPaletteRGBComponents(OBJ_PLTT_ID(IndexOfSpritePaletteTag(FLDEFF_PAL_TAG_POKEBALL_GLOW)) + 3, sPokeballGlowReds[phase], sPokeballGlowGreens[phase], sPokeballGlowBlues[phase]);
}
Scroll down to find PokeballGlowEffect_WaitForSound(struct Sprite *sprite)
and add this else
condition.
static void PokeballGlowEffect_WaitForSound(struct Sprite *sprite)
{
if (sprite->sPlayHealSe == FALSE || IsFanfareTaskInactive())
{
sprite->sState++;
}
+ else
+ {
+ if (sprite->data[3]++ > 30)
+ {
+ sprite->sState++;
+ }
+ }
}
Scroll a bit more to find SpriteCB_PokecenterMonitor(struct Sprite *sprite)
and add these lines before the last if condition. It is crucial to add it there and not at the end.
static void SpriteCB_PokecenterMonitor(struct Sprite *sprite)
{
if (sprite->data[0] != 0)
{
sprite->data[0] = 0;
sprite->invisible = FALSE;
StartSpriteAnim(sprite, 1);
}
+ if (!sprite->animEnded)
+ {
+ if (sprite->animDelayCounter > 0)
+ sprite->animDelayCounter -= 2;
+ }
if (sprite->animEnded)
{
FieldEffectFreeGraphicsResources(sprite);
}
}
And that's it! If you have any improvements for this, please reach out to me at our discord. :)