Skip to content

Commit

Permalink
More Work on Unown Forms
Browse files Browse the repository at this point in the history
  • Loading branch information
8bitZeta committed Sep 25, 2024
1 parent 9ebf8fb commit 3e4924f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
5 changes: 3 additions & 2 deletions engine/battle/core.asm
Original file line number Diff line number Diff line change
Expand Up @@ -6230,9 +6230,10 @@ LoadEnemyMon:

; Get random letter
.GenerateUnownLetter
ld a, NUM_UNOWN + 1
ld a, NUM_UNOWN
ld hl, wEnemyMonForm
call BattleRandomRange
inc a
and FORM_MASK
ld [hl], a
; Can't use any letters that haven't been unlocked
Expand Down Expand Up @@ -6284,7 +6285,7 @@ LoadEnemyMon:
; Try again if length >= 1616 mm (i.e. if LOW(length) >= 4 inches)
ld a, [wMagikarpLength + 1]
cp 4
jr nc, .GenerateIVs
jmp nc, .GenerateIVs

; 20% chance of skipping this check
call Random
Expand Down
15 changes: 7 additions & 8 deletions engine/pokemon/move_mon.asm
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,17 @@ endr
ld [de], a
inc de

; Initial Personality
; Initialize Personality
ld a, NUM_NATURES
call RandomRange
and NATURE_MASK
ld [de], a
inc de
ld a, NUM_UNOWN
call RandomRange
inc a
and FORM_MASK
ld [de], a
inc de

; Initialize PP.
Expand Down Expand Up @@ -745,7 +750,7 @@ SendMonIntoBox:
ld bc, MON_NAME_LENGTH
rst CopyBytes

ld hl, wEnemyMon
ld hl, wEnemyMon
ld de, wBufferMon
ld bc, 1 + 1 + NUM_MOVES ; species + item + moves
rst CopyBytes
Expand Down Expand Up @@ -1337,12 +1342,6 @@ GivePoke::
push bc
push de
push af
ld a, [wCurPartyMon]
ld hl, wPartyMon1Form
ld bc, PARTYMON_STRUCT_LENGTH
rst AddNTimes
ld a, [wCurPartyForm]
ld [hl], a
ld a, [wCurItem]
and a
jr z, .done
Expand Down
6 changes: 3 additions & 3 deletions maps/PlayersHouse2F.asm
Original file line number Diff line number Diff line change
Expand Up @@ -162,16 +162,16 @@ if DEF(_DEBUG)
; givepokemove HEADBUTT, wPartyMon3, 2
; givepokemove WATERFALL, wPartyMon3, 3
; misc pokemon for testing
givepoke WURMPLE, 90
givepokemove THUNDERSHOCK, wPartyMon1, 0
givepoke UNOWN, 90
givepokemove FLY, wPartyMon1, 0
givepokemove MEGA_DRAIN, wPartyMon1, 1
givepokemove LEAF_BLADE, wPartyMon1, 2
givepokemove LEECH_SEED, wPartyMon1, 3
givepoke WURMPLE, 5
givepoke WURMPLE, 5
givepoke WURMPLE, 5
givepoke WURMPLE, 5
givepoke WURMPLE, 5
; givepoke UNOWN, 5
; intro events
addcellnum PHONE_MOM
setmapscene PLAYERS_HOUSE_1F, $1
Expand Down

0 comments on commit 3e4924f

Please sign in to comment.