bcdice 3.0.0.pre.alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.editorconfig +21 -0
- data/.github/.codecov.yaml +10 -0
- data/.github/workflows/coverage.yaml +21 -0
- data/.github/workflows/lint.yaml +13 -0
- data/.github/workflows/test.yml +20 -0
- data/.gitignore +14 -0
- data/.rubocop.yml +96 -0
- data/.rubocop_todo.yml +113 -0
- data/CHANGELOG.md +868 -0
- data/Gemfile +11 -0
- data/LICENSE +29 -0
- data/README.md +38 -0
- data/ROADMAP.md +30 -0
- data/Rakefile +118 -0
- data/bcdice.gemspec +27 -0
- data/bin/repl.rb +21 -0
- data/docs/README.txt +2028 -0
- data/docs/dicebot_sort_key.md +72 -0
- data/docs/how_to_make_dicebot.md +453 -0
- data/lib/bcdice.rb +8 -0
- data/lib/bcdice/arithmetic_evaluator.rb +167 -0
- data/lib/bcdice/base.rb +423 -0
- data/lib/bcdice/command_parser.rb +242 -0
- data/lib/bcdice/common_command.rb +23 -0
- data/lib/bcdice/common_command/add_dice.rb +54 -0
- data/lib/bcdice/common_command/add_dice/node.rb +488 -0
- data/lib/bcdice/common_command/add_dice/parser.rb +282 -0
- data/lib/bcdice/common_command/add_dice/randomizer.rb +48 -0
- data/lib/bcdice/common_command/barabara_dice.rb +57 -0
- data/lib/bcdice/common_command/calc.rb +39 -0
- data/lib/bcdice/common_command/choice.rb +35 -0
- data/lib/bcdice/common_command/d66_dice.rb +63 -0
- data/lib/bcdice/common_command/reroll_dice.rb +190 -0
- data/lib/bcdice/common_command/upper_dice.rb +165 -0
- data/lib/bcdice/common_command/version.rb +26 -0
- data/lib/bcdice/dice_table.rb +8 -0
- data/lib/bcdice/dice_table/chain_table.rb +33 -0
- data/lib/bcdice/dice_table/d66_grid_table.rb +26 -0
- data/lib/bcdice/dice_table/d66_range_table.rb +26 -0
- data/lib/bcdice/dice_table/d66_table.rb +34 -0
- data/lib/bcdice/dice_table/range_table.rb +267 -0
- data/lib/bcdice/dice_table/roll_result.rb +43 -0
- data/lib/bcdice/dice_table/sai_fic_skill_table.rb +32 -0
- data/lib/bcdice/dice_table/table.rb +35 -0
- data/lib/bcdice/enum.rb +15 -0
- data/lib/bcdice/format.rb +36 -0
- data/lib/bcdice/game_system.rb +187 -0
- data/lib/bcdice/game_system/AFF2e.rb +141 -0
- data/lib/bcdice/game_system/AceKillerGene.rb +55 -0
- data/lib/bcdice/game_system/Airgetlamh.rb +117 -0
- data/lib/bcdice/game_system/Alsetto.rb +124 -0
- data/lib/bcdice/game_system/Alshard.rb +27 -0
- data/lib/bcdice/game_system/AlterRaise.rb +282 -0
- data/lib/bcdice/game_system/Amadeus.rb +622 -0
- data/lib/bcdice/game_system/Amadeus_Korean.rb +501 -0
- data/lib/bcdice/game_system/AnimaAnimus.rb +96 -0
- data/lib/bcdice/game_system/Arianrhod.rb +50 -0
- data/lib/bcdice/game_system/ArsMagica.rb +149 -0
- data/lib/bcdice/game_system/Avandner.rb +101 -0
- data/lib/bcdice/game_system/BBN.rb +143 -0
- data/lib/bcdice/game_system/BadLife.rb +435 -0
- data/lib/bcdice/game_system/BarnaKronika.rb +188 -0
- data/lib/bcdice/game_system/BattleTech.rb +530 -0
- data/lib/bcdice/game_system/BeastBindTrinity.rb +348 -0
- data/lib/bcdice/game_system/BeginningIdol.rb +2527 -0
- data/lib/bcdice/game_system/BeginningIdol_Korean.rb +2378 -0
- data/lib/bcdice/game_system/BladeOfArcana.rb +252 -0
- data/lib/bcdice/game_system/BlindMythos.rb +460 -0
- data/lib/bcdice/game_system/BloodCrusade.rb +423 -0
- data/lib/bcdice/game_system/BloodMoon.rb +213 -0
- data/lib/bcdice/game_system/CardRanker.rb +249 -0
- data/lib/bcdice/game_system/ChaosFlare.rb +181 -0
- data/lib/bcdice/game_system/Chill.rb +163 -0
- data/lib/bcdice/game_system/Chill3.rb +52 -0
- data/lib/bcdice/game_system/CodeLayerd.rb +132 -0
- data/lib/bcdice/game_system/ColossalHunter.rb +569 -0
- data/lib/bcdice/game_system/CrashWorld.rb +81 -0
- data/lib/bcdice/game_system/Cthulhu.rb +252 -0
- data/lib/bcdice/game_system/Cthulhu7th.rb +767 -0
- data/lib/bcdice/game_system/Cthulhu7th_ChineseTraditional.rb +386 -0
- data/lib/bcdice/game_system/Cthulhu7th_Korean.rb +383 -0
- data/lib/bcdice/game_system/CthulhuTech.rb +263 -0
- data/lib/bcdice/game_system/Cthulhu_ChineseTraditional.rb +243 -0
- data/lib/bcdice/game_system/Cthulhu_Korean.rb +240 -0
- data/lib/bcdice/game_system/DarkBlaze.rb +207 -0
- data/lib/bcdice/game_system/DarkDaysDrive.rb +425 -0
- data/lib/bcdice/game_system/DarkSouls.rb +91 -0
- data/lib/bcdice/game_system/DeadlineHeroes.rb +583 -0
- data/lib/bcdice/game_system/DemonParasite.rb +524 -0
- data/lib/bcdice/game_system/DetatokoSaga.rb +310 -0
- data/lib/bcdice/game_system/DetatokoSaga_Korean.rb +310 -0
- data/lib/bcdice/game_system/DiceBot.rb +17 -0
- data/lib/bcdice/game_system/DiceOfTheDead.rb +111 -0
- data/lib/bcdice/game_system/DoubleCross.rb +373 -0
- data/lib/bcdice/game_system/DoubleCross_Korean.rb +371 -0
- data/lib/bcdice/game_system/Dracurouge.rb +1856 -0
- data/lib/bcdice/game_system/Dracurouge_Korean.rb +310 -0
- data/lib/bcdice/game_system/DungeonsAndDragons.rb +19 -0
- data/lib/bcdice/game_system/EarthDawn.rb +225 -0
- data/lib/bcdice/game_system/EarthDawn3.rb +275 -0
- data/lib/bcdice/game_system/EarthDawn4.rb +272 -0
- data/lib/bcdice/game_system/EclipsePhase.rb +51 -0
- data/lib/bcdice/game_system/Elric.rb +36 -0
- data/lib/bcdice/game_system/Elysion.rb +1213 -0
- data/lib/bcdice/game_system/EmbryoMachine.rb +227 -0
- data/lib/bcdice/game_system/EndBreaker.rb +132 -0
- data/lib/bcdice/game_system/EtrianOdysseySRS.rb +27 -0
- data/lib/bcdice/game_system/Fiasco.rb +123 -0
- data/lib/bcdice/game_system/Fiasco_Korean.rb +122 -0
- data/lib/bcdice/game_system/FilledWith.rb +1543 -0
- data/lib/bcdice/game_system/FullMetalPanic.rb +27 -0
- data/lib/bcdice/game_system/FutariSousa.rb +994 -0
- data/lib/bcdice/game_system/FutariSousa_Korean.rb +994 -0
- data/lib/bcdice/game_system/Garako.rb +559 -0
- data/lib/bcdice/game_system/GardenOrder.rb +451 -0
- data/lib/bcdice/game_system/GehennaAn.rb +136 -0
- data/lib/bcdice/game_system/GeishaGirlwithKatana.rb +120 -0
- data/lib/bcdice/game_system/GoblinSlayer.rb +168 -0
- data/lib/bcdice/game_system/GoldenSkyStories.rb +77 -0
- data/lib/bcdice/game_system/Gorilla.rb +44 -0
- data/lib/bcdice/game_system/GranCrest.rb +518 -0
- data/lib/bcdice/game_system/Gundog.rb +52 -0
- data/lib/bcdice/game_system/GundogRevised.rb +294 -0
- data/lib/bcdice/game_system/GundogZero.rb +261 -0
- data/lib/bcdice/game_system/Gurps.rb +403 -0
- data/lib/bcdice/game_system/GurpsFW.rb +2330 -0
- data/lib/bcdice/game_system/HarnMaster.rb +208 -0
- data/lib/bcdice/game_system/HatsuneMiku.rb +706 -0
- data/lib/bcdice/game_system/Hieizan.rb +48 -0
- data/lib/bcdice/game_system/HouraiGakuen.rb +270 -0
- data/lib/bcdice/game_system/HuntersMoon.rb +503 -0
- data/lib/bcdice/game_system/Illusio.rb +89 -0
- data/lib/bcdice/game_system/InfiniteFantasia.rb +51 -0
- data/lib/bcdice/game_system/Insane.rb +822 -0
- data/lib/bcdice/game_system/Insane_Korean.rb +773 -0
- data/lib/bcdice/game_system/IthaWenUa.rb +38 -0
- data/lib/bcdice/game_system/JamesBond.rb +45 -0
- data/lib/bcdice/game_system/Kamigakari.rb +394 -0
- data/lib/bcdice/game_system/Kamigakari_Korean.rb +428 -0
- data/lib/bcdice/game_system/KanColle.rb +938 -0
- data/lib/bcdice/game_system/KemonoNoMori.rb +258 -0
- data/lib/bcdice/game_system/KillDeathBusiness.rb +1420 -0
- data/lib/bcdice/game_system/KillDeathBusiness_Korean.rb +1510 -0
- data/lib/bcdice/game_system/KurayamiCrying.rb +49 -0
- data/lib/bcdice/game_system/LiveraDoll.rb +375 -0
- data/lib/bcdice/game_system/LogHorizon.rb +3567 -0
- data/lib/bcdice/game_system/LogHorizon_Korean.rb +1407 -0
- data/lib/bcdice/game_system/LostRecord.rb +30 -0
- data/lib/bcdice/game_system/LostRoyal.rb +242 -0
- data/lib/bcdice/game_system/MagicaLogia.rb +1148 -0
- data/lib/bcdice/game_system/MeikyuDays.rb +415 -0
- data/lib/bcdice/game_system/MeikyuKingdom.rb +466 -0
- data/lib/bcdice/game_system/MeikyuKingdomBasic.rb +269 -0
- data/lib/bcdice/game_system/MetalHead.rb +249 -0
- data/lib/bcdice/game_system/MetalHeadExtream.rb +917 -0
- data/lib/bcdice/game_system/MetallicGuardian.rb +31 -0
- data/lib/bcdice/game_system/MonotoneMuseum.rb +354 -0
- data/lib/bcdice/game_system/MonotoneMuseum_Korean.rb +304 -0
- data/lib/bcdice/game_system/Nechronica.rb +211 -0
- data/lib/bcdice/game_system/Nechronica_Korean.rb +160 -0
- data/lib/bcdice/game_system/NeverCloud.rb +74 -0
- data/lib/bcdice/game_system/NightWizard.rb +231 -0
- data/lib/bcdice/game_system/NightWizard3rd.rb +24 -0
- data/lib/bcdice/game_system/NightmareHunterDeep.rb +117 -0
- data/lib/bcdice/game_system/NinjaSlayer.rb +274 -0
- data/lib/bcdice/game_system/NjslyrBattle.rb +54 -0
- data/lib/bcdice/game_system/Nuekagami.rb +293 -0
- data/lib/bcdice/game_system/OneWayHeroics.rb +134 -0
- data/lib/bcdice/game_system/OracleEngine.rb +265 -0
- data/lib/bcdice/game_system/OrgaRain.rb +77 -0
- data/lib/bcdice/game_system/Oukahoushin3rd.rb +162 -0
- data/lib/bcdice/game_system/Paradiso.rb +323 -0
- data/lib/bcdice/game_system/Paranoia.rb +64 -0
- data/lib/bcdice/game_system/ParanoiaRebooted.rb +109 -0
- data/lib/bcdice/game_system/ParasiteBlood.rb +231 -0
- data/lib/bcdice/game_system/Pathfinder.rb +21 -0
- data/lib/bcdice/game_system/Peekaboo.rb +324 -0
- data/lib/bcdice/game_system/Pendragon.rb +39 -0
- data/lib/bcdice/game_system/PhantasmAdventure.rb +73 -0
- data/lib/bcdice/game_system/Postman.rb +185 -0
- data/lib/bcdice/game_system/PulpCthulhu.rb +184 -0
- data/lib/bcdice/game_system/Raisondetre.rb +171 -0
- data/lib/bcdice/game_system/RecordOfLodossWar.rb +58 -0
- data/lib/bcdice/game_system/RecordOfSteam.rb +149 -0
- data/lib/bcdice/game_system/RokumonSekai2.rb +110 -0
- data/lib/bcdice/game_system/RoleMaster.rb +24 -0
- data/lib/bcdice/game_system/RuneQuest.rb +47 -0
- data/lib/bcdice/game_system/RyuTuber.rb +266 -0
- data/lib/bcdice/game_system/Ryutama.rb +199 -0
- data/lib/bcdice/game_system/SRS.rb +348 -0
- data/lib/bcdice/game_system/SamsaraBallad.rb +111 -0
- data/lib/bcdice/game_system/Satasupe.rb +1173 -0
- data/lib/bcdice/game_system/ScreamHighSchool.rb +128 -0
- data/lib/bcdice/game_system/SevenFortressMobius.rb +34 -0
- data/lib/bcdice/game_system/ShadowRun.rb +26 -0
- data/lib/bcdice/game_system/ShadowRun4.rb +49 -0
- data/lib/bcdice/game_system/ShadowRun5.rb +80 -0
- data/lib/bcdice/game_system/SharedFantasia.rb +69 -0
- data/lib/bcdice/game_system/ShinMegamiTenseiKakuseihen.rb +85 -0
- data/lib/bcdice/game_system/ShinkuuGakuen.rb +506 -0
- data/lib/bcdice/game_system/ShinobiGami.rb +680 -0
- data/lib/bcdice/game_system/ShoujoTenrankai.rb +677 -0
- data/lib/bcdice/game_system/Skynauts.rb +324 -0
- data/lib/bcdice/game_system/SteamPunkers.rb +485 -0
- data/lib/bcdice/game_system/StellarKnights.rb +856 -0
- data/lib/bcdice/game_system/SterileLife.rb +452 -0
- data/lib/bcdice/game_system/StrangerOfSwordCity.rb +103 -0
- data/lib/bcdice/game_system/StratoShout.rb +316 -0
- data/lib/bcdice/game_system/StratoShout_Korean.rb +314 -0
- data/lib/bcdice/game_system/Strave.rb +223 -0
- data/lib/bcdice/game_system/SwordWorld.rb +491 -0
- data/lib/bcdice/game_system/SwordWorld2_0.rb +295 -0
- data/lib/bcdice/game_system/SwordWorld2_5.rb +121 -0
- data/lib/bcdice/game_system/TherapieSein.rb +93 -0
- data/lib/bcdice/game_system/TokumeiTenkousei.rb +96 -0
- data/lib/bcdice/game_system/TokyoGhostResearch.rb +122 -0
- data/lib/bcdice/game_system/TokyoNova.rb +19 -0
- data/lib/bcdice/game_system/Torg.rb +364 -0
- data/lib/bcdice/game_system/Torg1_5.rb +139 -0
- data/lib/bcdice/game_system/TorgEternity.rb +414 -0
- data/lib/bcdice/game_system/TrinitySeven.rb +364 -0
- data/lib/bcdice/game_system/TunnelsAndTrolls.rb +287 -0
- data/lib/bcdice/game_system/TwilightGunsmoke.rb +527 -0
- data/lib/bcdice/game_system/Utakaze.rb +153 -0
- data/lib/bcdice/game_system/VampireTheMasquerade5th.rb +132 -0
- data/lib/bcdice/game_system/Villaciel.rb +555 -0
- data/lib/bcdice/game_system/WARPS.rb +33 -0
- data/lib/bcdice/game_system/WaresBlade.rb +34 -0
- data/lib/bcdice/game_system/Warhammer.rb +336 -0
- data/lib/bcdice/game_system/WitchQuest.rb +275 -0
- data/lib/bcdice/game_system/WorldOfDarkness.rb +135 -0
- data/lib/bcdice/game_system/YankeeYogSothoth.rb +440 -0
- data/lib/bcdice/game_system/YearZeroEngine.rb +134 -0
- data/lib/bcdice/game_system/ZettaiReido.rb +142 -0
- data/lib/bcdice/game_system/meikyu_kingdom/item_table.rb +383 -0
- data/lib/bcdice/game_system/meikyu_kingdom/kingdom_name_table.rb +89 -0
- data/lib/bcdice/game_system/meikyu_kingdom/landscape_table.rb +196 -0
- data/lib/bcdice/game_system/meikyu_kingdom/name_tables.rb +223 -0
- data/lib/bcdice/game_system/meikyu_kingdom/placename_table.rb +214 -0
- data/lib/bcdice/game_system/meikyu_kingdom/tables.rb +610 -0
- data/lib/bcdice/game_system/meikyu_kingdom/word_table.rb +117 -0
- data/lib/bcdice/game_system/meikyu_kingdom_basic/item_table.rb +380 -0
- data/lib/bcdice/game_system/meikyu_kingdom_basic/kingdom_table.rb +184 -0
- data/lib/bcdice/game_system/meikyu_kingdom_basic/name_table.rb +417 -0
- data/lib/bcdice/game_system/meikyu_kingdom_basic/table.rb +912 -0
- data/lib/bcdice/game_system/meikyu_kingdom_basic/word_table.rb +121 -0
- data/lib/bcdice/game_system/one_way_heroics/dungeon_table.rb +67 -0
- data/lib/bcdice/game_system/one_way_heroics/random_event_table.rb +166 -0
- data/lib/bcdice/game_system/one_way_heroics/tables.rb +668 -0
- data/lib/bcdice/loader.rb +37 -0
- data/lib/bcdice/normalize.rb +38 -0
- data/lib/bcdice/preprocessor.rb +87 -0
- data/lib/bcdice/randomizer.rb +137 -0
- data/lib/bcdice/repl.rb +155 -0
- data/lib/bcdice/user_defined_dice_table.rb +153 -0
- data/lib/bcdice/version.rb +3 -0
- metadata +304 -0
@@ -0,0 +1,128 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'bcdice/game_system/GardenOrder'
|
4
|
+
|
5
|
+
module BCDice
|
6
|
+
module GameSystem
|
7
|
+
class ScreamHighSchool < GardenOrder
|
8
|
+
# ゲームシステムの識別子
|
9
|
+
ID = 'ScreamHighSchool'
|
10
|
+
|
11
|
+
# ゲームシステム名
|
12
|
+
NAME = 'スクリームハイスクール'
|
13
|
+
|
14
|
+
# ゲームシステム名の読みがな
|
15
|
+
SORT_KEY = 'すくりいむはいすくうる'
|
16
|
+
|
17
|
+
# ダイスボットの使い方
|
18
|
+
HELP_MESSAGE = <<~INFO_MESSAGE_TEXT
|
19
|
+
・基本判定
|
20
|
+
SHx/y@z x:成功率、y:連続攻撃回数(省略可)、z:クリティカル値(省略可)
|
21
|
+
(連続攻撃では1回の判定のみが実施されます)
|
22
|
+
例)SH55 SH(40-20) SH100/2 SH70@10 SH155/3@44
|
23
|
+
・感情判定
|
24
|
+
EMx@z x:成功率、z:クリティカル値(省略可)
|
25
|
+
例)EM50 EM50@15
|
26
|
+
・性格傾向判定
|
27
|
+
TRx@z x:成功率、z:クリティカル値(省略可)
|
28
|
+
例)TR60 TR60@15
|
29
|
+
・恐怖判定
|
30
|
+
FEx@z x:成功率、z:クリティカル値(省略可)
|
31
|
+
例)FE70 FE70@15
|
32
|
+
・負傷表
|
33
|
+
DCxxy
|
34
|
+
xx:属性(切断:SL,銃弾:BL,衝撃:IM,灼熱:BR,冷却:RF,電撃:EL)
|
35
|
+
y:ダメージ
|
36
|
+
例)DCSL7 DCEL22
|
37
|
+
INFO_MESSAGE_TEXT
|
38
|
+
|
39
|
+
register_prefix([
|
40
|
+
'(SH|SHS)(\-?\d+)(\/\d+)?(@\d+)?',
|
41
|
+
'(EM|TR|FE)(\-?\d+)(@\d+)?',
|
42
|
+
'DC(SL|BL|IM|BR|RF|EL).+'
|
43
|
+
])
|
44
|
+
|
45
|
+
def eval_game_system_specific_command(command)
|
46
|
+
case command
|
47
|
+
when /(EM|TR|FE)(\-?\d+)(@(\d+))?/i
|
48
|
+
command_type = Regexp.last_match(1).upcase
|
49
|
+
success_rate = Regexp.last_match(2).to_i
|
50
|
+
critical_border_text = Regexp.last_match(4)
|
51
|
+
critical_border = get_critical_border(critical_border_text, success_rate)
|
52
|
+
|
53
|
+
return check_roll_sh(success_rate, critical_border, command_type)
|
54
|
+
when %r{(SH|SHS)(\-?\d+)(/(\d+))?(@(\d+))?}i
|
55
|
+
success_rate = Regexp.last_match(2).to_i
|
56
|
+
repeat_count = (Regexp.last_match(4) || 1).to_i
|
57
|
+
critical_border_text = Regexp.last_match(6)
|
58
|
+
critical_border = get_critical_border(critical_border_text, success_rate)
|
59
|
+
|
60
|
+
return check_roll_repeat_attack(success_rate, repeat_count, critical_border)
|
61
|
+
when /^DC(SL|BL|IM|BR|RF|EL)(\d+)/i
|
62
|
+
type = Regexp.last_match(1)
|
63
|
+
damage_value = Regexp.last_match(2).to_i
|
64
|
+
return look_up_damage_chart(type, damage_value)
|
65
|
+
end
|
66
|
+
|
67
|
+
return nil
|
68
|
+
end
|
69
|
+
|
70
|
+
def check_roll_sh(success_rate, critical_border, command_type)
|
71
|
+
success_rate = 0 if success_rate < 0
|
72
|
+
fumble_border = (success_rate < 100 ? 96 : 99)
|
73
|
+
|
74
|
+
dice_value = @randomizer.roll_once(100)
|
75
|
+
result = get_check_result(dice_value, success_rate, critical_border, fumble_border)
|
76
|
+
title, supplementary = get_supplementary(command_type, result)
|
77
|
+
unless supplementary.empty?
|
78
|
+
supplementary = "(#{supplementary})"
|
79
|
+
end
|
80
|
+
|
81
|
+
text = "#{title}判定 D100<=#{success_rate}@#{critical_border} > #{dice_value} > #{result}#{supplementary}"
|
82
|
+
return text
|
83
|
+
end
|
84
|
+
|
85
|
+
def get_supplementary(command_type, result)
|
86
|
+
title = ''
|
87
|
+
supplementary = ''
|
88
|
+
case command_type
|
89
|
+
when 'EM'
|
90
|
+
title = '感情'
|
91
|
+
case result
|
92
|
+
when 'クリティカル'
|
93
|
+
supplementary = '次に行う判定の成功率に+50%'
|
94
|
+
when '成功'
|
95
|
+
supplementary = '次に行う判定の成功率に+30%'
|
96
|
+
when '失敗'
|
97
|
+
supplementary = '次に行う判定の成功率に-20%、呪縛+1点'
|
98
|
+
when 'ファンブル'
|
99
|
+
supplementary = '次に行う判定の成功率に-50%、呪縛+1D5点'
|
100
|
+
end
|
101
|
+
when 'TR'
|
102
|
+
title = '性格傾向'
|
103
|
+
case result
|
104
|
+
when '失敗'
|
105
|
+
supplementary = '反対側の性格傾向で再判定する。あるいは、もしこれがその再判定の結果であればプレイヤーが性格傾向を選択する'
|
106
|
+
when 'ファンブル'
|
107
|
+
supplementary = '反対側の性格傾向に従い、呪縛+1D5点する。あるいは、もしこれが失敗後の再判定の結果だった場合、PCは混乱し行動を放棄するか逃げ出す。呪縛+2点'
|
108
|
+
else
|
109
|
+
supplementary = '判定した性格傾向に従う'
|
110
|
+
end
|
111
|
+
when 'FE'
|
112
|
+
title = '恐怖'
|
113
|
+
case result
|
114
|
+
when '成功'
|
115
|
+
supplementary = 'ショックを受け流した。恐怖判定効果表の成功側の値分、呪縛が上昇する'
|
116
|
+
when '失敗'
|
117
|
+
supplementary = 'ショックを受けた。恐怖判定効果表の失敗側の値分、呪縛が上昇する'
|
118
|
+
when 'ファンブル'
|
119
|
+
supplementary = '深いショックを受けた。恐怖判定効果表の失敗側の値分に加え、さらに1D5点分、呪縛が上昇する'
|
120
|
+
else
|
121
|
+
supplementary = '何もショックを受けなかった'
|
122
|
+
end
|
123
|
+
end
|
124
|
+
return title, supplementary
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'bcdice/game_system/NightWizard'
|
4
|
+
|
5
|
+
module BCDice
|
6
|
+
module GameSystem
|
7
|
+
class SevenFortressMobius < NightWizard
|
8
|
+
# ゲームシステムの識別子
|
9
|
+
ID = 'SevenFortressMobius'
|
10
|
+
|
11
|
+
# ゲームシステム名
|
12
|
+
NAME = 'セブン=フォートレス メビウス'
|
13
|
+
|
14
|
+
# ゲームシステム名の読みがな
|
15
|
+
SORT_KEY = 'せふんふおおとれすめひうす'
|
16
|
+
|
17
|
+
# ダイスボットの使い方
|
18
|
+
HELP_MESSAGE = <<~INFO_MESSAGE_TEXT
|
19
|
+
・判定用コマンド (nSFM+m@x#y)
|
20
|
+
"(基本値)SFM(常時および常時に準じる特技等及び状態異常(省略可))@(クリティカル値)#(ファンブル値)(常時以外の特技等及び味方の支援効果等の影響(省略可))"でロールします。
|
21
|
+
Rコマンド(2R6m[n,m]c[x]f[y]>=t tは目標値)に読替されます。
|
22
|
+
クリティカル値、ファンブル値が無い場合は1や13などのあり得ない数値を入れてください。
|
23
|
+
例)12SFM-5@7#2 1SFM 50SFM+5@7,10#2,5 50SFM-5+10@7,10#2,5+15+25
|
24
|
+
INFO_MESSAGE_TEXT
|
25
|
+
|
26
|
+
register_prefix(['([-+]?\d+)?SFM.*', '2R6.*'])
|
27
|
+
|
28
|
+
def initialize(command)
|
29
|
+
super(command)
|
30
|
+
@nw_command = "SFM"
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BCDice
|
4
|
+
module GameSystem
|
5
|
+
class ShadowRun < Base
|
6
|
+
# ゲームシステムの識別子
|
7
|
+
ID = 'ShadowRun'
|
8
|
+
|
9
|
+
# ゲームシステム名
|
10
|
+
NAME = 'シャドウラン'
|
11
|
+
|
12
|
+
# ゲームシステム名の読みがな
|
13
|
+
SORT_KEY = 'しやとうらん'
|
14
|
+
|
15
|
+
# ダイスボットの使い方
|
16
|
+
HELP_MESSAGE = "上方無限ロール(xUn)の境界値を6にセットします。\n"
|
17
|
+
|
18
|
+
def initialize(command)
|
19
|
+
super(command)
|
20
|
+
@sort_add_dice = true
|
21
|
+
@sort_barabara_dice = true
|
22
|
+
@upper_dice_reroll_threshold = 6
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BCDice
|
4
|
+
module GameSystem
|
5
|
+
class ShadowRun4 < Base
|
6
|
+
# ゲームシステムの識別子
|
7
|
+
ID = 'ShadowRun4'
|
8
|
+
|
9
|
+
# ゲームシステム名
|
10
|
+
NAME = 'シャドウラン 4th Edition'
|
11
|
+
|
12
|
+
# ゲームシステム名の読みがな
|
13
|
+
SORT_KEY = 'しやとうらん4'
|
14
|
+
|
15
|
+
# ダイスボットの使い方
|
16
|
+
HELP_MESSAGE = <<~INFO_MESSAGE_TEXT
|
17
|
+
個数振り足しロール(xRn)の境界値を6にセット、バラバラロール(xBn)の目標値を5以上にセットします。
|
18
|
+
BコマンドとRコマンド時に、グリッチの表示を行います。
|
19
|
+
INFO_MESSAGE_TEXT
|
20
|
+
|
21
|
+
def initialize(command)
|
22
|
+
super(command)
|
23
|
+
@sort_add_dice = true
|
24
|
+
@sort_barabara_dice = true
|
25
|
+
@reroll_dice_reroll_threshold = 6 # RerollDiceで振り足しをする出目の閾値
|
26
|
+
|
27
|
+
@default_cmp_op = :>=
|
28
|
+
@default_target_number = 5
|
29
|
+
end
|
30
|
+
|
31
|
+
# シャドウラン4版用グリッチ判定
|
32
|
+
def grich_text(numberSpot1, dice_cnt_total, successCount)
|
33
|
+
dice_cnt_total_half = (1.0 * dice_cnt_total / 2)
|
34
|
+
debug("dice_cnt_total_half", dice_cnt_total_half)
|
35
|
+
|
36
|
+
unless numberSpot1 >= dice_cnt_total_half
|
37
|
+
return nil
|
38
|
+
end
|
39
|
+
|
40
|
+
# グリッチ!
|
41
|
+
if successCount == 0
|
42
|
+
'クリティカルグリッチ'
|
43
|
+
else
|
44
|
+
'グリッチ'
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'bcdice/game_system/ShadowRun4'
|
4
|
+
|
5
|
+
module BCDice
|
6
|
+
module GameSystem
|
7
|
+
class ShadowRun5 < ShadowRun4
|
8
|
+
# ゲームシステムの識別子
|
9
|
+
ID = 'ShadowRun5'
|
10
|
+
|
11
|
+
# ゲームシステム名
|
12
|
+
NAME = 'シャドウラン 5th Edition'
|
13
|
+
|
14
|
+
# ゲームシステム名の読みがな
|
15
|
+
SORT_KEY = 'しやとうらん5'
|
16
|
+
|
17
|
+
# ダイスボットの使い方
|
18
|
+
HELP_MESSAGE = <<~INFO_MESSAGE_TEXT
|
19
|
+
個数振り足しロール(xRn)の境界値を6にセット、バラバラロール(xBn)の目標値を5以上にセットします。
|
20
|
+
バラバラロール(xBn)のみ、リミットをセットできます。リミットの指定は(xBn@l)のように指定します。(省略可)
|
21
|
+
BコマンドとRコマンド時に、グリッチの表示を行います。
|
22
|
+
INFO_MESSAGE_TEXT
|
23
|
+
|
24
|
+
register_prefix(['(\d+)B6@(\d+)'])
|
25
|
+
|
26
|
+
def initialize(command)
|
27
|
+
super(command)
|
28
|
+
@sort_add_dice = true
|
29
|
+
@sort_barabara_dice = true
|
30
|
+
@reroll_dice_reroll_threshold = 6 # RerollDiceで振り足しをする出目の閾値
|
31
|
+
|
32
|
+
@default_cmp_op = :>=
|
33
|
+
@default_target_number = 5
|
34
|
+
end
|
35
|
+
|
36
|
+
# シャドウラン5版 リミット時のテスト
|
37
|
+
def eval_game_system_specific_command(command)
|
38
|
+
debug('chatch limit prefix')
|
39
|
+
|
40
|
+
m = /(\d+B6)@(\d+)/.match(command)
|
41
|
+
b_dice = m[1]
|
42
|
+
limit = m[2].to_i
|
43
|
+
output_before_limited = BCDice::CommonCommand::BarabaraDice.new(b_dice, @randomizer, self).eval()
|
44
|
+
|
45
|
+
m = /成功数(\d+)/.match(output_before_limited)
|
46
|
+
output_after_limited = output_before_limited
|
47
|
+
before_suc_cnt = m[1].to_i
|
48
|
+
if before_suc_cnt > limit
|
49
|
+
after_suc_cnt = limit
|
50
|
+
over_suc_cnt = before_suc_cnt - limit
|
51
|
+
output_after_limited = output_before_limited.gsub(/成功数(\d+)/, "成功数#{after_suc_cnt}")
|
52
|
+
output_after_limited += "(リミット超過#{over_suc_cnt})"
|
53
|
+
end
|
54
|
+
|
55
|
+
output = output_after_limited
|
56
|
+
output = output.gsub('B', 'B6')
|
57
|
+
output = output.gsub('6>=5', "[6]Limit[#{limit}]>=5")
|
58
|
+
debug(output)
|
59
|
+
return output
|
60
|
+
end
|
61
|
+
|
62
|
+
# シャドウラン5版用グリッチ判定
|
63
|
+
def grich_text(numberSpot1, dice_cnt_total, successCount)
|
64
|
+
dice_cnt_total_half = dice_cnt_total.to_f / 2
|
65
|
+
debug("dice_cnt_total_half", dice_cnt_total_half)
|
66
|
+
|
67
|
+
unless numberSpot1 > dice_cnt_total_half
|
68
|
+
return nil
|
69
|
+
end
|
70
|
+
|
71
|
+
# グリッチ!
|
72
|
+
if successCount == 0
|
73
|
+
'クリティカルグリッチ'
|
74
|
+
else
|
75
|
+
'グリッチ'
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BCDice
|
4
|
+
module GameSystem
|
5
|
+
class SharedFantasia < Base
|
6
|
+
# ゲームシステムの識別子
|
7
|
+
ID = 'SharedFantasia'
|
8
|
+
|
9
|
+
# ゲームシステム名
|
10
|
+
NAME = 'Shared†Fantasia'
|
11
|
+
|
12
|
+
# ゲームシステム名の読みがな
|
13
|
+
SORT_KEY = 'しえああとふあんたしあ'
|
14
|
+
|
15
|
+
# ダイスボットの使い方
|
16
|
+
HELP_MESSAGE = <<~MESSAGETEXT
|
17
|
+
2D6の成功判定に 自動成功、自動失敗、致命的失敗、劇的成功 の判定があります。
|
18
|
+
|
19
|
+
SF/ST = 2D6のショートカット
|
20
|
+
|
21
|
+
例) SF+4>=9 : 2D6して4を足した値が9以上なら成功
|
22
|
+
MESSAGETEXT
|
23
|
+
|
24
|
+
register_prefix(['SF.*', 'ST.*'])
|
25
|
+
|
26
|
+
def change_text(string)
|
27
|
+
string.gsub(/SF/i, "2D6").gsub(/ST/i, "2D6")
|
28
|
+
end
|
29
|
+
|
30
|
+
def check_2D6(total, dice_total, _dice_list, cmp_op, target)
|
31
|
+
return '' if target == '?'
|
32
|
+
|
33
|
+
critical = false
|
34
|
+
fumble = false
|
35
|
+
|
36
|
+
if dice_total == 12
|
37
|
+
critical = true
|
38
|
+
elsif dice_total == 2
|
39
|
+
fumble = true
|
40
|
+
end
|
41
|
+
|
42
|
+
totalValueBonus = 0
|
43
|
+
if cmp_op == :>=
|
44
|
+
totalValueBonus = 1
|
45
|
+
end
|
46
|
+
|
47
|
+
if [:>=, :>].include?(cmp_op)
|
48
|
+
if (total + totalValueBonus) > target
|
49
|
+
if critical
|
50
|
+
return " > 自動成功(劇的成功)"
|
51
|
+
elsif fumble
|
52
|
+
return " > 自動失敗"
|
53
|
+
else
|
54
|
+
return " > 成功"
|
55
|
+
end
|
56
|
+
else
|
57
|
+
if critical
|
58
|
+
return " > 自動成功"
|
59
|
+
elsif fumble
|
60
|
+
return " > 自動失敗(致命的失敗)"
|
61
|
+
else
|
62
|
+
return " > 失敗"
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module BCDice
|
4
|
+
module GameSystem
|
5
|
+
class ShinMegamiTenseiKakuseihen < Base
|
6
|
+
# ゲームシステムの識別子
|
7
|
+
ID = 'SMTKakuseihen'
|
8
|
+
|
9
|
+
# ゲームシステム名
|
10
|
+
NAME = '真・女神転生TRPG 覚醒篇'
|
11
|
+
|
12
|
+
# ゲームシステム名の読みがな
|
13
|
+
SORT_KEY = 'しんめかみてんせいTRPGかくせいへん'
|
14
|
+
|
15
|
+
# ダイスボットの使い方
|
16
|
+
HELP_MESSAGE = <<~INFO_MESSAGE_TEXT
|
17
|
+
・判定
|
18
|
+
1D100<=(目標値) でスワップ・通常・逆スワップ判定を判定。
|
19
|
+
威力ダイスは nU6[6] (nはダイス個数)でロール可能です。
|
20
|
+
INFO_MESSAGE_TEXT
|
21
|
+
|
22
|
+
# ゲーム別成功度判定(1d100)
|
23
|
+
def check_1D100(total, dice_total, cmp_op, target)
|
24
|
+
return '' if target == '?'
|
25
|
+
return '' unless cmp_op == :<=
|
26
|
+
|
27
|
+
dice1, dice2 = split_tens(dice_total)
|
28
|
+
|
29
|
+
total1 = dice1 * 10 + dice2
|
30
|
+
total2 = dice2 * 10 + dice1
|
31
|
+
|
32
|
+
# ゾロ目
|
33
|
+
isRepdigit = (dice1 == dice2)
|
34
|
+
|
35
|
+
result = " > スワップ"
|
36
|
+
result += getCheckResultText(target, [total1, total2].min, isRepdigit)
|
37
|
+
result += "/通常"
|
38
|
+
result += getCheckResultText(target, total % 100, isRepdigit)
|
39
|
+
result += "/逆スワップ"
|
40
|
+
result += getCheckResultText(target, [total1, total2].max, isRepdigit)
|
41
|
+
|
42
|
+
return result
|
43
|
+
end
|
44
|
+
|
45
|
+
def split_tens(value)
|
46
|
+
value %= 100
|
47
|
+
|
48
|
+
ones = value / 10
|
49
|
+
tens = value % 10
|
50
|
+
|
51
|
+
return [ones, tens]
|
52
|
+
end
|
53
|
+
|
54
|
+
def getCheckResultText(diff, total, isRepdigit)
|
55
|
+
checkResult = getCheckResult(diff, total, isRepdigit)
|
56
|
+
text = format("(%02d)", total) + checkResult
|
57
|
+
return text
|
58
|
+
end
|
59
|
+
|
60
|
+
def getCheckResult(diff, total, isRepdigit)
|
61
|
+
if diff >= total
|
62
|
+
return getSuccessResult(isRepdigit)
|
63
|
+
end
|
64
|
+
|
65
|
+
return getFailResult(isRepdigit)
|
66
|
+
end
|
67
|
+
|
68
|
+
def getSuccessResult(isRepdigit)
|
69
|
+
if isRepdigit
|
70
|
+
return "絶対成功"
|
71
|
+
end
|
72
|
+
|
73
|
+
return "成功"
|
74
|
+
end
|
75
|
+
|
76
|
+
def getFailResult(isRepdigit)
|
77
|
+
if isRepdigit
|
78
|
+
return "絶対失敗"
|
79
|
+
end
|
80
|
+
|
81
|
+
return "失敗"
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|