Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions i18n/Alsetto/ja_jp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ja_jp:
Alsetto:
damage: "%{total_damage}ダメージ"
success_count: "成功数:%{success_count}"
triumph: " / %{critical_count}トライアンフ"
5 changes: 5 additions & 0 deletions i18n/Alsetto/ko_kr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ko_kr:
Alsetto:
damage: "%{total_damage} 대미지"
success_count: "성공 수 : %{success_count}"
triumph: " / %{critical_count} 트라이엄프"
1 change: 1 addition & 0 deletions lib/bcdice/game_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
require "bcdice/game_system/Airgetlamh"
require "bcdice/game_system/AlchemiaStruggle"
require "bcdice/game_system/Alsetto"
require "bcdice/game_system/Alsetto_Korean"
require "bcdice/game_system/Alshard"
require "bcdice/game_system/AlterRaise"
require "bcdice/game_system/Amadeus"
Expand Down
12 changes: 7 additions & 5 deletions lib/bcdice/game_system/Alsetto.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def eval_game_system_specific_command(command)

private

def parce_check_roll(command)
def parse_check_roll(command)
m = /(\d+)AL(C|G)?(\d+)?((x|\*)(\d+))?$/i.match(command)
unless m
return nil
Expand Down Expand Up @@ -80,7 +80,7 @@ def parce_check_roll(command)
end

def check_roll(command)
parsed = parce_check_roll(command)
parsed = parse_check_roll(command)
unless parsed
return nil
end
Expand Down Expand Up @@ -119,13 +119,15 @@ def check_roll(command)
if is_damage
total_damage = total_success_count * damage

result = "(#{rapid}D6\<\=#{target}) > #{text} > Hits:#{total_success_count}*#{damage} > #{total_damage}ダメージ"
damage_text = translate("Alsetto.damage", total_damage: total_damage)
result = "(#{rapid}D6\<\=#{target}) > #{text} > Hits:#{total_success_count}*#{damage} > #{damage_text}"
else
result = "(#{rapid}D6\<\=#{target}) > #{text} > 成功数:#{total_success_count}"
success_text = translate("Alsetto.success_count", success_count: total_success_count)
result = "(#{rapid}D6\<\=#{target}) > #{text} > #{success_text}"
end

if enable_critical
result += " / #{total_critical_count}トライアンフ"
result += translate("Alsetto.triumph", critical_count: total_critical_count)
end

return result
Expand Down
51 changes: 51 additions & 0 deletions lib/bcdice/game_system/Alsetto_Korean.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# frozen_string_literal: true

require 'bcdice/game_system/Alsetto'

module BCDice
module GameSystem
class Alsetto_Korean < Alsetto
# ゲームシステムの識別子
ID = 'Alsetto:Korean'

# ゲームシステム名
NAME = '시편의 알세토'

# ゲームシステム名の読みがな
SORT_KEY = '国際化:Korean:시편의 알세토'

# ダイスボットの使い方
HELP_MESSAGE = <<~MESSAGETEXT
・성공 판정:nAL[m]    ・트라이엄프 없음:nALC[m]
・명중 판정:nAL[m]*p   ・트라이엄프 없음:nALC[m]*p
・명중 판정(건슬링거의 근원시):nALG[m]*p
[] 내부는 생략 가능.

AL 커맨드는 트라이엄프 수만큼, 자동으로 추가 주사위 굴림 처리를 수행합니다.
「n」으로 주사위 수를 지정.
「m」으로 목표치를 지정. 생략 시에는 기본값인 「3」이 사용됩니다.
「p」로 공격력을 지정. 「*」 대신 「x」도 사용 가능.
공격력을 지정하면 명중 판정이 되며, 성공수가 아닌 대미지를 결과로 표시합니다.

ALC 커맨드는 트라이엄프 없이 성공수, 대미지를 결과로 표시합니다.
ALG 커맨드는 「2 이하」에서 트라이엄프 처리를 수행합니다.

【사용 예시】
・5AL → 5d6에서 목표치 3.
・5ALC → 5d6에서 목표치 3. 트라이엄프 없음.
・6AL2 → 6d6에서 목표치 2.
・4AL*5 → 4d6에서 목표치 3, 공격력 5의 명중 판정.
・7AL2x10 → 7d6에서 목표치 2, 공격력 10의 명중 판정.
・8ALC4x5 → 8d6에서 목표치 4, 공격력 5, 트라이엄프 없는 명중 판정.
MESSAGETEXT

register_prefix_from_super_class()

def initialize(command)
super(command)

@locale = :ko_kr
end
end
end
end
Loading