posted an update —

;; Ran out of time while updating the submission, so here's a quick primer on what's fully ;; functional right now in bitgear. You can test this by pulling the code via github and running ;; these commands in clarity console.

;; add byte-fighters to the list of "allowed" collections to play in bitgear (contract-call? .player-character-v0 add-collection .byte-fighters)

;; mint a NFT to play as your avatar (contract-call? .byte-fighters mint)

;; create your character! make sure to give it a good name ;) (contract-call? .player-character-v0 roll-character u"Rozar" .byte-fighters u1000)

;; look at your shiny new character (might need to change the principal) (contract-call? .player-character-v0 get-character 'ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM)

;; get some bitgear to equip to your character (contract-call? .bitgear-genesis claim u0)

;; initialization call (couldn't find a way to have this happen automagically) (contract-call? .equipment-v0 initialize-equipment)

;; test out the is-gear-equipped check in a failure case (contract-call? .equipment-v0 is-gear-equipped 'ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM) ;; fails

;; EQUIP GEAR :D (FYI this isn't limited to just the bitgear collection- other NFT collections can ;; make their own NFTs "equipment" by simply creating a "gear-slots" contract which defines a ;; mapping between the NFTs and what slots they are allowed to be equipped to- e.g. head, ;; main-hand, wrist, etc.) (contract-call? .equipment-v0 equip-gear-off-hand .player-character-v0 .bitgear-genesis u0 .bitgear-genesis-slots)

;; check our yourself! looking good (contract-call? .equipment-v0 is-gear-equipped 'ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM)

;; QUESTS! Dun, dun dun daaa...

;; this is the prep-work that in a future state will be managed by the DAO/dungeon-master ;; grabbing a NFT from the og contract so we can toss it into a rewards vault (contract-call? .bitgear-genesis claim u1)

;; unequip the gear to test out authorization (contract-call? .equipment-v0 unequip-gear-off-hand)

;; questing fails, need to have bitgear equipped to quest! (did i make liquid staking? jk) (contract-call? .woodlands-v0 quest u1) ;; fails

;; ok, put equipment back on, we want to quest! (contract-call? .equipment-v0 equip-gear-off-hand .player-character-v0 .bitgear-genesis u0 .bitgear-genesis-slots)

;; not so fast! the "woodlands" is not the active dungeon-master so it can't issue rewards. ;; this is an exciting part of the whole rewards issuance idea (contract-call? .woodlands-v0 quest u1) ;; fails

;; make the woodlands the dungeon-master ;; in a future state, the DAO would manage this transfer of control, or just be the dungeon master itself and facilitate transactions. work in progress for sure. (contract-call? .bitgear-genesis bestow .woodlands-v0)

;; one problem left- NFT reward not yet deposited into the reward vault ;; quest fails, unable to find the reward (contract-call? .woodlands-v0 quest u1) ;; fails

;; ok, drop off the reward in the vault so it's free to get claimed (contract-call? .bitgear-genesis transfer u1 'ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM .bitgear-genesis)

;; ah picked the wrong uint! gotta search harder to find it ;; i hope this encourages people to use the block-explorer ;; and review transactions to find rewards (contract-call? .woodlands-v0 quest u2) ;; fails

;; Quest Completed! (contract-call? .woodlands-v0 quest u1)

;; this was a basic end-to-end process to see how the bitgear project works. ;; i hope the possibilities you see here excite you like they do for me. ;; thanks! -rozar.btc

Log in or sign up for Devpost to join the conversation.