11 March 2016 - Forum Rules
Started by njosro, August 28, 2021, 01:17:42 PM
I struck the 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 notFE66 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 exitC494 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 stackC498 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 ShowMessageC538 .db 0c 41 82 ;idk what this is but it's required for the ShowMessage function to workC53B LDA EquippedItem C53E STA $A0 C540 JSR RemoveSelectedItem C543 LDX #$50 ;max health is 50 so this is the max countdown for refillC545 TXA C546 PHA ;save onto stackC547 AND #$01 ;check if the countdown is at an even numberC549 BEQ $C550 ;if so, allow the refill sound to playC54B 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 RTSC558 LDA $A0 ;again check which item was used C55A CMP #$11 ;check if brown potion C55C BNE $C563 ;skip to health part if notC55E 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
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 #$20FE68 CLC FE69 RTS@C491:C491 NOP C492 BCS $C49C ;if the item index used is too high then exitC494 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 stackC498 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 screenFE2D 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 dealFE3C 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
Quote from: ifightdragons on August 28, 2021, 06:01:25 PMThese are all very welcome additions. Hopefully you will add the patch to the site when it's done!
Quote from: the_E_y_Es on August 29, 2021, 06:16:50 AMFaxanadu! It's great to see this getting some attention. I like the changes so far. The fire crystal text is more than appropriate, too.I've been thinking of hacking this game to change the doors -- once you use a key, the door should stay open permanently. And I'd like to make the jump smoother and less restricted, if possible. After doing a little bit of SNES asm, I feel more confident in attempting these two things.Thanks for this
$E5B9: LDA $E5DB,Y ;loads key requirement for current door$E5BC: STA $042B ;stores it
$EB2F: LDA $042B ;loads key requirement for current door $EB32: BEQ $EB3E ;is it open?
$EB81: LDA $03C1 ;loads selected item ID$EB84: CMP #$07 ;is it key of Jack?$EB86: BEQ $EBD1 ;if yes, go to $EBD1
$EBD1: LDA #$84$EBD3: JSR $F921
00 04 00 03 00 01 00 07 00 08 00 00 00 01 00 02 01 03 02 04 03 05 04 05 00 00 08
QuoteMaybe it's also possible to make the towers in Mist land more useful?
QuoteWould also love the last boss to be more of a fight. You can now blast it with your strongest Magic and be done with in seconds. Even though the game states that shouldn't be possible.
QuoteAnd while we're at it, could you give the fighting master in the first town some more meaning? Now he just heals your, which is pretty redundant. I always thought they had some other use for him, but ultimately never found the time to implement it.
Quote from: njosro on September 22, 2021, 01:27:00 PMI've thought the exact same thing. Thanks for reminding me about that! He needs to do something useful. Any ideas?
Page created in 0.072 seconds with 20 queries.