전투 구현 반영
This commit is contained in:
@@ -273,19 +273,16 @@ class WarUnit{
|
|||||||
}
|
}
|
||||||
|
|
||||||
function addWin(){
|
function addWin(){
|
||||||
throw new NotInheritedMethodException();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function addLose(){
|
function addLose(){
|
||||||
throw new NotInheritedMethodException();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function finishBattle(){
|
function finishBattle(){
|
||||||
throw new NotInheritedMethodException();
|
throw new NotInheritedMethodException();
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCharacter(){
|
function getCharacter():int{
|
||||||
//TODO: 나머지에 구현
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -356,7 +353,9 @@ class WarUnit{
|
|||||||
}
|
}
|
||||||
|
|
||||||
function calcDamage():int{
|
function calcDamage():int{
|
||||||
return $this->getWarPower();
|
$warPower = $this->getWarPower();
|
||||||
|
$warPower *= Util::randRange(0.9, 1.1);
|
||||||
|
return Util::round($warPower);
|
||||||
}
|
}
|
||||||
|
|
||||||
function tryWound():bool{
|
function tryWound():bool{
|
||||||
|
|||||||
@@ -41,12 +41,6 @@ class WarUnitCity extends WarUnit{
|
|||||||
return $this->raw[$key];
|
return $this->raw[$key];
|
||||||
}
|
}
|
||||||
|
|
||||||
function calcDamage():int{
|
|
||||||
$warPower = $this->getWarPower();
|
|
||||||
$warPower *= Util::randRange(0.9, 1.1);
|
|
||||||
return Util::round($warPower);
|
|
||||||
}
|
|
||||||
|
|
||||||
function increaseKilled(int $damage):int{
|
function increaseKilled(int $damage):int{
|
||||||
$this->killed += $damage;
|
$this->killed += $damage;
|
||||||
return $this->killed;
|
return $this->killed;
|
||||||
@@ -84,13 +78,6 @@ class WarUnitCity extends WarUnit{
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function addWin(){
|
|
||||||
}
|
|
||||||
|
|
||||||
function addLose(){
|
|
||||||
//NOTE: 도시 정복은 외부에서 처리함
|
|
||||||
}
|
|
||||||
|
|
||||||
function heavyDecreseWealth(){
|
function heavyDecreseWealth(){
|
||||||
$this->multiplyVar('agri', 0.5);
|
$this->multiplyVar('agri', 0.5);
|
||||||
$this->multiplyVar('comm', 0.5);
|
$this->multiplyVar('comm', 0.5);
|
||||||
|
|||||||
@@ -74,6 +74,10 @@ class WarUnitGeneral extends WarUnit{
|
|||||||
return $this->getVar('special2');
|
return $this->getVar('special2');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getCharacter():int{
|
||||||
|
return $this->getVar('personal');
|
||||||
|
}
|
||||||
|
|
||||||
function getItem():int{
|
function getItem():int{
|
||||||
return $this->getVar('item');
|
return $this->getVar('item');
|
||||||
}
|
}
|
||||||
@@ -102,10 +106,10 @@ class WarUnitGeneral extends WarUnit{
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getComputedAtmos(){
|
function getComputedAtmos(){
|
||||||
$train = $this->getVar('atmos');
|
$atmos = $this->getVar('atmos');
|
||||||
$train += $this->trainBonus;
|
$atmos += $this->atmosBonus;
|
||||||
|
|
||||||
return $train;
|
return $atmos;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getComputedCriticalRatio():float{
|
function getComputedCriticalRatio():float{
|
||||||
@@ -491,6 +495,17 @@ class WarUnitGeneral extends WarUnit{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(
|
||||||
|
$specialWar == 63 &&
|
||||||
|
$this->getPhase() == 0 &&
|
||||||
|
$this->getHP() >= 1000 &&
|
||||||
|
$this->getComputedAtmos() >= 90 &&
|
||||||
|
$this->getComputedTrain() >= 90
|
||||||
|
){
|
||||||
|
$this->activateSkill('위압');
|
||||||
|
$activated = true;
|
||||||
|
}
|
||||||
|
|
||||||
return $activated;
|
return $activated;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -618,17 +633,6 @@ class WarUnitGeneral extends WarUnit{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(
|
|
||||||
$specialWar == 63 &&
|
|
||||||
$this->getPhase() == 0 &&
|
|
||||||
$this->getHP() >= 1000 &&
|
|
||||||
$this->getComputedAtmos() >= 90 &&
|
|
||||||
$this->getComputedTrain() >= 90
|
|
||||||
){
|
|
||||||
$this->activateSkill('위압');
|
|
||||||
$activated = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(
|
if(
|
||||||
($item == 23 || $item == 24) &&
|
($item == 23 || $item == 24) &&
|
||||||
!$this->hasActivatedSkill('치료') &&
|
!$this->hasActivatedSkill('치료') &&
|
||||||
|
|||||||
Reference in New Issue
Block a user