징병창 우선 부활
This commit is contained in:
+5
-4
@@ -221,7 +221,7 @@ function command_11($turn, $command, bool $is모병 = false) {
|
||||
|
||||
$leader = getGeneralLeadership($me, true, true, true);
|
||||
$maxCrew = $leader - Util::round($me['crew']/100);
|
||||
$abil = getTechAbil($nation['tech']);
|
||||
$abil = getTechAbil($tech);
|
||||
|
||||
$armTypes = [];
|
||||
|
||||
@@ -229,7 +229,7 @@ function command_11($turn, $command, bool $is모병 = false) {
|
||||
$armTypeCrews = [];
|
||||
|
||||
foreach(GameUnitConst::byType($armType) as $unit){
|
||||
$crewObj = new stdClass;
|
||||
$crewObj = new \stdClass;
|
||||
if(!$unit->isValid($ownCities, $ownRegions, $relativeYear, $tech)){
|
||||
continue; //TODO: 불가능한 병종도 보여줄 필요가 있음.
|
||||
}
|
||||
@@ -244,7 +244,7 @@ function command_11($turn, $command, bool $is모병 = false) {
|
||||
}
|
||||
|
||||
$crewObj->baseRice = $unit->rice * getTechCost($tech);
|
||||
$crewObj->baseCost = CharCost($unit->getTechCost($tech), $me['personal']);
|
||||
$crewObj->baseCost = CharCost(getTechCost($tech), $me['personal']);
|
||||
|
||||
$armType = $unit->armType;
|
||||
if($me['special2'] == 50 && $armType == GameUnitConst::T_FOOTMAN){
|
||||
@@ -275,7 +275,7 @@ function command_11($turn, $command, bool $is모병 = false) {
|
||||
$crewObj->img = ServConfig::$sharedIconPath."/default.jpg";
|
||||
}
|
||||
else{
|
||||
$crewObj->img = ServConfig::$gameImagePath."/weap{$unit->id}.png";
|
||||
$crewObj->img = ServConfig::$gameImagePath."/weap".$unit->id.".png";
|
||||
}
|
||||
|
||||
$crewObj->baseRiceShort = round($crewObj->baseRice, 1);
|
||||
@@ -304,6 +304,7 @@ function command_11($turn, $command, bool $is모병 = false) {
|
||||
'techLevelText'=>getTechCall($tech),
|
||||
'tech'=>$tech,
|
||||
'leader'=>$leader,
|
||||
'crewType'=>GameUnitConst::byId($me['crewtype'])->id,
|
||||
'crewTypeName'=>GameUnitConst::byId($me['crewtype'])->name,
|
||||
'crew'=>$me['crew'],
|
||||
'maxCrew'=>$maxCrew,
|
||||
|
||||
@@ -451,6 +451,7 @@ class GameUnitConstBase{
|
||||
static::$constName = $constName;
|
||||
static::$constCity = $constCity;
|
||||
static::$constRegion = $constRegion;
|
||||
static::$constType = $constType;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -39,6 +39,7 @@ class GameUnitDetail{
|
||||
array $defenceCoef,
|
||||
array $info
|
||||
){
|
||||
$this->id = $id;
|
||||
$this->name = $name;
|
||||
$this->armType = $armType;
|
||||
$this->attack = $attack;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<script>
|
||||
var currentTech = <?=$tech?>;
|
||||
var leadership = <?=$leadership?>;
|
||||
var leader = <?=$leader?>;
|
||||
var currentCrewType = <?=$crewType?>;
|
||||
var currentCrew = <?=$crew?>
|
||||
var currentGold = <?=$gold?>;
|
||||
var is모병 = <?=($commandName=='모병')?'true':'false'?>;
|
||||
|
||||
function calc(id) {
|
||||
window.calc = function(id) {
|
||||
var $obj = $('#crewType{0}'.format(id));
|
||||
var crew = $obj.find('.form_double').val();
|
||||
var baseCost = $obj.data('cost');
|
||||
@@ -60,6 +60,7 @@ function calc(id) {
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($armTypes as [$armName,$armTypeCrews]): ?>
|
||||
<tr><td colspan=10><?=$armName?> 계열</td></tr>
|
||||
<?php foreach($armTypeCrews as $crewObj): ?>
|
||||
<tr
|
||||
id="crewType<?=$crewObj->id?>"
|
||||
@@ -67,7 +68,7 @@ function calc(id) {
|
||||
data-rice="<?=$crewObj->baseRice?>"
|
||||
data-cost="<?=$crewObj->baseCost?>"
|
||||
>
|
||||
<td style='background-no-repeat center url("<?=$crewObj->img?>;backround-size:64px;background-color:#222222;'></td>
|
||||
<td style='background-no-repeat center url("<?=$crewObj->img?>");backround-size:64px;background-color:#222222;'></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->defence?></td>
|
||||
|
||||
Reference in New Issue
Block a user