환약 사용 기준 추가
This commit is contained in:
+14
-2
@@ -37,6 +37,8 @@ if($gameStor->turntime <= $gameStor->opentime){
|
||||
}
|
||||
}
|
||||
|
||||
$use_treatment = $me->getAuxVar('use_treatment')??10;
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
@@ -72,7 +74,17 @@ var availableDieImmediately = <?=$availableDieImmediately?'true':'false'?>;
|
||||
<input type=radio class='tnmt' name=tnmt value=0 <?=$me->getVar('tnmt')==0?"checked":""; ?>>수동참여
|
||||
<input type=radio class='tnmt' name=tnmt value=1 <?=$me->getVar('tnmt')==1?"checked":""; ?>>자동참여
|
||||
】<br>
|
||||
∞<font color=orange>개막직전 남는자리가 있을경우 랜덤하게 참여합니다.</font><br><br>
|
||||
∞<span style='color:orange'>개막직전 남는자리가 있을경우 랜덤하게 참여합니다.</span><br><br>
|
||||
|
||||
환약 사용 【<select id='use_treatment' name='use_treatment'>
|
||||
<option value=10 <?=$use_treatment==10?"selected":""; ?>>경상</option>
|
||||
<option value=20 <?=$use_treatment==21?"selected":""; ?>>중상</option>
|
||||
<option value=40 <?=$use_treatment==41?"selected":""; ?>>심각</option>
|
||||
<option value=60 <?=$use_treatment==61?"selected":""; ?>>위독</option>
|
||||
<option value=100 <?=$use_treatment==100?"selected":""; ?>>사용안함</option>
|
||||
</select>】<br>
|
||||
∞<span style='color:orange'>부상을 입었을 때 환약을 사용하는 기준입니다.</span><br><br>
|
||||
|
||||
수비 【<select id='defence_train' name='defence_train'>
|
||||
<option value=90 <?=$me->getVar('defence_train')==90?"selected":""; ?>>☆(훈사90)</option>
|
||||
<option value=80 <?=$me->getVar('defence_train')==80?"selected":""; ?>>◎(훈사80)</option>
|
||||
@@ -82,7 +94,7 @@ var availableDieImmediately = <?=$availableDieImmediately?'true':'false'?>;
|
||||
</select>
|
||||
】<br><br>
|
||||
<input type=<?=$submit?> id='set_my_setting' name=btn style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px; value=설정저장><br>
|
||||
∞<font color=orange>설정저장은 이달중 <?=$myset?>회 남았습니다.</font><br><br>
|
||||
∞<span style='color:orange'>설정저장은 이달중 <?=$myset?>회 남았습니다.</span><br><br>
|
||||
<?php if(!($gameStor->autorun_user['limit_minutes']??false)): ?>
|
||||
휴 가 신 청<br>
|
||||
<button type="button" id='vacation' style=background-color:<?=GameConst::$basecolor2?>;color:white;width:160px;height:30px;font-size:13px;>휴가 신청</button><br><br>
|
||||
|
||||
@@ -15,6 +15,7 @@ increaseRefresh("내정보 수정", 0);
|
||||
$action = Util::getPost('action');
|
||||
$tnmt = Util::getPost('tnmt', 'int', 1);
|
||||
$defence_train = Util::getPost('defence_train', 'int', 80);
|
||||
$use_treatment = Util::getPost('use_treatment', 'int', 10);
|
||||
//$detachNPC = Util::getPost('detachNPC', 'bool');
|
||||
$detachNPC = false;
|
||||
|
||||
@@ -48,9 +49,10 @@ if($defence_train != $me->getVar('defence_train')){
|
||||
$me->increaseVar('myset', -1);
|
||||
$me->setVar('defence_train', $defence_train);
|
||||
}
|
||||
$myset -= 1;
|
||||
}
|
||||
|
||||
$me->setAuxVar('use_treatment', Util::valueFit($use_treatment, 10, 100));
|
||||
|
||||
if($me->getVar('tnmt') != $tnmt){
|
||||
$me->setVar('tnmt', $tnmt);
|
||||
}
|
||||
|
||||
@@ -143,6 +143,7 @@ jQuery(function($){
|
||||
data:{
|
||||
tnmt:$('.tnmt:checked').val(),
|
||||
defence_train:$('#defence_train').val(),
|
||||
use_treatment:$('#use_treatment').val(),
|
||||
}
|
||||
}).then(function(data){
|
||||
if(!data){
|
||||
|
||||
@@ -18,7 +18,7 @@ class che_치료_환약 extends \sammo\BaseItem{
|
||||
|
||||
public function getPreTurnExecuteTriggerList(General $general):?GeneralTriggerCaller{
|
||||
return new GeneralTriggerCaller(
|
||||
new GeneralTrigger\che_아이템치료($general)
|
||||
new GeneralTrigger\che_아이템치료($general, $general->getAuxVar('use_treatment')??10)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user