Giter Club home page Giter Club logo

genshin_panel's Introduction

《原神》面板计算器

npm

模拟角色、装备、圣遗物的搭配,得出最终面板。

注:最终面板与实际面板有出入,这是因为游戏中的圣遗物只保留到小数点后一位,实际上这之后的小数位数并不是零。
最终结果仅有非常小的差别,可以忽略不计

安装

npm install genshin_panel

构建角色与武器

const genshin = require("genshin_panel");

// 刻晴,80级,已突破,0命之座
let keqing = new genshin.Character("keqing", 80, true, 0);
// 可以使用中文或英文
let keqing = new genshin.Character("刻晴", 80, true, 0);

// 黑剑,90级,未突破,精炼2(初始为精炼1)
let heijian = new genshin.Weapon("heijian", 90, false, 2);
// 同样可以使用中文或英文,英文应当全部小写且没有空格
let heijian = new genshin.Weapon("theblacksword", 90, false, 2);

构建圣遗物

使用ArtifactBuilder构建圣遗物

const genshin = require("genshin_panel");

let art1 = new genshin.ArtifactBuilder()
    .setName("thunderingFury")      // 如雷的盛怒
    .position("flower")             // 生之花
    .mainTag("lifeStatic", 4780)
    .tag("critical", 0.086)
    .tag("elementalMastery", 21)
    .tag("attackPercentage", 0.099)
    .tag("defendStatic", 39)
    .build()
;

构建最终面板

const genshin = require("genshin_panel");

let attribute = new genshin.AttributeBuilder()
    .character(keqing)
    .weapon(weapon)
    .artifact(art1)
    .artifact(art2)
    .artifact(art3)
    .artifact(art4)
    .artifact(art5)
    .build()
;

genshin_panel's People

Contributors

wormtql 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.