숙련 버그 수정
This commit is contained in:
+6
-12
@@ -237,19 +237,9 @@ class WarUnit{
|
||||
$warPower *= $this->getComputedAtmos();
|
||||
$warPower /= $oppose->getComputedTrain();
|
||||
|
||||
if($this instanceof WarUnitGeneral){
|
||||
$genDexAtt = $general->getDex($this->getCrewType());
|
||||
}
|
||||
else{
|
||||
$genDexAtt = ($this->cityRate - 60) * 7200;
|
||||
}
|
||||
$genDexAtt = $this->getDex($this->getCrewType());
|
||||
|
||||
if($this instanceof WarUnitGeneral){
|
||||
$oppDexDef = $opposeGeneral->getDex($this->getCrewType());
|
||||
}
|
||||
else{
|
||||
$oppDexDef = ($this->cityRate - 60) * 7200;
|
||||
}
|
||||
$oppDexDef = $oppose->getDex($this->getCrewType());
|
||||
|
||||
$warPower *= getDexLog($genDexAtt, $oppDexDef);
|
||||
|
||||
@@ -300,6 +290,10 @@ class WarUnit{
|
||||
function addLose(){
|
||||
}
|
||||
|
||||
function getDex(GameUnitDetail $crewType){
|
||||
throw new NotInheritedMethodException();
|
||||
}
|
||||
|
||||
function finishBattle(){
|
||||
throw new NotInheritedMethodException();
|
||||
}
|
||||
|
||||
@@ -68,6 +68,10 @@ class WarUnitCity extends WarUnit{
|
||||
return $this->hp;
|
||||
}
|
||||
|
||||
function getDex(GameUnitDetail $crewType){
|
||||
return ($this->cityRate - 60) * 7200;
|
||||
}
|
||||
|
||||
function decreaseHP(int $damage):int{
|
||||
$damage = min($damage, $this->hp);
|
||||
$this->dead += $damage;
|
||||
|
||||
@@ -74,6 +74,10 @@ class WarUnitGeneral extends WarUnit{
|
||||
$this->general->increaseVarWithLimit('atmos', $atmos, 0, GameConst::$maxAtmosByWar);
|
||||
}
|
||||
|
||||
function getDex(GameUnitDetail $crewType){
|
||||
return $this->general->getDex($crewType);
|
||||
}
|
||||
|
||||
function getComputedTrain(){
|
||||
$train = $this->general->getVar('train');
|
||||
$train = $this->general->onCalcStat($this->general, 'bonusTrain', $train);
|
||||
|
||||
Reference in New Issue
Block a user