Skip to content

Commit

Permalink
・レイアウト修正とif文の中身を&&に置き換え
Browse files Browse the repository at this point in the history
  • Loading branch information
FredGreenfield authored and FredGreenfield committed Sep 30, 2021
1 parent 237c6a4 commit 8b7f2a4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/bcdice/game_system/YearZeroEngine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,15 @@ def eval_game_system_specific_command(command)
skill_dice_text, success_dice, botch_dice = make_dice_roll(dice_pool)

skill_unsigned = m[SKILL_SIGNED_INDEX]
if command_type == 'YZE' and skill_unsigned == '-'
# YZEはシンプルに動作するコマンドなのでマイナス技能の処理は対応しない。
return "YZEコマンドでは技能ダイスをマイナス指定できません。"
elsif command_type == 'MYZ' and skill_unsigned == '-'
if command_type == 'YZE' && skill_unsigned == '-'
# YZEはシンプルに動作するコマンドなのでマイナス技能の処理は対応しない。
return "YZEコマンドでは技能ダイスをマイナス指定できません。"
elsif command_type == 'MYZ' && skill_unsigned == '-'
@total_success_dice -= success_dice # マイナス技能の成功は通常の成功と相殺される
else
@total_success_dice += success_dice
end

@total_botch_dice += botch_dice
@skill_botch_dice += botch_dice # 技能ダイスの1はpushで振り直し可能(例えマイナス技能でも)
@push_dice += (dice_pool - success_dice) # 技能ダイスのみ1を含むので、ここでは1を計算に入れない
Expand Down Expand Up @@ -130,7 +131,7 @@ def make_result_with_yze(dice_count_text, dice_text)
def make_result_with_myz(dice_count_text, dice_text)
result_text = "#{dice_count_text}#{dice_text} 成功数:#{@total_success_dice}"
atter_text = "\n出目1:[能力:#{@base_botch_dice},技能:#{@skill_botch_dice},アイテム:#{@gear_botch_dice}) プッシュ可能=#{@push_dice}ダイス"

if @difficulty > 0
if @total_success_dice >= @difficulty
return Result.success("#{result_text} 難易度=#{@difficulty}:判定成功!#{atter_text}")
Expand Down

0 comments on commit 8b7f2a4

Please sign in to comment.