øAslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&topic=1461.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index394e-2.htmlslickproductions.org/forum/index.php?PHPSESSID=5f0fck550j2m4m2fpbtkj2vkm1&board=8.280e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index394e-2.html.zxv'h^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈà•¤ÇOKtext/htmlISO-8859-1gzip@øÕÇÿÿÿÿÿÿÿÿWed, 11 Mar 2020 00:05:35 GMT0ó°° ®0®P®€§²ð®v'h^TÇ My Dischord spell effect

Author Topic: My Dischord spell effect  (Read 3286 times)

Mikey

  • Karlabos
  • *
  • Posts: 30
    • View Profile
My Dischord spell effect
« on: September 18, 2010, 05:58:30 PM »
I'm new to a lot of this, and I'm having some trouble getting this to work. I have a feeling I missed something crucial.

BB             TYX
89 04        BIT #$04      <Check for Can't Run bit. Did I do this correctly?
F0 06        BEQ $6676   <Should branch to RTS
FE 18 3B   INC $3B18,X <Level
5E 18 3B   LSR $3B18,X <Halves level
60             RTS

I put the location for this into the Pointer Table for spell effects under 25(??? Crusader in FF3usme) and used the editor to apply it to Dischord. Now ingame it does nothing.

Lenophis

  • Forum Overlord
  • *
  • Posts: 1,688
  • Gender: Male
  • I sad
    • View Profile
    • Slick Productions
Re: My Dischord spell effect
« Reply #1 on: September 18, 2010, 06:04:12 PM »
No, you forgot to load whatever holds the can't run flag. A will hold garbage coming in, and there's no telling what will happen.

119 bugs fixed and counting.

Mikey

  • Karlabos
  • *
  • Posts: 30
    • View Profile
Re: My Dischord spell effect
« Reply #2 on: September 22, 2010, 01:03:25 PM »
I'm having trouble finding where said flag is held. I'm using assassin's C2 doc as a reference.

assassin

  • Bane of Retards
  • *
  • Posts: 1,033
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: My Dischord spell effect
« Reply #3 on: September 23, 2010, 07:00:24 AM »
see C2/5CC4.

since i'm guessing you want to check that bit in the attacker, you'll want to open your special effect with:

Code: [Select]
LDA $05,S     (get index to attacker)
TAX
LDA $3C80,X   (load Special Byte 2)
BIT #$04      (is "Can't Run" set?)
BEQ label     (branch if not)
TYX           (now index Target)
INC $3B18,X   (Level)
LSR $3B18,X   (Halve level, rounded up)
label:
RTS

hell, that's the whole thing. :P

Mikey

  • Karlabos
  • *
  • Posts: 30
    • View Profile
Re: My Dischord spell effect
« Reply #4 on: September 23, 2010, 09:32:14 AM »
Thanks. I want to check the bit in the target\monster being affected by the spell I guess.
« Last Edit: September 23, 2010, 09:38:39 AM by Mikey »

Mikey

  • Karlabos
  • *
  • Posts: 30
    • View Profile
Re: My Dischord spell effect
« Reply #5 on: September 23, 2010, 04:33:42 PM »
Nevermind, doesnt work, the spell effect affect targets with can't run bit.

I'm trying to make a special spell effect check for the Can't Run bit in a monster, and then miss if it's set. Right now it's affecting all targets :(
« Last Edit: September 23, 2010, 04:54:50 PM by Mikey »

assassin

  • Bane of Retards
  • *
  • Posts: 1,033
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: My Dischord spell effect
« Reply #6 on: September 23, 2010, 06:27:48 PM »
oh..  in that case, just use your initial code, and insert the "LDA $3C80,X" after the "TYX".

Mikey

  • Karlabos
  • *
  • Posts: 30
    • View Profile
Re: My Dischord spell effect
« Reply #7 on: September 23, 2010, 08:31:05 PM »
Tried that, now it just branches to 'miss'

I'll post my hex, sorry for any head-smashing it may cause  :isuck:

BB                TYX
BD 80 3C     LDA $3C80,X
89 04          BIT #$04
F0 15          BEQ $6688 (I added a branch to 'miss' further on, I'll try branching to RTS again)
FE 18 3B     INC $3B18,X
5E 18 3B     LSR $3B18,X
60               RTS

FF FF FF (Blank to help me seperate visually)

A3 05 (experimental stuff, ignore from here...)
AA
BD 80 3C
89 04
D0 01
60 (...to here)

4C 1B 3B (jump to 'miss')
60

Mikey

  • Karlabos
  • *
  • Posts: 30
    • View Profile
Re: My Dischord spell effect
« Reply #8 on: September 23, 2010, 08:34:55 PM »
Just tried something. Changing the BEQ to BNE makes it work, but it works on everything, even stuff you can't run from.

Is BIT #$04 the problem?

assassin

  • Bane of Retards
  • *
  • Posts: 1,033
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: My Dischord spell effect
« Reply #9 on: September 23, 2010, 10:00:54 PM »
please provide a paragraph, no code, explaining specifically what you want this special effect to do.

Mikey

  • Karlabos
  • *
  • Posts: 30
    • View Profile
Re: My Dischord spell effect
« Reply #10 on: September 24, 2010, 11:47:45 AM »
I want to check the target of the spell. If you can't run from the target, I want the spell to miss. If you CAN run, I want it to cut the target's level in half like Dischord does.

So it'll miss when used on a GtBehemoth, but hit an Evil Oscar\Great Malboro and halve it's level.

assassin

  • Bane of Retards
  • *
  • Posts: 1,033
  • space bears are not gentle!
    • View Profile
    • My Barren Webpage
Re: My Dischord spell effect
« Reply #11 on: September 24, 2010, 06:52:22 PM »
gar, i forgot about the "LSR" at C2/5CC7.  which means you'll want to do "BIT #$08" here instead.  and yes, you will want to use BNE.

Mikey

  • Karlabos
  • *
  • Posts: 30
    • View Profile
Re: My Dischord spell effect
« Reply #12 on: September 24, 2010, 08:36:11 PM »
Works perfectly! Thanks a lot.