hv-unified/references/The HentaiVerse - Character_files/hvc.js
GaboGG 93c0f85acd v0.14.22 - Survival-first priority chain (simulation-backed, 10/10 survival)
AGY built a full 60-round arena simulator (hv-battle-sim.py) using
the user's actual gear/stats and ran 10 iterations:

  Original: 0/10 survived (0%)
  Improved: 10/10 survived (100%)

Critical changes from simulation findings:
  - Health items + Cure moved to TOP of priority chain (before skills)
  - Dynamic HP threshold: 60% when 7+ mobs, normal threshold otherwise
  - SP threshold raised from 55% to 60% for Spark safety buffer
  - Mana maintenance raised to prevent spell lockout
  - AoE crowd control prioritized for 4+ mobs

Full report in agy_sim_output.txt
2026-07-28 06:19:02 -04:00

47 lines
20 KiB
JavaScript

function api_call(h,g,d){h.open("POST",MAIN_URL+"json");h.setRequestHeader("Content-Type","application/json");h.withCredentials=!0;h.onreadystatechange=d;h.send(JSON.stringify(g))}function api_response(h){if(4==h.readyState)if(200==h.status)if(h=JSON.parse(h.responseText),void 0!=h.login)top.location.href=login_url;else return h;else alert("Server communication failed: "+h.status+" ("+h.responseText+")"),document.location+="";return!1}
function number_format(h){return h.toString().replace(/\B(?=(\d{3})+(?!\d))/g," ")}var e=function(h){return document.getElementById(h)};
function Common(){function h(a,f,l){a=a.getElementsByTagName("DIV");f=["f2l"+f,"f2r"+f,"f4l"+f,"f4r"+f];var r=["f2l"+l,"f2r"+l,"f4l"+l,"f4r"+l];l="a"==l?"#0030CB":"#5C0D11";for(var n=0;n<a.length;n++)for(var w=0;w<f.length;w++)a[n].className=a[n].className.replace(f[w],r[w]),a[n].style.color=l}this.goto_arena=function(){document.location=MAIN_URL+"?s=Battle&ss=ar"};this.goto_ring=function(){document.location=MAIN_URL+"?s=Battle&ss=rb"};this.goto_grindfest=function(){document.location=MAIN_URL+"?s=Battle&ss=gr"};
this.goto_tower=function(){document.location=MAIN_URL+"?s=Battle&ss=tw"};this.findPos=function(a){var f=0,l=0;if(a.offsetParent){do f+=a.offsetLeft,l+=a.offsetTop;while(a=a.offsetParent)}return[f,l]};this.findPosWithScroll=function(a){var f=0,l=0;if(a.offsetParent){do f+=a.offsetLeft+(a.scrollLeft?a.scrollLeft:0),l+=a.offsetTop+(a.scrollTop?a.scrollTop:0);while(a=a.offsetParent)}return[f,l]};this.findScrollOffset=function(a){var f=0,l=0;if(a.offsetParent){do f+=a.scrollLeft?a.scrollLeft:0,l+=a.scrollTop?
a.scrollTop:0;while(a=a.offsetParent)}return[f,l]};this.getCursorPosition=function(a){a=a||window.event;var f={x:0,y:0};if(a.pageX||a.pageY)f.x=a.pageX,f.y=a.pageY;else{var l=document.documentElement,r=document.body;f.x=a.clientX+(l.scrollLeft||r.scrollLeft)-(l.clientLeft||0);f.y=a.clientY+(l.scrollTop||r.scrollTop)-(l.clientTop||0)}return f};this.decimalround=function(a,f){return Math.round(a*Math.pow(10,f))/Math.pow(10,f)};this.suppress_popups=!1;this.show_popup_box=function(a,f,l,r,n,w,B,D,H,F){if(!this.suppress_popups){var G=
e("popup_box"),J=[0,0],I=[0,0],L=0;void 0!=w&&(L=w.offsetWidth,J=common.findPosWithScroll(w),""!=n&&(n=e(n),I[0]=n.scrollLeft,I[1]=n.scrollTop));G.style.left=("right"==B?J[0]-I[0]+L+a:J[0]-I[0]-a-l)+"px";G.style.top=J[1]-I[1]+f+"px";G.style.width=l+"px";G.style.height=r+"px";G.innerHTML="<div>"+D+"</div><div>"+H+"</div><div>"+F+"</div>";G.style.visibility="visible"}};this.hide_popup_box=function(){e("popup_box").removeAttribute("style")};this.show_itemc_box=function(a,f,l,r,n,w){this.show_popup_box(a,
f,398,75,l,r,n,dynjs_itemc[w].n,dynjs_itemc[w].q,"Consumable")};this.show_itemr_box=function(a,f,l,r,n,w,B,D){this.show_popup_box(a,f,398,85,l,r,n,w,B,D)};var g=void 0,d=0,m=0,q=0,u=function(){var a=g.scrollTop;g.scrollTop=0<d?Math.min(g.scrollTop+q,m):Math.max(g.scrollTop-q,m);a!=g.scrollTop?setTimeout(u,1):(g=void 0,m=d=0)};this.scrollpane_up=function(a,f,l){void 0==g&&(g=e(a),d=-1,m=Math.max(0,g.scrollTop-f),q=void 0!=l?1E3:25,u())};this.scrollpane_down=function(a,f,l){void 0==g&&(g=e(a),d=1,m=
g.scrollTop+f,q=void 0!=l?1E3:25,u())};this.hookEvent=function(a,f,l){"string"==typeof a&&(a=e(a));null!=a&&(a.addEventListener?("mousewheel"==f&&a.addEventListener("DOMMouseScroll",l,!1),a.addEventListener(f,l,!1)):a.attachEvent&&a.attachEvent("on"+f,l))};this.unhookEvent=function(a,f,l){"string"==typeof a&&(a=e(a));null!=a&&(a.removeEventListener?("mousewheel"==f&&a.removeEventListener("DOMMouseScroll",l,!1),a.removeEventListener(f,l,!1)):a.detachEvent&&a.detachEvent("on"+f,l))};this.cancelEvent=
function(a){a=a?a:window.event;a.stopPropagation&&a.stopPropagation();a.preventDefault&&a.preventDefault();a.cancelBubble=!0;a.cancel=!0;return a.returnValue=!1};this.number_format=function(a){x=(a+"").split(".");x1=x[0];x2=1<x.length?"."+x[1]:"";for(a=/(\d+)(\d{3})/;a.test(x1);)x1=x1.replace(a,"$1,$2");return x1+x2};var v=[9,5,10,10,10,10,10,10,9,9,4,4,5,10,11,8,8,8,11,11,4,4,4];this.get_dynamic_digit_string=function(a){a=this.number_format(a);for(var f="",l=0,r=a.length-1;0<=r;r--){var n=","==a.charAt(r)?
11:"."==a.charAt(r)?10:"+"==a.charAt(r)?15:":"==a.charAt(r)?22:"-"==a.charAt(r)?16:parseInt(a.charAt(r));f=f+'<div style="float:right; height:12px; width:'+(v[n]+1)+"px; background:transparent url("+IMG_URL+"font/12b.png) 0px -"+12*n+'px"></div>';l+=v[n]}return'<div style="position:relative; display:inline; height:12px; width:'+l+'px">'+f+"</div>"};this.apply_select=function(a){h(a,"b","a");a.style.color="#0030CB"};this.apply_unselect=function(a){h(a,"a","b");a.removeAttribute("style")};var y=void 0;
this.text_select=function(a){var f=y!=a;this.text_unselect();f&&(this.apply_select(a),y=a)};this.text_unselect=function(){void 0!=y&&(this.apply_unselect(y),y=void 0)}}var common=new Common;
function ItemShop(){function h(){y=!0;1>d||1>m?y=!1:"shop_pane"==g&&m*u>current_credits&&(y=!1);e("accept_button").src=IMG_URL+"shops/accept"+(y?"":"_d")+".png";e("cost_field").value=u;e("sum_field").value=(m*u).toLocaleString("en")}var g=void 0,d=0,m=0,q=void 0,u=0,v=0,y=!1;this.set_item=function(a,f,l,r,n){f==d&&a==g&&(a=void 0,r=l=f=0,n=void 0);g=a;d=f;u=r;q=f&&!n?dynjs_itemc[f].n:n;v=l;this.set_count(0<f?1:0);h()};this.set_count=function(a){m=Math.max(0,Math.min(a,v));e("count_field").value=m;
h()};this.increase_count=function(a){this.set_count(1==m&&1<a?a:m+a)};this.read_count=function(){m=Math.max(0,parseInt(e("count_field").value));0<d&&m>v&&this.set_count(v);h()};this.commit_transaction=function(){y&&confirm("Are you sure you wish to "+("shop_pane"==g?"purchase":"sell")+" "+m+' "'+q.replace("&#039;","'")+'" for '+common.number_format(m*u)+" credits ?")&&(e("select_mode").value=g,e("select_item").value=d,e("select_count").value=m,e("shopform").submit())}}
function Snowflake(){var h=e("shrine_info"),g=e("shrine_artifact"),d=e("shrine_trophy"),m=e("shrine_collectible"),q=e("shrine_offertext"),u=0,v=0,y=0,a="",f="",l=void 0,r=!1;this.set_shrine_item=function(n,w,B,D){n==u&&(B=w=n=0,D=void 0);u=n;v=w;y=B;l=D;r=!0;n=0;1>u?(e("accept_equip").style.display="none",r=!1,n=1):2E4<=u&&3E4>u?(r=!0,n=2):3E4<=u&&4E4>u?(r=y<=v,n=3):7E4<=u&&8E4>u&&(r=!0,n=4);if(3==n)for(e("accept_equip").style.display="",e("accept_reward").style.display="none",w=e("accept_equip").querySelectorAll(".accept_equip"),
B=0;B<w.length;B++)w[B].disabled=r?"":"disabled";else e("accept_equip").style.display="none",e("accept_reward").style.display=1<n?"":"none",e("accept_reward").disabled=r?"":"disabled";h.style.display=1==n?"":"none";g.style.display=2==n?"":"none";d.style.display=3==n?"":"none";m.style.display=4==n?"":"none";q.innerHTML=0==u?"":y>v?"You have "+v+" / "+y+" items required for this offering.":"Offer "+y+"x "+l+" for :"};this.submit_shrine_reward=function(n,w){a=n;f=w;this.commit_transaction()};this.commit_transaction=
function(){r&&confirm("Are you sure you wish to offer Snowflake "+(1<y?y+"x":"a")+" "+l.replace("&#039;","'")+" ?")&&(e("select_item").value=u,e("select_reward_type").value=a,e("select_reward_slot").value=f,e("shopform").submit())}}
function MoogleMail(){var h=0,g=void 0;this.set_mooglemail_item=function(d,m){if(void 0==m||"1"!=m.getAttribute("data-locked"))d==h&&(d=0),0==d?(common.text_unselect(),h=0):(void 0!=m&&common.text_select(m),h=d,"equip"==g&&this.apply_attachment())};this.set_mooglemail_pane=function(d){this.set_mooglemail_item(0);g=g==d?void 0:d;e("mmail_attachinfo").style.display=void 0==g?"":"none";e("mmail_attachitem").style.display="item"==g?"":"none";e("mmail_attachequip").style.display="equip"==g?"":"none";e("mmail_attachcredits").style.display=
"credits"==g?"":"none";e("mmail_attachhath").style.display="hath"==g?"":"none"};this.apply_attachment=function(){if(void 0!=g){var d="equip"==g?1:Math.max(1,parseInt(e("count_"+g).value));0<d&&(e("action").value="attach_add",e("select_item").value=h,e("select_count").value=d,e("select_pane").value=g,e("mailform").submit())}};this.check_apply_attachment=function(d){13==d.keyCode&&this.apply_attachment()};this.mmail_send=function(){var d="";0<attach_count&&(d="You have attached "+attach_count+(1==attach_count?
" item":" items")+(0<attach_cod?", and the CoD is set to "+attach_cod+" credits, kupo!":", but you have not set a CoD, kupo! The attachments will be a gift, kupo!"));0<send_cost&&(d+=" Sending it will cost you "+send_cost+" credits, kupo!");confirm(d+" Are you sure you wish to send this message, kupo?")&&(e("action").value="send",e("mailform").submit())};this.mmail_save=function(){e("action").value="save";e("mailform").submit()};this.mmail_discard=function(){confirm("Are you sure you wish to discard this message, kupo?")&&
(e("action").value="discard",e("mailform").submit())};this.remove_attachment=function(d){0<mail_state&&0<attach_cod&&!confirm("Removing the attachments will deduct "+attach_cod+" Credits from your account, kupo! Are you sure?")||(e("action").value="attach_remove",e("action_value").value=d,e("mailform").submit())};this.return_mail=function(){confirm("This will return the message to the sender, kupo! Are you sure?")&&(e("action").value="return_message",e("mailform").submit())};this.check_set_cod=function(d){13==
d.keyCode&&this.set_cod()};this.set_cod=function(){e("action").value="attach_cod";e("action_value").value=Math.max(0,parseInt(e("newcod").value));e("mailform").submit()}}
function Equips(){var h=0,g=void 0;this.set=function(d,m,q,u){var v="undefined"==typeof dynjs_eqstore||"undefined"==typeof dynjs_eqstore[d]?dynjs_equip:dynjs_eqstore;h=d;g=v[d].k;common.show_popup_box(q,u,360,360,m,void 0,"right",v[d].t,v[d].d,"")};this.unset=function(){h=0;g=void 0;common.hide_popup_box()};this.pop_equipwindow=function(){return 0<h?(window.open(MAIN_URL+"equip/"+h+"/"+g,"_pu"+(Math.random()+"").replace(/0\./,""),"toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=450,height=520,left="+
(screen.width-450)/2+",top="+(screen.height-520)/2),!0):!1};this.lock=function(d,m){var q=new XMLHttpRequest;api_call(q,{type:"simple",method:"lockequip",uid,token:simple_token,eid:d,lock:"il"==m.className?0:1},function(){var u=api_response(q);if(0!=u&&void 0!=u.eid){m.className=u.locked?"il":"iu";var v=e("e"+d),y=v.getAttribute("data-locked");if(y){if("0"===y&&v.getAttribute("style")&&v.onclick)v.onclick();v.setAttribute("data-locked",u.locked)}}})};document.onkeypress=function(d){d.shiftKey||d.altKey||
"c"==String.fromCharCode(window.event?d.keyCode:d.which)&&equips.pop_equipwindow()&&common.cancelEvent(d)}}
function Training(){this.start_training=function(m){e("start_train").value=m;e("trainform").submit()};this.cancel_training=function(){e("cancel_train").value=1;e("trainform").submit()};var h=e("train_progbar"),g=e("train_progcnt");if("undefined"!=typeof reload_to)var d=setInterval(function(){var m=Date.now()/1E3+time_skew,q=m<end_time?q=100-100*(end_time-m)/total_time:100,u=Math.floor(q),v=Math.floor(100*(q-u));g.innerHTML=u+"."+(10>v?"0":"")+v;h.style.width=4*q+"px";m>=end_time&&(document.location=
reload_to,clearInterval(d))},ticktime)}
function ItemSelector(){var h=0,g=!1;this.set_item=function(q){h==q?this.commit_slot(0):h=q};var d=void 0,m=void 0;this.hover_slot=function(q){0!=h&&(void 0!=d&&this.unhover_slot(),common.suppress_popups=!0,d=q,m=q.innerHTML,q.innerHTML=dynjs_itemc[h].n,q.className="ss")};this.unhover_slot=function(){void 0!=d&&(d.innerHTML=m,d.removeAttribute("class"),d=void 0,common.suppress_popups=!1)};this.commit_slot=function(q){g||(g=!0,e("slot").value=q,e("item").value=h,e("selectionform").submit())}}
function MonsterLab(){this.create_monster=function(h){e("selected_patk").value=h;e("create_form").submit()}}
function Battle(){var h=e("infopane"),g=[void 0,void 0],d=[void 0,void 0],m="log",q=void 0,u=void 0,v=void 0,y=1,a=0,f=void 0,l=e("ta_monster_1"),r=e("ta_monster_2"),n=!1,w=function(b){void 0!=h&&(h.innerHTML=b)};this.set_infopane=function(b){switch(b){case "Attack":var k="Damages a single enemy. Depending on your equipped weapon, this can place certain status effects on the affected monster. To attack, click here, then click your target. Simply clicking an enemy will also perform a normal attack.";break;
case "Skillbook":k="Use special skills and magic. To use offensive spells and skills, first click it, then click your target. To use it on yourself, click it twice.";break;case "Items":k="Use various consumable items that can replenish your vitals or augment your power in various ways.";break;case "Spirit":k="Toggle Spirit Channeling.";break;case "Defend":k="Increases your defensive capabilities for the next turn.";break;case "Focus":k="Reduces the chance that your next spell will be resisted. Your defenses and evade chances are lowered for the next turn.";
break;default:k="Choose from the Battle Actions highlighted above, and use them to defeat your enemies listed to the right. When all enemies are reduced to zero Health, you win. If your Health reaches zero, you are defeated."}w('<div class="btii">'+b+"</div><div>"+k+"</div>")};this.set_infopane_spell=function(b,k,t,z,C,A){var E="";if(0<z||0<C)E="Requires ",0<z&&(E+=z+" Magic Points"),0<z&&0<C&&(E+=z+" and "),0<C&&(E+=C+" Charge"+(1==C?"":"s")),E+=" to use.";0<A&&(E+=" Cooldown: "+A+" turns.");w('<div class="btii">'+
b+'</div><div style="position:relative"><div style="float:left; width:601px"><div style="padding-bottom:3px; padding-right:3px">'+k+'</div><div><span style="font-weight:bold">'+E+'</span></div></div><div style="float:left; width:32px; height:32px; position:relative"><img src="'+IMG_URL+"a/"+t+'.png" style="border:0px; margin:0px; padding:0px; position:absolute; left:3px; top:4px; z-index:3" /><img src="'+IMG_URL+'ab/b.png" style="border:0px; margin:0px; padding:0px; position:absolute; left:-5px; top:-4px; z-index:3" /></div></div>')};
this.set_infopane_effect=function(b,k,t){w('<div class="btii">'+b+'</div><div style="padding-bottom:3px">'+k+'</div><div><span style="font-weight:bold">'+("autocast"==t?"Expires if magic is depleted to below 10%":"permanent"==t?"Permanent until triggered":"decaying"==t?"Decays by 20% per turn":"Expires in "+t+" turn"+(1==t?"":"s"))+".</span></div>")};this.set_infopane_item=function(b){w('<div class="btii">'+dynjs_itemc[b].n+'</div><div style="padding-bottom:3px">'+dynjs_itemc[b].q+"</div>")};this.lock_action=
function(b,k,t,z){if(!n)if(d[k]==b&&"skill"!=t?(g[k]=void 0,d[k]=void 0):(g[k]=h.innerHTML,d[k]=b),0==k&&(g[1]=void 0,d[1]=void 0),1==k)q!=t&&(this.clear_actions(),q=t,b.src=IMG_URL+"battle/"+q+"_s.png",this.set_mode(t)),this.set_selected_subaction(b,z);else switch(q==t?"skill"==t?this.set_selected_subaction(void 0):q=void 0:(this.clear_actions(),q=t),b.src=IMG_URL+"battle/"+t+"_"+(void 0==q?"n":"s")+".png",this.set_mode(t),t){case "attack":this.toggle_default_pane();break;case "skill":this.toggle_magic_pane();
break;case "items":this.toggle_item_pane();break;default:this.touch_and_go()}};this.clear_actions=function(){if(void 0!=q){if("spirit"!=q){var b="magic"==q?"skill":q;e("ckey_"+b).src=IMG_URL+"battle/"+b+"_n.png"}q=void 0}};this.clear_infopane=function(){void 0!=g[1]?w(g[1]):void 0!=g[0]?w(g[0]):this.set_infopane("Battle Time")};var B=function(b){e("pane_"+b).style.display="none";m=void 0};this.toggle_pane=function(b){b==m?this.toggle_default_pane():(B(m),e("pane_"+b).style.display="",m=b)};this.toggle_default_pane=
function(){"log"!=m&&(B(m),e("pane_log").style.display="",m=m="log")};this.toggle_magic_pane=function(){"skill"==m?this.toggle_pane("magic"):"magic"==m?this.toggle_pane("skill"):this.toggle_pane(default_magic_pane)};this.toggle_skill_pane=function(){this.toggle_pane("skill")};this.toggle_item_pane=function(){this.toggle_pane("item")};var D="attack",H=0,F=0;this.set_mode=function(b){D=D==b&&"magic"!=b?"attack":b};this.reset_skill=function(){F=H=0;this.set_selected_subaction(void 0)};this.set_hostile_skill=
function(b){F=F==b?0:b};this.set_friendly_skill=function(b){F==b?(H=0,this.touch_and_go()):F=b};this.hover_target=function(b){if(void 0==v){var k=common.findPosWithScroll(b),t=common.findPosWithScroll(e("battle_right"));k[0]-=t[0];k[1]-=t[1];l.style.left=k[0]-7+"px";l.style.top=k[1]+b.offsetHeight/2-3+"px";r.style.left=k[0]+b.offsetWidth+2+"px";r.style.top=k[1]+b.offsetHeight/2-3+"px";l.style.visibility="visible";r.style.visibility="visible"}};this.unhover_target=function(){void 0==v&&(l.removeAttribute("style"),
r.removeAttribute("style"))};this.commit_target=function(b){n||void 0!=v||(H=v=b,this.touch_and_go())};var G=void 0,J=void 0,I=void 0;this.touch_and_go=function(){n||void 0!=f||(G=D,J=H,I=F,f=new XMLHttpRequest,api_call(f,{type:"battle",method:"action",token:battle_token,mode:D,target:H,skill:F},this.process_action))};this.recast=function(){n||void 0==G||(D=G,H=J,F=I,this.touch_and_go())};for(var L=0,O=!1,M="pane_completion pane_effects pane_action pane_vitals pane_quickbar table_skills table_magic pane_item pane_monster".split(" "),
Q=[],P=0;P<M.length;P++){var R=M[P];Q[R]=e(R)}this.process_action=function(){var b=api_response(f);if(0!=b){if(void 0!=b.error)this.battle_continue();else if(void 0!=b.reload)this.battle_continue();else{for(var k=0;k<M.length;k++){var t=M[k];void 0!=b[t]&&(Q[t].innerHTML=b[t])}has_debug&&(e("debugpane").innerHTML=b.debugpane);if(void 0!=b.textlog){t=e("textlog");t.insertRow(0).insertCell(0).className="tls";var z=b.textlog.length;for(k=0;k<z;k++){var C=t.insertRow(0).insertCell(0);C.className="tl"+
(void 0!=b.textlog[k].c?b.textlog[k].c:"");C.innerHTML=b.textlog[k].t}for(L+=z;100<L;)t.deleteRow(-1),--L}void 0==b.pane_completion?(e("pane_completion").innerHTML="",n=!1):n=!0;e("expbar").style.width=b.exp+"px";1234==b.exp?(O=!0,e("expbar").src=IMG_URL+"bar_yellow.png"):O&&(O=!1,e("expbar").src=IMG_URL+"bar_blue.png");do_healthflash=b.healthflash;v=void 0;battle.unhover_target();battle.reset_skill();battle.set_mode("attack");a=1;l.style.opacity=a;r.style.opacity=a;battle.toggle_default_pane();g[0]=
void 0;g[1]=void 0;battle.clear_infopane();battle.clear_actions()}f=void 0}};var S=!1;this.battle_continue=function(){S||(S=!0,document.location+="")};this.set_selected_subaction=function(b,k){void 0==b?(u=void 0,common.text_unselect()):u==k?this.set_selected_subaction(void 0):common.text_select(b)};var N=0;this.start_flash_loop=function(){setInterval(function(){a=common.decimalround(Math.min(1,Math.max(0,a+.07*y)),2);if(0==a||1==a)y*=-1;void 0!=v&&(l.style.opacity=a,r.style.opacity=a);do_healthflash?
(N=Math.floor(80+150*a),e(vital_prefix+"vbh").style.backgroundColor="rgb("+N+",50,50)"):0!=N&&(e(vital_prefix+"vbh").style.backgroundColor="",N=0);for(var b=0,k;k=e("effect_expire_"+ ++b);)k.style.opacity=.8-a/2},20)};document.onkeydown=function(b){b=b||window.event;if(b.target)var k=b.target;else b.srcElement&&(k=b.srcElement);3==k.nodeType&&(k=k.parentNode);if("INPUT"!=k.tagName&&"TEXTAREA"!=k.tagName){k=b.keyCode?b.keyCode:b.which;var t=String.fromCharCode(k),z=void 0,C=void 0,A=-1;switch(k){case 48:case 96:A=
0;break;case 49:case 97:A=1;break;case 50:case 98:A=2;break;case 51:case 99:A=3;break;case 52:case 100:A=4;break;case 53:case 101:A=5;break;case 54:case 102:A=6;break;case 55:case 103:A=7;break;case 56:case 104:A=8;break;case 57:case 105:A=9}var E=!1;if(b.altKey){if(0<=A&&10>A){0==A&&(A=10);E=!0;var K=e("qb"+A);K&&(K.onmouseover(),K.onclick())}}else{if(13==k||32==k)z="btcp";else if(-1<A)z="mkey_"+A;else if(112<=k&&123>=k||"G"==t||"P"==t)"item"!=m&&(z="ckey_items"),C="G"==t||"P"==t?"ikey_p":b.ctrlKey?
"ikey_n"+(k-111):b.shiftKey?"ikey_s"+(k-111):"ikey_"+(k-111);else if(!b.ctrlKey&&!b.shiftKey)switch(t){case "Q":z="ckey_attack";break;case "W":z="ckey_skill";break;case "E":z="ckey_items";break;case "S":z="ckey_spirit";break;case "D":z="ckey_defend";break;case "F":z="ckey_focus";break;case "R":z="recast"}if(z||C)E=!0;if(z)if("recast"==z)battle.recast();else if(K=e(z))K.onclick();if(C&&(K=e(C)))K.onclick()}if(E)return b.cancelBubble=!0,b.returnValue=!1,b.stopPropagation&&(b.stopPropagation(),b.preventDefault()),
!1}};this.clear_infopane();this.start_flash_loop();this.set_infopane("Battle Time")}function at_show_aux(h,g){h=e(h);g=e(g);for(var d="x"==g.at_position?h.offsetWidth+0:0;h;h=h.offsetParent)d+=h.offsetLeft;g.style.position="absolute";g.style.top="27px";g.style.left=d+"px";g.style.visibility="visible"}function at_show(){p=e(this.at_parent);c=e(this.at_child);at_show_aux(p.id,c.id)}function at_hide(){c=e(this.at_child);e(c.id).style.visibility="hidden"}
function at_click(){p=e(this.at_parent);c=e(this.at_child);"visible"!=c.style.visibility?at_show_aux(p.id,c.id):c.style.visibility="hidden";return!1}
function at_attach(h,g,d,m,q){p=e(h);c=e(g);p.at_parent=p.id;c.at_parent=p.id;p.at_child=c.id;c.at_child=c.id;p.at_position=m;c.at_position=m;c.style.position="absolute";c.style.visibility="hidden";switch(d){case "click":p.onclick=at_click;p.onmouseout=at_hide;c.onmouseover=at_show;c.onmouseout=at_hide;break;case "hover":p.onmouseover=at_show,p.onmouseout=at_hide,c.onmouseover=at_show,c.onmouseout=at_hide}};