Permalink
Browse files

Add: Medicine and Berry pockets in the Bag.

  • Loading branch information...
roukaour committed Oct 7, 2016
1 parent 10d32cc commit 4c5bbbc2f408a9b3ec7d3190dc44597abd7224e1
View
@@ -201,6 +201,7 @@ I was hesitant to make original changes like this, because the goal is to be an
These changes have been made since the current 2.2.0 release. If you build the project as-is, it will include all of them.
* Add: Medicine and Berry pockets in the Bag.
* Add: Always keep the option to Teleport away from Indigo Plateau.
* Add: Portrait for the meteorite in Pewter Museum.
* Add: Special sprite for Red's Pikachu.
View
@@ -43,7 +43,6 @@ This is *not* actually a list of concrete plans. Many items are just ideas I tho
* Show stat changes and then absolute values on level up
* Send gift Pokémon to the PC if the party is full
* Separate radio channels for March and Lullaby, available every day
* More Bag pockets (split Items into Items, Medicine, and Berries, or Held and Used)
* Press Start to auto-sort items
* Select reorders Pokémon in party menu
* Longer player and rival names
@@ -312,9 +312,11 @@ MAIL_MAX_LENGTH EQU $20
; pockets
ITEM EQU 1
KEY_ITEM EQU 2
MEDICINE EQU 2
BALL EQU 3
TM_HM EQU 4
BERRIES EQU 5
KEY_ITEM EQU 6
; item actions
CANT_SELECT EQU 1 << 6
@@ -1,9 +1,11 @@
PARTY_LENGTH EQU 6
MAX_ITEMS EQU 30
MAX_BALLS EQU 16
MAX_KEY_ITEMS EQU 25
MAX_PC_ITEMS EQU 50
MAX_ITEMS EQU 25 ; 92 kinds
MAX_MEDICINE EQU 20 ; 34 kinds
MAX_BALLS EQU 16 ; 16 kinds
MAX_BERRIES EQU 17 ; 17 kinds
MAX_KEY_ITEMS EQU 23 ; 23 kinds
MAX_PC_ITEMS EQU 20
; strings
PLAYER_NAME_LENGTH EQU 8
View
@@ -133,12 +133,18 @@ _ResetWRAM: ; 5bae
ld hl, NumItems
call InitList
ld hl, NumKeyItems
ld hl, NumMedicine
call InitList
ld hl, NumBalls
call InitList
ld hl, NumBerries
call InitList
ld hl, NumKeyItems
call InitList
ld hl, PCItems
call InitList
View
@@ -1,6 +1,4 @@
_ReceiveItem:: ; d1d5
call DoesHLEqualNumItems
jp nz, PutItemInPocket
push hl
call CheckItemPocket
pop de
@@ -12,24 +10,32 @@ _ReceiveItem:: ; d1d5
.Pockets: ; d1e9
dw .Item
dw .KeyItem
dw .Medicine
dw .Ball
dw .TMHM
dw .Berry
dw .KeyItem
.Item: ; d1f1
ld h, d
ld l, e
ld hl, NumItems
jp PutItemInPocket
.KeyItem: ; d1f6
ld h, d
ld l, e
jp ReceiveKeyItem
.Medicine:
ld hl, NumMedicine
jp PutItemInPocket
.Ball: ; d1fb
ld hl, NumBalls
jp PutItemInPocket
.Berry:
ld hl, NumBerries
jp PutItemInPocket
.KeyItem: ; d1f6
ld hl, NumKeyItems
jp ReceiveKeyItem
.TMHM: ; d201
ld h, d
ld l, e
@@ -52,9 +58,15 @@ _TossItem:: ; d20d
.Pockets:
dw .Item
dw .KeyItem
dw .Medicine
dw .Ball
dw .TMHM
dw .Berry
dw .KeyItem
.Medicine:
ld hl, NumMedicine
jp RemoveItemFromPocket
.Ball: ; d228
ld hl, NumBalls
@@ -68,6 +80,10 @@ _TossItem:: ; d20d
call GetTMHMNumber
jp TossTMHM
.Berry:
ld hl, NumBerries
jp RemoveItemFromPocket
.KeyItem: ; d23a
ld h, d
ld l, e
@@ -76,7 +92,6 @@ _TossItem:: ; d20d
.Item: ; d23f
ld h, d
ld l, e
.remove
jp RemoveItemFromPocket
@@ -94,9 +109,15 @@ _CheckItem:: ; d244
.Pockets:
dw .Item
dw .KeyItem
dw .Medicine
dw .Ball
dw .TMHM
dw .Berry
dw .KeyItem
.Medicine:
ld hl, NumMedicine
jp CheckTheItem
.Ball: ; d25f
ld hl, NumBalls
@@ -110,6 +131,10 @@ _CheckItem:: ; d244
call GetTMHMNumber
jp CheckTMHM
.Berry:
ld hl, NumBerries
jp CheckTheItem
.KeyItem: ; d271
ld h, d
ld l, e
@@ -118,7 +143,6 @@ _CheckItem:: ; d244
.Item: ; d276
ld h, d
ld l, e
.nope
jp CheckTheItem
@@ -134,22 +158,40 @@ GetPocketCapacity: ; d283
ld c, MAX_ITEMS
ld a, e
cp NumItems % $100
jr nz, .not_bag
jr nz, .not_items
ld a, d
cp NumItems / $100
ret z
.not_bag
ld c, MAX_PC_ITEMS
.not_items:
ld c, MAX_MEDICINE
ld a, e
cp PCItems % $100
jr nz, .not_pc
cp NumMedicine % $100
jr nz, .not_medicine
ld a, d
cp PCItems / $100
cp NumMedicine / $100
ret z
.not_pc
.not_medicine:
ld c, MAX_BALLS
ld a, e
cp NumBalls % $100
jr nz, .not_balls
ld a, d
cp NumBalls / $100
ret z
.not_balls:
ld c, MAX_BERRIES
ld a, e
cp NumBerries % $100
jr nz, .not_berries
ld a, d
cp NumBerries / $100
ret z
.not_berries:
ld c, MAX_PC_ITEMS
ret
PutItemInPocket: ; d29c
Oops, something went wrong.

0 comments on commit 4c5bbbc

Please sign in to comment.