1456

**Game Modification Station / Re: FF6 misc ramblings**

« **on:**March 10, 2008, 03:48:11 PM »

Magic power. Magic defense gets stored to....$3BB9,X/Y if I'm reading this right.

Code: [Select]

`C2/2CA2: AA TAX (X = enemy # * 4 * 8. Monster data block at $CF0000`

is 32 bytes)

C2/2CA3: BF 05 00 CF LDA $CF0005,X (bottom = Defense, top = Magic Defense)

C2/2CA7: 99 B8 3B STA $3BB8,Y

C2/2CAA: BF 0C 00 CF LDA $CF000C,X (XP)

C2/2CAE: 99 84 3D STA $3D84,Y

C2/2CB1: BF 0E 00 CF LDA $CF000E,X (GP)

C2/2CB5: 99 98 3D STA $3D98,Y

C2/2CB8: AD 46 3A LDA $3A46

C2/2CBB: 30 27 BMI $2CE4 (branch if there was an enemy formation # switch, and

it designates that the new enemies retain HP and Max HP

from the current formation.)

C2/2CBD: BF 0A 00 CF LDA $CF000A,X (MP)

C2/2CC1: 99 08 3C STA $3C08,Y

C2/2CC4: 99 30 3C STA $3C30,Y

C2/2CC7: BF 08 00 CF LDA $CF0008,X (HP)

C2/2CCB: 99 F4 3B STA $3BF4,Y

C2/2CCE: 99 1C 3C STA $3C1C,Y

C2/2CD1: AD D4 3E LDA $3ED4 (Battle formation)

C2/2CD4: C9 CF 01 CMP #$01CF

C2/2CD7: D0 0B BNE $2CE4 (Branch if not Doom Gaze's formation)

C2/2CD9: 8C FA 33 STY $33FA

C2/2CDC: AD BE 3E LDA $3EBE (Doom Gaze's HP)

C2/2CDF: F0 03 BEQ $2CE4

C2/2CE1: 99 F4 3B STA $3BF4,Y (Set current HP to Doom Gaze's HP)

C2/2CE4: E2 21 SEP #$21 (Set 8-bit Accumulator, carry)

C2/2CE6: B9 1D 3C LDA $3C1D,Y (High byte of max HP)

C2/2CE9: 4A LSR

C2/2CEA: C9 19 CMP #$19

C2/2CEC: 90 02 BCC $2CF0

C2/2CEE: A9 17 LDA #$17 (Stamina = (Max HP / 512) + 16. If this number

is greater than 40, then the monster's stamina is

set to 40)

C2/2CF0: 69 10 ADC #$10

C2/2CF2: 99 40 3B STA $3B40,Y (Stamina)

C2/2CF5: BF 01 00 CF LDA $CF0001,X

C2/2CF9: 99 68 3B STA $3B68,Y (Battle Power)

C2/2CFC: BF 1A 00 CF LDA $CF001A,X

C2/2D00: 99 A8 3C STA $3CA8,Y (Monster's regular weapon graphic)

C2/2D03: BF 03 00 CF LDA $CF0003,X (Evade)

C2/2D07: 20 61 28 JSR $2861

C2/2D0A: 99 54 3B STA $3B54,Y (255 - Evade * 2 + 1)

C2/2D0D: BF 04 00 CF LDA $CF0004,X (MBlock)

C2/2D11: 20 61 28 JSR $2861

C2/2D14: 99 55 3B STA $3B55,Y (255 - MBlock * 2 + 1)

C2/2D17: BF 02 00 CF LDA $CF0002,X

C2/2D1B: 99 7C 3B STA $3B7C,Y (Hit Rate)

C2/2D1E: BF 10 00 CF LDA $CF0010,X

C2/2D22: 99 18 3B STA $3B18,Y (Level)

C2/2D25: BF 00 00 CF LDA $CF0000,X

C2/2D29: 99 19 3B STA $3B19,Y (Speed)

C2/2D2C: BF 07 00 CF LDA $CF0007,X (Magic Power)

C2/2D30: 20 D6 47 JSR $47D6 (* 1.5)

C2/2D33: 99 41 3B STA $3B41,Y (Magic Power)

C2/2D36: BF 1E 00 CF LDA $CF001E,X (monster status byte 4?)

C2/2D3A: 29 82 AND #$82 (only keep float and enemy runic?)

C2/2D3C: 19 4C 3E ORA $3E4C,Y

C2/2D3F: 99 4C 3E STA $3E4C,Y (turn them on in Retort/Runic/etc byte)

C2/2D42: BF 13 00 CF LDA $CF0013,X

C2/2D46: 99 80 3C STA $3C80,Y (Special Byte 2)

C2/2D49: 20 C1 2D JSR $2DC1 (load enemy elemental reactions, statuses and

status protection, metamorph info, special info

like human/undead/etc)

C2/2D4C: BE A8 33 LDX $33A8,Y

C2/2D4F: BF C0 37 CF LDA $CF37C0,X (get Enemy Special Move graphic)

C2/2D53: 99 81 3C STA $3C81,Y

C2/2D56: E2 10 SEP #$10

C2/2D58: 20 99 2D JSR $2D99

C2/2D5B: 7B TDC

C2/2D5C: 6A ROR

C2/2D5D: 04 B1 TSB $B1

C2/2D5F: 20 5A 4B JSR $4B5A

C2/2D62: 29 07 AND #$07

C2/2D64: 18 CLC

C2/2D65: 69 38 ADC #$38

C2/2D67: 99 2C 3B STA $3B2C,Y

C2/2D6A: BB TYX

C2/2D6B: 20 50 26 JSR $2650 (deal with Instant Death protection, and Poison elemental

nullification giving immunity to Poison status)

C2/2D6E: 28 PLP

C2/2D6F: FA PLX

C2/2D70: 60 RTS