I decided to have fun and work on a little hack to make the unused items Brown Potion (BLACK POTION) and Fire Crystal (CRYSTAL) have functionality!
The hack is based on UnsavoryMaggot's Faxanadu Restoration hack v1.04. (Thanks for all your hard work!!)
It's a work in progress and currently none of the items have their own text. They just say the Red Potion text.
Video:
https://youtu.be/g6q201wMLRE- The brown potion refills magic, and the refill animation is faster and smoother than the red potion in the original game.
- The hourglass doesn't halve your remaining health, and it lasts twice as long (just because!)
- The fire crystal deals massive damage to the enemies on screen. It will usually kill them all but some enemies like the cobra and the bosses have enough HP that they won't get killed.
- bread restores magic by half as much as it restores health.
Here's what I was thinking for the message that appears when you use the fire crystal:
I struck the fire crystal.
Next, I want to make the Holy Bible (BOOK) teleport you to the priest (guru) you would appear at if you died. But using the Bible you won't lose any EXP or gold. So it's like an emergency exit from the battle field.
As for the lamp, I think it should just be changed into another item. I was thinking of using the graphics for the FIRE CRYSTAL (not the one featured here, but the one in the original that has a diamond graphic) and then go from there.
What functionality would you give to an extra item?Here's some code snippets.
Brown Potion:
C48B LDA EquippedItem
C48E JSR $FE60
@FE60:
FE60 ASL A
FE61 TAY
FE62 CPY #$22 ;check if item used * 2 is 22 (brown potion)
FE64 BNE $FE69 ;exit if not
FE66 LDY #$20 ;set Y to 20 otherwise (will point to red potion code)
FE68 CLC
FE69 RTS
@C491:
C491 NOP
C492 BCS $C49C ;if the item index used is too high then exit
C494 LDA $C49E,Y ;get low byte of location to jump to based on item used (red potion in this case)
C497 PHA ;push onto the stack
C498 LDA $C49D,Y ;get high byte of location to jump to based on item used (red potion in this case)
C49B PHA ;push
C49C RTS ;pull the two bytes from the stack and jump there.
@C533:
C533 LDA #$80 ;index of red potion message
C535 JSR ShowMessage
C538 .db 0c 41 82 ;idk what this is but it's required for the ShowMessage function to work
C53B LDA EquippedItem
C53E STA $A0
C540 JSR RemoveSelectedItem
C543 LDX #$50 ;max health is 50 so this is the max countdown for refill
C545 TXA
C546 PHA ;save onto stack
C547 AND #$01 ;check if the countdown is at an even number
C549 BEQ $C550 ;if so, allow the refill sound to play
C54B LDA #$13 ;(I did this ^ to prevent the refill sound from sounding weird)
C54D JSR PlaySound
C550 LDA #$02
C552 LDX $A0 ;retrieve the item that was actually used (brown potion or red potion)
C554 NOP
C555 JSR $FE06
@FE06:
FE06 CPX #$11 ;if brown potion, skip to the mana part.
FE08 BEQ $FE10
FE0A JSR AddHealthPoints
FE0D JMP $FE13
FE10 JSR AddMana
FE13 JSR $DC46 ;do something?
FE16 JSR $CA25 ;do a frame of refill
FE19 JSR $CBA8
FE1C JSR $CA25 ;do another frame of refill
FE1F JSR $CBA8
RTS
C558 LDA $A0 ;again check which item was used
C55A CMP #$11 ;check if brown potion
C55C BNE $C563 ;skip to health part if not
C55E LDA ManaPoints
C561 BCS $C566
C563 LDA HealthPoints
C566 STA $B0 ;store current mana/health (whichever one is refilling) into B0
C568 NOP
C569 NOP
C56A NOP
C56B NOP
C56C PLA
C56D TAX
C56E LDA $B0
C570 NOP
C571 CMP #$50 ;if the amount of mana/health reached max then exit, else loop.
C573 BCS $C578
C575 DEX
C576 BNE $C545
C578 RTS
Fire Crystal:
C48B LDA EquippedItem
C48E JSR $FE60
@FE60:
FE60 ASL A
FE61 TAY
FE62 CPY #$22 ;check if item used * 2 is 22 (brown potion)
FE64 BNE $FE69 ;exit if not (will exit because fire crystal is not)
FE66 LDY #$20
FE68 CLC
FE69 RTS
@C491:
C491 NOP
C492 BCS $C49C ;if the item index used is too high then exit
C494 LDA $C49E,Y ;get low byte of location to jump to based on item used (fire crystal in this case)
C497 PHA ;push onto the stack
C498 LDA $C49D,Y ;get high byte of location to jump to based on item used (fire crystal in this case)
C49B PHA ;push
C49C RTS ;pull the two bytes from the stack and jump there.
@FE23:
FE23 LDA #$80 ;index of message to show (red potion because I dont know how to make a new text)
FE25 JSR ShowMessage
--------data block--------
FE28 .db $0C $41 $82
----------------
FE2B LDX #$07 ;loop through the 8 enemies that could possibly be on the screen
FE2D LDA $02CC,X ;Check if the current enemy's ID is FF
FE30 CMP #$FF
FE32 BEQ $FE44 ;skip to the next loop if it is.
FE34 STX $A0 ;store the current loop index.
FE36 TXA
FE37 STA $0378 ;set CurrentEnemyToHandle to the current loop index.
FE3A LDA #$27 ;amount of damage to deal
FE3C STA $00 ;used by subroutine below.
FE3E JSR $8891 ;This subroutine handles damage dealing. I jump into the middle of it.
FE41 LDA $A0 ;retrieve current loop index.
FE43 TAX
FE44 DEX
FE45 BPL $FE2D
FE47 JSR $C4BF ;Remove fire crystal from inventory
FE4A RTS
You can play around with my progress so far by downloading the patch here:
https://drive.google.com/uc?export=download&id=1UNejlrLYrWfi-QpIg2E3JdXDJQoPXpHWI think this one is just for the fire crystal but it might also have all the other changes... I haven't been good at keeping track.
You have to first apply umaggot's faxanadu restoration v1.04 on a japanese faxanadu rom and then apply this patch.