의병모집 구현

This commit is contained in:
2020-03-22 04:16:42 +09:00
parent 869dd8d5a8
commit 7c7caf98c1
5 changed files with 222 additions and 206 deletions
+8 -1
View File
@@ -49,6 +49,8 @@ class NPC{
protected $experience = null;
protected $dedication = null;
public $killturn = null;
//XXX: 코드 못 바꾸나?
protected $dex0 = 0;
protected $dex10 = 0;
@@ -294,7 +296,12 @@ class NPC{
$turntime = \sammo\getRandTurn($env['turnterm'], new \DateTimeImmutable($env['turntime']));
$killturn = ($this->death - $year) * 12 + mt_rand(0, 11);
if($this->killturn){
$killturn = $this->killturn;
}
else{
$killturn = ($this->death - $year) * 12 + mt_rand(0, 11) + $month - 1;
}
$specage = $this->specAge?:$age + 1;
$specage2 = $this->specAge2?:$age + 1;