숙련 버그 수정

This commit is contained in:
2020-04-28 02:02:28 +09:00
parent 7aa826fc80
commit c831d539b6
4 changed files with 19 additions and 17 deletions
+5 -5
View File
@@ -223,11 +223,11 @@ jQuery(function($){
atmos:getInt('.form_atmos'), atmos:getInt('.form_atmos'),
train:getInt('.form_train'), train:getInt('.form_train'),
dex1:getInt('.form_dex0'), dex1:getInt('.form_dex1'),
dex2:getInt('.form_dex10'), dex2:getInt('.form_dex2'),
dex3:getInt('.form_dex20'), dex3:getInt('.form_dex3'),
dex4:getInt('.form_dex30'), dex4:getInt('.form_dex4'),
dex5:getInt('.form_dex40'), dex5:getInt('.form_dex5'),
defence_train:getInt('.form_defence_train'), defence_train:getInt('.form_defence_train'),
}; };
} }
+6 -12
View File
@@ -237,19 +237,9 @@ class WarUnit{
$warPower *= $this->getComputedAtmos(); $warPower *= $this->getComputedAtmos();
$warPower /= $oppose->getComputedTrain(); $warPower /= $oppose->getComputedTrain();
if($this instanceof WarUnitGeneral){ $genDexAtt = $this->getDex($this->getCrewType());
$genDexAtt = $general->getDex($this->getCrewType());
}
else{
$genDexAtt = ($this->cityRate - 60) * 7200;
}
if($this instanceof WarUnitGeneral){ $oppDexDef = $oppose->getDex($this->getCrewType());
$oppDexDef = $opposeGeneral->getDex($this->getCrewType());
}
else{
$oppDexDef = ($this->cityRate - 60) * 7200;
}
$warPower *= getDexLog($genDexAtt, $oppDexDef); $warPower *= getDexLog($genDexAtt, $oppDexDef);
@@ -300,6 +290,10 @@ class WarUnit{
function addLose(){ function addLose(){
} }
function getDex(GameUnitDetail $crewType){
throw new NotInheritedMethodException();
}
function finishBattle(){ function finishBattle(){
throw new NotInheritedMethodException(); throw new NotInheritedMethodException();
} }
+4
View File
@@ -68,6 +68,10 @@ class WarUnitCity extends WarUnit{
return $this->hp; return $this->hp;
} }
function getDex(GameUnitDetail $crewType){
return ($this->cityRate - 60) * 7200;
}
function decreaseHP(int $damage):int{ function decreaseHP(int $damage):int{
$damage = min($damage, $this->hp); $damage = min($damage, $this->hp);
$this->dead += $damage; $this->dead += $damage;
+4
View File
@@ -74,6 +74,10 @@ class WarUnitGeneral extends WarUnit{
$this->general->increaseVarWithLimit('atmos', $atmos, 0, GameConst::$maxAtmosByWar); $this->general->increaseVarWithLimit('atmos', $atmos, 0, GameConst::$maxAtmosByWar);
} }
function getDex(GameUnitDetail $crewType){
return $this->general->getDex($crewType);
}
function getComputedTrain(){ function getComputedTrain(){
$train = $this->general->getVar('train'); $train = $this->general->getVar('train');
$train = $this->general->onCalcStat($this->general, 'bonusTrain', $train); $train = $this->general->onCalcStat($this->general, 'bonusTrain', $train);