OptionManager::ExistsChaos()
@@ -398,7 +398,7 @@ | ||
398 | 398 | //self::Stack()->p(self::RAND, '◆Rand'); |
399 | 399 | |
400 | 400 | //闇鍋モード処理 |
401 | - if (DB::$ROOM->IsOption('no_sub_role') || false === DB::$ROOM->IsOptionGroup('chaos')) { | |
401 | + if (DB::$ROOM->IsOption('no_sub_role') || OptionManager::ExistsChaos()) { | |
402 | 402 | return; |
403 | 403 | } |
404 | 404 |
@@ -2,6 +2,16 @@ | ||
2 | 2 | //-- ◆文字化け抑制◆ --// |
3 | 3 | //-- オプションフィルタデータベース --// |
4 | 4 | final class OptionFilterData { |
5 | + //-- 役職グループ --// | |
6 | + //闇鍋モードグループ | |
7 | + public static $group_chaos = ['chaos', 'chaosfull', 'chaos_hyper', 'chaos_verso']; | |
8 | + | |
9 | + //村人置換村グループ | |
10 | + public static $group_replace_human = [ | |
11 | + 'replace_human', 'full_mad', 'full_cupid', 'full_quiz', 'full_vampire', | |
12 | + 'full_chiroptera', 'full_patron', 'full_mania', 'full_unknown_mania' | |
13 | + ]; | |
14 | + | |
5 | 15 | //-- Cast::Get() --// |
6 | 16 | //基礎配役 (順番依存あり) |
7 | 17 | public static $cast_base = [ |
@@ -19,12 +29,6 @@ | ||
19 | 29 | //追加配役/闇鍋固定枠 |
20 | 30 | public static $cast_chaos_fix_role = ['topping', 'gerd', 'detective']; |
21 | 31 | |
22 | - //村人置換村グループ | |
23 | - public static $replace_human = [ | |
24 | - 'replace_human', 'full_mad', 'full_cupid', 'full_quiz', 'full_vampire', | |
25 | - 'full_chiroptera', 'full_patron', 'full_mania', 'full_unknown_mania' | |
26 | - ]; | |
27 | - | |
28 | 32 | //-- Cast::Execute() --// |
29 | 33 | //身代わり君固定配役 (順番依存あり) |
30 | 34 | public static $cast_dummy_boy_fix_role = ['quiz', 'gerd']; |
@@ -146,7 +146,7 @@ | ||
146 | 146 | |
147 | 147 | //-- 村人上限補正 --// |
148 | 148 | if (true === $this->EnableCastChaosCalibration() && |
149 | - false === OptionManager::Exists('replace_human') && | |
149 | + false === OptionManager::Exists('group_replace_human') && | |
150 | 150 | ArrayFilter::Exists($role_list, 'human')) { |
151 | 151 | $role = 'human'; |
152 | 152 | $count = $role_list[$role] - round($user_count / ChaosConfig::$max_human_rate); |
@@ -37,6 +37,11 @@ | ||
37 | 37 | return false; |
38 | 38 | } |
39 | 39 | |
40 | + //オプション存在判定 (闇鍋モード) | |
41 | + public static function ExistsChaos() { | |
42 | + return self::Exists('group_chaos'); | |
43 | + } | |
44 | + | |
40 | 45 | //オプションクラスロード |
41 | 46 | public static function GetFilter($type) { |
42 | 47 | foreach (OptionFilterData::$$type as $option) { |
@@ -138,7 +143,7 @@ | ||
138 | 143 | //配役一覧出力用フィルター取得 |
139 | 144 | public static function GetCastMessageFilter() { |
140 | 145 | //闇鍋モード判定 |
141 | - if (DB::$ROOM->IsOptionGroup('chaos')) { | |
146 | + if (OptionManager::ExistsChaos()) { | |
142 | 147 | foreach (OptionFilterData::$cast_message as $option) { |
143 | 148 | if (DB::$ROOM->IsOption($option)) { |
144 | 149 | return OptionLoader::Load($option); |
@@ -9,7 +9,7 @@ | ||
9 | 9 | public $mix_in = ['decide']; |
10 | 10 | |
11 | 11 | protected function IgnoreResult() { |
12 | - return false === DB::$ROOM->IsOptionGroup('chaos'); | |
12 | + return false === OptionManager::ExistsChaos(); | |
13 | 13 | } |
14 | 14 | |
15 | 15 | protected function OutputAddResult() { |
@@ -120,8 +120,8 @@ | ||
120 | 120 | |
121 | 121 | //闇鍋式希望制オプション判定 |
122 | 122 | public function IsChaosWish() { |
123 | - return $this->IsOptionGroup('chaos') || $this->IsOption('duel') || | |
124 | - $this->IsOption('festival') || OptionManager::Exists('replace_human') || | |
123 | + return OptionManager::ExistsChaos() || $this->IsOption('duel') || | |
124 | + $this->IsOption('festival') || OptionManager::Exists('group_replace_human') || | |
125 | 125 | $this->IsOptionGroup('change_'); |
126 | 126 | } |
127 | 127 |