I currently have two weapons in my game that I would like to be unlockable, but when I unlock one weapon, the other unlocks as well.
The code for changeToAttack is this for lines 1-19

(The presets that I'm using to test this. Only weapon 1 unlocked is checked, yet both weapons work still)
Beneath is lines 176-182. I believe that the first section: weaponChoiceTable shows each weapon's ID, and the second section: weaponObjectTable shows the actual objects that the game is attributing. I have it cycling through the first 2 options.
What I guess I am wondering is how I can set both weapons to their own IDs considering they seem to be under the same one? This way they can both be unlocked under their own circumstances.
The code for changeToAttack is this for lines 1-19
I did try to make some changes to this code in attempt for the system to differentiate weapon 1 and weapon 2. It still works the same, which kinda just shows me that both are being unlocked at the same time under weapon 1.;; if you would like unlockable weapons,
;; that will be created with the b button
;; use this code.
;PlaySound #sfx_bonk
LDA weaponsUnlocked
BNE +canCreateWeapon
LDY weaponChoice
LDA weaponChoiceTable,y
AND #%00000001
BNE +canCreateWeapon
LDY weaponChoice
LDA weaponChoiceTable,y
AND #%00000010
BNE +canCreateWeapon
RTS
+canCreateWeapon
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;END UNLOCKABLE WEAPONS
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(The presets that I'm using to test this. Only weapon 1 unlocked is checked, yet both weapons work still)
Beneath is lines 176-182. I believe that the first section: weaponChoiceTable shows each weapon's ID, and the second section: weaponObjectTable shows the actual objects that the game is attributing. I have it cycling through the first 2 options.
weaponChoiceTable:
.db #%00000001, #%00000010, #%00000100, #%00001000
.db #%00010000, #%00100000, #%01000000, #%10000000
weaponObjectTable:
.db #$01, #$02, #$03, #$03, #$03, #$03, #$03, #$03
What I guess I am wondering is how I can set both weapons to their own IDs considering they seem to be under the same one? This way they can both be unlocked under their own circumstances.