weap -> weapon

This commit is contained in:
2019-10-04 18:15:12 +09:00
parent 4c3cc8547c
commit 6f722f9ead
23 changed files with 68 additions and 68 deletions
+1 -1
View File
@@ -76,7 +76,7 @@ echo "
</td>
<td width=100 align=center>아이템 지급</td>
<td width=504>
<select name=weap size=1 style='color:white;background-color:black;font-size:13px'>";
<select name=weapon size=1 style='color:white;background-color:black;font-size:13px'>";
foreach(GameConst::$allItems as $itemCategories){
foreach($itemCategories as $item=>$cnt){
if($cnt == 0){
+2 -2
View File
@@ -230,12 +230,12 @@ switch($btn) {
if($item === 'None'){
$db->update('general', [
'weap'=>'None'
'weapon'=>'None'
], '`no` IN %li', $genlist);
}
else{
$db->update('general', [
'weap'=>$item
'weapon'=>$item
], '`no` IN %li', $genlist, $item);
}
break;
+2 -2
View File
@@ -181,7 +181,7 @@ $generals = array_map(function($general) use($nationColor, $nationName) {
dex0, dex10, dex20, dex30, dex40,
ttw, ttd, ttl, tlw, tld, tll, tpw, tpd, tpl, tiw, tid, til,
betgold, betwin, betwingold,
horse, weap, book, item
horse, weapon, book, item
FROM general WHERE %l", $btn == "NPC 보기"?"npc>=2":"npc<2"));
@@ -225,7 +225,7 @@ foreach($types as $idx=>[$typeName, $typeValue, $typeFunc]){
//유니크 아이템 소유자
$itemTypes = [
'horse'=>'명 마',
'weap'=>'명 검',
'weapon'=>'명 검',
'book'=>'명 서',
'item'=>'도 구'
];
+13 -13
View File
@@ -42,7 +42,7 @@ if($btn == '참가') {
exit(1);
}
$general = $db->queryFirstRow('SELECT no,name,npc,leadership,strength,intel,explevel,gold,horse,weap,book FROM general WHERE `no`=%i', $me['no']);
$general = $db->queryFirstRow('SELECT no,name,npc,leadership,strength,intel,explevel,gold,horse,weapon,book FROM general WHERE `no`=%i', $me['no']);
//{$admin['develcost']}원 참가비
if($general['gold'] < $admin['develcost']) {
@@ -71,7 +71,7 @@ if($btn == '참가') {
'grp'=>$grp,
'grp_no'=>$grpMemberCount,
'h'=>$general['horse'],
'w'=>$general['weap'],
'w'=>$general['weapon'],
'b'=>$general['book']
]);
$db->update('general', [
@@ -104,7 +104,7 @@ if($btn == "자동개최설정") {
$gameStor->phase = 0;
} elseif($btn == "투입" || $btn == "무명투입" || $btn == "쪼렙투입" || $btn == "일반투입" || $btn == "굇수투입" || $btn == "랜덤투입") {
if($btn == "투입") {
$query = "select no,name,npc,leadership,strength,intel,explevel,gold,horse,weap,book from general where no='$gen'";
$query = "select no,name,npc,leadership,strength,intel,explevel,gold,horse,weapon,book from general where no='$gen'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$general = MYDB_fetch_array($result);
$general['gold'] -= $admin['develcost'];
@@ -119,7 +119,7 @@ if($btn == "자동개최설정") {
$general['gold'] = 0;
} elseif($btn == "쪼렙투입") {
$sel = rand() % 32;
$query = "select no,name,npc,leadership,strength,intel,explevel,gold,leadership+strength+intel as total,horse,weap,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by {$tp} limit {$sel},1";
$query = "select no,name,npc,leadership,strength,intel,explevel,gold,leadership+strength+intel as total,horse,weapon,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by {$tp} limit {$sel},1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$general = MYDB_fetch_array($result);
$general['gold'] -= $admin['develcost'];
@@ -136,18 +136,18 @@ if($btn == "자동개최설정") {
$sel = rand() % 32 + $genCount - 8;
$query = "select no,name,npc,leadership,strength,intel,explevel,leadership+strength+intel as total,horse,weap,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by {$tp} desc limit {$sel},1";
$query = "select no,name,npc,leadership,strength,intel,explevel,leadership+strength+intel as total,horse,weapon,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by {$tp} desc limit {$sel},1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$general = MYDB_fetch_array($result);
$general['gold'] -= $admin['develcost'];
} elseif($btn == "굇수투입") {
$sel = rand() % 32;
$query = "select no,name,npc,leadership,strength,intel,explevel,gold,leadership+strength+intel as total,horse,weap,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by {$tp} desc limit {$sel},1";
$query = "select no,name,npc,leadership,strength,intel,explevel,gold,leadership+strength+intel as total,horse,weapon,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by {$tp} desc limit {$sel},1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$general = MYDB_fetch_array($result);
$general['gold'] -= $admin['develcost'];
} elseif($btn == "랜덤투입") {
$query = "select no,name,npc,leadership,strength,intel,explevel,gold,leadership+strength+intel as total,horse,weap,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by rand() limit 0,1";
$query = "select no,name,npc,leadership,strength,intel,explevel,gold,leadership+strength+intel as total,horse,weapon,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by rand() limit 0,1";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$general = MYDB_fetch_array($result);
$general['gold'] -= $admin['develcost'];
@@ -174,7 +174,7 @@ if($btn == "자동개최설정") {
'grp'=>$grp,
'grp_no'=>$grpMemberCount,
'h'=>$general['horse'],
'w'=>$general['weap'],
'w'=>$general['weapon'],
'b'=>$general['book']
]);
$db->update('general', [
@@ -211,7 +211,7 @@ if($btn == "자동개최설정") {
for($i=0; $i < $z; $i++) {
$sel = rand() % 32;
if($btn == "쪼렙전부투입") {
$query = "select no,name,npc,leadership,strength,intel,explevel,leadership+strength+intel as total,horse,weap,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by {$tp} limit {$sel},1";
$query = "select no,name,npc,leadership,strength,intel,explevel,leadership+strength+intel as total,horse,weapon,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by {$tp} limit {$sel},1";
} elseif($btn == "일반전부투입") {
//참가한 사람 평균치
$query = "select AVG({$tp3}) as av from general where tournament=1";
@@ -225,11 +225,11 @@ if($btn == "자동개최설정") {
$sel += $genCount - 8;
$query = "select no,name,npc,leadership,strength,intel,explevel,leadership+strength+intel as total,horse,weap,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by {$tp} desc limit {$sel},1";
$query = "select no,name,npc,leadership,strength,intel,explevel,leadership+strength+intel as total,horse,weapon,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by {$tp} desc limit {$sel},1";
} elseif($btn == "굇수전부투입") {
$query = "select no,name,npc,leadership,strength,intel,explevel,leadership+strength+intel as total,horse,weap,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by {$tp} desc limit {$sel},1";
$query = "select no,name,npc,leadership,strength,intel,explevel,leadership+strength+intel as total,horse,weapon,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by {$tp} desc limit {$sel},1";
} else {
$query = "select no,name,npc,leadership,strength,intel,explevel,leadership+strength+intel as total,horse,weap,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by rand() limit 0,1";
$query = "select no,name,npc,leadership,strength,intel,explevel,leadership+strength+intel as total,horse,weapon,book from general where tournament=0 and gold>='{$admin['develcost']}' and npc>=2 order by rand() limit 0,1";
}
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$general = MYDB_fetch_array($result);
@@ -247,7 +247,7 @@ if($btn == "자동개최설정") {
'grp'=>$grp,
'grp_no'=>$grp_no,
'h'=>$general['horse'],
'w'=>$general['weap'],
'w'=>$general['weapon'],
'b'=>$general['book']
]);
$db->update('general', [
+1 -1
View File
@@ -22,7 +22,7 @@ $gameStor = KVStorage::getStorage($db, 'game_env');
$admin = $gameStor->getValues(['develcost', 'cost', 'vote_title', 'vote', 'votecomment']);
$me = $db->queryFirstRow('SELECT no,vote,name,nation,horse,weap,book,item,npc from general where owner=%i', $userID);
$me = $db->queryFirstRow('SELECT no,vote,name,nation,horse,weapon,book,item,npc from general where owner=%i', $userID);
if($btn == "투표" && $me['vote'] == 0 && $sel > 0) {
$develcost = $admin['develcost'] * 5;
+8 -8
View File
@@ -778,7 +778,7 @@ function generalInfo($no) {
$show_img_level = $gameStor->show_img_level;
$query = "select block,no,name,picture,imgsvr,injury,nation,city,troop,leadership,leadership2,strength,strength2,intel,intel2,explevel,experience,level,gold,rice,crew,crewtype,train,atmos,weap,book,horse,item,turntime,killturn,age,personal,special,specage,special2,specage2,mode,con,connect from general where no='$no'";
$query = "select block,no,name,picture,imgsvr,injury,nation,city,troop,leadership,leadership2,strength,strength2,intel,intel2,explevel,experience,level,gold,rice,crew,crewtype,train,atmos,weapon,book,horse,item,turntime,killturn,age,personal,special,specage,special2,specage2,mode,con,connect from general where no='$no'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$general = MYDB_fetch_array($result);
@@ -818,7 +818,7 @@ function generalInfo($no) {
}
$call = getCall($general['leadership'], $general['power'], $general['intel']);
$typename = GameUnitConst::byId($general['crewtype'])->name;
$weapname = getItemName($general['weap']);
$weapname = getItemName($general['weapon']);
$bookname = getItemName($general['book']);
$horsename = getItemName($general['horse']);
$itemname = displayItemInfo($general['item']);
@@ -871,7 +871,7 @@ function generalInfo($no) {
elseif($general['mode'] == 1) { $general['mode'] = "<font color=limegreen>수비 함(훈사60)</font>"; }
else { $general['mode'] = "<font color=red>수비 안함</font>"; }
$weapImage = ServConfig::$gameImagePath."/weap{$general['crewtype']}.png";
$weapImage = ServConfig::$gameImagePath."/weapon{$general['crewtype']}.png";
if($show_img_level < 2) { $weapImage = ServConfig::$sharedIconPath."/default.jpg"; };
$imageTemp = GetImageURL($general['imgsvr']);
echo "<table width=498 class='tb_layout bg2'>
@@ -2195,7 +2195,7 @@ function uniqueItemEx(int $generalID, ActionLogger $logger, string $acquireType=
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
$general = $db->queryFirstRow('SELECT no,name,nation,npc,weap,book,horse,item FROM general WHERE no=%i', $generalID);
$general = $db->queryFirstRow('SELECT no,name,nation,npc,weapon,book,horse,item FROM general WHERE no=%i', $generalID);
if(!$general){
return false;
}
@@ -2203,7 +2203,7 @@ function uniqueItemEx(int $generalID, ActionLogger $logger, string $acquireType=
if($general['npc'] >= 2) {
return false;
}
if($general['horse'] > 6 || $general['weap'] > 6 || $general['book'] > 6 || $general['item'] > 6){
if($general['horse'] > 6 || $general['weapon'] > 6 || $general['book'] > 6 || $general['item'] > 6){
return false;
}
@@ -2238,7 +2238,7 @@ function uniqueItemEx(int $generalID, ActionLogger $logger, string $acquireType=
$availableUnique = [];
$itemTypes = [
'horse'=>'getItemName',
'weap'=>'getItemName',
'weapon'=>'getItemName',
'book'=>'getItemName',
'item'=>'getItemName'
];
@@ -2292,7 +2292,7 @@ function uniqueItem($general, $log, $vote=0) {
$item = [];
if($general['npc'] >= 2) { return $log; }
if($general['weap'] > 6 || $general['book'] > 6 || $general['horse'] > 6 || $general['item'] > 6) { return $log; }
if($general['weapon'] > 6 || $general['book'] > 6 || $general['horse'] > 6 || $general['item'] > 6) { return $log; }
$admin = $gameStor->getValues(['year', 'month', 'scenario']);
@@ -2313,7 +2313,7 @@ function uniqueItem($general, $log, $vote=0) {
//셋중 선택
$sel = rand() % 4;
switch($sel) {
case 0: $type = "weap"; break;
case 0: $type = "weapon"; break;
case 1: $type = "book"; break;
case 2: $type = "horse"; break;
case 3: $type = "item"; break;
+6 -6
View File
@@ -635,7 +635,7 @@ function generalInfo($no) {
$show_img_level = $gameStor->show_img_level;
$query = "select block,no,name,picture,imgsvr,injury,nation,city,troop,leadership,leadership2,strength,strength2,intel,intel2,explevel,experience,level,gold,rice,crew,crewtype,train,atmos,weap,book,horse,item,turntime,killturn,age,personal,special,specage,special2,specage2,mode,con,connect from general where no='$no'";
$query = "select block,no,name,picture,imgsvr,injury,nation,city,troop,leadership,leadership2,strength,strength2,intel,intel2,explevel,experience,level,gold,rice,crew,crewtype,train,atmos,weapon,book,horse,item,turntime,killturn,age,personal,special,specage,special2,specage2,mode,con,connect from general where no='$no'";
$result = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
$general = MYDB_fetch_array($result);
@@ -686,7 +686,7 @@ function generalInfo($no) {
}
$call = getCall($general['leadership'], $general['strength'], $general['intel']);
$typename = GameUnitConst::byId($general['crewtype'])->name;
$weapname = getItemName($general['weap']);
$weapname = getItemName($general['weapon']);
$bookname = getItemName($general['book']);
$horsename = getItemName($general['horse']);
$itemname = displayItemInfo($general['item']);
@@ -738,7 +738,7 @@ function generalInfo($no) {
elseif($general['mode'] == 1) { $general['mode'] = "<font color=limegreen>수비 함(훈사60)</font>"; }
else { $general['mode'] = "<font color=red>수비 안함</font>"; }
$weapImage = ServConfig::$gameImagePath."/weap{$general['crewtype']}.png";
$weapImage = ServConfig::$gameImagePath."/weapon{$general['crewtype']}.png";
if($show_img_level < 2) { $weapImage = ServConfig::$sharedIconPath."/default.jpg"; };
$imageTemp = GetImageURL($general['imgsvr']);
echo "<table width=498 class='tb_layout bg2'>
@@ -1625,7 +1625,7 @@ function uniqueItem($general, $log, $vote=0) {
$item = [];
if($general['npc'] >= 2) { return $log; }
if($general['weap'] > 6 || $general['book'] > 6 || $general['horse'] > 6 || $general['item'] > 6) { return $log; }
if($general['weapon'] > 6 || $general['book'] > 6 || $general['horse'] > 6 || $general['item'] > 6) { return $log; }
$admin = $gameStor->getValues(['year', 'month', 'scenario']);
@@ -1645,14 +1645,14 @@ function uniqueItem($general, $log, $vote=0) {
if(rand() % $prob == 0) {
//셋중 선택
$selGroup = [
20 - $db->queryFirstField('SELECT count(*) from general where weap > 6'),
20 - $db->queryFirstField('SELECT count(*) from general where weapon > 6'),
20 - $db->queryFirstField('SELECT count(*) from general where book > 6'),
20 - $db->queryFirstField('SELECT count(*) from general where horse > 6'),
20 - $db->queryFirstField('SELECT count(*) from general where item > 6')
];
$sel = Util::choiceRandomUsingWeight($selGroup);
switch($sel) {
case 0: $type = "weap"; break;
case 0: $type = "weapon"; break;
case 1: $type = "book"; break;
case 2: $type = "horse"; break;
case 3: $type = "item"; break;
+8 -8
View File
@@ -50,7 +50,7 @@ function getGeneralLeadership($general, $withInjury, $withItem, $withStatAdjust,
/**
* 장수의 무력을 받아옴
*
* @param array $general 장수 정보, power, injury, weap 사용
* @param array $general 장수 정보, power, injury, weapon 사용
* @param bool $withInjury 부상값 사용 여부
* @param bool $withItem 아이템 적용 여부
* @param bool $withStatAdjust 추가 능력치 보정 사용 여부
@@ -68,7 +68,7 @@ function getGeneralStrength($general, $withInjury, $withItem, $withStatAdjust, $
}
if($withItem){
$power += getWeapEff($general['weap']);
$power += getWeapEff($general['weapon']);
}
if($withStatAdjust){
@@ -2281,7 +2281,7 @@ function process_48(&$general) {
$log[] = "<C>●</>{$admin['month']}월:구입할 수 있는 물건이 아닙니다. 구입 실패. <1>$date</>";
} elseif($general['gold'] < $cost && $type != 0) {
$log[] = "<C>●</>{$admin['month']}월:자금이 모자랍니다. 구입 실패. <1>$date</>";
} elseif($general['weap'] == 0 && $isweap == 0 && $type == 0) {
} elseif($general['weapon'] == 0 && $isweap == 0 && $type == 0) {
$log[] = "<C>●</>{$admin['month']}월:무기가 없습니다. 판매 실패. <1>$date</>";
} elseif($general['book'] == 0 && $isweap == 1 && $type == 0) {
$log[] = "<C>●</>{$admin['month']}월:서적이 없습니다. 판매 실패. <1>$date</>";
@@ -2294,13 +2294,13 @@ function process_48(&$general) {
if($type != 0) {
$josaUl = JosaUtil::pick(getItemName($type), '을');
$log[] = "<C>●</>{$admin['month']}월:<C>".getItemName($type)."</>{$josaUl} 구입했습니다. <1>$date</>";
$query = "update general set resturn='SUCCESS',weap='$type',gold=gold-'$cost' where no='{$general['no']}'";
$query = "update general set resturn='SUCCESS',weapon='$type',gold=gold-'$cost' where no='{$general['no']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
} else {
$cost = Util::round(getItemCost($general['weap']) / 2);
$josaUl = JosaUtil::pick(getItemName($general['weap']), '을');
$log[] = "<C>●</>{$admin['month']}월:<C>".getItemName($general['weap'])."</>{$josaUl} 판매했습니다. <1>$date</>";
$query = "update general set resturn='SUCCESS',weap='0',gold=gold+'$cost' where no='{$general['no']}'";
$cost = Util::round(getItemCost($general['weapon']) / 2);
$josaUl = JosaUtil::pick(getItemName($general['weapon']), '을');
$log[] = "<C>●</>{$admin['month']}월:<C>".getItemName($general['weapon'])."</>{$josaUl} 판매했습니다. <1>$date</>";
$query = "update general set resturn='SUCCESS',weapon='0',gold=gold+'$cost' where no='{$general['no']}'";
MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),"");
}
} elseif($isweap == 1) {
+1 -1
View File
@@ -2067,7 +2067,7 @@ function process_76(&$general) {
npc,npc_org,affinity,name,picture,nation,
city,leadership,power,intel,experience,dedication,
level,gold,rice,crew,crewtype,train,atmos,tnmt,
weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg,
weapon,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg,
makelimit,bornyear,deadyear,
dex0, dex10, dex20, dex30, dex40
) values (
+1 -1
View File
@@ -1584,7 +1584,7 @@ function process_76(&$general) {
npc,npc_org,affinity,name,picture,nation,
city,leadership,strength,intel,experience,dedication,
level,gold,rice,crew,crewtype,train,atmos,tnmt,
weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg,
weapon,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg,
makelimit,bornyear,deadyear,
dex0, dex10, dex20, dex30, dex40
) values (
+1 -1
View File
@@ -501,7 +501,7 @@ function process_29(&$general) {
npcid,npc,npc_org,affinity,name,picture,nation,
city,leadership,power,intel,experience,dedication,
level,gold,rice,crew,crewtype,train,atmos,tnmt,
weap,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg,
weapon,book,horse,turntime,killturn,age,belong,personal,special,specage,special2,specage2,npcmsg,
makelimit,bornyear,deadyear,
dex0, dex10, dex20, dex30, dex40
) values (
+4 -4
View File
@@ -161,7 +161,7 @@ function process_32(&$general) {
$srcNation = getNationStaticInfo($srcNationID);
$destNation = getNationStaticInfo($destNationID);
$generalList = $db->query('SELECT `no`,leadership,horse,strength,weap,intel,book,injury,level,special,special2 FROM general WHERE city=%i and nation=%i', $destCity['city'], $destCity['nation']);
$generalList = $db->query('SELECT `no`,leadership,horse,strength,weapon,intel,book,injury,level,special,special2 FROM general WHERE city=%i and nation=%i', $destCity['city'], $destCity['nation']);
[
$srcGenScore,
@@ -298,7 +298,7 @@ function process_33(&$general) {
$srcNation = getNationStaticInfo($srcNationID);
$destNation = getNationStaticInfo($destNationID);
$generalList = $db->query('SELECT `no`,leadership,horse,strength,weap,intel,book,injury,level,special,special2 FROM general WHERE city=%i and nation=%i', $destCity['city'], $destCity['nation']);
$generalList = $db->query('SELECT `no`,leadership,horse,strength,weapon,intel,book,injury,level,special,special2 FROM general WHERE city=%i and nation=%i', $destCity['city'], $destCity['nation']);
[
$srcGenScore,
@@ -467,7 +467,7 @@ function process_34(&$general) {
$srcNation = getNationStaticInfo($srcNationID);
$destNation = getNationStaticInfo($destNationID);
$generalList = $db->query('SELECT `no`,leadership,horse,strength,weap,intel,book,injury,level,special,special2 FROM general WHERE city=%i and nation=%i', $destCity['city'], $destCity['nation']);
$generalList = $db->query('SELECT `no`,leadership,horse,strength,weapon,intel,book,injury,level,special,special2 FROM general WHERE city=%i and nation=%i', $destCity['city'], $destCity['nation']);
[
$srcGenScore,
@@ -607,7 +607,7 @@ function process_35(&$general) {
$srcNation = getNationStaticInfo($srcNationID);
$destNation = getNationStaticInfo($destNationID);
$generalList = $db->query('SELECT `no`,leadership,horse,strength,weap,intel,book,injury,level,special,special2 FROM general WHERE city=%i and nation=%i', $destCity['city'], $destCity['nation']);
$generalList = $db->query('SELECT `no`,leadership,horse,strength,weapon,intel,book,injury,level,special,special2 FROM general WHERE city=%i and nation=%i', $destCity['city'], $destCity['nation']);
[
$srcGenScore,
$srcSpecialScore,
+5 -5
View File
@@ -335,7 +335,7 @@ function fillLowGenAll() {
//자동신청하고, 돈 있고, 아직 참가 안한 장수
$freeJoiners = $db->query(
'SELECT no,npc,name,leadership,strength,intel,explevel,horse,weap,book from general where tnmt=1 and tournament=0 order by rand() limit %d',
'SELECT no,npc,name,leadership,strength,intel,explevel,horse,weapon,book from general where tnmt=1 and tournament=0 order by rand() limit %d',
$toBeFilledCnt
);
@@ -356,7 +356,7 @@ function fillLowGenAll() {
'grp'=>$grpIdx,
'grp_no'=>$grpCnt,
'h'=>$general['horse'],
'w'=>$general['weap'],
'w'=>$general['weapon'],
'b'=>$general['book']
];
@@ -854,7 +854,7 @@ function fight($tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) {
foreach([$gen1, $gen2] as $gen){
$horse = buildItemClass($gen['h']);
$weap = buildItemCalss($gen['w']);
$weapon = buildItemCalss($gen['w']);
$book = buildItemCalss($gen['b']);
//아이템 로그
@@ -876,8 +876,8 @@ function fight($tnmt_type, $tnmt, $phs, $group, $g1, $g2, $type) {
$log[] = "<S>●</> <Y>{$gen['name']}</>의 <S>{$itemName}</>{$josaYi} 갈기를 휘날립니다!"; break;
}
}
if(!$weap->isBuyable() && ($tnmt_type == 0 || $tnmt_type == 2)) {
$itemName = $weap->getName();
if(!$weapon->isBuyable() && ($tnmt_type == 0 || $tnmt_type == 2)) {
$itemName = $weapon->getName();
switch(rand()%4) {
case 0:
$josaYi = JosaUtil::pick($itemName, '이');
+3 -3
View File
@@ -82,13 +82,13 @@ $rawDefenderNation = $query['defenderNation'];
$generalCheck = [
'required'=>[
'no', 'name', 'nation', 'turntime', 'personal', 'special2', 'crew', 'crewtype', 'atmos', 'train',
'intel', 'intel2', 'book', 'strength', 'strength2', 'weap', 'injury', 'leadership', 'leadership2', 'horse', 'item',
'intel', 'intel2', 'book', 'strength', 'strength2', 'weapon', 'injury', 'leadership', 'leadership2', 'horse', 'item',
'explevel', 'experience', 'dedication', 'level', 'gold', 'rice', 'dex0', 'dex10', 'dex20', 'dex30', 'dex40',
'warnum', 'killnum', 'deathnum', 'killcrew', 'deathcrew', 'recwar'
],
'integer'=>[
'no', 'nation', 'personal', 'special2', 'crew', 'crewtype', 'atmos', 'train',
'intel', 'intel2', 'book', 'strength', 'strength2', 'weap', 'injury', 'leadership', 'leadership2', 'horse', 'item',
'intel', 'intel2', 'book', 'strength', 'strength2', 'weapon', 'injury', 'leadership', 'leadership2', 'horse', 'item',
'explevel', 'experience', 'dedication', 'level', 'gold', 'rice', 'dex0', 'dex10', 'dex20', 'dex30', 'dex40',
'warnum', 'killnum', 'deathnum', 'killcrew', 'deathcrew'
],
@@ -112,7 +112,7 @@ $generalCheck = [
['train', [40, GameConst::$maxTrainByWar]],
['atmos', [40, GameConst::$maxAtmosByWar]],
['book', [0, 26]],
['weap', [0, 26]],
['weapon', [0, 26]],
['horse', [0, 26]],
['item', [0, 26]],
['explevel', [0, 300]],
+2 -2
View File
@@ -159,7 +159,7 @@ jQuery(function($){
setVal('.form_leadership', data.leadership);
setVal('.form_general_horse', data.horse);
setVal('.form_strength', data.strength);
setVal('.form_general_weap', data.weap);
setVal('.form_general_weap', data.weapon);
setVal('.form_intel', data.intel);
setVal('.form_general_book', data.book);
setVal('.form_general_item', data.item);
@@ -206,7 +206,7 @@ jQuery(function($){
leadership:getInt('.form_leadership'),
horse:getInt('.form_general_horse'),
strength:getInt('.form_strength'),
weap:getInt('.form_general_weap'),
weapon:getInt('.form_general_weap'),
intel:getInt('.form_intel'),
book:getInt('.form_general_book'),
item:getInt('.form_general_item'),
+1 -1
View File
@@ -34,7 +34,7 @@ function processWar(General $attackerGeneral, array $rawAttackerNation, array $r
$city = new WarUnitCity($rawDefenderCity, $rawDefenderNation, $year, $month, $cityRate);
$defenderList = [];
foreach ($db->query('SELECT no,name,nation,turntime,personal,special2,crew,crewtype,atmos,train,intel,intel2,book,strength,strength2,weap,injury,leadership,leadership2,horse,item,explevel,experience,dedication,level,gold,rice,dex0,dex10,dex20,dex30,dex40,warnum,killnum,deathnum,killcrew,deathcrew,recwar,mode FROM general WHERE nation=%i AND city=%i AND nation!=0 and crew > 0 and rice>(crew/100) and ((train>=60 and atmos>=60 and mode=1) or (train>=80 and atmos>=80 and mode=2))', $city->getVar('nation'), $city->getVar('city')) as $rawGeneral){
foreach ($db->query('SELECT no,name,nation,turntime,personal,special2,crew,crewtype,atmos,train,intel,intel2,book,strength,strength2,weapon,injury,leadership,leadership2,horse,item,explevel,experience,dedication,level,gold,rice,dex0,dex10,dex20,dex30,dex40,warnum,killnum,deathnum,killcrew,deathcrew,recwar,mode FROM general WHERE nation=%i AND city=%i AND nation!=0 and crew > 0 and rice>(crew/100) and ((train>=60 and atmos>=60 and mode=1) or (train>=80 and atmos>=80 and mode=2))', $city->getVar('nation'), $city->getVar('city')) as $rawGeneral){
$defenderList[] = new General($rawGeneral, $rawDefenderCity, $year, $month);
}
+1 -1
View File
@@ -287,7 +287,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."/weapon".$unit->id.".png";
}
$crewObj->baseRiceShort = round($crewObj->baseRice, 1);
@@ -30,7 +30,7 @@ class che_군량매매 extends Command\GeneralCommand{
static $itemMap = [
'horse'=>'명마',
'weap'=>'무기',
'weapon'=>'무기',
'book'=>'서적',
'item'=>'도구',
];
@@ -30,7 +30,7 @@ class che_장비매매 extends Command\GeneralCommand{
static $itemMap = [
'horse'=>'명마',
'weap'=>'무기',
'weapon'=>'무기',
'book'=>'서적',
'item'=>'도구',
];
+1 -1
View File
@@ -218,7 +218,7 @@ class che_화계 extends Command\GeneralCommand{
[$year, $month] = [$env['year'], $env['month']];
foreach($db->query(
'SELECT `no`,name,city,nation,level,leadership,horse,strength,weap,intel,book,item,last_turn,injury,special,special2 FROM general WHERE city = %i',
'SELECT `no`,name,city,nation,level,leadership,horse,strength,weapon,intel,book,item,last_turn,injury,special,special2 FROM general WHERE city = %i',
$destCityID,
$destNationID
) as $rawDestCityGeneral){
+3 -3
View File
@@ -78,7 +78,7 @@ class General implements iAction{
$this->personalityObj = new $personalityClass;
$this->itemObjs['horse'] = buildItemClass($raw['horse']);
$this->itemObjs['weapon'] = buildItemClass($raw['weap']);
$this->itemObjs['weapon'] = buildItemClass($raw['weapon']);
$this->itemObjs['book'] = buildItemClass($raw['book']);
$this->itemObjs['item'] = buildItemClass($raw['item']);
}
@@ -612,11 +612,11 @@ class General implements iAction{
$defaultEventColumn = [
'no', 'name', 'city', 'nation', 'level',
'special', 'special2', 'personal',
'horse', 'weap', 'book', 'item', 'last_turn'
'horse', 'weapon', 'book', 'item', 'last_turn'
];
$fullColumn = [
'no', 'name', 'name2', 'picture', 'imgsvr', 'nation', 'nations', 'city', 'troop', 'injury', 'affinity',
'leadership', 'leadership2', 'strength', 'strength2', 'intel', 'intel2', 'weap', 'book', 'horse', 'item',
'leadership', 'leadership2', 'strength', 'strength2', 'intel', 'intel2', 'weapon', 'book', 'horse', 'item',
'experience', 'dedication', 'level', 'gold', 'rice', 'crew', 'crewtype', 'train', 'atmos', 'turntime',
'makelimit', 'killturn', 'block', 'dedlevel', 'explevel', 'age', 'startage', 'belong',
'personal', 'special', 'special2', 'mode', 'npc', 'npc_org', 'deadyear', 'npcmsg',
+1 -1
View File
@@ -40,7 +40,7 @@ $general_schema = "
gold int(6) default 0, rice int(6) default 0,
crew int(5) default 0, crewtype int(2) default 0,
train int(3) default 0, atmos int(3) default 0,
weap int(2) default 0, book int(2) default 0,
weapon int(2) default 0, book int(2) default 0,
horse int(2) default 0, item int(2) default 0,
turntime datetime, recwar datetime,
makenation char(255), makelimit int(2) default 24,
+1 -1
View File
@@ -47,7 +47,7 @@ CREATE TABLE `general` (
`crewtype` INT(2) NOT NULL DEFAULT '0',
`train` INT(3) NOT NULL DEFAULT '0',
`atmos` INT(3) NOT NULL DEFAULT '0',
`weap` VARCHAR(20) NOT NULL DEFAULT 'None',
`weapon` VARCHAR(20) NOT NULL DEFAULT 'None',
`book` VARCHAR(20) NOT NULL DEFAULT 'None',
`horse` VARCHAR(20) NOT NULL DEFAULT 'None',
`item` VARCHAR(20) NOT NULL DEFAULT 'None',