• R/O
  • SSH
  • HTTPS

jinrousiki: Commit


Commit MetaInfo

Revision2685 (tree)
Time2020-07-05 00:28:50
Authorumethyl

Log Message

Room::IsChaosWish() -> OptionManager::ExistsWishRoleChaos()

Change Summary

Incremental Difference

--- trunk/include/cast_class.php (revision 2684)
+++ trunk/include/cast_class.php (revision 2685)
@@ -296,7 +296,8 @@
296296 //希望制配役
297297 private static function CastWishRole() {
298298 $stack = self::Stack();
299- $stack->Set(self::WISH, DB::$ROOM->IsChaosWish() || DB::$ROOM->IsOption('step')); //特殊村用
299+ //特殊村用
300+ $stack->Set(self::WISH, OptionManager::ExistsWishRoleChaos() || DB::$ROOM->IsOption('step'));
300301
301302 foreach ($stack->Get(self::USER) as $uname) {
302303 $role = self::GetWishRole($uname); //希望役職を取得
--- trunk/include/data/option_filter_data_class.php (revision 2684)
+++ trunk/include/data/option_filter_data_class.php (revision 2685)
@@ -3,9 +3,6 @@
33 //-- オプションフィルタデータベース --//
44 final class OptionFilterData {
55 //-- 役職グループ --//
6- //闇鍋モードグループ
7- public static $group_chaos = ['chaos', 'chaosfull', 'chaos_hyper', 'chaos_verso'];
8-
96 //村人置換村グループ
107 public static $group_replace_human = [
118 'replace_human', 'full_mad', 'full_cupid', 'full_quiz', 'full_vampire',
@@ -12,6 +9,18 @@
129 'full_chiroptera', 'full_patron', 'full_mania', 'full_unknown_mania'
1310 ];
1411
12+ //闇鍋モードグループ
13+ public static $group_chaos = ['chaos', 'chaosfull', 'chaos_hyper', 'chaos_verso'];
14+
15+ //闇鍋式希望制グループ (村人置換 + 闇鍋を追加)
16+ public static $group_wish_role_chaos = [
17+ 'duel', 'festival',
18+ 'change_common', 'change_hermit_common',
19+ 'change_mad', 'change_fanatic_mad', 'change_whisper_mad', 'change_immolate_mad',
20+ 'change_cupid', 'change_mind_cupid', 'change_triangle_cupid',
21+ 'change_angel', 'change_exchange_angel'
22+ ];
23+
1524 //-- Cast::Get() --//
1625 //基礎配役 (順番依存あり)
1726 public static $cast_base = [
--- trunk/include/option/option_class.php (revision 2684)
+++ trunk/include/option/option_class.php (revision 2685)
@@ -39,7 +39,7 @@
3939
4040 //オプション存在判定 (村人置換村)
4141 public static function ExistsReplaceHuman() {
42- return self::Exists('group_replace_human')
42+ return self::Exists('group_replace_human');
4343 }
4444
4545 //オプション存在判定 (闇鍋モード)
@@ -47,6 +47,12 @@
4747 return self::Exists('group_chaos');
4848 }
4949
50+ //オプション存在判定 (闇鍋式希望制)
51+ public static function ExistsWishRoleChaos() {
52+ return self::ExistsReplaceHuman() || self::ExistsChaos() ||
53+ self::Exists('group_wish_role_chaos');
54+ }
55+
5056 //オプションクラスロード
5157 public static function GetFilter($type) {
5258 foreach (OptionFilterData::$$type as $option) {
--- trunk/include/option/wish_role.php (revision 2684)
+++ trunk/include/option/wish_role.php (revision 2685)
@@ -21,7 +21,7 @@
2121 }
2222
2323 //固有判定
24- if (DB::$ROOM->IsChaosWish()) {
24+ if (OptionManager::ExistsWishRoleChaos()) {
2525 if (DB::$ROOM->IsOption('detective')) {
2626 $stack[] = 'detective_common';
2727 }
--- trunk/include/room_class.php (revision 2684)
+++ trunk/include/room_class.php (revision 2685)
@@ -118,13 +118,6 @@
118118 return $this->IsOption('quiz');
119119 }
120120
121- //闇鍋式希望制オプション判定
122- public function IsChaosWish() {
123- return OptionManager::ExistsChaos() || $this->IsOption('duel') ||
124- $this->IsOption('festival') || OptionManager::ExistsReplaceHuman() ||
125- $this->IsOptionGroup('change_');
126- }
127-
128121 //-- イベント関連 --//
129122 //イベント情報を DB から取得
130123 public function LoadEvent() {
Show on old repository browser