• R/O
  • SSH
  • HTTPS

jinrousiki: Commit


Commit MetaInfo

Revision2683 (tree)
Time2020-07-05 00:03:58
Authorumethyl

Log Message

OptionManager::ExistsChaos()

Change Summary

Incremental Difference

--- trunk/include/cast_class.php (revision 2682)
+++ trunk/include/cast_class.php (revision 2683)
@@ -398,7 +398,7 @@
398398 //self::Stack()->p(self::RAND, '◆Rand');
399399
400400 //闇鍋モード処理
401- if (DB::$ROOM->IsOption('no_sub_role') || false === DB::$ROOM->IsOptionGroup('chaos')) {
401+ if (DB::$ROOM->IsOption('no_sub_role') || OptionManager::ExistsChaos()) {
402402 return;
403403 }
404404
--- trunk/include/data/option_filter_data_class.php (revision 2682)
+++ trunk/include/data/option_filter_data_class.php (revision 2683)
@@ -2,6 +2,16 @@
22 //-- ◆文字化け抑制◆ --//
33 //-- オプションフィルタデータベース --//
44 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+
515 //-- Cast::Get() --//
616 //基礎配役 (順番依存あり)
717 public static $cast_base = [
@@ -19,12 +29,6 @@
1929 //追加配役/闇鍋固定枠
2030 public static $cast_chaos_fix_role = ['topping', 'gerd', 'detective'];
2131
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-
2832 //-- Cast::Execute() --//
2933 //身代わり君固定配役 (順番依存あり)
3034 public static $cast_dummy_boy_fix_role = ['quiz', 'gerd'];
--- trunk/include/option/chaos.php (revision 2682)
+++ trunk/include/option/chaos.php (revision 2683)
@@ -146,7 +146,7 @@
146146
147147 //-- 村人上限補正 --//
148148 if (true === $this->EnableCastChaosCalibration() &&
149- false === OptionManager::Exists('replace_human') &&
149+ false === OptionManager::Exists('group_replace_human') &&
150150 ArrayFilter::Exists($role_list, 'human')) {
151151 $role = 'human';
152152 $count = $role_list[$role] - round($user_count / ChaosConfig::$max_human_rate);
--- trunk/include/option/option_class.php (revision 2682)
+++ trunk/include/option/option_class.php (revision 2683)
@@ -37,6 +37,11 @@
3737 return false;
3838 }
3939
40+ //オプション存在判定 (闇鍋モード)
41+ public static function ExistsChaos() {
42+ return self::Exists('group_chaos');
43+ }
44+
4045 //オプションクラスロード
4146 public static function GetFilter($type) {
4247 foreach (OptionFilterData::$$type as $option) {
@@ -138,7 +143,7 @@
138143 //配役一覧出力用フィルター取得
139144 public static function GetCastMessageFilter() {
140145 //闇鍋モード判定
141- if (DB::$ROOM->IsOptionGroup('chaos')) {
146+ if (OptionManager::ExistsChaos()) {
142147 foreach (OptionFilterData::$cast_message as $option) {
143148 if (DB::$ROOM->IsOption($option)) {
144149 return OptionLoader::Load($option);
--- trunk/include/role/quiz.php (revision 2682)
+++ trunk/include/role/quiz.php (revision 2683)
@@ -9,7 +9,7 @@
99 public $mix_in = ['decide'];
1010
1111 protected function IgnoreResult() {
12- return false === DB::$ROOM->IsOptionGroup('chaos');
12+ return false === OptionManager::ExistsChaos();
1313 }
1414
1515 protected function OutputAddResult() {
--- trunk/include/room_class.php (revision 2682)
+++ trunk/include/room_class.php (revision 2683)
@@ -120,8 +120,8 @@
120120
121121 //闇鍋式希望制オプション判定
122122 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') ||
125125 $this->IsOptionGroup('change_');
126126 }
127127
Show on old repository browser