Excluding Weapons from Use With Genji Glove
#17
I'm starting on the equip screen with this, and worrying about Battle Equipment Changes and Optimize later. I have the code partially working, but I need some advice. Right now, it's correctly checking if the EQUIPPED weapon is compatible with Dual Wielding. However, it's not checking the list of items for compatibility. Let me illustrate with an example.

Example:
Weapon 1: Dirk - Compatible
Weapon 2: Imp Halberd - NOT Compatible
(Character has Genji Glove Equipped)

Scenario 1: Both hands empty, or one with a shield
Result: All weapons available. CORRECT

Scenario 2: One hand holds Imp Halberd
Result: Cannot equip another weapon. CORRECT

Scenario 3: One hand holds Dirk
Result: All weapons available. INCORRECT. This needs to only make weapons compatible with Dual Wielding available.

Any ideas on how to check the list of equippable weapons for their properties? Here is the code I have so far. I have plenty of free space thanks to Novalia's optimization. (http://www.romhacking.net/documents/736/)

Code:
;Determine if gear list entry is disabled    
    C3/9A6F: A5 5F     LDA $5F Check Slot
    C3/9A71: C9 02     CMP #$02 Head or Body?
    C3/9A73: B0 3B     BCS $9AB1 If so, jump to 9AB1
    C3/9A75: C9 01     CMP #$01 L-Hand/Relic 2?
    C3/9A77: F0 05     BEQ $C39A7E if no, branch to R-Hand
   
;Fork: For L-Hand
    C3/9A79: B9 20 00   LDA $0020,Y Check Left Hand's Item
    C3/9A7C: 80 03 BRA $C39A81 skip next line

;Fork: For R-Hand
    C3/9A7E: B9 1E 00 LDA $001E,Y Check Right Hand's Item
    C3/9A81: C9 FF     CMP #$FF is it empty?
    C3/9A83: F0 1F     BEQ $9AA4 if so, enable
    C3/9A85: 20 21 83   JSR $8321 compute index
    C3/9A88: AE 34 21   LDX $2134 load it
    C3/9A8B: BF 00 50 D8 LDA $D85000,X Check properties
    C3/9A8F: 29 07     AND #$07 Get Class
    C3/9A91: C9 03     CMP #$03 Is it a Shield?
    C3/9A93: F0 11     BEQ $9AA6 if so, jump to duplicate item check
    C3/9A95: AD D8 11   LDA $11D8 Check character properties
    C3/9A98: 29 10     AND #$10 check for "allow weapon in each hand"
    C3/9A9A: F0 0A     BEQ $9A99 If not, branch to duplicate check
    C3/9A9C: BF 13 50 D8 LDA $D85013,X Check Weapon Properties
    C3/9AA0: 29 04 AND #$04 Is Dual Wield enabled?
    C3/9AA2: F0 02 BEQ $C39AA6 If not, branch to duplicate check
    C3/9AA4: 38       SEC
    C3/9AA5: 60       RTS

;Fork: Duplicate Check
    C3/9AA6: BF 00 50 D8 LDA $D85000,X (Load item type X)
    C3/9AAA: 29 07     AND #$07 zero out upper nibble
    C3/9AAC: C5 F6     CMP $F6 ????
    C3/9AAE: F0 2E     BEQ $9AD1 if the above line is true, exit function
    C3/9AB0: 38       SEC
    C3/9AB1: 60       RTS
    C3/9AB2-C3/9AD0  EA... NOPed Out

Projects:
FFVI: Divergent Paths (Completed) - a complete storyline and gameplay hack of FF6 that adds Leo as a playable character
Reply


Messages In This Thread
RE: Excluding Weapons from Use With Genji Glove - by PowerPanda - 08-22-2018, 11:48 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Frame Job - Making Weapons show after a strike C-Dude 4 3,740 01-23-2023, 08:55 PM
Last Post: Lightning
  Genji Glove glitch doofenH 2 2,379 05-11-2022, 06:58 AM
Last Post: doofenH
  Weapons teaching Lore skills? FF6Fanatic 5 6,467 07-11-2016, 03:58 PM
Last Post: FF6Fanatic
  Random Spellcast for Weapons lopolly 2 2,993 12-04-2013, 01:43 AM
Last Post: lopolly
  Custom weapons to replace brushes? ribbits 3 3,664 07-20-2013, 06:35 PM
Last Post: madsiur
  Disabling Auto-Optimize/Remove on Genji Glove/Gauntlet Riketz 8 11,407 12-23-2012, 09:59 PM
Last Post: Riketz
  Genji or Gauntlet specific weapons Royaken 4 5,347 03-22-2012, 07:39 PM
Last Post: madsiur
  Weapons.... Oh boy... Royaken 5 7,166 03-20-2012, 07:55 PM
Last Post: madsiur
  Teaching magic spells through weapons Overswarm 25 31,990 12-10-2011, 11:24 AM
Last Post: Angelo26
  More Than 93 Weapons Animations? Zeemis 12 13,572 08-05-2011, 03:07 PM
Last Post: SSJ Rick

Forum Jump:


Users browsing this thread: 1 Guest(s)