Giter VIP home page Giter VIP logo

gacha-logic's Introduction

gacha-logic

Penerapan Weighted PRNG dengan studi kasus yakni Japanese Style Gacha. Untuk test, cukup ketik node index saja. Untuk versi simpel silahkan menuju ke branch simple-version.

Setting

Lokasi setting ada bersama dengan README ini.

Variable Tipe Data Deskripsi Contoh
r_rate Float Rate Rarity (Rare) dalam persentase "r_rate": 90
sr_rate Float Rate Rarity (S Rare) dalam persentase "sr_rate": 8.1
ssr_rate Float Rate Rarity (SS Rate) dalam persentase "ssr_rate": 1.9
event_rate Float Rate Rarity (EVENT Card) dalam persentase "event_rate": 2.5
roll Boolean Tulis true apabila ingin roll sebanyak 10x. Tulis false apabila ingin roll sebanyak 1x. "roll": true

Card Table

Card Table dalam project ini berada di /resources/card-list/. Sementara ini, list kartunya adalah:

ID Nama Idol Franchise Rarity Costume Event (Boolean)
IMCG001 Shibuya Rin THE IDOLM@STER: Cinderella Girls R Normal Costume False
IMCG002 Shibuya Rin THE IDOLM@STER: Cinderella Girls SR New Generation Series Costume False
IMCG003 Shibuya Rin THE IDOLM@STER: Cinderella Girls SSR Wonderful Magic Series Costume True
IMCG004 Uzuki Shimamura THE IDOLM@STER: Cinderella Girls R Normal Costume False
IMCG005 Uzuki Shimamura THE IDOLM@STER: Cinderella Girls SR New Generation Series Costume False
IMCG006 Uzuki Shimamura THE IDOLM@STER: Cinderella Girls SSR Wonderful Magic Series Costume True
IMCG007 Mio Honda THE IDOLM@STER: Cinderella Girls R Normal Costume False
IMCG008 Mio Honda THE IDOLM@STER: Cinderella Girls SR New Generation Series Costume True
IMCG009 Mio Honda THE IDOLM@STER: Cinderella Girls SSR Wonderful Magic Series Costume False
LLSP001 Honoka Kousaka Love Live! School Idol Project R Normal Costume False
LLSP002 Honoka Kousaka Love Live! School Idol Project SR Promo Costume True
LLSP003 Honoka Kousaka Love Live! School Idol Project SSR Future Style Costume False
LLSP004 Umi Sonoda Love Live! School Idol Project R Normal Costume False
LLSP005 Umi Sonoda Love Live! School Idol Project SR Promo Costume False
LLSP006 Umi Sonoda Love Live! School Idol Project SSR Wonderland Costume True
LLSP007 Kotori Minami Love Live! School Idol Project R Normal Costume False
LLSP008 Kotori Minami Love Live! School Idol Project SR Promo Costume False
LLSP009 Kotori Minami Love Live! School Idol Project SSR Sky Costume True
IMML001 Fuka Toyokawa THE IDOLM@STER: Million Live! R Normal Costume False
IMML002 Fuka Toyokawa THE IDOLM@STER: Million Live! SR Nurse Costume False
IMML003 Fuka Toyokawa THE IDOLM@STER: Million Live! SSR Real Idol Series Costume True
IMML004 Rio Momose THE IDOLM@STER: Million Live! R Normal Costume False
IMML005 Rio Momose THE IDOLM@STER: Million Live! SR Chef Costume False
IMML006 Rio Momose THE IDOLM@STER: Million Live! SSR Real Idol Series Costume True
IMML007 Takane Shijou THE IDOLM@STER: Million Live! R Normal Costume False
IMML008 Takane Shijou THE IDOLM@STER: Million Live! SR Pirate Costume True
IMML009 Takane Shijou THE IDOLM@STER: Million Live! SSR Real Idol Series Costume False
LLSS001 Tsushima Yoshiko Love Live! Sunshine!! R Normal Costume False
LLSS002 Tsushima Yoshiko Love Live! Sunshine!! SR Halloween Costume True
LLSS003 Tsushima Yoshiko Love Live! Sunshine!! SSR Punk Rock Style Costume False
LLSS004 Watanabe You Love Live! Sunshine!! R Normal Costume False
LLSS005 Watanabe You Love Live! Sunshine!! SR Wedding Costume False
LLSS006 Watanabe You Love Live! Sunshine!! SSR Wonderful Stories Costume True
LLSS007 Sakurachi Riko Love Live! Sunshine!! R Normal Costume False
LLSS008 Sakurachi Riko Love Live! Sunshine!! SR Promo Costume False
LLSS009 Sakurachi Riko Love Live! Sunshine!! SSR China Dress Costume True

Butuh kontributor untuk mengisi di /resources/card-list/, karena wawasan saya kurang luas di dunia per-idolan. Kalau bisa sekalian edit tablenya kalau nambahin idolnya yah. Untuk event terserah kalian.

Untuk franchise lain yang ingin anda tambahkan, silahkan buat file JSON baru dengan settingan yang sama dengan file yang lain. Kemudian masuk ke /resources/connector.js dan tambahkan sendiri case untuk kode franchise baru. Kodenya wajib 4 karakter saja.

(C) 2018 - Lingkarya Media Formasi - Ikramullah Latif (skymunn)

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.