환약 사용 기준 추가

This commit is contained in:
Hide_D committed 2020-06-01 02:31:46 +09:00
1 parent 82f2eecfe8
commit e4322e60cc
5 files changed
+26 -5

No files matched your search

@@ -9,13 +9,19 @@ use sammo\JosaUtil;
class che_아이템치료 extends BaseGeneralTrigger{
protected $priority = 20010;
protected $injuryTarget = 10;
public function __construct(General $general, int $injuryTarget=10){
$this->object = $general;
$this->injuryTarget = $injuryTarget;
}
public function action(?array $env=null, $arg=null):?array{
/** @var \sammo\General $general */
$general = $this->object;
if($general->getVar('injury') >= 10){
if($general->getVar('injury') >= $this->injuryTarget){
if($general->getReservedTurn(0, $env) instanceof \sammo\Command\General\che_요양){
return $env;
}