Giter Site home page Giter Site logo

crypto-zombies's Introduction

僵尸之谜

区块链 NFT 游戏,基于火币生态链 Heco 开发部署。

官方教程:https://cryptozombies.io/

视频教程:https://www.youtube.com/playlist?list=PLV16oVzL15MQDi5sPb1WEBm7m7U6-11s1

游戏地址:// TODO 待开发完成后部署到 Heco 主网

火币生态链 Heco 主网节点

合约 UML

编译步骤

# 合约编译
$ truffle compile

# 合约部署
$ truffle migrate

# 安装前端依赖
$ npm install

# 启动游戏
$ npm run serve

需求列表

基因

  • 每个僵尸有一个16位10进制数字作为基因
  • 最后一位数字为特殊标识
  • 僵尸名称为 string 字符串
  • 根据名称和随机数创建僵尸基因

拥有

  • 每人可以免费领养1只僵尸
  • 拥有超过1只僵尸之后需要购买僵尸
  • 主动攻击另1只僵尸并且胜利之后可以产生1只僵尸
  • 喂食10次之后会产生一只僵尸

对战

  • 主动发起对战一方胜率为70%
  • 胜利计数,失败计数
  • 每天只能主动攻击1次

喂食

  • 每天只能喂食1次
  • 喂食计次
  • 喂食每满10次后会产生1只僵尸

交易

  • 可以把自己的僵尸放到市场定价并销售
  • 可以购买市场的僵尸
  • 税金为0.0001HT,可以修改
  • 最低售价0.0001HT,可以修改
  • 购买僵尸的钱除税金后交给原主人

升级

  • 主动发起对战并胜利可以升级一次
  • 可以付费升级
  • 升级费为0.0001HT,可以修改

查询

  • 查询发送者僵尸数量
  • 查询发送者僵尸数组
  • 查询单个僵尸数据
  • 根据地址查询僵尸
  • 查询商店的僵尸
  • 根据ID查询僵尸

杂项

  • 名称,标识
  • 空函数
  • 提款

crypto-zombies's People

Contributors

onee-io avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.