diff options
| author | Rangi <35663410+Rangi42@users.noreply.github.com> | 2020-07-06 11:52:24 -0400 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-06 11:52:24 -0400 | 
| commit | 122d715484b79aba71d79caf148bac4a2ec441a5 (patch) | |
| tree | a13bdf621fa8d3f3836ecb6e8d3a269ccc5d61cc /engine | |
| parent | c57c93d2b2fb06cadafefda37c0974ba1ec9e6c0 (diff) | |
| parent | 43e0e40d5a4af369661fd6c7aa44d7265b9f6e59 (diff) | |
Merge pull request #261 from Rangi42/master
Port pokecrystal's base data and tmhm structure
Diffstat (limited to 'engine')
| -rwxr-xr-x | engine/items/item_effects.asm | 8 | ||||
| -rwxr-xr-x | engine/items/tm_prices.asm | 4 | ||||
| -rwxr-xr-x | engine/menus/start_sub_menus.asm | 2 | 
3 files changed, 7 insertions, 7 deletions
| diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index 93eab051..238c2ea9 100755 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -2,7 +2,7 @@ UseItem_::  	ld a, 1  	ld [wActionResultOrTookBattleTurn], a ; initialise to success value  	ld a, [wcf91] ;contains item_ID -	cp HM_01 +	cp HM01  	jp nc, ItemUseTMHM  	ld hl, ItemUsePtrTable  	dec a @@ -2201,10 +2201,10 @@ ItemUseTMHM:  	and a  	jp nz, ItemUseNotTime  	ld a, [wcf91] -	sub TM_01 +	sub TM01 ; underflows below 0 for HM items (before TM items)  	push af  	jr nc, .skipAdding -	add 55 ; if item is an HM, add 55 +	add NUM_TMS + NUM_HMS ; adjust HM IDs to come after TM IDs  .skipAdding  	inc a  	ld [wd11e], a @@ -2661,7 +2661,7 @@ IsKeyItem_::  	ld a, $01  	ld [wIsKeyItem], a  	ld a, [wcf91] -	cp HM_01 ; is the item an HM or TM? +	cp HM01 ; is the item an HM or TM?  	jr nc, .checkIfItemIsHM  ; if the item is not an HM or TM  	push af diff --git a/engine/items/tm_prices.asm b/engine/items/tm_prices.asm index 85531bab..502191d5 100755 --- a/engine/items/tm_prices.asm +++ b/engine/items/tm_prices.asm @@ -2,8 +2,8 @@ GetMachinePrice::  ; Input:  [wcf91] = Item Id of a TM  ; Output: Stores the TM price at hItemPrice  	ld a, [wcf91] ; a contains TM item id -	sub TM_01 -	ret c +	sub TM01 ; underflows below 0 for HM items (before TM items) +	ret c ; HMs are priceless  	ld d, a  	ld hl, TechnicalMachinePrices  	srl a diff --git a/engine/menus/start_sub_menus.asm b/engine/menus/start_sub_menus.asm index 9ec06556..5182ae79 100755 --- a/engine/menus/start_sub_menus.asm +++ b/engine/menus/start_sub_menus.asm @@ -384,7 +384,7 @@ StartMenu_Item::  ; use item  	ld [wPseudoItemID], a ; a must be 0 due to above conditional jump  	ld a, [wcf91] -	cp HM_01 +	cp HM01  	jr nc, .useItem_partyMenu  	ld hl, UsableItems_CloseMenu  	ld de, 1 | 
