Class: BCDice::GameSystem::RecordOfLodossWar
- Defined in:
- lib/bcdice/game_system/RecordOfLodossWar.rb
Constant Summary collapse
- ID =
'RecordOfLodossWar'- NAME =
'ロードス島戦記RPG'- SORT_KEY =
'ろおとすとうせんきRPG'- HELP_MESSAGE =
"\u25CF\u5224\u5B9A\n\u3000LW<=(\u76EE\u6A19\u5024)\u3067\u5224\u5B9A\u3002\n\u3000\u9054\u6210\u5024\u304C\u76EE\u6A19\u5024\u306E1/10(\u7AEF\u6570\u5207\u308A\u4E0A\u3052)\u4EE5\u4E0B\u3067\u3042\u308C\u3070\u5927\u6210\u529F\u30021\uFF5E10\u3067\u3042\u308C\u3070\u81EA\u52D5\u6210\u529F\u3002\n\u300091\uFF5E100\u3067\u3042\u308C\u3070\u81EA\u52D5\u5931\u6557\u3068\u306A\u308A\u307E\u3059\u3002\n\n\u25CF\u56DE\u907F\u5224\u5B9A\n\u3000LWD<=(\u76EE\u6A19\u5024)\u3067\u56DE\u907F\u5224\u5B9A\u3002\u3053\u306E\u6642\u51FA\u76EE\u304C51\u4EE5\u4E0A\u3067\u81EA\u52D5\u5931\u6557\u3068\u306A\u308A\u307E\u3059\u3002\n\n\u3000\u5224\u5B9A\u3068\u56DE\u907F\u5224\u5B9A\u306F\u3001\u3069\u3061\u3089\u3082\u30B3\u30DE\u30F3\u30C9\u3060\u3051\u306E\u5834\u5408\u3001\u51FA\u76EE\u306E\u8868\u793A\u3068\u81EA\u52D5\u6210\u529F\u3068\u81EA\u52D5\u5931\u6557\u306E\u5224\u5B9A\u306E\u307F\u3092\u884C\u3044\u307E\u3059\u3002\n"
Instance Attribute Summary
Attributes inherited from Base
#d66_sort_type, #default_cmp_op, #default_target_number, #randomizer, #reroll_dice_reroll_threshold, #round_type, #sides_implicit_d, #upper_dice_reroll_threshold
Instance Method Summary collapse
Methods inherited from Base
#change_text, #check_result, command_pattern, #enable_debug, #enabled_d9?, #eval, eval, #grich_text, #initialize, prefixes_pattern, register_prefix, register_prefix_from_super_class, #sort_add_dice?, #sort_barabara_dice?
Methods included from Translate
Constructor Details
This class inherits a constructor from BCDice::Base
Instance Method Details
#eval_game_system_specific_command(command) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/bcdice/game_system/RecordOfLodossWar.rb', line 24 def eval_game_system_specific_command(command) parser = Command::Parser.new("LWD", "LW", round_type: round_type) .restrict_cmp_op_to(nil, :<=) cmd = parser.parse(command) if cmd.nil? || ![nil, :<=].include?(cmd.cmp_op) return nil end auto_failure = cmd.command == "LWD" ? 51 : 91 critical = (cmd.target_number.to_f / 10).ceil dice_value = @randomizer.roll_once(100) result = if dice_value >= auto_failure "自動失敗(#{auto_failure})" elsif dice_value <= critical "大成功(#{critical})" elsif dice_value <= 10 "自動成功" elsif cmd.cmp_op dice_value <= cmd.target_number ? "成功" : "失敗" end sequence = [ "(1D100#{cmd.cmp_op}#{cmd.target_number})", dice_value.to_s, result ].compact return sequence.join(" > ") end |