Skip to content

outerspacesoph/nft_card_game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Avax Gods βš”οΈ Online Multiplayer Web3 Card Game

Game

Register & battle on the blockchain!

πŸ”Ή Register as a player with your crypto wallet πŸ’Έ

πŸ”Ή Create and join live battles 🌎

πŸ”Ή Choose your battleground β˜„οΈ

πŸ”Ή Battle other players in real-time βš”οΈ

Instructions on setting up the Web3 part of the project

  1. cd web3
  2. npx hardhat -> y β†’ typescript β†’ enter β†’ enter
  3. npm install @openzeppelin/contracts dotenv @nomiclabs/hardhat-ethers + Hardhat packages npm install --save-dev "hardhat@^2.12.0" "@nomicfoundation/hardhat-toolbox@^2.0.0"
  4. Install MetaMask (see below)
  5. Create a .env file and specify a PRIVATE_KEY variable.
  6. Copy the hardhat.config.ts file from this repository
  7. Copy the deploy.ts script from this repository
  8. Copy the AvaxGods.sol smart contract code from this repository
  9. Compile the contract by running the npx hardhat compile command
  10. Deploy the smart contract on the Fuji test network by running the npx hardhat run scripts/deploy.ts --network fuji command. Move the /artifacts/contracts/AVAXGods.json file to the /contract folder on the frontend. Copy the address of the deployed contract from the terminal and paste it into the /contract/index.js file of the frontend application.

Instructions on setting up Metamask & Fuji testnet

  1. Install Metamask in your browser: MetaMask

  2. Connect to the Fuji Testnet: Add the Avalanche Testnet C-Chain to your MetaMask

  3. Fund your wallet from the Avax Faucet

  4. Track transactions with the blockchain explorer for Avalanche Testnet: SNOWTRACE

Game Rules

⭐️PLEASE USE FULL SCREEN ON YOUR BROWSER FOR THE BEST DISPLAY⭐️

βœ… Each player starts with 10 Mana β‘©

-Your Mana and Health are located at the bottom of the screen

-Mana are the currency spent or gained when making moves within the game

-Defending never costs Mana, you will gain 3 Mana

-Attacking costs 3 Mana. Be careful! If your Mana is too low you won't be able to attack!

-Mana is separate from the health points

βœ… Each player also starts with 25 health-points 🟩

-When you are attacked, your health points are deducted by the attack value on the opposing player's card

-If you defend an attack, your defense value is subtracted from the opposing players attack value

βœ… Cards are randomly generated every turn πŸƒ

-Attack & defense values on the cards are randomly generated

-Cards with the same defense and attack point will cancel each other out

About

πŸ’Έ 🌎 β˜„οΈ βš”οΈ

https://nft-card-game-five.vercel.app/

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published