var xunlu={
xjshanghai:0,bgimg:"",xjsunshi:"", //陷阱数据存取
jisuan:function(tox,toy,jiax,jiay){
if(tox+mewid>fmwid||toy+mehei>fmhei||tox<0||toy<0)return false
var temp1=document.elementFromPoint(tox+fmleft,toy+fmtop)
if(temp1.move==null)temp1=document.elementFromPoint(tox+fmleft+mewid,toy+fmtop);
if(temp1.move==null)temp1=document.elementFromPoint(tox+fmleft+mewid,toy+fmtop+mehei)
if(temp1.move==null)temp1=document.elementFromPoint(tox+fmleft,toy+fmtop+mehei)

if(temp1.move==null)temp1=document.elementFromPoint(tox+fmleft+(mewid/2),toy+fmtop)
if(temp1.move==null)temp1=document.elementFromPoint(tox+fmleft+mewid,toy+fmtop+(mehei/2))
if(temp1.move==null)temp1=document.elementFromPoint(tox+fmleft+(mewid/2),toy+fmtop+mehei)
if(temp1.move==null)temp1=document.elementFromPoint(tox+fmleft,toy+fmtop+(mehei/2))

if(temp1.id!="fm1"&&temp1.id!="tb"&&temp1.parentElement!=fm1)return false;  //防止外设阻盖主角
if(temp1.id=="me")temp1=fm1
if(temp1.id=="fm1"){if(anquanqu==true){anquanqu=false;yinxiao("场景音乐");lt.help("<font style='color:red;font-weight:bold;'>离开安全区,进入冒险/作战环境</font><img src='img/biaoqing/jian.gif' width=24 height=24 style='position:static;'>")};}

if(temp1.move==null){
if(yd.zt=="潜泳"){yinxiao("水声");rpg.yd2=0
me.style.height=95;me2.style.height=95;ying.style.visibility="visible";shezhifei.style.visibility="hidden";yd.zt="走路";
}
if(yd.zt=="陷阱"){shezhifei.style.visibility="hidden";yd.zt="走路";}
return;
}
if(ying.offsetTop+jiay-(temp1.offsetTop+temp1.offsetHeight)>-5&&temp1.id!="exit")return;


if(yd.zt=="走路"&&temp1.move==1)return false  //地阻隔
if(yd.zt=="飞行"&&temp1.move==2)return false  //空阻隔
if(yd.zt=="潜泳"&&temp1.move==3)return false  //水内阻隔
if(temp1.move==4)return false  //绝对阻隔
if(temp1.move==5&&yd.zt=="走路"){  //海洋地形
if(me.offsetHeight!=45){me.style.height=45;me2.style.height=60;;ying.style.visibility="hidden";yd.zt="潜泳";
rpg.yd2=rpg.zb[7]!=null?-round(rpg.yd*0.5)+parseInt(xml.getwp("zb",rpg.zb[7]).getAttribute("游泳速度")):-round(rpg.yd*0.5);
shezhifei.src="img/ico/qianyong.gif";shezhifei.style.visibility="visible";yinxiao("水声");
}
}
if(temp1.move==6&&yd.zt=="走路"){  //陷阱地形
yd.zt="陷阱";shezhifei.src="img/ico/zhuoshang.gif";shezhifei.style.visibility="visible";yinxiao("陷阱")
xunlu.xjshanghai=temp1.xjshanghai;xunlu.bgimg=temp1.bgimg;xunlu.xjsunshi=temp1.xjsunshi;
}
if(temp1.move==14){
if(anquanqu==false){anquanqu=true;yinxiao("安全区");lt.help("进入安全区(无法战斗,全员体力逐渐休息恢复)<img src='img/biaoqing/dun.gif' width=24 height=24 style='position:static;'>")}
}
if(temp1.move==15){
xml.loaddt(temp1.exitto.split("+-=-+")[0],temp1.exitto.split("+-=-+")[1],temp1.exitx,temp1.exity);saveuser();return false;
}
}
}