Users browsing this thread: 1 Guest(s)
Gau's Rage 75%

#3
Posts: 3,971
Threads: 279
Thanks Received: 238
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
If you have no idea how to do it you can test this code with xkas 0.06. Note that you'll need to change the org $C26469 to actual free space in bank $C2 if that space is occupied by patches. This code is untested.

Code:
hirom
;header

org $C20600
jsr sub_rage      ; get good index
tax               ; transfer rage/attack index to X
sep #$20          ; 8-bit accumulator
lda $CF4600,X     ; load rage/attack
plp
plx
rts

org $C26469       ; change to free space in bank $C2
sub_rage:
pha               ; save monster index
jsr $4B5A         ; random number between 0 and 255
cmp #$40          ; compare to 64
bcc is_attack     ; branch if smaller than 64
; rage (75%)
pla               ; restore monster index
rep #$30          ; 16-bit accumulator/index
asl a             ; multiply by 2
inc a             ; increment by 1
bra exit          
is_attack:
; attack (25%)
pla               ; restore monster index
rep #$30          ; 16-bit accumulator/index
asl a             ; multiply by 2
exit:
rts
  Find
Quote  



Messages In This Thread
Gau's Rage 75% - by doofenH - 01-21-2020, 01:33 AM
RE: Gau's Rage 75% - by seibaby - 01-23-2020, 05:49 PM
RE: Gau's Rage 75% - by doofenH - 01-23-2020, 09:04 PM
RE: Gau's Rage 75% - by madsiur - 01-23-2020, 08:10 PM
RE: Gau's Rage 75% - by Cecil188 - 01-23-2020, 09:07 PM
RE: Gau's Rage 75% - by seibaby - 01-24-2020, 04:46 PM
RE: Gau's Rage 75% - by doofenH - 01-29-2020, 11:12 PM
RE: Gau's Rage 75% - by assassin - 01-30-2020, 02:53 AM
RE: Gau's Rage 75% - by doofenH - 01-30-2020, 08:57 AM
RE: Gau's Rage 75% - by madsiur - 01-30-2020, 11:16 AM
RE: Gau's Rage 75% - by doofenH - 01-31-2020, 07:21 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite