새 전투 엔진 중간 반영

This commit is contained in:
2018-08-18 02:26:27 +09:00
parent ea5a25a671
commit fb8d3a038d
4 changed files with 321 additions and 140 deletions
-82
View File
@@ -40,88 +40,6 @@ class WarUnitCity extends WarUnit{
return $this->raw['name'];
}
function getCrewType():GameUnitConst{
return $this->crewType;
}
function getLogger():ActionLogger{
return $this->logger;
}
function getSpecialDomestic():int{
return $this->raw['special'];
}
function getSpecialWar():int{
return $this->raw['special2'];
}
function getItem():int{
return $this->raw['item'];
}
function getMaxPhase():int{
$phase = $this->getCrewType()->speed;
if($this->getSpecialWar() == 60){
$phase += 1;
}
return $phase;
}
function useBattleInitItem():bool{
$item = $this->getItem();
if($item == 0){
return false;
}
$itemActivated = false;
$itemConsumed = false;
$itemName = getItemName($item);
if($item == 3){
//탁주 사용
$this->genAtmos += 3;
$itemActivated = true;
$itemConsumed = true;
}
else if($item >= 14 && $item <= 16){
//의적주, 두강주, 보령압주 사용
$this->genAtmos += 5;
$itemActivated = true;
}
else if($item >= 19 && $item <= 20){
//춘화첩, 초선화 사용
$this->genAtmos += 7;
$itemActivated = true;
}
else if($item == 4){
//청주 사용
$this->genTrain += 3;
$itemActivated = true;
$itemConsumed = true;
}
else if($item >= 12 && $item <= 13){
//과실주, 이강주 사용
$this->genTrain += 5;
$itemActivated = true;
}
else if($item >= 18 && $item <= 18){
//철벽서, 단결도 사용
$this->genTrain += 7;
$itemActivated = true;
}
if($itemConsumed){
$this->raw['item'] = 0;
$this->updatedVar['item'] = true;
$josaUl = JosaUtil::pick($itemName, '을');
$this->getLogger()->generalActionLog("<C>●</><C>{$itemName}</>{$josaUl} 사용!");
}
return $itemActivated;
}
function continueWar(&$noRice):bool{
//전투가 가능하면 true
$noRice = false;