Skip to content

Instantly share code, notes, and snippets.

@you21979
Created September 23, 2016 03:25
Show Gist options
  • Save you21979/1d312caf84f0a649e5ec7424fcb6baa2 to your computer and use it in GitHub Desktop.
Save you21979/1d312caf84f0a649e5ec7424fcb6baa2 to your computer and use it in GitHub Desktop.
振り分け抽選方式
ガチャのロジック
レジェンド、エピック、アンコモン、コモンなどに等級を分ける
それぞれ1、5、40、54と確率を割り振る
乱数を100でmodをとり、どの等級が当たるか確定させる(振り分け抽選)
次に等級に存在するカード枚数で乱数をmodする
その結果で決まる
この方法の良いところは重み付け方式よりもガチャの確率がわかりやすいところであるしデバッグも楽である
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment