mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-20 22:28:41 +13:00
1/256 Text and other transparency enhancements
- In the event of a 1/256 miss, the game will now state the Pokemon evaded the attack to signify its occurrence. This is part of an effort to make misses, overall, more transparent. - Battle Debug now loads some items to assist with testing. - Misleading Guard Spec message in Celadon has been changed to refer to X Special, which it was actually describing. - Removed "it can spook the target sometimes" text when getting the TM for Rock Slide, because it's a LIE
This commit is contained in:
parent
62059aafd5
commit
7ed5c0ae95
7 changed files with 89 additions and 16 deletions
|
|
@ -3955,11 +3955,24 @@ PrintMoveFailureText:
|
|||
; This gives players a nice little dopamine rush.
|
||||
ld a, [wDidZeroDamage] ; Grab the variable.
|
||||
cp 1 ; Alright, is it set?
|
||||
jr nz, .skip ; No? Skip these instructions.
|
||||
jr nz, .check256 ; No? Skip these instructions, but don't forget the 1/256 check.
|
||||
ld hl, ZeroDamageText ; Load the zero damage text in.
|
||||
ld a, 0 ; Now shut the address off.
|
||||
ld [wDidZeroDamage], a ; Bink!
|
||||
|
||||
; 1/256 text functionality.
|
||||
; This makes them a feature, with the reasoning being vanilla experience + how it may have been intentional all along.
|
||||
; See Pokemon Stadium's handling of the mechanic for latter point.
|
||||
; Yes I am a fucking psycho
|
||||
; In theory this could be merged with the previous check in some capacity but that's neither here nor there
|
||||
.check256 ; jump point
|
||||
ld a, [wAttackWasDodged] ; Alright, let's see...
|
||||
cp 1 ; Was the attack dodged?
|
||||
jr nz, .skip ; No? Ok, neither of my hardmods are needed. proceed as normal.
|
||||
ld hl, EvadedAttackText ; Oho? Let's load this then.
|
||||
ld a, 0 ; Now to shut off the variable.
|
||||
ld [wAttackWasDodged], a ; Bink!
|
||||
|
||||
.skip
|
||||
ld a, [wCriticalHitOrOHKO]
|
||||
cp $ff
|
||||
|
|
@ -4016,6 +4029,10 @@ ZeroDamageText:
|
|||
prompt
|
||||
text_end
|
||||
|
||||
EvadedAttackText: ; for 1/256, repurposed from leech seed
|
||||
text_far _EvadedAttackText
|
||||
text_end
|
||||
|
||||
KeptGoingAndCrashedText:
|
||||
text_far _KeptGoingAndCrashedText
|
||||
text_end
|
||||
|
|
@ -5570,9 +5587,15 @@ MoveHitTest:
|
|||
; if the random number generated is greater than or equal to the scaled accuracy, the move misses
|
||||
; note that this means that even the highest accuracy is still just a 255/256 chance, not 100%
|
||||
call BattleRandom
|
||||
cp 255 ; is it 1/256?
|
||||
jr z, .oneIn256 ; if true, skip the next few lines.
|
||||
cp b
|
||||
jr nc, .moveMissed
|
||||
ret
|
||||
.oneIn256 ; 1/256 text functionality, used to be more transparent to players.
|
||||
ld a, 1
|
||||
ld [wAttackWasDodged], a
|
||||
;fallthrough
|
||||
.moveMissed
|
||||
xor a
|
||||
ld hl, wDamage ; zero the damage
|
||||
|
|
|
|||
|
|
@ -28,13 +28,14 @@ LeechSeedEffect_:
|
|||
.moveMissed
|
||||
ld c, 50
|
||||
call DelayFrames
|
||||
ld hl, EvadedAttackText
|
||||
ld hl, LeechFailedText
|
||||
jp PrintText
|
||||
|
||||
WasSeededText:
|
||||
text_far _WasSeededText
|
||||
text_end
|
||||
|
||||
EvadedAttackText:
|
||||
text_far _EvadedAttackText
|
||||
; This messed up if I farcalled AttackMissedText, so we're doing this instead.
|
||||
LeechFailedText:
|
||||
text_far _ButItFailedText
|
||||
text_end
|
||||
|
|
|
|||
|
|
@ -76,6 +76,22 @@ TestBattle:
|
|||
.loop
|
||||
call GBPalNormal
|
||||
|
||||
; Get some debug items.
|
||||
ld hl, wNumBagItems
|
||||
ld de, BattleDebugItemsList
|
||||
.items_loop
|
||||
ld a, [de]
|
||||
cp -1
|
||||
jr z, .items_end
|
||||
ld [wcf91], a
|
||||
inc de
|
||||
ld a, [de]
|
||||
inc de
|
||||
ld [wItemQuantity], a
|
||||
call AddItemToInventory
|
||||
jr .items_loop
|
||||
.items_end
|
||||
|
||||
; Don't mess around
|
||||
; with obedience.
|
||||
ld a, 1 << BIT_EARTHBADGE
|
||||
|
|
@ -104,11 +120,17 @@ TestBattle:
|
|||
; This function gives you a way to waste a turn, never know when you'll need it.
|
||||
; Alternatively, add a move to test.
|
||||
ld hl, wPartyMon1Moves
|
||||
ld a, SPLASH
|
||||
ld a, POISON_STING ; Something super weak
|
||||
ld [hli], a
|
||||
ld a, LEECH_SEED ; Test new failure text
|
||||
ld [hli], a
|
||||
ld a, FISSURE ; Something that'll miss easily
|
||||
ld [hli], a
|
||||
ld a, SPLASH ; Skip turn
|
||||
ld [hli], a
|
||||
|
||||
; Opponent's Pokemon.
|
||||
ld a, WEEDLE
|
||||
ld a, SANDY_SHOCKS
|
||||
ld [wCurOpponent], a
|
||||
ld a, 100 ; Set the level you want here.
|
||||
ld [wCurEnemyLVL], a
|
||||
|
|
@ -121,3 +143,17 @@ TestBattle:
|
|||
ld [wUpdateSpritesEnabled], a
|
||||
ldh [hAutoBGTransferEnabled], a
|
||||
jr .loop
|
||||
|
||||
BattleDebugItemsList:
|
||||
db FULL_RESTORE, 99
|
||||
db MAX_ELIXER, 99
|
||||
db FULL_HEAL, 99
|
||||
db X_ATTACK, 99
|
||||
db X_SPECIAL, 99
|
||||
db X_DEFEND, 99
|
||||
db X_SPEED, 99
|
||||
db X_ACCURACY, 99
|
||||
db DIRE_HIT, 99
|
||||
db GUARD_SPEC, 99
|
||||
db POKE_FLUTE, 1
|
||||
db -1 ; end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue