From bcef765d45c6f12fdd380ad0d1a2c049670b46ef Mon Sep 17 00:00:00 2001 From: May Evans <36418502+PlagueVonKarma@users.noreply.github.com> Date: Wed, 28 Sep 2022 13:59:54 +0100 Subject: [PATCH] Fix the Ghost identification and squiggly lines from night shade, etc pretty objective fixes, need to make the rocket hideout more interesting --- engine/battle/animations.asm | 3 +++ engine/battle/core.asm | 11 +++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm index f79b02b0..8dc9ab45 100644 --- a/engine/battle/animations.asm +++ b/engine/battle/animations.asm @@ -1878,6 +1878,8 @@ AnimationWavyScreen: ld c, $ff ld hl, WavyScreenLineOffsets .loop + ld a, [hl] ; this fixes the wavy screen - PvK + ldh [hSCX], a push hl .innerLoop call WavyScreen_SetSCX @@ -1894,6 +1896,7 @@ AnimationWavyScreen: dec c jr nz, .loop xor a + ldh [hSCX], a ; also fixing the wavy screen - PvK ldh [hWY], a call SaveScreenTilesToBuffer2 call ClearScreen diff --git a/engine/battle/core.asm b/engine/battle/core.asm index 37829c9f..900209b8 100644 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -1675,7 +1675,7 @@ LoadBattleMonFromParty: ld bc, 1 + NUM_STATS * 2 call CopyData call ApplyBurnAndParalysisPenaltiesToPlayer - call ApplyBadgeStatBoosts + call ApplyBadgeStatBoosts ; if this is commented out maybe it stops them entirely? test - PvK ld a, $7 ; default stat modifier ld b, NUM_STAT_MODS ld hl, wPlayerMonAttackMod @@ -2405,7 +2405,11 @@ PartyMenuOrRockOrRun: ld [wd0b5], a call GetMonHeader ld de, vFrontPic - call LoadMonFrontSprite + call IsGhostBattle ; this prevents ghosts from being identified without the silph scope - PvK + push af + call nz, LoadMonFrontSprite + pop af + call z, LoadGhostPic ; fix ends here, just make it "call LoadMonFrontSprite on line 2408 to revert. jr .enemyMonPicReloaded .doEnemyMonAnimation ld b, BANK(AnimationSubstitute) ; BANK(AnimationMinimizeMon) @@ -6285,12 +6289,15 @@ LoadEnemyMonData: ld a, [wEnemyMonSpecies2] ld [wd11e], a predef IndexToPokedex + call IsGhostBattle ; this prevents it from being identified early + jr nz, .noMarkSeen ; part of the ghost fix ld a, [wd11e] dec a ld c, a ld b, FLAG_SET ld hl, wPokedexSeen predef FlagActionPredef ; mark this mon as seen in the pokedex +.noMarkSeen ; part of the ghost fix ld hl, wEnemyMonLevel ld de, wEnemyMonUnmodifiedLevel ld bc, 1 + NUM_STATS * 2