TriggerCaller버그 수정

This commit is contained in:
2020-05-08 20:52:16 +09:00
parent 99755e98ee
commit bece81b10e
11 changed files with 15 additions and 19 deletions
+9 -9
View File
@@ -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;'>&nbsp;</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;'>&nbsp;{$color}{$leadership}</font>{$lbonus}&nbsp;</td>
<td style='text-align:center;'>&nbsp;{$color}{$leadership}</span>{$lbonus}&nbsp;</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;'>&nbsp;{$color}{$strength}</font>&nbsp;</td>
<td style='text-align:center;'>&nbsp;{$color}{$strength}</span>&nbsp;</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;'>&nbsp;{$color}{$intel}</font>&nbsp;</td>
<td style='text-align:center;'>&nbsp;{$color}{$intel}</span>&nbsp;</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)
);
}
+1
View File
@@ -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);
-1
View File
@@ -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;
}
-3
View File
@@ -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();
+1
View File
@@ -9,6 +9,7 @@ abstract class ObjectTrigger{
const PRIORITY_POST = 40000;
const PRIORITY_FINAL = 50000;
/** @var int 낮을 수록 우선순위가 높다. */
protected $priority;
protected $object = null;
+1 -1
View File
@@ -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;