feat, game: 초반 '배신 수치' 1 증가, 배신 패널티 증가

- 184년 1월부터 배신수치 1 증가.
- 배신 패널티 당 15%, 최대 6회
This commit is contained in:
2022-09-21 23:12:56 +09:00
parent c89bd2f63f
commit 635f1ae077
6 changed files with 39 additions and 7 deletions
@@ -0,0 +1,20 @@
<?php
namespace sammo\Event\Action;
use sammo\DB;
class AddGlobalBetray extends \sammo\Event\Action
{
public function __construct(private int $cnt = 1, private int $ifMax = 0)
{
}
public function run(array $env)
{
$db = DB::db();
$db->update('general', [
'betray' => $db->sqleval('betray + %i', $this->cnt),
], 'betray <= %i', $this->ifMax);
}
}