Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[StellarLife] 全コマンドにわたってダイス目がズレている問題を修正(+α) #494

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
19aaff4
[StellarLife] Refactor: remove redundant `upcase`
Aug 15, 2021
6e75ba6
[StellarLife] Refactor: remove redundant comment
Aug 15, 2021
38a04b4
[StellarLife] お題表の番号をルールブックに準拠させる
Aug 15, 2021
b4ca469
[StellarLife] アバターアルファベット表の番号とダイス目を一致させる
Aug 15, 2021
896df0f
[StellarLife] 船名接頭辞表の番号とダイス目を一致させる
Aug 15, 2021
34605a6
[StellarLife] Refactor: remove unused method `get_table_by_1d10`
Aug 15, 2021
83a2963
[StellarLife] 船名前半表・船名後半表の番号とダイス目を一致させる
Aug 15, 2021
7f4b089
[StellarLife] お宝形容表の番号とダイス目を一致させる
Aug 15, 2021
d7ffbad
[StellarLife] お宝特徴表の番号とダイス目を一致させる
Aug 15, 2021
e31238e
[StellarLife] お宝外見表の番号とダイス目を一致させる
Aug 15, 2021
fbd0fd1
[StellarLife] お宝物品表の番号とダイス目を一致させる
Aug 15, 2021
acc54ca
[StellarLife] Refactor: remove unused method `get_table_by_d1010`
Aug 15, 2021
4a2fb70
[StellarLife] ランダムイベント表の挙動をルールブックに準拠させる
Aug 15, 2021
0ccd5c2
[StellarLife] ランダムNPC艦表の番号をルールブックに準拠させる
Aug 15, 2021
b03d53d
[StellarLife] Refactor: remove unused method `get_table_by_d510`
Aug 15, 2021
ab0c9f2
[StellarLife] Refactor: find table from dictionary
Aug 15, 2021
370f04c
[StellarLife] Add test that send invalid command
Aug 15, 2021
d210e1e
[StellarLife] 表の結果に余計なホワイトスペースがまぎれこんでいたのを削除
Aug 15, 2021
b950de8
[StellarLife] Refactor: register prefixes of table commands by hash keys
Aug 15, 2021
f2063c9
[StellarLife] 判定コマンドで出目 10 を 0 と読み、 1-9 がズレないように
Aug 15, 2021
5f1d3d6
[StellarLife] 判定の「1成功」の境界値にまつわるテストケースを追加
Aug 15, 2021
13ccc7d
[StellarLife] 判定の「2成功」の境界値にまつわるテストケースを追加
Aug 15, 2021
287f5b2
[StellarLife] 判定の修正値が正の数のテストケースを追加
Aug 15, 2021
8f56013
[StellarLife] Refactor: remove redundant `to_i`
Aug 15, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[StellarLife] お宝形容表の番号とダイス目を一致させる
  • Loading branch information
ViVi committed Aug 18, 2021
commit 7f4b089775a9f7e2a011bbfc948a2964a3b30122
10 changes: 4 additions & 6 deletions lib/bcdice/game_system/StellarLife.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ def eval_game_system_specific_command(command)
type = 'お宝特徴表'
result, total_n = get_treasurespec_table
when 'TRAT'
type = 'お宝形容表'
result, total_n = get_treasureappearance_table
return get_treasureappearance_table.roll(@randomizer)
when 'TRMT'
type = 'お宝外見表'
result, total_n = get_treasurematerial_table
Expand Down Expand Up @@ -343,9 +342,9 @@ def get_treasurespec_table
return get_table_by_d1010(table)
end

# お宝形容表
def get_treasureappearance_table
table = [
StellarLife2D10Table.new(
'お宝形容表',
'ブレスト(価値+3)', 'ホーリー(価値+1)', 'ワンダフル(価値+1)', 'シャイニング(価値+1)', 'スーパー(価値+1)', 'エクセレント(価値+1)', 'グロリアス(価値+1)', 'グレート(価値+1)', 'フラワリー(価値+1)', 'ミラクル(価値+2)',
'アース(価値+1)', 'サバンナ(価値+1)', 'マウンテン', 'リバー', 'フォレスト', 'ジャングル', 'デザート', 'ハイランド', 'レイク', 'オーシャン(価値+1)',
'スペース(価値+1)', 'コスモ', 'ワールド(価値+1)', 'ユニバーサル', 'スカイ', 'メテオール', 'コメット', 'ルナティック', 'プラネタリー', 'ステラー(価値+1)',
Expand All @@ -356,8 +355,7 @@ def get_treasureappearance_table
'宇宙(価値+1)', '乾坤', '世界', '森羅万象', '空の', '流星の', '隕石の', '月の(価値+1)', '惑星', '星の(価値+1)',
'大地の(価値+1)', '草原の', '山の', '川の', '森の', '林の', '砂漠の', '高地の', '湖の(価値+1)', '海の(価値+1)',
'祝福の(価値+2)', '神聖な(価値+1)', '不思議な(価値+1)', '輝かしい(価値+1)', '超(価値+1)', '素晴らしい(価値+1)', '栄光の(価値+1)', '偉大な(価値+1)', '華の(価値+1)', '奇跡の(価値+3)'
]
return get_table_by_d1010(table)
)
end

# お宝外見表
Expand Down
58 changes: 56 additions & 2 deletions test/data/StellarLife.toml
Original file line number Diff line number Diff line change
Expand Up @@ -271,13 +271,67 @@ rands = [
{ sides = 10, value = 2 },
]

[[ test ]]
game_system = "StellarLife"
input = "TRAT"
output = "お宝形容表(00) > ブレスト(価値+3)"
rands = [
{ sides = 10, value = 10 },
{ sides = 10, value = 10 },
]

[[ test ]]
game_system = "StellarLife"
input = "TRAT"
output = "お宝形容表(01) > ホーリー(価値+1)"
rands = [
{ sides = 10, value = 10 },
{ sides = 10, value = 1 },
]

[[ test ]]
game_system = "StellarLife"
input = "TRAT"
output = "お宝形容表(10) > アース(価値+1)"
rands = [
{ sides = 10, value = 1 },
{ sides = 10, value = 10 },
]

[[ test ]]
game_system = "StellarLife"
input = "TRAT"
output = "お宝形容表(36) > アバンギャルド"
rands = [
{ sides = 10, value = 4 },
{ sides = 10, value = 7 },
{ sides = 10, value = 3 },
{ sides = 10, value = 6 },
]

[[ test ]]
game_system = "StellarLife"
input = "TRAT"
output = "お宝形容表(89) > 海の(価値+1)"
rands = [
{ sides = 10, value = 8 },
{ sides = 10, value = 9 },
]

[[ test ]]
game_system = "StellarLife"
input = "TRAT"
output = "お宝形容表(98) > 華の(価値+1)"
rands = [
{ sides = 10, value = 9 },
{ sides = 10, value = 8 },
]

[[ test ]]
game_system = "StellarLife"
input = "TRAT"
output = "お宝形容表(99) > 奇跡の(価値+3)"
rands = [
{ sides = 10, value = 9 },
{ sides = 10, value = 9 },
]

[[ test ]]
Expand Down