NPC 행동 코드 재 구현중

This commit is contained in:
Hide_D committed 2018-10-06 04:08:53 +09:00
1 parent 1660e563ab
commit 00d4541537
5 files changed
+505 -39

No files matched your search

+8
View File
@@ -159,6 +159,14 @@ class GameUnitDetail{
return min(50, $ratio) / 100;
}
public function pickScore($tech){
$defaultWar = GameConst::$armperphase + $this->attack + $this->defence + getTechAbil($tech) * 2;
$defaultWar *= 1 + $this->speed / 2;
$defaultWar /= Util::valueFit(1 - $this->avoid / 100, 0.1);
$defaultWar *= 1 + $this->magicCoef / 2;
return sqrt($defaultWar);
}
public function isValid($ownCities, $ownRegions, $relativeYear, $tech){
//음수 없음
$relativeYear = max(0, $relativeYear);