changeing Health command
#5
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:

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)
Reply


Messages In This Thread
changeing Health command - by Tsushiy - 12-10-2013, 09:52 AM
RE: changeing Health command - by Synchysi - 12-10-2013, 03:53 PM
RE: changeing Health command - by Tsushiy - 12-11-2013, 05:45 AM
RE: changeing Health command - by Cyprus - 12-19-2013, 09:58 PM
RE: changeing Health command - by madsiur - 12-20-2013, 01:59 AM
RE: changeing Health command - by HatZen08 - 12-20-2013, 02:57 PM
RE: changeing Health command - by Cyprus - 12-22-2013, 01:58 PM
RE: changeing Health command - by Gi Nattak - 03-05-2014, 05:45 PM
RE: changeing Health command - by Synchysi - 03-05-2014, 10:02 PM
RE: changeing Health command - by Gi Nattak - 03-05-2014, 10:58 PM
RE: changeing Health command - by SSJ Rick - 03-05-2014, 11:23 PM
RE: changeing Health command - by Gi Nattak - 03-05-2014, 11:36 PM
RE: changeing Health command - by HatZen08 - 03-06-2014, 11:46 AM
RE: changeing Health command - by Gi Nattak - 03-06-2014, 03:49 PM
RE: changeing Health command - by SSJ Rick - 03-07-2014, 01:42 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Banon, don't wander off! (Health fix) C-Dude 0 1,249 09-18-2021, 09:29 PM
Last Post: C-Dude
  Shock/Health: Hardcoded animation? Kugawattan 6 6,523 05-16-2017, 06:14 PM
Last Post: Tenkarider
  Gaining a greater health from Potions? Kugawattan 41 38,189 08-18-2016, 12:02 AM
Last Post: DrakeyC
  Change the Health command effect Blue Mage Gab 18 15,624 12-08-2015, 08:31 AM
Last Post: Zozma

Forum Jump:


Users browsing this thread: 1 Guest(s)