• R/O
  • SSH
  • HTTPS

jinrousiki: Commit


Commit MetaInfo

Révision2774 (tree)
l'heure2021-08-16 05:50:25
Auteurumethyl

Message de Log

Number::MultipleThree()

Change Summary

Modification

--- trunk/include/functions.php (revision 2773)
+++ trunk/include/functions.php (revision 2774)
@@ -333,6 +333,11 @@
333333 public static function Odd($number, $limit = null) {
334334 return self::Multiple($number, 2, 1, $limit);
335335 }
336+
337+ //3の倍数
338+ public static function MultipleThree($number, $limit = null) {
339+ return self::Multiple($number, 3, 0, $limit);
340+ }
336341 }
337342
338343 //-- Switch (bool) 関連 --//
--- trunk/include/role/agent_escaper.php (revision 2773)
+++ trunk/include/role/agent_escaper.php (revision 2774)
@@ -8,7 +8,7 @@
88 RoleLoader::LoadFile('escaper');
99 class Role_agent_escaper extends Role_escaper {
1010 protected function IsAddVote() {
11- return DB::$ROOM->date > 2 && DB::$ROOM->date % 3 == 0;
11+ return Number::MultipleThree(DB::$ROOM->date, 2);
1212 }
1313
1414 protected function GetDisabledAddVoteNightMessage() {
--- trunk/include/role/fire_depraver.php (revision 2773)
+++ trunk/include/role/fire_depraver.php (revision 2774)
@@ -2,7 +2,7 @@
22 /*
33 ◆紂王 (fire_depraver)
44 ○仕様
5- ・処刑投票:狐火 (3 の倍数日)
5+ ・処刑投票:狐火 (3の倍数日)
66 */
77 RoleLoader::LoadFile('depraver');
88 class Role_fire_depraver extends Role_depraver {
@@ -13,7 +13,7 @@
1313 }
1414
1515 protected function IsVoteKillActionTarget(User $user) {
16- return DB::$ROOM->date % 3 == 0;
16+ return Number::MultipleThree(DB::$ROOM->date, 2);
1717 }
1818
1919 protected function GetVoteKillActionRole() {
--- trunk/include/role/fire_mad.php (revision 2773)
+++ trunk/include/role/fire_mad.php (revision 2774)
@@ -2,7 +2,7 @@
22 /*
33 ◆煙々羅 (fire_mad)
44 ○仕様
5- ・処刑投票:天火 (3 の倍数日)
5+ ・処刑投票:天火 (3の倍数日)
66 */
77 RoleLoader::LoadFile('critical_mad');
88 class Role_fire_mad extends Role_critical_mad {
@@ -11,7 +11,7 @@
1111 }
1212
1313 protected function IsVoteKillActionTarget(User $user) {
14- return DB::$ROOM->date % 3 == 0;
14+ return Number::MultipleThree(DB::$ROOM->date, 2);
1515 }
1616
1717 protected function GetVoteKillActionRole() {
--- trunk/include/role/seiren_mad.php (revision 2773)
+++ trunk/include/role/seiren_mad.php (revision 2774)
@@ -8,7 +8,7 @@
88 public $mix_in = ['vote' => 'fairy'];
99
1010 protected function IsFairyVote() {
11- return DB::$ROOM->date > 2 && DB::$ROOM->date % 3 == 0;
11+ return Number::MultipleThree(DB::$ROOM->date, 2);
1212 }
1313
1414 protected function GetDisabledFairyVoteNightMessage() {
Afficher sur ancien navigateur de dépôt.