Compare commits
15
Commits
v0.8.0-pre
...
v0.8.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
30c219716d | ||
|
|
5dd47cb89b | ||
|
|
abe856bd3f | ||
|
|
6ecb009466 | ||
|
|
3b4b2383a8 | ||
|
|
4ddd46c4a2 | ||
|
|
69ec2469b4 | ||
|
|
5789af801a | ||
|
|
7171b6302b | ||
|
|
51d4818b1e | ||
|
|
1c2875e7fc | ||
|
|
5048a88310 | ||
|
|
aef37f4362 | ||
|
|
d04641041b | ||
|
|
67b2ccea86 |
@@ -94,6 +94,15 @@
|
|||||||
background:transparent;
|
background:transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.world_map .city_detail_name{
|
||||||
|
background-color:rgba(0,0,0,0.5);
|
||||||
|
font-size:10px;
|
||||||
|
position:absolute;
|
||||||
|
white-space:nowrap;
|
||||||
|
left:70%;
|
||||||
|
bottom:-10px;
|
||||||
|
color:white;
|
||||||
|
}
|
||||||
|
|
||||||
.city_base{
|
.city_base{
|
||||||
position:absolute;
|
position:absolute;
|
||||||
@@ -338,6 +347,8 @@
|
|||||||
|
|
||||||
/* Basic */
|
/* Basic */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.world_map.map_basic .city_filler{
|
.world_map.map_basic .city_filler{
|
||||||
position:absolute;
|
position:absolute;
|
||||||
width:100%;
|
width:100%;
|
||||||
|
|||||||
+12
-12
@@ -2304,55 +2304,55 @@ function checkAbilityEx(int $generalID, ActionLogger $actLog){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($general['leader2'] < 0){
|
if($general['leader2'] < 0){
|
||||||
$general->updqte('general',[
|
$db->update('general',[
|
||||||
'leader2'=>$db->sqleval('leader2 + %i', GameConst::$upgradeLimit),
|
'leader2'=>$db->sqleval('leader2 + %i', GameConst::$upgradeLimit),
|
||||||
'leader'=>$db->sqleval('leader - 1')
|
'leader'=>$db->sqleval('leader - 1')
|
||||||
]);
|
], 'no=%i', $generalID);
|
||||||
$actLog->pushGeneralActionLog('<R>통솔</>이 <C>1</> 떨어졌습니다!', ActionLogger::PLAIN);
|
$actLog->pushGeneralActionLog('<R>통솔</>이 <C>1</> 떨어졌습니다!', ActionLogger::PLAIN);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($general['power2'] < 0){
|
if($general['power2'] < 0){
|
||||||
$general->updqte('general',[
|
$db->update('general',[
|
||||||
'power2'=>$db->sqleval('power2 + %i', GameConst::$upgradeLimit),
|
'power2'=>$db->sqleval('power2 + %i', GameConst::$upgradeLimit),
|
||||||
'power'=>$db->sqleval('power - 1')
|
'power'=>$db->sqleval('power - 1')
|
||||||
]);
|
], 'no=%i', $generalID);
|
||||||
$actLog->pushGeneralActionLog('<R>무력</>이 <C>1</> 떨어졌습니다!', ActionLogger::PLAIN);
|
$actLog->pushGeneralActionLog('<R>무력</>이 <C>1</> 떨어졌습니다!', ActionLogger::PLAIN);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($general['intel2'] < 0){
|
if($general['intel2'] < 0){
|
||||||
$general->updqte('general',[
|
$db->update('general',[
|
||||||
'intel2'=>$db->sqleval('intel2 + %i', GameConst::$upgradeLimit),
|
'intel2'=>$db->sqleval('intel2 + %i', GameConst::$upgradeLimit),
|
||||||
'intel'=>$db->sqleval('intel - 1')
|
'intel'=>$db->sqleval('intel - 1')
|
||||||
]);
|
], 'no=%i', $generalID);
|
||||||
$actLog->pushGeneralActionLog('<R>지력</>이 <C>1</> 떨어졌습니다!', ActionLogger::PLAIN);
|
$actLog->pushGeneralActionLog('<R>지력</>이 <C>1</> 떨어졌습니다!', ActionLogger::PLAIN);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($general['leader2'] >= GameConst::$upgradeLimit){
|
if($general['leader2'] >= GameConst::$upgradeLimit){
|
||||||
$general->updqte('general',[
|
$db->update('general',[
|
||||||
'leader2'=>$db->sqleval('leader2 - %i', GameConst::$upgradeLimit),
|
'leader2'=>$db->sqleval('leader2 - %i', GameConst::$upgradeLimit),
|
||||||
'leader'=>$db->sqleval('leader + 1')
|
'leader'=>$db->sqleval('leader + 1')
|
||||||
]);
|
], 'no=%i', $generalID);
|
||||||
$actLog->pushGeneralActionLog('<R>통솔</>이 <C>1</> 올랐습니다!', ActionLogger::PLAIN);
|
$actLog->pushGeneralActionLog('<R>통솔</>이 <C>1</> 올랐습니다!', ActionLogger::PLAIN);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($general['power2'] >= GameConst::$upgradeLimit){
|
if($general['power2'] >= GameConst::$upgradeLimit){
|
||||||
$general->updqte('general',[
|
$db->update('general',[
|
||||||
'power2'=>$db->sqleval('power2 - %i', GameConst::$upgradeLimit),
|
'power2'=>$db->sqleval('power2 - %i', GameConst::$upgradeLimit),
|
||||||
'power'=>$db->sqleval('power + 1')
|
'power'=>$db->sqleval('power + 1')
|
||||||
]);
|
], 'no=%i', $generalID);
|
||||||
$actLog->pushGeneralActionLog('<R>무력</>이 <C>1</> 올랐습니다!', ActionLogger::PLAIN);
|
$actLog->pushGeneralActionLog('<R>무력</>이 <C>1</> 올랐습니다!', ActionLogger::PLAIN);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($general['intel2'] >= GameConst::$upgradeLimit){
|
if($general['intel2'] >= GameConst::$upgradeLimit){
|
||||||
$general->updqte('general',[
|
$db->update('general',[
|
||||||
'intel2'=>$db->sqleval('intel2 - %i', GameConst::$upgradeLimit),
|
'intel2'=>$db->sqleval('intel2 - %i', GameConst::$upgradeLimit),
|
||||||
'intel'=>$db->sqleval('intel + 1')
|
'intel'=>$db->sqleval('intel + 1')
|
||||||
]);
|
], 'no=%i', $generalID);
|
||||||
$actLog->pushGeneralActionLog('<R>지력</>이 <C>1</> 올랐습니다!', ActionLogger::PLAIN);
|
$actLog->pushGeneralActionLog('<R>지력</>이 <C>1</> 올랐습니다!', ActionLogger::PLAIN);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -615,7 +615,7 @@ function getDexLog($dex1, $dex2) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function getWeapName($weap) : string {
|
function getWeapName($weap) : ?string {
|
||||||
switch($weap) {
|
switch($weap) {
|
||||||
case 0: $weapname = '-'; break;
|
case 0: $weapname = '-'; break;
|
||||||
case 1: $weapname = '단도(+1)'; break;
|
case 1: $weapname = '단도(+1)'; break;
|
||||||
@@ -649,7 +649,7 @@ function getWeapName($weap) : string {
|
|||||||
return $weapname;
|
return $weapname;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getWeapEff($weap) : int{
|
function getWeapEff($weap) : ?int{
|
||||||
switch($weap) {
|
switch($weap) {
|
||||||
case 7: $weap = 7; break;
|
case 7: $weap = 7; break;
|
||||||
case 8: $weap = 7; break;
|
case 8: $weap = 7; break;
|
||||||
@@ -676,7 +676,7 @@ function getWeapEff($weap) : int{
|
|||||||
return $weap;
|
return $weap;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getBookName($book) : string {
|
function getBookName($book) : ?string {
|
||||||
switch($book) {
|
switch($book) {
|
||||||
case 0: $bookname = '-'; break;
|
case 0: $bookname = '-'; break;
|
||||||
case 1: $bookname = '효경전(+1)'; break;
|
case 1: $bookname = '효경전(+1)'; break;
|
||||||
@@ -710,7 +710,7 @@ function getBookName($book) : string {
|
|||||||
return $bookname;
|
return $bookname;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getBookEff($book) : int {
|
function getBookEff($book) : ?int {
|
||||||
switch($book) {
|
switch($book) {
|
||||||
case 7: $book = 7; break;
|
case 7: $book = 7; break;
|
||||||
case 8: $book = 7; break;
|
case 8: $book = 7; break;
|
||||||
@@ -737,7 +737,7 @@ function getBookEff($book) : int {
|
|||||||
return $book;
|
return $book;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getHorseName($horse) : string {
|
function getHorseName($horse) : ?string {
|
||||||
switch($horse) {
|
switch($horse) {
|
||||||
case 0: $horsename = '-'; break;
|
case 0: $horsename = '-'; break;
|
||||||
case 1: $horsename = '노기(+1)'; break;
|
case 1: $horsename = '노기(+1)'; break;
|
||||||
@@ -771,7 +771,7 @@ function getHorseName($horse) : string {
|
|||||||
return $horsename;
|
return $horsename;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getHorseEff($horse) : int {
|
function getHorseEff($horse) : ?int {
|
||||||
switch($horse) {
|
switch($horse) {
|
||||||
case 7: $horse = 7; break;
|
case 7: $horse = 7; break;
|
||||||
case 8: $horse = 7; break;
|
case 8: $horse = 7; break;
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ function getSpecial2($leader, $power, $intel, $nodex=1, $dex0=0, $dex10=0, $dex2
|
|||||||
|
|
||||||
function getGenDex($general, $type) {
|
function getGenDex($general, $type) {
|
||||||
//XXX: 지금은 동작하지만.. 병종 구성이 보궁기귀차 에서 바뀌면...
|
//XXX: 지금은 동작하지만.. 병종 구성이 보궁기귀차 에서 바뀌면...
|
||||||
$ntype = GameUnitCons::byId($type)->armType * 10;
|
$ntype = GameUnitConst::byId($type)->armType * 10;
|
||||||
return $general["dex{$ntype}"]??0;
|
return $general["dex{$ntype}"]??0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -872,7 +872,7 @@ function process_11(&$general, $type) {
|
|||||||
$defaulttrain = GameConst::$defaultTrainHigh;
|
$defaulttrain = GameConst::$defaultTrainHigh;
|
||||||
}
|
}
|
||||||
|
|
||||||
[$startYear, $year, $month] = $gameStor->getValuesAsArray(['startyear, year, month']);
|
[$startyear, $year, $month] = $gameStor->getValuesAsArray(['startyear', 'year', 'month']);
|
||||||
|
|
||||||
$actLog = new ActionLogger($general['no'], $general['nation'], $year, $month);
|
$actLog = new ActionLogger($general['no'], $general['nation'], $year, $month);
|
||||||
|
|
||||||
@@ -942,19 +942,21 @@ function process_11(&$general, $type) {
|
|||||||
|
|
||||||
if($general['gold'] < $cost){
|
if($general['gold'] < $cost){
|
||||||
$actLog->pushGeneralActionLog("자금이 모자랍니다. $dtype 실패. <1>$date</>");
|
$actLog->pushGeneralActionLog("자금이 모자랍니다. $dtype 실패. <1>$date</>");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($general['rice'] < $crew) {
|
if($general['rice'] < $crew / 100) {
|
||||||
$actLog->pushGeneralActionLog("군량이 모자랍니다. $dtype 실패. <1>$date</>");
|
$actLog->pushGeneralActionLog("군량이 모자랍니다. $dtype 실패. <1>$date</>");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$ownCities = [];
|
$ownCities = [];
|
||||||
$ownRegions = [];
|
$ownRegions = [];
|
||||||
foreach($db->queryFirstColumn('SELECT city FROM city WHERE nation = %i', $me['nation']) as $ownCity){
|
foreach($db->queryFirstColumn('SELECT city FROM city WHERE nation = %i', $general['nation']) as $ownCity){
|
||||||
$ownCities[$ownCity] = 1;
|
$ownCities[$ownCity] = 1;
|
||||||
$ownRegions[CityConst::byId($ownCity)->region] = 1;
|
$ownRegions[CityConst::byId($ownCity)->region] = 1;
|
||||||
}
|
}
|
||||||
$valid = $crewTypeObj->isValid($ownCities, $ownRegions, $admin['year'] - $admin['startyear'], $tech);
|
$valid = $crewTypeObj->isValid($ownCities, $ownRegions, $year - $startyear, $tech);
|
||||||
|
|
||||||
if(!$valid) {
|
if(!$valid) {
|
||||||
$actLog->pushGeneralActionLog("현재 $dtype 할 수 없는 병종입니다. $dtype 실패. <1>$date</>");
|
$actLog->pushGeneralActionLog("현재 $dtype 할 수 없는 병종입니다. $dtype 실패. <1>$date</>");
|
||||||
|
|||||||
@@ -276,6 +276,9 @@ function reloadWorldMap(option){
|
|||||||
}
|
}
|
||||||
$imgObj.append($flagObj);
|
$imgObj.append($flagObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var $nameObj = $('<span class="city_detail_name">{0}</span>'.format(city.name));
|
||||||
|
$imgObj.append($nameObj);
|
||||||
|
|
||||||
|
|
||||||
$map_body.append($cityObj);
|
$map_body.append($cityObj);
|
||||||
@@ -336,6 +339,8 @@ function reloadWorldMap(option){
|
|||||||
$imgObj.append($capitalObj);
|
$imgObj.append($capitalObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var $nameObj = $('<span class="city_detail_name">{0}</span>'.format(city.name));
|
||||||
|
$imgObj.append($nameObj);
|
||||||
|
|
||||||
$map_body.append($cityObj);
|
$map_body.append($cityObj);
|
||||||
});
|
});
|
||||||
|
|||||||
+18
-10
@@ -205,12 +205,19 @@ function command_11($turn, $command, bool $is모병 = false) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
[$nationLevel, $tech] = $db->queryFirstList('SELECT level,tech FROM nation WHERE nation=%i', $me['nation']);
|
[$nationLevel, $tech] = $db->queryFirstList('SELECT level,tech FROM nation WHERE nation=%i', $me['nation']);
|
||||||
|
if(!$nationLevel){
|
||||||
|
$nationLevel = 0;
|
||||||
|
}
|
||||||
|
|
||||||
$lbonus = setLeadershipBonus($general, $nationLevel);
|
if(!$tech){
|
||||||
|
$tech = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$lbonus = setLeadershipBonus($me, $nationLevel);
|
||||||
|
|
||||||
$ownCities = [];
|
$ownCities = [];
|
||||||
$ownRegions = [];
|
$ownRegions = [];
|
||||||
[$year, $startYear] = $gameStor->getValuesAsArray(['year','startyear']);
|
[$year, $startyear] = $gameStor->getValuesAsArray(['year','startyear']);
|
||||||
|
|
||||||
$relativeYear = $year - $startyear;
|
$relativeYear = $year - $startyear;
|
||||||
|
|
||||||
@@ -219,9 +226,9 @@ function command_11($turn, $command, bool $is모병 = false) {
|
|||||||
$ownRegions[$city['region']] = 1;
|
$ownRegions[$city['region']] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$leader = getGeneralLeadership($general, true, true, true);
|
$leader = getGeneralLeadership($me, true, true, true);
|
||||||
$maxCrew = $leader - Util::round($me['crew']/100);
|
$maxCrew = $leader - Util::round($me['crew']/100);
|
||||||
$abil = getTechAbil($nation['tech']);
|
$abil = getTechAbil($tech);
|
||||||
|
|
||||||
$armTypes = [];
|
$armTypes = [];
|
||||||
|
|
||||||
@@ -229,7 +236,7 @@ function command_11($turn, $command, bool $is모병 = false) {
|
|||||||
$armTypeCrews = [];
|
$armTypeCrews = [];
|
||||||
|
|
||||||
foreach(GameUnitConst::byType($armType) as $unit){
|
foreach(GameUnitConst::byType($armType) as $unit){
|
||||||
$crewObj = new stdClass;
|
$crewObj = new \stdClass;
|
||||||
if(!$unit->isValid($ownCities, $ownRegions, $relativeYear, $tech)){
|
if(!$unit->isValid($ownCities, $ownRegions, $relativeYear, $tech)){
|
||||||
continue; //TODO: 불가능한 병종도 보여줄 필요가 있음.
|
continue; //TODO: 불가능한 병종도 보여줄 필요가 있음.
|
||||||
}
|
}
|
||||||
@@ -244,7 +251,7 @@ function command_11($turn, $command, bool $is모병 = false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$crewObj->baseRice = $unit->rice * getTechCost($tech);
|
$crewObj->baseRice = $unit->rice * getTechCost($tech);
|
||||||
$crewObj->baseCost = CharCost($unit->getTechCost($tech), $me['personal']);
|
$crewObj->baseCost = CharCost($unit->costWithTech($tech), $me['personal']);
|
||||||
|
|
||||||
$armType = $unit->armType;
|
$armType = $unit->armType;
|
||||||
if($me['special2'] == 50 && $armType == GameUnitConst::T_FOOTMAN){
|
if($me['special2'] == 50 && $armType == GameUnitConst::T_FOOTMAN){
|
||||||
@@ -275,7 +282,7 @@ function command_11($turn, $command, bool $is모병 = false) {
|
|||||||
$crewObj->img = ServConfig::$sharedIconPath."/default.jpg";
|
$crewObj->img = ServConfig::$sharedIconPath."/default.jpg";
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$crewObj->img = ServConfig::$gameImagePath."/weap{$unit->id}.png";
|
$crewObj->img = ServConfig::$gameImagePath."/weap".$unit->id.".png";
|
||||||
}
|
}
|
||||||
|
|
||||||
$crewObj->baseRiceShort = round($crewObj->baseRice, 1);
|
$crewObj->baseRiceShort = round($crewObj->baseRice, 1);
|
||||||
@@ -304,10 +311,11 @@ function command_11($turn, $command, bool $is모병 = false) {
|
|||||||
'techLevelText'=>getTechCall($tech),
|
'techLevelText'=>getTechCall($tech),
|
||||||
'tech'=>$tech,
|
'tech'=>$tech,
|
||||||
'leader'=>$leader,
|
'leader'=>$leader,
|
||||||
'crewTypeName'=>GameUnitConst::byId($general['crewtype'])->name,
|
'crewType'=>GameUnitConst::byId($me['crewtype'])->id,
|
||||||
'crew'=>$general['crew'],
|
'crewTypeName'=>GameUnitConst::byId($me['crewtype'])->name,
|
||||||
|
'crew'=>$me['crew'],
|
||||||
'maxCrew'=>$maxCrew,
|
'maxCrew'=>$maxCrew,
|
||||||
'gold'=>$general['gold'],
|
'gold'=>$me['gold'],
|
||||||
'turn'=>$turn,
|
'turn'=>$turn,
|
||||||
'armTypes'=>$armTypes,
|
'armTypes'=>$armTypes,
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ class ActionLogger{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$text = $this->formatText($formatType);
|
$text = $this->formatText($text, $formatType);
|
||||||
$this->generalHistoryLog[] = $text;
|
$this->generalHistoryLog[] = $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,7 +124,7 @@ class ActionLogger{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$text = $this->formatText($formatType);
|
$text = $this->formatText($text, $formatType);
|
||||||
$this->generalActionLog[] = $text;
|
$this->generalActionLog[] = $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ class ActionLogger{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$text = $this->formatText($formatType);
|
$text = $this->formatText($text, $formatType);
|
||||||
$this->generalBattleResultLog[] = $text;
|
$this->generalBattleResultLog[] = $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -154,7 +154,7 @@ class ActionLogger{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$text = $this->formatText($formatType);
|
$text = $this->formatText($text, $formatType);
|
||||||
$this->generalBattleDetailLog[] = $text;
|
$this->generalBattleDetailLog[] = $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,7 +169,7 @@ class ActionLogger{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$text = $this->formatText($formatType);
|
$text = $this->formatText($text, $formatType);
|
||||||
$this->nationalHistoryLog[] = $text;
|
$this->nationalHistoryLog[] = $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -184,7 +184,7 @@ class ActionLogger{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$text = $this->formatText($formatType);
|
$text = $this->formatText($text, $formatType);
|
||||||
$this->globalActionLog[] = $text;
|
$this->globalActionLog[] = $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -199,7 +199,7 @@ class ActionLogger{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$text = $this->formatText($formatType);
|
$text = $this->formatText($text, $formatType);
|
||||||
$this->globalHistoryLog[] = $text;
|
$this->globalHistoryLog[] = $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -451,6 +451,7 @@ class GameUnitConstBase{
|
|||||||
static::$constName = $constName;
|
static::$constName = $constName;
|
||||||
static::$constCity = $constCity;
|
static::$constCity = $constCity;
|
||||||
static::$constRegion = $constRegion;
|
static::$constRegion = $constRegion;
|
||||||
|
static::$constType = $constType;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -39,6 +39,7 @@ class GameUnitDetail{
|
|||||||
array $defenceCoef,
|
array $defenceCoef,
|
||||||
array $info
|
array $info
|
||||||
){
|
){
|
||||||
|
$this->id = $id;
|
||||||
$this->name = $name;
|
$this->name = $name;
|
||||||
$this->armType = $armType;
|
$this->armType = $armType;
|
||||||
$this->attack = $attack;
|
$this->attack = $attack;
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
<script>
|
<script>
|
||||||
var currentTech = <?=$tech?>;
|
var currentTech = <?=$tech?>;
|
||||||
var leadership = <?=$leadership?>;
|
var leader = <?=$leader?>;
|
||||||
var currentCrewType = <?=$crewType?>;
|
var currentCrewType = <?=$crewType?>;
|
||||||
var currentCrew = <?=$crew?>
|
var currentCrew = <?=$crew?>;
|
||||||
var currentGold = <?=$gold?>;
|
var currentGold = <?=$gold?>;
|
||||||
var is모병 = <?=($commandName=='모병')?'true':'false'?>;
|
var is모병 = <?=($commandName=='모병')?'true':'false'?>;
|
||||||
|
|
||||||
function calc(id) {
|
window.calc = function(id) {
|
||||||
var $obj = $('#crewType{0}'.format(id));
|
var $obj = $('#crewType{0}'.format(id));
|
||||||
var crew = $obj.find('.form_double').val();
|
var crew = $obj.find('.form_double').val();
|
||||||
var baseCost = $obj.data('cost');
|
var baseCost = $obj.data('cost');
|
||||||
var $cost = $obj.find('.form_cost');
|
var $cost = $obj.find('.form_cost');
|
||||||
|
|
||||||
var cost = crew * baseCost.val();
|
var cost = crew * baseCost;
|
||||||
if(is모병){
|
if(is모병){
|
||||||
cost *= 2;
|
cost *= 2;
|
||||||
}
|
}
|
||||||
@@ -60,6 +60,7 @@ function calc(id) {
|
|||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php foreach($armTypes as [$armName,$armTypeCrews]): ?>
|
<?php foreach($armTypes as [$armName,$armTypeCrews]): ?>
|
||||||
|
<tr><td colspan=10><?=$armName?> 계열</td></tr>
|
||||||
<?php foreach($armTypeCrews as $crewObj): ?>
|
<?php foreach($armTypeCrews as $crewObj): ?>
|
||||||
<tr
|
<tr
|
||||||
id="crewType<?=$crewObj->id?>"
|
id="crewType<?=$crewObj->id?>"
|
||||||
@@ -67,7 +68,7 @@ function calc(id) {
|
|||||||
data-rice="<?=$crewObj->baseRice?>"
|
data-rice="<?=$crewObj->baseRice?>"
|
||||||
data-cost="<?=$crewObj->baseCost?>"
|
data-cost="<?=$crewObj->baseCost?>"
|
||||||
>
|
>
|
||||||
<td style='background-no-repeat center url("<?=$crewObj->img?>;backround-size:64px;background-color:#222222;'></td>
|
<td style='background:#222222 no-repeat center url("<?=$crewObj->img?>");background-size:64px'></td>
|
||||||
<td style='text-align:center;vertical-align:middle;'><?=$crewObj->name?></td>
|
<td style='text-align:center;vertical-align:middle;'><?=$crewObj->name?></td>
|
||||||
<td style='text-align:center;vertical-align:middle;'><?=$crewObj->attack?></td>
|
<td style='text-align:center;vertical-align:middle;'><?=$crewObj->attack?></td>
|
||||||
<td style='text-align:center;vertical-align:middle;'><?=$crewObj->defence?></td>
|
<td style='text-align:center;vertical-align:middle;'><?=$crewObj->defence?></td>
|
||||||
|
|||||||
Reference in New Issue
Block a user