TriggerCaller버그 수정
This commit is contained in:
+9
-9
@@ -585,19 +585,19 @@ function generalInfo(General $generalObj)
|
||||
|
||||
$injury = $generalObj->getVar('injury');
|
||||
if ($injury > 60) {
|
||||
$color = "<font color=red>";
|
||||
$color = "<span style='color:red'>";
|
||||
$injury = "위독";
|
||||
} elseif ($injury > 40) {
|
||||
$color = "<font color=magenta>";
|
||||
$color = "<span style='color:magenta'>";
|
||||
$injury = "심각";
|
||||
} elseif ($injury > 20) {
|
||||
$color = "<font color=orange>";
|
||||
$color = "<span style='color:orange'>";
|
||||
$injury = "중상";
|
||||
} elseif ($injury > 0) {
|
||||
$color = "<font color=yellow>";
|
||||
$color = "<span style='color:yellow'>";
|
||||
$injury = "경상";
|
||||
} else {
|
||||
$color = "<font color=white>";
|
||||
$color = "<span style='color:white'>";
|
||||
$injury = "건강";
|
||||
}
|
||||
|
||||
@@ -660,17 +660,17 @@ function generalInfo(General $generalObj)
|
||||
echo "<table width=498 class='tb_layout bg2'>
|
||||
<tr>
|
||||
<td width=64 height=64 rowspan=3 class='generalIcon' style='text-align:center;background:no-repeat center url(\"{$imagePath}\");background-size:64px;'> </td>
|
||||
<td colspan=9 height=16 style=text-align:center;color:" . newColor($nation['color']) . ";background-color:{$nation['color']};font-weight:bold;font-size:13px;>{$generalObj->getName()} 【 {$officerLevelText} | {$call} | {$color}{$injury}</font> 】 " . $generalObj->getTurnTime($generalObj::TURNTIME_HMS) . "</td>
|
||||
<td colspan=9 height=16 style=text-align:center;color:" . newColor($nation['color']) . ";background-color:{$nation['color']};font-weight:bold;font-size:13px;>{$generalObj->getName()} 【 {$officerLevelText} | {$call} | {$color}{$injury}</span> 】 " . $generalObj->getTurnTime($generalObj::TURNTIME_HMS) . "</td>
|
||||
</tr>
|
||||
<tr height=16>
|
||||
<td style='text-align:center;' class='bg1'><b>통솔</b></td>
|
||||
<td style='text-align:center;'> {$color}{$leadership}</font>{$lbonus} </td>
|
||||
<td style='text-align:center;'> {$color}{$leadership}</span>{$lbonus} </td>
|
||||
<td style='text-align:center;' width=45>" . bar(expStatus($generalObj->getVar('leadership_exp')), 20) . "</td>
|
||||
<td style='text-align:center;' class='bg1'><b>무력</b></td>
|
||||
<td style='text-align:center;'> {$color}{$strength}</font> </td>
|
||||
<td style='text-align:center;'> {$color}{$strength}</span> </td>
|
||||
<td style='text-align:center;' width=45>" . bar(expStatus($generalObj->getVar('strength_exp')), 20) . "</td>
|
||||
<td style='text-align:center;' class='bg1'><b>지력</b></td>
|
||||
<td style='text-align:center;'> {$color}{$intel}</font> </td>
|
||||
<td style='text-align:center;'> {$color}{$intel}</span> </td>
|
||||
<td style='text-align:center;' width=45>" . bar(expStatus($generalObj->getVar('intel_exp')), 20) . "</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -20,7 +20,6 @@ class che_의술_청낭서 extends \sammo\BaseItem{
|
||||
|
||||
public function getPreTurnExecuteTriggerList(General $general):?GeneralTriggerCaller{
|
||||
return new GeneralTriggerCaller(
|
||||
new GeneralTrigger\che_아이템치료($general),
|
||||
new GeneralTrigger\che_도시치료($general)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ class che_의술_태평청령 extends \sammo\BaseItem{
|
||||
|
||||
public function getPreTurnExecuteTriggerList(General $general):?GeneralTriggerCaller{
|
||||
return new GeneralTriggerCaller(
|
||||
new GeneralTrigger\che_아이템치료($general),
|
||||
new GeneralTrigger\che_도시치료($general)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -83,6 +83,7 @@ class che_하야 extends Command\GeneralCommand{
|
||||
$general->setVar('dedication', $general->getVar('dedication') * (1 - 0.1 * $general->getVar('betray')));
|
||||
$general->addDedication(0, false);
|
||||
$general->increaseVarWithLimit('betray', 1, null, GameConst::$maxBetrayCnt);
|
||||
$general->setVar('permission', 'normal');
|
||||
|
||||
$newGold = Util::valueFit($general->getVar('gold'), null, GameConst::$defaultGold);
|
||||
$newRice = Util::valueFit($general->getVar('rice'), null, GameConst::$defaultRice);
|
||||
|
||||
@@ -7,7 +7,6 @@ class CreateManyNPC extends \sammo\Event\Action{
|
||||
protected $npcCount;
|
||||
protected $avgGen;
|
||||
public function __construct($npcCount = 200){
|
||||
\sammo\LogText('ctc',$npcCount);
|
||||
$this->npcCount = $npcCount;
|
||||
}
|
||||
|
||||
|
||||
@@ -756,9 +756,6 @@ class General implements iAction{
|
||||
if(!$iObj){
|
||||
continue;
|
||||
}
|
||||
if($caller->isEmpty()){
|
||||
continue;
|
||||
}
|
||||
/** @var iAction $iObj */
|
||||
$caller->merge($iObj->getPreTurnExecuteTriggerList($general));
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ use sammo\Util;
|
||||
use sammo\JosaUtil;
|
||||
|
||||
class che_도시치료 extends BaseGeneralTrigger{
|
||||
protected $priority = 10000;
|
||||
protected $priority = 10010;
|
||||
|
||||
public function action(?array $env=null, $arg=null):?array{
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ use sammo\Util;
|
||||
use sammo\JosaUtil;
|
||||
|
||||
class che_부상경감 extends BaseGeneralTrigger{
|
||||
protected $priority = 30010;
|
||||
protected $priority = 10000;
|
||||
|
||||
public function action(?array $env=null, $arg=null):?array{
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class che_아이템치료 extends BaseGeneralTrigger{
|
||||
/** @var \sammo\General $general */
|
||||
$general = $this->object;
|
||||
|
||||
if($general->getVar('injury') > 0){
|
||||
if($general->getVar('injury') >= 10){
|
||||
$general->updateVar('injury', 0);
|
||||
$general->activateSkill('pre.부상경감', 'pre.치료');
|
||||
$itemObj = $general->getItem();
|
||||
|
||||
@@ -9,6 +9,7 @@ abstract class ObjectTrigger{
|
||||
const PRIORITY_POST = 40000;
|
||||
const PRIORITY_FINAL = 50000;
|
||||
|
||||
/** @var int 낮을 수록 우선순위가 높다. */
|
||||
protected $priority;
|
||||
protected $object = null;
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ abstract class TriggerCaller{
|
||||
$iterLhs->next();
|
||||
continue;
|
||||
}
|
||||
if($iterRhs->key() > $iterLhs->key()){
|
||||
if($iterRhs->key() < $iterLhs->key()){
|
||||
$newTriggerList[$iterRhs->key()] = $iterRhs->current();
|
||||
$iterRhs->next();
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user