• R/O
  • SSH
  • HTTPS

jinrousiki: コミット


コミットメタ情報

リビジョン1964 (tree)
日時2017-04-15 19:41:38
作者umethyl

ログメッセージ

Role_protected::IsSacrifice()

変更サマリ

差分

--- trunk/include/role/sacrifice_fox.php (revision 1963)
+++ trunk/include/role/sacrifice_fox.php (revision 1964)
@@ -13,7 +13,7 @@
1313 return false;
1414 }
1515
16- public function IsSacrifice(User $user) {
16+ protected function IsSacrifice(User $user) {
1717 return $user->IsMainGroup(CampGroup::CHILD_FOX, CampGroup::CHIROPTERA);
1818 }
1919 }
--- trunk/include/role/boss_chiroptera.php (revision 1963)
+++ trunk/include/role/boss_chiroptera.php (revision 1964)
@@ -7,7 +7,7 @@
77 class Role_boss_chiroptera extends Role {
88 public $mix_in = array('protected');
99
10- public function IsSacrifice(User $user) {
10+ protected function IsSacrifice(User $user) {
1111 return ! $this->IsActor($user) && $user->IsMainCamp(Camp::CHIROPTERA);
1212 }
1313 }
--- trunk/include/role/doll_master.php (revision 1963)
+++ trunk/include/role/doll_master.php (revision 1964)
@@ -14,7 +14,7 @@
1414 return true;
1515 }
1616
17- public function IsSacrifice(User $user) {
17+ protected function IsSacrifice(User $user) {
1818 return $this->IsDoll($user);
1919 }
2020
--- trunk/include/role/sacrifice_ogre.php (revision 1963)
+++ trunk/include/role/sacrifice_ogre.php (revision 1964)
@@ -6,7 +6,7 @@
66 ・仲間表示:洗脳者
77 ・人攫い無効:吸血鬼陣営
88 ・人攫い:洗脳者付加
9- ・人狼襲撃無効確率:0% (身代わり)
9+ ・人狼襲撃:身代わり (無効確率 0%)
1010 ・身代わり:洗脳者
1111 */
1212 RoleLoader::LoadFile('ogre');
@@ -33,6 +33,10 @@
3333 return 0;
3434 }
3535
36+ protected function IsSacrifice(User $user) {
37+ return ! $this->IsActor($user) && $user->IsRole('psycho_infected');
38+ }
39+
3640 protected function IgnoreAssassin(User $user) {
3741 return $user->IsCamp(Camp::VAMPIRE);
3842 }
@@ -41,10 +45,6 @@
4145 $user->AddRole('psycho_infected');
4246 }
4347
44- public function IsSacrifice(User $user) {
45- return ! $this->IsActor($user) && $user->IsRole('psycho_infected');
46- }
47-
4848 public function Win($winner) {
4949 return $winner != WinCamp::HUMAN && $this->IsActorLive();
5050 }
--- trunk/include/role/sacrifice_common.php (revision 1963)
+++ trunk/include/role/sacrifice_common.php (revision 1964)
@@ -8,7 +8,7 @@
88 class Role_sacrifice_common extends Role_common {
99 public $mix_in = array('protected');
1010
11- public function IsSacrifice(User $user) {
11+ protected function IsSacrifice(User $user) {
1212 return $user->IsRole('human', 'chiroptera');
1313 }
1414 }
--- trunk/include/role/protected.php (revision 1963)
+++ trunk/include/role/protected.php (revision 1964)
@@ -25,9 +25,11 @@
2525 //人狼襲撃得票カウンター (Mixin 用)
2626 public function WolfEatReaction() {
2727 if ($this->IgnoreSacrifice()) return false;
28+
2829 $stack = array();
2930 foreach (DB::$USER->Get() as $user) {
3031 if ($user->IsDead(true) || RoleUser::IsAvoidLovers($user, true)) continue;
32+
3133 if ($this->CallParent('IsSacrifice', $user)) {
3234 $stack[] = $user->id;
3335 }
@@ -35,6 +37,11 @@
3537 return $this->Sacrifice($stack);
3638 }
3739
40+ //身代わり対象判定
41+ protected function IsSacrifice(User $user) {
42+ return false;
43+ }
44+
3845 //身代わり無効判定
3946 private function IgnoreSacrifice() {
4047 return DB::$ROOM->IsEvent('no_sacrifice');
--- trunk/include/role/immolate_mad.php (revision 1963)
+++ trunk/include/role/immolate_mad.php (revision 1964)
@@ -12,12 +12,12 @@
1212 }
1313
1414 //能力発現処理
15- public function AddMusterRole() {
15+ final protected function AddMusterRole() {
1616 $this->GetActor()->AddRole($this->GetMusterRole());
1717 }
1818
19- //発現役職
20- protected function GetMusterRole() {
19+ //発現役職取得
20+ final protected function GetMusterRole() {
2121 return 'muster_ability';
2222 }
2323
@@ -26,7 +26,7 @@
2626 }
2727
2828 //能力発現判定
29- public function IsMusterRole() {
29+ final protected function IsMusterRole() {
3030 return $this->GetActor()->IsRole($this->GetMusterRole());
3131 }
3232 }
--- trunk/include/role/sacrifice_vampire.php (revision 1963)
+++ trunk/include/role/sacrifice_vampire.php (revision 1964)
@@ -8,7 +8,7 @@
88 class Role_sacrifice_vampire extends Role_vampire {
99 public $mix_in = array('protected');
1010
11- public function IsSacrifice(User $user) {
11+ protected function IsSacrifice(User $user) {
1212 return $user->IsPartner('infected', $this->GetID());
1313 }
1414 }
旧リポジトリブラウザで表示