DiplomaticMessage 작성중

ScoutMessage 버그 개선
This commit is contained in:
2018-04-15 02:41:00 +09:00
parent 9fb455d38a
commit 655cd1700c
8 changed files with 180 additions and 34 deletions
+6
View File
@@ -0,0 +1,6 @@
<?php
namespace sammo\Engine;
class Battle{
}
+55
View File
@@ -0,0 +1,55 @@
<?php
namespace sammo\Engine;
//NOTE: A가 B에게 항복, 통합 서신을 보냈을 때 통합 후 대상이 A이므로 A가 주체임.
class Diplomacy{
protected $nation = null;//TODO: 상속체로 변경.
public $valid = false;
public $startYear = 0;
public $year = 0;
public $month = 0;
public function __construct(int $nationID){
$db = DB::db();
$nation = $db->queryFirstRow(
'SELECT nation, `name`, capital, gold, rice, surlimit, color FROM nation WHERE nation=%i',
$nationID
);
if(!$nation){
return;
}
$this->nation = $nation;
$this->valid = true;
list(
$this->startYear,
$this->year,
$this->month
) = $db->queryFirstList('SELECT startyear, year, month FROM game LIMIT 1');
}
public function ally(int $destNation){
}
public function cancelAlly(int $destNation){
}
public function stopWar(int $destNation){
}
public function acceptMerge(int $destNation){
}
public function acceptSurrender(int $destNation){
}
}
+1 -1
View File
@@ -36,7 +36,7 @@ class Personnel{
$this->year,
$this->month,
$this->killturn
) = $db->queryFirstList('SELECT startyear, year, month, killturn FROM game LIMIt 1');
) = $db->queryFirstList('SELECT startyear, year, month, killturn FROM game LIMIT 1');
}