⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 armament_action_do.php

📁 Download you own three BR
💻 PHP
📖 第 1 页 / 共 3 页
字号:
$move_spead+=$move_spead*($now[8]*2/100);
$move_spead+=$move_spead*($now[17]*3/100);
$action_time =intval ($distince / (($move_spead+($move_spead+$move_spead*$gen_speed_add)) / $soldier_counter));

//echo $action_time;exit;
$total_resource = $resource_result['golds'] + $resource_result['ores'] + $resource_result['woods'] + $resource_result['rices'];
$take_num = min($take_num,$total_resource);
//  	 echo $soldier_type.'<br/>';
//  	 echo $soldier_num;
$db->close();
$rand_str_array="0123456789aqwertyuioplkjhgfdszxcvbnmQWERTYUIOPOLKJHGGFDSAZXCVBNM";	
	for($i=0;$i<5;$i++){
	$nu_ar=rand(0,strlen($rand_str_array));
	$value=$value.$rand_str_array[$nu_ar];
	}
	setcookie("array_code",$value,time()+30,"/");
	
	$_COOKIE['array_code']=$value;
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>军事行动</title>

<link href="css/id.css" rel="stylesheet" type="text/css">
<link href="css/css.css" rel="stylesheet" type="text/css">
<link type="text/css" href="css/build.css" rel="stylesheet">

<style>
body{
margin-top:0px;
}
a.info {
 position:relative; z-index:0; color:#000; text-decoration:none;}
a.info:hover { 
 z-index:1;background-color:#E7CBA5;}
a.info span { 
 display: none;  }
a.info:hover span { display:block; position:absolute; padding-left:5px; padding-right:5px; padding-top:5px; padding-bottom:5px;width:180px; border:2px solid #fff; line-height:16px; background-color:#E7CB94; color:#000000; text-align: left;  text-decoration:none; margin-top:-8px;margin-left:-65px;}

/*.img_style { filter:Gray(enabled=true); }*/
.img_style { filter:Gray(enabled=false);}
.img_style1 { filter:Gray(enabled=false);}
.img_style0 { filter:Gray(enabled=true);}
</style>

</head>

<body oncontextmenu="return false">
  <script   language="JavaScript">     
  <!--     
  javascript:window.history.forward(1);     
  //-->     
  </script> 
<script>

if (top.location == self.location)top.location='/';

function showControl(obj){
	var value;
	value = obj.options[obj.selectedIndex].value;
	
    if(value == 2) {
    	document.getElementById("text2").innerText = '输送到';
    	zc_che.style.display="none";
    	all_arm.style.display="";
    	my_gen_list.style.display="none";
    	city_area.style.display="none";
    	max_soldier_info.style.display="none";
    	my_city_list.style.display="";
    	//war.style.display="none";
    	show_02.style.display="";
    	lurcher_1.style.display="none";
    	//lurcher_2.style.display="none";
    	//lurcher_3.style.display="none";
    }else
    if(value == 5) {
    	document.getElementById("text2").innerText = '分城坐标';
    	zc_che.style.display="";
    	all_arm.style.display="none";
    	my_city_list.style.display="none";
    	city_area.style.display="";
    	my_gen_list.style.display="";
    	max_soldier_info.style.display="";
    	//war.style.display="none";
    	show_02.style.display="";
    	lurcher_1.style.display="none";
    	//lurcher_2.style.display="none";
    	//lurcher_3.style.display="none";
    }else
    if(value == 3) {
    	document.getElementById("text2").innerText = '探索坐标';
    	zc_che.style.display="none";
    	all_arm.style.display="none";
    	my_city_list.style.display="none";
    	city_area.style.display="";
    	my_gen_list.style.display="none";
    	max_soldier_info.style.display="none";
    	//war.style.display="none";
    	show_02.style.display="none";
    	lurcher_1.style.display="";
    	//lurcher_2.style.display="";
    	//lurcher_3.style.display="";
    }
    else{
    	zc_che.style.display="none";
    	all_arm.style.display="";
    	city_area.style.display="";
    	document.getElementById("text2").innerText = '攻击目标';
    	my_gen_list.style.display="";
    	max_soldier_info.style.display="";
    	my_city_list.style.display="none";
    	//war.style.display="";
    	show_02.style.display="";
    	lurcher_1.style.display="none";
    	//lurcher_2.style.display="none";
    	//lurcher_3.style.display="none";
    }
}

function choice(val,val2,g_name){
	var val,val2;
	for(i=0;i<<?php echo count($my_hero_list);?>;i++){
		if(i!=val){
			eval("document.getElementById('gen_header"+i+"').className=\"img_style1\";");
		}else{
			eval("document.getElementById('gen_header"+val+"').className=\"img_style\";");
		}
	}
	val2 = parseInt(val2);

	document.getElementsByName("gen")[val].checked=true;
	
	document.getElementById("gen_uplimit").innerHTML='<br /><span style=\"color:RED; font-weight:bold;\" id="\"gen_uplimit\">'+val2+'</span>';
    //document.attackForm.gen_max_soldier_num.value = val2;
}

function checkForm(obj){
	//alert(parseInt(obj.golds.value));
	if(obj.action_type=="5" || obj.action_type=="2"){
		    var g,w,r,i,max,max2;
			g = obj.golds.value;
			w = obj.woods.value;
			r = obj.rices.value;
			i = obj.irons.value;
			mg = obj.max_golds.value;
			mw = obj.max_woods.value;
			mr = obj.max_rices.value;
			mi = obj.max_irons.value;
			
			max = obj.take_num.value;
	        max2 =(g + w + r + i);

			if(max2>max){
				alert("超出总携带量");
				return false;
			}
	        
			if(g>mg){
				alert("超出黄金最大携带量");
				return false;
			}
			if(g>mw){
				alert("超出木材最大携带量");
				return false;
			}
			if(g>mr){
				alert("超出粮食最大携带量");
				return false;
			}
			if(g>mi){
				alert("超出矿石最大携带量");
				return false;
			}
			
    }
	
    obj.submit_name.disabled=true;
    obj.submit_name.value='    正在出征     ';
}

function max_control(i){
   var current_Num = eval("document.attackForm.soldier_num"+i+".value");
   var max_Num = eval("document.attackForm.max_soldier_num"+i+".value");
   if(parseInt(current_Num) > parseInt(max_Num)){
   	  eval("document.attackForm.soldier_num"+i+".value="+parseInt(max_Num));
   }
}

function soldier_max_select(val,s){
	var sval;
	sval = val.split("|");
	if(sval[1]>0){
		eval("document.attackForm.soldier_num_"+s+".value=0");
		eval("document.attackForm.max_soldier_num_"+s+".value="+sval[1]);
		eval("soldier_num_"+s+".style.display=\"\"");
		//eval("document.attackForm.soldier_num_"+s+".type='text'");
	}
	else{
		eval("document.attackForm.max_soldier_num_"+s+".value=0");
		eval("document.attackForm.soldier_num_"+s+".value=0");
		//eval("document.attackForm.soldier_num_"+s+".type='hidden'");
		eval("soldier_num_"+s+".style.display=\"none\"");
		
	}
}

function input_num(){
	if(document.attackForm.lurcher_num.value > document.attackForm.max_num.value){
		document.attackForm.lurcher_num.value = document.attackForm.max_num.value;
	}
}

function move_spead(val){
	var spead;
	spead = Math.floor(val / 100 * <?php echo intval($move_spead+($move_spead+$move_spead*$gen_speed_add));?>);
	document.getElementById("move_spead").innerHTML = spead;
      
	  //单程时间=目标距离÷部队速度=时间(单位为:分钟)取整数
	  ntime= Math.floor(<?php echo $distince;?> / (spead / <?php echo $soldier_counter;?>)) * 60;
	  
	  hour=Math.floor(ntime/3600);
	  minute=Math.floor(ntime % 3600 / 60);
	  //alert(minute);
	  if(parseInt(hour)>=1){
	 	 document.getElementById("nhour").innerHTML=hour;
	 	 eval("document.attackForm.hour.value="+hour);
	  }
	  else{
	  	document.getElementById("nhour").innerHTML='0';
	  	eval("document.attackForm.hour.value=0");
	  }
	  if(parseInt(minute)>=1){
      	document.getElementById("nminute").innerHTML=minute;
      	eval("document.attackForm.minute.value="+minute);
	  }
      else{
      	document.getElementById("nminute").innerHTML='0';
      	eval("document.attackForm.minute.value=0");
      }
}

function max_take2(type){
	var g,w,r,i,max,max2;
	g = parseInt(document.attackForm.golds.value);
	w = parseInt(document.attackForm.woods.value);
	r = parseInt(document.attackForm.rices.value);
	i = parseInt(document.attackForm.irons.value);
	mg = parseInt(document.attackForm.max_golds.value);
	mw = parseInt(document.attackForm.max_woods.value);
	mr = parseInt(document.attackForm.max_rices.value);
	mi = parseInt(document.attackForm.max_irons.value);
	
	if(g>mg || w>mw || r>mr || i>mi){
		alert("无法携带更多资源");
		return false;
	}
	

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -