.. _gradetable: 段位システム ============ | 定義ファイルはJSON形式で記述する。 | フォーマットチェックを通過しないJSONは読み込まれず、段位の表示が無効になる。 .. list-table:: :width: 100% :widths: 20 10 10 30 30 :header-rows: 1 * - 名前 - 型 - 省略 - 内容 - 備考 * - name - 文字列 - 不可 - 昇段システムの名称 - 識別用 * - addition_expression - 文字列 - 0 - 指定された式を評価し、昇段ポイントに加える(小数点以下は切り上げ) - | ``rpoint`` : 素点 | ``origin_point`` : 配給原点 * - table - 配列 - 不可 - 要素に昇段テーブルオブジェクトを持つ - 下記参照 昇段テーブル ------------ 段位の数だけ配列に含める。 | ``point`` に初期値と昇段に必要な昇段ポイントを指定する。 | ``demote`` フラグが ``false`` となっている段位は降段しない。 .. list-table:: :width: 100% :widths: 20 10 10 30 30 :header-rows: 1 * - 名前 - 型 - 省略 - 内容 - 備考 * - grade - 文字列 - 不可 - 段位名称 - * - point - 配列 - 不可 - 昇段ポイント初期値、昇段条件 - 昇段条件で指定された値を上回れば昇段 * - acquisition - 配列 - 不可 - 着順毎(1~4位)の昇段ポイント増減値 - 4つ指定 * - demote - bool - true - 降段フラグ - マイナス分はリセット(下限: 0) 計算方法 ++++++++ #. 昇段ポイントの初期値を 0 とする - 計算後の昇段ポイントは次回に持ち越す #. ゲーム終了時点の順位と素点から獲得ポイントを求める - 素点を ``addition_expression`` で評価する - 順位に応じた獲得ポイントを ``acquisition`` から取得する #. 昇段ポイントに獲得ポイントを加算する - 昇段条件に指定されたポイントを越えれば昇段 - 段位を1つ上げ、昇段ポイントを指定された初期値にセット - 昇段ポイントがマイナスになれば降段 - ``demote`` フラグが ``true`` なら段位を1つ下げ、昇段ポイントを指定された初期値にセット - ``demote`` フラグが ``false`` なら昇段ポイントを 0 にセット サンプル -------- .. code-block:: json :caption: 段位テーブルサンプル { "name": "雀魂", "addition_expression": "({rpoint}-{origin_point})/10", "table": [ { "grade": "初心★☆☆", "point": [0, 20 ], "acquisition": [35, 15, -5, -15 ], "demote": false }, { "grade": "初心★★☆", "point": [0, 80 ], "acquisition": [35, 15, -5, -15 ], "demote": false }, { "grade": "初心★★★", "point": [0, 200 ], "acquisition": [35, 15, -5, -15 ], "demote": false }, { "grade": "雀士★☆☆", "point": [300, 600 ], "acquisition": [55, 25, -5, -35 ], "demote": false }, { "grade": "雀士★★☆", "point": [400, 800 ], "acquisition": [55, 25, -5, -55 ] }, { "grade": "雀士★★★", "point": [500, 1000], "acquisition": [55, 25, -5, -75 ] }, { "grade": "雀傑★☆☆", "point": [600, 1200], "acquisition": [95, 45, -5, -95 ] }, { "grade": "雀傑★★☆", "point": [700, 1400], "acquisition": [95, 45, -5, -115] }, { "grade": "雀傑★★★", "point": [1000, 2000], "acquisition": [95, 45, -5, -135] }, { "grade": "雀豪★☆☆", "point": [1400, 2800], "acquisition": [125, 60, -5, -180] }, { "grade": "雀豪★★☆", "point": [1600, 3200], "acquisition": [125, 60, -5, -195] }, { "grade": "雀豪★★★", "point": [1800, 3600], "acquisition": [125, 60, -5, -210] }, { "grade": "雀聖★☆☆", "point": [2000, 4000], "acquisition": [135, 65, -5, -225] }, { "grade": "雀聖★★☆", "point": [3000, 6000], "acquisition": [135, 65, -5, -240] }, { "grade": "雀聖★★★", "point": [4500, 9000], "acquisition": [135, 65, -5, -255] }, { "grade": "魂天", "point": [0, 0], "acquisition": [0, 0, 0, 0], "demote": false } ] }