Users browsing this thread: 1 Guest(s)
changeing Health command
Assuming you would choose spells IDs #$12, #$20, #$3F, #$70 and #$7F, it would be really similar to the code Synchysi wrote. Note that I only use the A register, there might be a more optimized way to write this:
You can place this code in unused space in bank C2. You'll also need to change the pointer of the skill to point where your new code is. I'm not 100% sure if there is anything else to consider.
Pointer
Code:
01) JSR $4B5A (get random number)
02) CMP #$33 (Between 0% and ~20%)
03) BCC ???? (Branch to step 11)
04) CMP #$66 (Between ~21% and ~40%)
05) BCC ???? (Branch to step 13)
06) CMP #$99 (Between ~41% and ~60%)
07) BCC ???? (Branch to step 15)
08) CMP #$CC (Between ~61% and ~80%)
09) BCC ???? (Branch to step 17)
10) BRA ???? (Branch to step 19)
11) LDA #$12 (Load spell #1)
12) BRA ???? (Branch to step 20)
13) LDA #$20 (Load spell #2)
14) BRA ???? (Branch to step 20)
15) LDA #$3F (Load spell #3)
16) BRA ???? (Branch to step 20)
17) LDA #$70 (Load spell #4)
18) BRA ???? (Branch to step 20)
19) LDA #$7F (more than ~80%, load spell #5)
20) STA $B6 (Store in skill to use)
21) LDA #$05 (used to display a spell name?)
22) JMP $1765
You can place this code in unused space in bank C2. You'll also need to change the pointer of the skill to point where your new code is. I'm not 100% sure if there is anything else to consider.
Pointer
Code:
C2/19F9: 63 17 (Summon)
« Next Oldest | Next Newest »
Users browsing this thread: 1 Guest(s)