game: 저지시 쌀을 소모하도록 변경
- 오르는 숙련 대비 0.25배 - 즉, 일반 공격력 대비 0.9 * 0.25만큼
This commit is contained in:
@@ -262,11 +262,8 @@ class WarUnitGeneral extends WarUnit
|
||||
return $general->getVar('crew');
|
||||
}
|
||||
|
||||
function increaseKilled(int $damage): int
|
||||
function calcRiceConsumption(int $damage): float
|
||||
{
|
||||
$general = $this->general;
|
||||
$this->addLevelExp($damage / 50);
|
||||
|
||||
$rice = $damage / 100;
|
||||
if (!$this->isAttacker) {
|
||||
$rice *= 0.8;
|
||||
@@ -279,6 +276,16 @@ class WarUnitGeneral extends WarUnit
|
||||
$rice *= getTechCost($this->getNationVar('tech'));
|
||||
$rice = $this->general->onCalcStat($this->general, 'killRice', $rice);
|
||||
|
||||
return $rice;
|
||||
}
|
||||
|
||||
function increaseKilled(int $damage): int
|
||||
{
|
||||
$general = $this->general;
|
||||
$this->addLevelExp($damage / 50);
|
||||
|
||||
$rice = $this->calcRiceConsumption($damage);
|
||||
|
||||
$general->increaseVarWithLimit('rice', -$rice, 0);
|
||||
|
||||
$addDex = $damage;
|
||||
|
||||
Reference in New Issue
Block a user