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
27 changes: 27 additions & 0 deletions i18n/ZombiLine/ja_jp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
ja_jp:
ZombiLine:
success_critical: "成功(クリティカル)"
success_fumble: "成功(ファンブル)"
success: "成功"
failure_fumble: "失敗(ファンブル)"
failure: "失敗"
SST:
name: "ストレス症状表"
type: "1D10"
items:
- '憤怒:一番近い敵を攻撃(成功率+20%)しにいきます。近くに敵がいない場合、誰かのストレスを+1させます。 頭に血が上り、誰かに怒りをぶつけます。'
- '逃避:落下してでも敵から逃げるように移動します。周囲に敵が居ない場合、現実逃避します。 耐えられなくなり、逃げ出します。'
- '幻覚:戦闘中は、「行動放棄(全AP)」します。戦闘以外なら、幻覚を見て笑います。 自分が望む幻覚が見えます。'
- '絶叫:戦闘中は、「注目を集める(2AP)」をします。戦闘以外なら、無意味に叫びます。 思わず叫んでしまいます。'
- '自傷:自ら【怪我】を負います。戦闘中は「自傷行為(1AP)」をして自分が【怪我】します。 思わず自分を傷つけます。'
- '不安:誰かのストレスを1上げます。近くに誰も居ない場合、泣き出します。 不安にかられて余計なことを言います。'
- '忌避:その場から一番近い対象に「石(1AP)」を投げます。それができない場合、【転倒】してうずくまります。 嫌悪感から全てを拒みます。'
- '暴走:一番近い敵を攻撃しにいきます。近くに敵がいない場合、周りの意見も聞かずに安直な行動をします。 冷静でいられなくなり、直情的になります。'
- '混乱:近くにいるランダムな対象に格闘で攻撃しにいきます。それができない場合、「行動放棄(全 AP)」します。 世界全てが敵に見えて攻撃します。'
- '開眼:ストレスは0まで下がります。あなたは教祖となって教義をひとつつくって「布教」できます。次の症状が出るまで効果は続きます。 ゾンビだらけの世界の真理を見つけます。'
IT:
name: "食材表"
items:
raw: '生モノ食材'
suspicious: '怪しい食材'
dangerous: '危ない食材'
27 changes: 27 additions & 0 deletions i18n/ZombiLine/ko_kr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
ko_kr:
ZombiLine:
success_critical: "성공(크리티컬)"
success_fumble: "성공(펌블)"
success: "성공"
failure_fumble: "실패(펌블)"
failure: "실패"
SST:
name: "스트레스 증상표"
type: "1D10"
items:
- '[분노] 가장 가까이 있는 적을 공격(성공률 +20%)합니다. 가까이 적이 없는 경우, 누군가의 스트레스를 +1시킵니다. / 설명: 머리에 피가 몰려 누군가에게 화를 터트립니다.'
- '[도피] 낙하하더라도 적에게서 도망치려 이동합니다. 주변에 적이 없는 경우, 현실도피를 하려 합니다. / 설명: 견딜 수 없게 되어 도망칩니다.'
- '[환상] 전투 중에는 「행동방치(전AP)」를 합니다. 전투 이외의 경우, 환상을 보며 웃음을 흘립니다. / 설명: 자신이 꿈꾸는 환상을 봅니다.'
- '[절규] 전투 중에는 비명을 지르며 「주목을 모은다(2AP)」를 합니다. 전투 이외의 경우, 무의미한 소리를 지릅니다. / 설명: 생각없이 비명을 지릅니다.'
- '[자해] 스스로 【상처】를 입습니다. 전투 중에는 「자해행위(1AP)」로 스스로에게 【상처】를 입힙니다. / 설명: 생각없이 자신에게 상처를 입힙니다.'
- '[불안] 누군가의 스트레스를 1 올립니다. 근처에 아무도 없는 경우, 울음을 터트립니다. / 설명: 불안해져 쓸데없는 말을 지껄입니다.'
- '[기피] 그 자리에서 가장 가까이 있는 대상에게 「돌(1AP)」을 던집니다. 그게 불가능한 경우, 【넘어짐】상태가 됩니다. / 설명: 혐오감으로 모든 것을 거부합니다.'
- '[폭주] 가장 가까이 있는 적에게 공격을 가합니다. 가까이 적이 없는 경우 주변의 의견을 듣지 않고 제멋대로 행동을 합니다. / 설명: 냉정을 찾지 못하고 제멋대로 행동합니다.'
- '[혼란] 가까이 있는 무작위 대상에게 격투로 공격을 가합니다. 그게 불가능한 경우 「행동방치(전AP)」를 합니다. / 설명: 세상 모든 것이 적으로 보여 공격합니다.'
- '[개안] 스트레스가 0까지 떨어집니다. 당신은 교조가 되어 교의를 한가지 정해 「포교」할 수 있습니다. 다음 증상이 나올 때까지 효과가 지속됩니다. / 설명: 좀비투성이 세상의 진리를 보았습니다.'
IT:
name: "식재료 표"
items:
raw: '신선 식재료'
suspicious: '수상한 식재료'
dangerous: '위험한 식재료'
1 change: 1 addition & 0 deletions lib/bcdice/game_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@
require "bcdice/game_system/YuMyoKishi"
require "bcdice/game_system/ZettaiReido"
require "bcdice/game_system/ZombiLine"
require "bcdice/game_system/ZombiLine_Korean"
require "bcdice/game_system/FinalFantasyXIV"
require "bcdice/game_system/FinalFantasyXIV_English"
require "bcdice/game_system/Garactier"
Expand Down
65 changes: 29 additions & 36 deletions lib/bcdice/game_system/ZombiLine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def initialize(command)
end

def eval_game_system_specific_command(command)
return check_action(command) || roll_tables(command, TABLES)
return check_action(command) || roll_tables(command, self.class::TABLES)
end

def check_action(command)
Expand All @@ -37,9 +37,7 @@ def check_action(command)
.disable_modifier
.restrict_cmp_op_to(:<=)
parsed = parser.parse(command)
unless parsed
return nil
end
return nil unless parsed

dice_count = parsed.prefix_number || 1
target_num = parsed.target_number
Expand All @@ -50,23 +48,25 @@ def check_action(command)
is_success = dice_list.any? { |i| i <= target_num }
is_critical = dice_list.any? { |i| i <= 5 }
is_fumble = dice_list.any? { |i| i >= 96 && i > target_num }

if is_critical && is_fumble
is_critical = false
is_fumble = false
end

success_message =
if is_success && is_critical
"成功(クリティカル)"
translate("ZombiLine.success_critical")
elsif is_success && is_fumble
"成功(ファンブル)"
translate("ZombiLine.success_fumble")
elsif is_success
"成功"
translate("ZombiLine.success")
elsif is_fumble
"失敗(ファンブル)"
translate("ZombiLine.failure_fumble")
else
"失敗"
translate("ZombiLine.failure")
end

sequence = [
"(#{parsed})",
"[#{dice_list.join(',')}]",
Expand All @@ -81,33 +81,26 @@ def check_action(command)
end
end

TABLES = {
'SST' => DiceTable::Table.new(
'ストレス症状表',
'1D10',
[
'憤怒:一番近い敵を攻撃(成功率+20%)しにいきます。近くに敵がいない場合、誰かのストレスを+1させます。 頭に血が上り、誰かに怒りをぶつけます。',
'逃避:落下してでも敵から逃げるように移動します。周囲に敵が居ない場合、現実逃避します。 耐えられなくなり、逃げ出します。',
'幻覚:戦闘中は、「行動放棄(全AP)」します。戦闘以外なら、幻覚を見て笑います。 自分が望む幻覚が見えます。',
'絶叫:戦闘中は、「注目を集める(2AP)」をします。戦闘以外なら、無意味に叫びます。 思わず叫んでしまいます。',
'自傷:自ら【怪我】を負います。戦闘中は「自傷行為(1AP)」をして自分が【怪我】します。 思わず自分を傷つけます。',
'不安:誰かのストレスを1上げます。近くに誰も居ない場合、泣き出します。 不安にかられて余計なことを言います。',
'忌避:その場から一番近い対象に「石(1AP)」を投げます。それができない場合、【転倒】してうずくまります。 嫌悪感から全てを拒みます。',
'暴走:一番近い敵を攻撃しにいきます。近くに敵がいない場合、周りの意見も聞かずに安直な行動をします。 冷静でいられなくなり、直情的になります。',
'混乱:近くにいるランダムな対象に格闘で攻撃しにいきます。それができない場合、「行動放棄(全 AP)」します。 世界全てが敵に見えて攻撃します。',
'開眼:ストレスは0まで下がります。あなたは教祖となって教義をひとつつくって「布教」できます。次の症状が出るまで効果は続きます。 ゾンビだらけの世界の真理を見つけます。',
]
),
'IT' => DiceTable::RangeTable.new(
'食材表',
'1d100',
[
[1..50, '生モノ食材'],
[51..80, '怪しい食材'],
[81..100, '危ない食材']
]
)
}.freeze
class << self
private

def translate_tables(locale)
{
'SST' => DiceTable::Table.from_i18n("ZombiLine.SST", locale),
'IT' => DiceTable::RangeTable.new(
I18n.t("ZombiLine.IT.name", locale: locale),
'1d100',
[
[1..50, I18n.t("ZombiLine.IT.items.raw", locale: locale)],
[51..80, I18n.t("ZombiLine.IT.items.suspicious", locale: locale)],
[81..100, I18n.t("ZombiLine.IT.items.dangerous", locale: locale)]
]
)
}
end
end

TABLES = translate_tables(:ja_jp).freeze

register_prefix('\d*ZL', TABLES.keys)
end
Expand Down
35 changes: 35 additions & 0 deletions lib/bcdice/game_system/ZombiLine_Korean.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# frozen_string_literal: true

module BCDice
module GameSystem
class ZombiLine_Korean < ZombiLine
# ゲームシステムの識別子
ID = "ZombiLine:Korean"

# ゲームシステム名
NAME = "좀비 라인"

# ゲームシステム名の読みがな
SORT_KEY = "国際化:Korean:좀비 라인"

HELP_MESSAGE = <<~TEXT
■ 판정 (xZL<=y)
 x:주사위 개수(생략 시 1)
 y:성공률

■ 각종 표
 스트레스 증상표 SST
 식재료 표 IT
TEXT

register_prefix_from_super_class()

def initialize(command)
super(command)
@locale = :ko_kr
end

TABLES = translate_tables(:ko_kr).freeze
end
end
end
Loading