• R/O
  • SSH
  • HTTPS

jinrousiki: コミット


コミットメタ情報

リビジョン1962 (tree)
日時2017-04-15 19:00:01
作者umethyl

ログメッセージ

Role_ogre::GetWolfEatResistRate()

変更サマリ

差分

--- trunk/include/role/north_ogre.php (revision 1961)
+++ trunk/include/role/north_ogre.php (revision 1962)
@@ -3,13 +3,17 @@
33 ◆水鬼 (north_ogre)
44 ○仕様
55 ・勝利:生存 + 自分と同列の上側にいる人の全滅 + 村人陣営勝利
6+ ・人狼襲撃無効確率:40%
67 */
78 RoleLoader::LoadFile('ogre');
89 class Role_north_ogre extends Role_ogre {
9- public $resist_rate = 40;
1010 public $reduce_rate = 2;
1111 public $reflect_rate = 40;
1212
13+ protected function GetWolfEatResistRate() {
14+ return 40;
15+ }
16+
1317 public function Win($winner) {
1418 if ($winner != WinCamp::HUMAN || $this->IsActorDead()) return false;
1519
--- trunk/include/role/dowser_yaksa.php (revision 1961)
+++ trunk/include/role/dowser_yaksa.php (revision 1962)
@@ -4,13 +4,17 @@
44 ○仕様
55 ・勝利:生存 + 自分よりサブ役職の所持数が多い人の全滅
66 ・人攫い無効:サブ役職未所持
7+ ・人狼襲撃無効確率:40%
78 */
89 RoleLoader::LoadFile('yaksa');
910 class Role_dowser_yaksa extends Role_yaksa {
10- public $resist_rate = 40;
1111 public $reduce_rate = 2;
1212 public $reflect_rate = 40;
1313
14+ protected function GetWolfEatResistRate() {
15+ return 40;
16+ }
17+
1418 protected function IgnoreAssassin(User $user) {
1519 return $user->GetRoleCount() == 1;
1620 }
--- trunk/include/role/south_ogre.php (revision 1961)
+++ trunk/include/role/south_ogre.php (revision 1962)
@@ -3,13 +3,17 @@
33 ◆隠行鬼 (south_ogre)
44 ○仕様
55 ・勝利条件:生存 + 自分と同列の下側にいる人の全滅 + 村人陣営勝利
6+ ・人狼襲撃無効確率:40%
67 */
78 RoleLoader::LoadFile('ogre');
89 class Role_south_ogre extends Role_ogre {
9- public $resist_rate = 40;
1010 public $reduce_rate = 2;
1111 public $reflect_rate = 40;
1212
13+ protected function GetWolfEatResistRate() {
14+ return 40;
15+ }
16+
1317 public function Win($winner) {
1418 if ($winner != WinCamp::HUMAN || $this->IsActorDead()) return false;
1519
--- trunk/include/role/sacrifice_ogre.php (revision 1961)
+++ trunk/include/role/sacrifice_ogre.php (revision 1962)
@@ -6,12 +6,12 @@
66 ・仲間表示:洗脳者
77 ・人攫い無効:吸血鬼陣営
88 ・人攫い:洗脳者付加
9+ ・人狼襲撃無効確率:0% (身代わり)
910 ・身代わり:洗脳者
1011 */
1112 RoleLoader::LoadFile('ogre');
1213 class Role_sacrifice_ogre extends Role_ogre {
1314 public $mix_in = array('protected');
14- public $resist_rate = 0;
1515 public $reduce_base = 3;
1616 public $reduce_rate = 5;
1717 public $reflect_rate = 50;
@@ -29,6 +29,10 @@
2929 return array('psycho_infected_list' => $stack);
3030 }
3131
32+ protected function GetWolfEatResistRate() {
33+ return 0;
34+ }
35+
3236 protected function IgnoreAssassin(User $user) {
3337 return $user->IsCamp(Camp::VAMPIRE);
3438 }
--- trunk/include/role/ogre.php (revision 1961)
+++ trunk/include/role/ogre.php (revision 1962)
@@ -4,12 +4,12 @@
44 ○仕様
55 ・勝利:生存 + 人狼系の生存
66 ・人狼襲撃:確率無効
7+ ・人狼襲撃無効確率:30%
78 */
89 class Role_ogre extends Role {
910 public $action = VoteAction::OGRE;
1011 public $not_action = VoteAction::NOT_OGRE;
1112 public $action_date = RoleActionDate::AFTER;
12- public $resist_rate = 30;
1313 public $reduce_base = 1;
1414 public $reduce_rate = 5;
1515 public $reflect_rate = 30;
@@ -23,6 +23,29 @@
2323 return DB::$ROOM->IsEvent('force_assassin_do');
2424 }
2525
26+ final public function WolfEatResist() {
27+ $event = $this->GetOgreEvent();
28+ $rate = is_null($event) ? $this->GetWolfEatResistRate() : $event;
29+ //Text::p($rate, '◆Resist Rate [ogre]');
30+ return Lottery::Percent($rate);
31+ }
32+
33+ //人狼襲撃無効確率取得
34+ protected function GetWolfEatResistRate() {
35+ return 30;
36+ }
37+
38+ //鬼陣営天候情報取得 (朧月 > 叢雲)
39+ final protected function GetOgreEvent() {
40+ if (DB::$ROOM->IsEvent('full_ogre')) {
41+ return 100;
42+ } elseif (DB::$ROOM->IsEvent('seal_ogre')) {
43+ return 0;
44+ } else {
45+ return null;
46+ }
47+ }
48+
2649 //人攫い情報セット
2750 //罠 > 対暗殺護衛 > 死亡 > 逃亡 > 反射 > 個別無効 > 人攫い成功判定 > 通常 → 更新判定
2851 public function SetAssassin(User $user) {
@@ -41,7 +64,7 @@
4164 return false;
4265 } else {
4366 $count = (int)$this->GetActor()->GetMainRoleTarget();
44- $event = $this->GetEvent();
67+ $event = $this->GetOgreEvent();
4568 if (is_null($event)) {
4669 $rate = ceil(100 * pow($this->reduce_base / $this->reduce_rate, $count));
4770 } else {
@@ -65,11 +88,6 @@
6588 return false;
6689 }
6790
68- //天候情報取得
69- final protected function GetEvent() {
70- return DB::$ROOM->IsEvent('full_ogre') ? 100 : (DB::$ROOM->IsEvent('seal_ogre') ? 0 : null);
71- }
72-
7391 //人攫い
7492 protected function Assassin(User $user) {
7593 $this->AddSuccess($user->id, 'ogre');
@@ -82,13 +100,6 @@
82100 }
83101 }
84102
85- //人狼襲撃耐性判定
86- final public function WolfEatResist() {
87- $rate = is_null($event = $this->GetEvent()) ? $this->resist_rate : $event;
88- //Text::p($rate, '◆Resist Rate [ogre]');
89- return Lottery::Percent($rate);
90- }
91-
92103 public function Win($winner) {
93104 if ($this->IsActorDead()) return false;
94105 if ($winner == WinCamp::WOLF) return true;
--- trunk/include/role/revive_ogre.php (revision 1961)
+++ trunk/include/role/revive_ogre.php (revision 1962)
@@ -3,17 +3,20 @@
33 ◆茨木童子 (revive_ogre)
44 ○仕様
55 ・勝利:生存 + 嘘吐き全滅
6- ・人狼襲撃:確率蘇生
6+ ・人狼襲撃:確率蘇生 (無効確率 0%)
77 */
88 RoleLoader::LoadFile('ogre');
99 class Role_revive_ogre extends Role_ogre {
1010 public $mix_in = array('psycho_mage', 'revive_pharmacist');
11- public $resist_rate = 0;
1211 public $reduce_rate = 2;
1312 public $reflect_rate = 40;
1413
14+ protected function GetWolfEatResistRate() {
15+ return 0;
16+ }
17+
1518 protected function IsResurrect() {
16- $event = $this->GetEvent();
19+ $event = $this->GetOgreEvent();
1720 return Lottery::Percent(is_null($event) ? 40 : $event);
1821 }
1922
--- trunk/include/role/collector_ogre.php (revision 1961)
+++ trunk/include/role/collector_ogre.php (revision 1962)
@@ -3,14 +3,18 @@
33 ◆蒐集鬼 (collector_ogre)
44 ○仕様
55 ・勝利:生存 + 生存者の役職系に重複なし
6+ ・人狼襲撃無効確率:25%
67 */
78 RoleLoader::LoadFile('ogre');
89 class Role_collector_ogre extends Role_ogre {
9- public $resist_rate = 25;
1010 public $reduce_base = 3;
1111 public $reduce_rate = 5;
1212 public $reflect_rate = 45;
1313
14+ protected function GetWolfEatResistRate() {
15+ return 25;
16+ }
17+
1418 public function Win($winner) {
1519 if ($this->IsActorDead()) return false;
1620
--- trunk/include/role/east_ogre.php (revision 1961)
+++ trunk/include/role/east_ogre.php (revision 1962)
@@ -3,13 +3,17 @@
33 ◆風鬼 (east_ogre)
44 ○仕様
55 ・勝利条件:生存 + 自分と同列の右側にいる人の全滅 + 村人陣営勝利
6+ ・人狼襲撃無効確率:40%
67 */
78 RoleLoader::LoadFile('ogre');
89 class Role_east_ogre extends Role_ogre {
9- public $resist_rate = 40;
1010 public $reduce_rate = 2;
1111 public $reflect_rate = 40;
1212
13+ protected function GetWolfEatResistRate() {
14+ return 40;
15+ }
16+
1317 public function Win($winner) {
1418 if ($winner != WinCamp::HUMAN || $this->IsActorDead()) return false;
1519
--- trunk/include/role/power_ogre.php (revision 1961)
+++ trunk/include/role/power_ogre.php (revision 1962)
@@ -3,14 +3,18 @@
33 ◆星熊童子 (power_ogre)
44 ○仕様
55 ・勝利:生存 + 人口を三分の一以下にする
6+ ・人狼襲撃無効確率:40%
67 */
78 RoleLoader::LoadFile('ogre');
89 class Role_power_ogre extends Role_ogre {
9- public $resist_rate = 40;
1010 public $reduce_base = 7;
1111 public $reduce_rate = 10;
1212 public $reflect_rate = 40;
1313
14+ protected function GetWolfEatResistRate() {
15+ return 40;
16+ }
17+
1418 public function Win($winner) {
1519 return $this->IsActorLive() && DB::$USER->CountLive() <= ceil(DB::$USER->Count() / 3);
1620 }
--- trunk/include/role/incubus_ogre.php (revision 1961)
+++ trunk/include/role/incubus_ogre.php (revision 1962)
@@ -3,13 +3,17 @@
33 ◆般若 (incubus_ogre)
44 ○仕様
55 ・勝利:生存 + 女性全滅
6+ ・人狼襲撃無効確率:40%
67 */
78 RoleLoader::LoadFile('ogre');
89 class Role_incubus_ogre extends Role_ogre {
9- public $resist_rate = 40;
1010 public $reduce_rate = 2;
1111 public $reflect_rate = 40;
1212
13+ protected function GetWolfEatResistRate() {
14+ return 40;
15+ }
16+
1317 public function Win($winner) {
1418 if ($this->IsActorDead()) return false;
1519
--- trunk/include/role/power_yaksa.php (revision 1961)
+++ trunk/include/role/power_yaksa.php (revision 1962)
@@ -4,14 +4,18 @@
44 ○仕様
55 ・勝利:生存 + 生存陣営数が出現陣営の半分以下
66 ・人攫い無効:村人陣営
7+ ・人狼襲撃無効確率:30%
78 */
89 RoleLoader::LoadFile('yaksa');
910 class Role_power_yaksa extends Role_yaksa {
10- public $resist_rate = 30;
1111 public $reduce_base = 3;
1212 public $reduce_rate = 5;
1313 public $reflect_rate = 30;
1414
15+ protected function GetWolfEatResistRate() {
16+ return 30;
17+ }
18+
1519 protected function IgnoreAssassin(User $user) {
1620 return $user->IsCamp(Camp::HUMAN, true);
1721 }
--- trunk/include/role/west_ogre.php (revision 1961)
+++ trunk/include/role/west_ogre.php (revision 1962)
@@ -3,13 +3,17 @@
33 ◆金鬼 (west_ogre)
44 ○仕様
55 ・勝利:生存 + 自分と同列の左側にいる人の全滅 + 村人陣営の勝利
6+ ・人狼襲撃無効確率:40%
67 */
78 RoleLoader::LoadFile('ogre');
89 class Role_west_ogre extends Role_ogre {
9- public $resist_rate = 40;
1010 public $reduce_rate = 2;
1111 public $reflect_rate = 40;
1212
13+ protected function GetWolfEatResistRate() {
14+ return 40;
15+ }
16+
1317 public function Win($winner) {
1418 if ($winner != WinCamp::HUMAN || $this->IsActorDead()) return false;
1519
--- trunk/include/role/yaksa.php (revision 1961)
+++ trunk/include/role/yaksa.php (revision 1962)
@@ -3,13 +3,17 @@
33 ◆夜叉 (yaksa)
44 ○仕様
55 ・勝利:生存 + 人狼系全滅
6+ ・人狼襲撃無効確率:20%
67 ・人攫い無効:人狼系以外
78 */
89 RoleLoader::LoadFile('ogre');
910 class Role_yaksa extends Role_ogre {
10- public $resist_rate = 20;
1111 public $reflect_rate = 20;
1212
13+ protected function GetWolfEatResistRate() {
14+ return 20;
15+ }
16+
1317 protected function IgnoreAssassin(User $user) {
1418 return ! $user->IsMainGroup(CampGroup::WOLF);
1519 }
--- trunk/include/role/wise_ogre.php (revision 1961)
+++ trunk/include/role/wise_ogre.php (revision 1962)
@@ -3,14 +3,18 @@
33 ◆夜行鬼 (wise_ogre)
44 ○仕様
55 ・勝利:生存 + 共有者系・人狼系・妖狐系全滅
6+ ・人狼襲撃無効確率:40%
67 */
78 RoleLoader::LoadFile('ogre');
89 class Role_wise_ogre extends Role_ogre {
910 public $mix_in = array('common');
10- public $resist_rate = 40;
1111 public $reduce_rate = 2;
1212 public $reflect_rate = 40;
1313
14+ protected function GetWolfEatResistRate() {
15+ return 40;
16+ }
17+
1418 public function Win($winner) {
1519 if ($this->IsActorDead()) return false;
1620
旧リポジトリブラウザで表示