Sign in to follow this  
seibaby

Patch: Quicksteal

3 posts in this topic

Like the other Steal patch, this is the result of a drunken Nowea, half mad from sleep deprivation, pitching an idea half almost entirely in jest, which upon closer examination actually turned out to be rather good. After Nowea sobered up, he pitched it to BTB, whose fancy was also tickled, enough so that he wanted it included in 1.8.6. I'll accept a modest credit for actually coding it, but otherwise, blame Nowea, that lovable idiot savant of accidental game design.

So what does it do?

Nothing fancy - it simply makes it so a successful Steal attempt doesn't cost you a turn. It works with Mug (and Switchblade) too, so it actually improves Mug to the point of almost being useful. This is scheduled for inclusion in the upcoming 1.8.6, but if you'd like to test it out right now, I'd appreciate the bit of extra QA. Get it here: header | non-header

 

Finally, from the shit nobody cares about department, here are (spooky voice) Tales From Dev Chat.

Although the idea arose from a joke about Steal buffing Locke with Quick, it has nothing to with Quick; that poor, disease-ridden mechanic was taken out back and shot long ago. It doesn't stop time or anything; just prevents the ATB gauge from resetting after a Steal turn, keeping it in the golden "ready" state. If you're super interested in the mechanics: the Steal function now sets a flag upon a successful Steal attempt, which is later checked by the function which increments the ATB gauge. If the flag is set, it skips ahead to the part where it sets the character into the "ready for action" state. If you know how to code, you can make any attack set this flag...

Fun fact: the original name I came up with for this patch was inspired by the colloquialism used by Magic: the Gathering players to describe cards like these. It was promptly shot down by BTB (deservedly so, I'll admit). Nowea suggested Stealing Is A Free Action as a replacement, which I kind of like. In the end I think Quicksteal has a nice, simple elegance to it. Call it what you will, at least Steal sucks a little less now.

 

SXDsbIj.png

We know you are sensitive about your art, Locke.

Code:

 

	;Quicksteal - a successful Steal attempt doesn't deplete the ATB bar.
	;NOTE: makes use of bit 3 of $3AA1,index as a flag to tell the ATB ticker
;function to just go ahead and set ATB state to "ready".
	;All the code except the calls to the new functions is unchanged and just
;there for context.
	
hirom
;header
!freespace = $C2659D            ;Requires 33 bytes in C2
	;Successful Steal attempt
org $C239E9
C239E9: STA $2F35               ;Save Item stolen for message purposes in
                                ;parameter 1, bottom byte
C239EC: STA $32F4,X             ;Store in "Acquired item"
C239EF: JSR setCantrip          ;(LDA $3018,X)
        macro setCantrip()
        reset bytes
        setCantrip:
        LDA $3AA1,X
        ORA #$08
        STA $3AA1,X             ;Use bit 3 of $3AA1 as cantrip flag, it seems
                                ;to be unused. $3AA0 has a flag that sort of
                                ;does the opposite (resets ATB, used when
                                ;waking from Sleep), so it seems appropriate.
        LDA $3018,X
        RTS
        print "setCantrip is ",bytes," bytes"
        endmacro
C239F2: TSB $3A8C               ;Flag character to have any applicable item in
                                ;$32F4,X added to inventory when turn is over.
	;Update ATB timer
org $C211BB
C211BB: REP #$21
C211BD: LDA $3218,X             ;current ATB timer count
C211C0: ADC $3AC8,X             ;amount to increase timer by
C211C3: JSR checkCantrip        ;(STA $3218,X)
        macro checkCantrip()
        reset bytes
        checkCantrip:
        PHA                     ;Save A
        LDA $3AA1,X
        BIT #$0008
        BEQ .exit               ;Exit if cantrip flag not set
        AND #$FFF7
        STA $3AA1,X             ;Clear cantrip flag
        SEC                     ;Set ATB to fill immediately
        .exit
        PLA                     ;Restore A
        STA $3218,X             ;Save updated timer
        RTS
        print "checkCantrip is ",bytes," bytes"
        endmacro
	org !freespace
%setCantrip()
%checkCantrip()
Edited by seibaby

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this