feat, game: 초반 '배신 수치' 1 증가, 배신 패널티 증가
- 184년 1월부터 배신수치 1 증가. - 배신 패널티 당 15%, 최대 6회
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user