Users browsing this thread: 1 Guest(s)
Changing physical damage calculations?

#8
Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(04-17-2012, 08:08 AM)Marketa Lazarova Wrote: On an unrelated note, I've also been considering replacing the Soul Sabre effect with an effect similar to that of the Tempest's effect, only using a different spell in Tempest's place. The idea is to have another weapon randomly cast Magnitude8, while keeping the Tempest and its ability to cast Wind Slash. The Soul Sabre effect, as per the disassembly, has 16 bytes of data, while the Tempest ability has 14 bytes, and I am wondering if this is possible without doing a whole lot of rearranging.

I wasn't able to fit it in the Soul saber code. You need 0x18 bytes for this code. Maybe there is a way to optimize it but this is what I came up with with my level of ASM programming. This could would give the soul saber the same properties as the tempest except it could cast Magnitude8 25% (12.5% total) of the times and Wind Slash 75% (37.5% total) of the time. You still have 50% chances to cast a spell, if not it's a regular hit:

Code:
C2/0000: 20 5A 4B     JSR $4B5A   (Random Number Function: 0 to 255)  
C2/0003: C9 80        CMP #$80    (compare to 128)
C2/0005: B0 ??        BCS $3FB6   (50% chance exit function)
C2/0007: 20 5A 4B     JSR $4B5A   (Random Number Function: 0 to 255)  
C2/000A: C9 80        CMP #$40    (compare to 64)
C2/000C: B0 04        BCS $0012   (25% chance branch)
C2/000E: A9 65        LDA #$65    (Wind Slash spell number 75% chances)
C2/0010: 80 02        BRA $0014   (branch to clear battle power)
C2/0012: A9 BC        LDA #$BC    (Magnitude8 spell number 25% chances)
C2/0014: 9C A6 11     STZ $11A6   (clear battle power)
C2/0017: 80 ??        BRA $3FB0   (branch to store the spell number)

You could maybe put some of this code where there is empty space in C2. In this case, the last BRA might need to be replaced by a JMP, depending where the code is.
  Find
Quote  



Messages In This Thread
RE: Changing physical damage calculations? - by madsiur - 04-17-2012, 08:47 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite