diff --git a/fx.bundle.js b/fx.bundle.js index b91b8f7..c75ba9f 100644 --- a/fx.bundle.js +++ b/fx.bundle.js @@ -1,2 +1,2 @@ -const buildTimestamp = "1739534494298"; const dictionary = {"gIsTeamGame":"hQ","game":"aC","playerId":"eK","playerData":"af","playerNames":"zL","gameState":"ym","fontSize":"fontSize","x":"eh","y":"ej","canvas":"hY","gHumans":"jq","playerStates":"a2B","fontGeneratorFunction":"b8.pZ.rN","rawPlayerNames":"zP","playerBalances":"gc","playerTerritories":"gO","gLobbyMaxJoin":"w0","data":"data","playerCount":"playerCount","gBots":"kB","strs":"a9C","gIsSingleplayer":"k9","uiSizes":"ba","gap":"gap","gMaxPlayers":"eX","i":"aA","MenuManager":"aZ","getState":"zx"}; +const buildTimestamp = "1739567916320"; const dictionary = {"gIsTeamGame":"hQ","game":"aC","playerId":"eK","playerData":"af","playerNames":"zL","gameState":"ym","fontSize":"fontSize","x":"eh","y":"ej","canvas":"hY","gHumans":"jq","playerStates":"a2B","fontGeneratorFunction":"b8.pZ.rN","rawPlayerNames":"zP","playerBalances":"gc","playerTerritories":"gO","gLobbyMaxJoin":"w0","data":"data","playerCount":"playerCount","gBots":"kB","strs":"a9C","gIsSingleplayer":"k9","uiSizes":"ba","gap":"gap","gMaxPlayers":"eX","i":"aA","MenuManager":"aZ","getState":"zx"}; (()=>{"use strict";function e(e){const t=document.createElement("p");t.innerText="Attack Percentage Keybinds";const n=document.createElement("div");n.className="arrayinput";const o=document.createElement("button");return o.innerText="Add",e.append(t,n,o),this.container=n,this.keys=["key","type","value"],this.objectArray=[],this.addObject=function(){this.objectArray.push({key:"",type:"absolute",value:.8}),this.displayObjects(),o.scrollIntoView(!1)},this.update=function(e){this.objectArray=e.attackPercentageKeybinds,this.displayObjects()},o.addEventListener("click",this.addObject.bind(this)),this.displayObjects=function(){if(this.container.innerHTML="",0===this.objectArray.length)return this.container.innerText="No custom attack percentage keybinds added";for(var e=0;eAbsolute',o.addEventListener("change",this.updateObject.bind(this,e,n));else if("key"===n)o.type="text",o.setAttribute("readonly",""),o.setAttribute("placeholder","No key set"),o.addEventListener("click",this.startKeyInput.bind(this,e,n));else{const t="absolute"===this.objectArray[e].type;o.type=t?"text":"number",t?o.addEventListener("click",this.convertIntoNumberInput.bind(this,e,n),{once:!0}):o.setAttribute("step","0.1"),o.addEventListener("input",this.updateObject.bind(this,e,n))}"value"===n&&"absolute"===this.objectArray[e].type?o.value=100*this.objectArray[e][n]+"%":o.value=this.objectArray[e][n],t.appendChild(o)}),this);var n=document.createElement("button");n.textContent="Delete",n.addEventListener("click",this.deleteObject.bind(this,e)),t.appendChild(n),this.container.appendChild(t)}},this.startKeyInput=function(e,t,n){n.target.value="Press any key";const o=this.updateObject.bind(this,e,t);n.target.addEventListener("keydown",o,{once:!0}),n.target.addEventListener("blur",(()=>{n.target.removeEventListener("keydown",o),n.target.value=this.objectArray[e][t]}),{once:!0})},this.convertIntoNumberInput=function(e,t,n){n.target.value=n.target.value.slice(0,-1),n.target.type="number",n.target.addEventListener("blur",(()=>{this.displayObjects()}),{once:!0})},this.updateObject=function(e,t,n){if(e>=this.objectArray.length)return;const o="value"===t?"absolute"===this.objectArray[e].type?parseFloat(n.target.value)/100:parseFloat(n.target.value):"key"===t?n.key:n.target.value;this.objectArray[e][t]=o,"key"===t&&this.displayObjects()},this.deleteObject=function(e){this.objectArray.splice(e,1),this.displayObjects()},this}const t={count:0,removeWins:function(){confirm("Do you really want to reset your wins?")&&(t.count=0,localStorage.removeItem("fx_winCount"),alert("Successfully reset wins"))}};null!==localStorage.getItem("fx_winCount")&&(t.count=localStorage.getItem("fx_winCount"));const n=t;var o={};const a=document.getElementById("windowContainer");function i(e){o[e.name]=e,o[e.name].isOpen=!1}function s(e){!1!==o[e].isOpen&&(o[e].isOpen=!1,o[e].element.style.display="none",void 0!==o[e].onClose&&o[e].onClose())}function l(){Object.values(o).forEach((function(e){!1!==e.closable&&s(e.name)}))}document.addEventListener("mousedown",(e=>{a.contains(e.target)||l(),y().useFullscreenMode&&h()}),{passive:!0,capture:!0}),document.getElementById("canvasA").addEventListener("touchstart",l,{passive:!0}),document.addEventListener("keydown",(e=>{"Escape"===e.key&&l()}));const r={create:function(e){const t=document.createElement("div");return e.element=t,t.className="window"+(void 0!==e.classes?" "+e.classes:" scrollable selectable"),t.style.display="none",a.appendChild(t),i(e),t},add:i,openWindow:function(e,...t){!0!==o[e].isOpen&&(void 0!==o[e].beforeOpen&&o[e].beforeOpen(...t),o[e].isOpen=!0,o[e].element.style.display=null)},closeWindow:s,closeAll:l};window.__fx=window.__fx||{};const c=window.__fx;var d={displayWinCounter:!0,useFullscreenMode:!1,hoveringTooltip:!0,realisticNames:!1,showPlayerDensity:!0,coloredDensity:!0,densityDisplayStyle:"percentage",hideBotNames:!1,highlightClanSpawns:!1,detailedTeamPercentage:!1,customBackgroundUrl:"",attackPercentageKeybinds:[]};c.settings=d;const u=["hideAllLinks","fontName"];c.makeMainMenuTransparent=!1;const p=new function(){const t=[{for:"displayWinCounter",type:"checkbox",label:"Display win counter",note:"The win counter tracks multiplayer solo wins (not in team games)"},{type:"button",text:"Reset win counter",action:n.removeWins},{for:"useFullscreenMode",type:"checkbox",label:"Use fullscreen mode",note:"Note: fullscreen mode will trigger after you click anywhere on the page due to browser policy restrictions."},{for:"hoveringTooltip",type:"checkbox",label:"Hovering tooltip",note:"Display map territory info constantly (on mouse hover) instead of only when right clicking on the map"},{for:"realisticNames",type:"checkbox",label:"Realistic Bot Names"},{for:"showPlayerDensity",type:"checkbox",label:"Show player density"},{for:"coloredDensity",type:"checkbox",label:"Colored density",note:"Display the density with a color between red and green depending on the density value"},{for:"densityDisplayStyle",type:"selectMenu",label:"Density value display style:",tooltip:"Controls how the territorial density value should be rendered",options:[{value:"percentage",label:"Percentage"},{value:"absoluteQuotient",label:"Value from 0 to 150 (BetterTT style)"}]},{for:"hideBotNames",type:"checkbox",label:"Hide bot names"},{for:"highlightClanSpawns",type:"checkbox",label:"Highlight clan spawnpoints",note:"Increases the spawnpoint glow size for members of your clan"},{for:"detailedTeamPercentage",type:"checkbox",label:"Detailed team pie chart percentage",note:"For example: this would show 25.82% instead of 26% on the pie chart in team games"},{for:"customBackgroundUrl",type:"textInput",label:"Custom main menu background:",placeholder:"Enter an image URL here",tooltip:"A custom image to be shown as the main menu background instead of the currently selected map."},e],o=document.querySelector(".settings .scrollable");var a={},i={},s=[];t.forEach((e=>{if("function"==typeof e){const t=document.createElement("div");return s.push(new e(t)),o.append(t)}const t=document.createElement("label");e.tooltip&&(t.title=e.tooltip);const n=e.type.endsWith("Input"),l=document.createElement(n||"checkbox"===e.type?"input":"selectMenu"===e.type?"select":"button");if("textInput"===e.type&&(l.type="text"),e.placeholder&&(l.placeholder=e.placeholder),(n||"selectMenu"===e.type)&&(a[e.for]=l),e.text&&(l.innerText=e.text),e.action&&l.addEventListener("click",e.action),e.label&&t.append(e.label+" "),e.note){const n=document.createElement("small");n.innerText=e.note,t.append(document.createElement("br"),n)}if(e.options&&e.options.forEach((e=>{const t=document.createElement("option");t.setAttribute("value",e.value),t.innerText=e.label,l.append(t)})),t.append(l),"checkbox"===e.type){l.type="checkbox";const n=document.createElement("span");n.className="checkmark",t.className="checkbox",t.append(n),i[e.for]=l}else t.append(document.createElement("br"));o.append(t,document.createElement("br"))})),this.save=function(){Object.keys(a).forEach((function(e){d[e]=a[e].value.trim()})),Object.keys(i).forEach((function(e){d[e]=i[e].checked})),this.applySettings(),r.closeWindow("settings"),u.forEach((e=>delete d[e])),localStorage.setItem("fx_settings",JSON.stringify(d)),window.location.reload()};const l=document.createElement("input");function p(e){const t=e.target,n=t.files[0];if(!n)return;if(t.removeEventListener("change",p),t.value="",!n.name.endsWith(".json"))return alert("Invalid file format");const o=new FileReader;o.onload=function(){let e;try{e=JSON.parse(o.result),confirm('Warning: This will override all current settings, click "OK" to confirm')&&(c.settings=d=e),localStorage.setItem("fx_settings",JSON.stringify(d)),window.location.reload()}catch(e){alert("Error\n"+e)}},o.readAsText(n)}l.type="file",this.importFromFile=function(){l.click(),l.addEventListener("change",p)},this.exportToFile=function(){var e,t,n;e=JSON.stringify(d),t=document.createElement("a"),n=new Blob([e],{type:"application/json"}),t.href=URL.createObjectURL(n),t.download="FX_client_settings.json",t.click(),URL.revokeObjectURL(t.href)},this.syncFields=function(){Object.keys(a).forEach((function(e){a[e].value=d[e]})),Object.keys(i).forEach((function(e){i[e].checked=d[e]})),s.forEach((e=>e.update(d)))},this.resetAll=function(){confirm("Are you Really SURE you want to RESET ALL SETTINGS back to the default?")&&(localStorage.removeItem("fx_settings"),window.location.reload())},this.applySettings=function(){""!==d.customBackgroundUrl&&(document.body.style.backgroundImage="url("+d.customBackgroundUrl+")",document.body.style.backgroundSize="cover",document.body.style.backgroundPosition="center"),c.makeMainMenuTransparent=""!==d.customBackgroundUrl},d.useFullscreenMode&&h()};function h(){null===document.fullscreenElement&&document.fullscreenEnabled&&document.documentElement.requestFullscreen({navigationUI:"hide"}).then((()=>{console.log("Fullscreen mode activated")})).catch((e=>{console.warn("Could not enter fullscreen mode:",e)}))}r.add({name:"settings",element:document.querySelector(".settings"),beforeOpen:function(){p.syncFields()}}),null!==localStorage.getItem("fx_settings")&&(c.settings=d={...d,...JSON.parse(localStorage.getItem("fx_settings"))}),p.applySettings();const m=p;function y(){return d}const b=["playerTerritories","playerBalances","rawPlayerNames"],f=["playerId","gIsTeamGame","gHumans","gLobbyMaxJoin","gameState","gIsSingleplayer"],g=e=>b.includes(e)?window[dictionary.playerData]?.[dictionary[e]]:f.includes(e)?window[dictionary.game]?.[dictionary[e]]:window[dictionary[e]],v=new function(){this.playersToInclude=[],this.tabLabels=["ALL","CLAN"],this.filteredLeaderboard=[],this.tabBarOffset=0,this.windowWidth=0,this.verticalClickThreshold=1e3,this.hoveringOverTabs=!1,this.scrollToTop=()=>{},this.repaintLeaderboard=()=>{},this.setUpdateFlag=()=>{},this.parseClanFromPlayerName=()=>{console.warn("parse function not set")},this.selectedTab=0,this.tabHovering=-1,this.enabled=!1,this.drawTabs=function(e,t,n,o){e.textBaseline="middle",e.textAlign="center";const a=t/this.tabLabels.length,i=n+this.tabBarOffset/2;this.tabLabels.forEach(((t,s)=>{0!==s&&e.fillRect(a*s,n,1,this.tabBarOffset),this.selectedTab===s&&(e.fillStyle=o,e.fillRect(a*s,n,a,this.tabBarOffset),e.fillStyle="rgb(255,255,255)"),this.tabHovering===s&&(e.fillStyle="rgba(255,255,255,0.3)",e.fillRect(a*s,n,a,this.tabBarOffset),e.fillStyle="rgb(255,255,255)"),e.fillText(t,a*s+a/2,i)}))},this.setHovering=(e,t)=>{let n=!1;if(e){const e=Math.floor(t/(this.windowWidth/this.tabLabels.length));this.tabHovering!==e&&(this.tabHovering=e,n=!0)}return e!==this.hoveringOverTabs&&(this.hoveringOverTabs=e,!1===e&&(this.tabHovering=-1),e||(n=!0)),n&&this.repaintLeaderboard(),e},this.handleMouseDown=e=>{const t=Math.floor(e/(this.windowWidth/this.tabLabels.length));return this.selectedTab!==t&&(this.selectedTab=t,0===this.selectedTab?this.clearFilter():1===this.selectedTab&&(this.filterByOwnClan(),this.setUpdateFlag()),this.repaintLeaderboard()),!0},this.filterByOwnClan=()=>{this.playersToInclude=[];const e=g("playerId"),t=this.parseClanFromPlayerName(g("rawPlayerNames")[e]);g("rawPlayerNames").forEach(((n,o)=>{o!==e&&this.parseClanFromPlayerName(n)!==t||this.playersToInclude.push(o)})),this.enabled=!0,this.scrollToTop()},this.clearFilter=()=>{this.enabled=!1},this.reset=()=>{this.enabled=!1,this.selectedTab=0,w.refresh()}},w=new function(){this.inOwnClan=new Array(512),this.inOwnClan.fill(!1),this.refresh=()=>{const e=g("gHumans"),t=v.parseClanFromPlayerName(g("rawPlayerNames")[g("playerId")]);null===t?this.inOwnClan.fill(!1):g("rawPlayerNames").forEach(((n,o)=>{this.inOwnClan[o]=o/g,">").replace(/"/g,""").replace(/'/g,"'")}r.add({name:"donationHistory",element:document.querySelector("#donationhistory"),beforeOpen:function(e){document.getElementById("donationhistory_note").style.display="none"},onClose:function(){k.openedWindowPlayerID=null}});const k=new function(){function e(e,t,n,o){const a=g("rawPlayerNames"),i=document.createElement("tr");o&&i.setAttribute("class","new");let s=`${t}. `;return n===e[1]?s+=`Received ${e[2]} resources from ${E(a[e[0]])}`:s+=`Sent ${e[2]} resources to ${E(a[e[1]])}`,s+="",i.innerHTML=s,i}this.openedWindowPlayerID=null,this.contentElement=document.querySelector("#donationhistory_content"),this.donationHistory=Array(512),this.getHistoryOf=function(e){return this.donationHistory[e].toReversed()},this.reset=function(){for(var e=0;e<512;e++)this.donationHistory[e]=[]},this.logDonation=function(t,n,o){const a=[t,n,o];if(this.donationHistory[n].push(a),this.donationHistory[t].push(a),this.openedWindowPlayerID===t||this.openedWindowPlayerID===n){const o=this.donationHistory[this.openedWindowPlayerID===t?t:n].length;this.contentElement.prepend(e(a,o,this.openedWindowPlayerID,!0))}},this.displayHistory=function(t,n=g("rawPlayerNames"),o=g("gIsSingleplayer")){var a=k.getHistoryOf(t);console.log("History for "+n[t]+":"),console.log(a),document.querySelector("#donationhistory h1").innerHTML="Donation history for "+E(n[t]),this.contentElement.innerHTML="",a.length>0?a.forEach(((n,o)=>{this.contentElement.appendChild(e(n,a.length-o,t))})):this.contentElement.innerText="Nothing to display",this.openedWindowPlayerID=t,r.openWindow("donationHistory",o)}},x=k,L=new function(){const e=document.createElement("img");e.setAttribute("src","assets/players_icon.png"),document.getElementById("playerlist_content").addEventListener("click",(e=>{const t=e.target.closest("tr[data-player-id]")?.getAttribute("data-player-id");t&&g("gIsTeamGame")&&(r.closeWindow("playerList"),x.displayHistory(t))})),this.display=function(e){const t=g("gHumans"),n=g("gLobbyMaxJoin");let o=`

Players (${t})

`;for(let a=0;aBots (${n-t})`),o+=`${a+1}. ${E(e[a])}`;document.getElementById("playerlist_content").innerHTML=o,document.getElementById("playerlist_content").setAttribute("class",g("gIsTeamGame")?"clickable":""),r.openWindow("playerList")},this.hoveringOverButton=!1,this.drawButton=(t,n,o,a)=>{t.fillRect(n,o,a,a),t.fillStyle=this.hoveringOverButton?"#aaaaaaaa":"#000000aa",t.clearRect(n+1,o+1,a-2,a-2),t.fillRect(n+1,o+1,a-2,a-2),t.fillStyle="#ffffff",t.imageSmoothingEnabled=!0,t.drawImage(e,n+2,o+2,a-4,a-4),t.imageSmoothingEnabled=!1}};r.add({name:"playerList",element:document.getElementById("playerlist")});const T=L,I=new function(){this.getMaxTroops=function(e,t){return(150*e[t]).toString()},this.getDensity=function(e,t=g("playerBalances"),n=g("playerTerritories")){return"percentage"===y().densityDisplayStyle?(t[e]/(150*(0===n[e]?1:n[e]))*100).toFixed(1)+"%":(t[e]/(0===n[e]?1:n[e])).toFixed(1)},this.isPointInRectangle=function(e,t,n,o,a,i){return e>=n&&e<=n+a&&t>=o&&t<=o+i},this.fillTextMultiline=function(e,t,n,o,a){const i=parseInt(e.font.split(" ").find((e=>e.endsWith("px"))).slice(0,-2));t.split("\n").forEach(((t,s)=>e.fillText(t,n,o+s*i,a)))},this.textStyleBasedOnDensity=function(e){const t=g("playerBalances"),n=g("playerTerritories");return`hsl(${t[e]/(1.5*n[e])}, 100%, 50%, 1)`}},S=new function(){let e=!1;function t(t){if(!y().hoveringTooltip||!g("gameState")||e)return;let n,o;if(t.type.includes("touch")){const{touches:e,changedTouches:a}=t.originalEvent??t,i=e[0]??a[0];n=i.pageX,o=i.pageY}else t.type.includes("mouse")&&(n=t.clientX,o=t.clientY);e=!0;try{this.display(this.canvasPixelScale*n,this.canvasPixelScale*o)}catch(t){console.error(t)}setTimeout((()=>e=!1),100)}this.display=()=>{},this.canvasPixelScale=1,document.getElementById("canvasA").addEventListener("mousemove",t.bind(this)),document.getElementById("canvasA").addEventListener("touchstart",t.bind(this))},O={setAbsolute:()=>{},setRelative:()=>{}};let B=!1,C="",N=()=>{},A=()=>{},H=(e,t)=>{};const j=new TextEncoder,M=new TextDecoder;r.add({name:"lobbyJoinMenu",element:document.getElementById("customLobbyJoinMenu")});const P=r.create({name:"customLobby",classes:"scrollable selectable flex-column text-align-center",closable:!1}),W=document.createElement("h2");W.textContent="Custom Lobby";const F=document.createElement("div");F.className="customlobby-main";const D=document.createElement("div"),_=document.createElement("p");_.textContent="0 Players";const R=document.createElement("div");D.append(_,R);const U=document.createElement("div");U.className="text-align-left";const J={mode:{label:"Mode:",type:"selectMenu",options:[{value:0,label:"2 Teams"},{value:1,label:"3 Teams"},{value:2,label:"4 Teams"},{value:3,label:"5 Teams"},{value:4,label:"6 Teams"},{value:5,label:"7 Teams"},{value:6,label:"8 Teams"},{value:7,label:"Battle Royale"},{value:10,label:"No Fullsend Battle Royale"},{value:9,label:"Zombie mode"}]},map:{label:"Map:",type:"selectMenu"},difficulty:{label:"Difficulty:",type:"selectMenu",options:[{value:0,label:"Very Easy (Default)"},{value:1,label:"Easy (1v1)"},{value:2,label:"Normal"},{value:3,label:"Hard"},{value:4,label:"Very Hard"},{value:5,label:"Impossible"}]},spawnSelection:{label:"Spawn selection",type:"checkbox"},botCount:{label:"Bot & player count:",type:"numberInput",attributes:{min:"1",max:"512"}}},G={},$={};function K(e,t){"checkbox"===J[e].type?G[e].checked=0!==t:G[e].value=t.toString(),$[e]=t}function q(e,t){Z("options",[e,parseInt(t.target.value)])}function V(e,t){Z("options",[e,t.target.checked?1:0])}Object.entries(J).forEach((([e,t])=>{const n=document.createElement("label");t.tooltip&&(n.title=t.tooltip);const o=t.type.endsWith("Input"),a=document.createElement(o||"checkbox"===t.type?"input":"selectMenu"===t.type?"select":"button");if(G[e]=a,"textInput"===t.type&&(a.type="text"),"numberInput"===t.type&&(a.type="number"),t.placeholder&&(a.placeholder=t.placeholder),(o||"selectMenu"===t.type)&&a.addEventListener("change",q.bind(void 0,e)),t.text&&(a.innerText=t.text),t.action&&a.addEventListener("click",t.action),t.label&&n.append(t.label+" "),t.note){const e=document.createElement("small");e.innerText=t.note,n.append(document.createElement("br"),e)}if(t.options&&Q(t.options,a),t.attributes&&Object.entries(t.attributes).forEach((([e,t])=>a.setAttribute(e,t))),n.append(a),"checkbox"===t.type){a.type="checkbox";const t=document.createElement("span");t.className="checkmark",n.className="checkbox",n.append(t),a.addEventListener("change",V.bind(void 0,e))}else n.append(document.createElement("br"));U.append(n)})),F.append(D,U);const X=document.createElement("footer");X.style.marginTop="10px";const z=document.createElement("button"),Y=document.createElement("button");function Q(e,t){e.forEach((e=>{const n=document.createElement("option");n.setAttribute("value",e.value),n.textContent=e.label,t.append(n)}))}function Z(e,t){const n=void 0!==t?{t:e,d:t}:{t:e},o=j.encode(JSON.stringify(n)),a=new ArrayBuffer(o.length+1);new DataView(a).setUint8(0,120),new Uint8Array(a,1).set(o),H(1,a)}z.textContent="Start game",Y.textContent="Leave lobby",z.addEventListener("click",(function(){r.closeWindow("customLobby"),Z("startGame")})),Y.addEventListener("click",(()=>A())),X.append(z,Y),P.append(W,F,X),document.getElementById("lobbyCode").addEventListener("input",(({target:e})=>{5===e.value.length&&(C=e.value.toLowerCase(),e.value="",r.closeWindow("lobbyJoinMenu"),B=!0,N())})),document.getElementById("createLobbyButton").addEventListener("click",(()=>{C="",r.closeWindow("lobbyJoinMenu"),B=!0,N()}));let ee,te=!1,ne=[];function oe(e,t){const n=document.createElement("span");return n.textContent=e,n.className=t?"":"d-none",n}function ae(e){const t=document.createElement("div");t.className="lobby-player",t.textContent=e.name;const n=document.createElement("button");n.textContent="Kick",n.className=te&&!e.isHost?"":"d-none",n.addEventListener("click",ie);const o=oe("Host",e.isHost),a=oe("In Game",e.inGame);t.append(o,a,n),R.append(t),ne.push({element:t,hostBadge:o,inGameBadge:a,kickButton:n,isHost:e.isHost,inGame:e.inGame})}function ie(e){const t=e.target;for(let e=0;eK(e,t))),i=a.players,ne=[],R.innerHTML="",i.forEach(ae),ee=ne[ne.length-1],se();else if("addPlayer"===o)ae({name:a.name,inGame:!1,isHost:!1}),se();else if("removePlayer"===o){const e=a;ne[e].element.remove(),ne.splice(e,1),se()}else if("inLobby"===o)ne[a].inGameBadge.className="d-none";else if("options"===o){const[e,t]=a;K(e,t)}else if("setHost"===o){const e=a;ne[e].isHost=!0,ne[e].hostBadge.className=""}else"host"===o?(te=!0,z.disabled=!1,U.classList.remove("disabled"),ne.forEach((e=>{e.isHost||(e.kickButton.className="")}))):"serverMessage"===o&&alert(a);var i;return!0},getSocketURL:function(){return"wss://fx.peshomir.workers.dev/"+(""===C?"create":"join?"+C)},getPlayerId:function(){let e=0;for(let t=0;tQ(e.map(((e,t)=>({value:t.toString(),label:e.name}))),G.map)),0)},rejoinLobby:function(){N()},hideWindow:function(){r.closeWindow("customLobby")},isActive:()=>B,setActive:function(e){B=e,!1===e&&r.closeWindow("customLobby")}};"serviceWorker"in navigator&&(navigator.serviceWorker.addEventListener("message",(e=>{const t=e.data;"activate"===t.event&&buildTimestamp!==t.version&&(document.getElementById("updateNotification").style.display="block")})),navigator.serviceWorker.register("./sw.js")),window.__fx=window.__fx||{};const re=window.__fx;re.version="0.6.7 Feb 8",re.settingsManager=m,re.leaderboardFilter=v,re.utils=I,re.WindowManager=r,re.keybindFunctions=O,re.keybindHandler=e=>{const t=y().attackPercentageKeybinds.find((t=>t.key===e));return void 0!==t&&("absolute"===t.type?O.setAbsolute(t.value):O.setRelative(t.value),!0)},re.donationsTracker=x,re.playerList=T,re.hoveringTooltip=S,re.clanFilter=w,re.wins=n,re.customLobby=le,console.log("Successfully loaded FX Client")})(); \ No newline at end of file diff --git a/game.js b/game.js index f0a4095..161d713 100644 --- a/game.js +++ b/game.js @@ -72,10 +72,10 @@ function bp(bq) { } function dB() { - this.dl = 1092, this.n = 2038, this.rVersion = 7, this.dW = function() { + this.dl = 1092, this.n = 2039, this.rVersion = 7, this.dW = function() { di = 2; var dm = bJ.dn(this.n, 10) % 100; - dj = "14 Feb 2025 [" + bJ.dn(this.n, 1e3) + "." + (dm < 10 ? "0" : "") + dm + "." + this.n % 10 + "]", a8 = true, a9 = function() { + dj = "15 Feb 2025 [" + bJ.dn(this.n, 1e3) + "." + (dm < 10 ? "0" : "") + dm + "." + this.n % 10 + "]", a8 = true, a9 = function() { try { return window.self !== window.top } catch (e) { @@ -6703,7 +6703,9 @@ function cY() { this.dW = function() { aHv = "Abbasid Caliphate;Aceh s;Achaemenid Z;Afsharid z;Aghlabid Emirate;Ahom z;Akkadian Z;Aksumite Z;Akwamu;Alaouite z;Almohad Caliphate;Almoravid z;Angevin Z;Aq Qoyunlu;Armenian Z;Assyria;Ashanti Z;Austrian Z;Austria-Hungary;Ayyubid z;Aztec Z;Aulikara Z;Babylonian Z;Balhae;Banten s;S Banjar;Bamana Z;Bengal s;Benin Z;Kadamba z;Bornu Z;E Brazil;Britannic Z;British Z;British Raj;Bruneian Z;Bukhara Z;Burgundian State;Buyid z;Byzantine Z;Caliphate of Córdoba;Cao Wei;Carthaginian Z;Cebu Rajahnate;Chagatai Khanate;Chalukya z;Chauhan z;Chavín Z;Chenla;Chera z;Chola z;Comanche Z;Congo Free State;Crimean Khanate;Dacian Z;Delhi s;Demak s;Durrani Z;Dutch Z;Egyptian Z;Elamite Z;Exarchate of Africa;Abyssinia;Fatimid Caliphate;First French Z;Frankish Z;Funan;Gallic Z;Gaza Z;Republic of Genoa;German Z;Ghana Z;Ghaznavid z;Ghurid z;Goguryeo;Goryeo;Gorkha Z;Göktürk Khaganate;Golden Horde;S Gowa;Seljuq Z;Gupta Z;Hafsid Y;Han z;Hanseatic League;E Harsha;Hephthalite Z;Hittite Z;Holy Roman Z;Hotak z;Hoysala Z;Hunnic Z;Husainid z;Idrisid z;Ilkhanate;K Israel;K Judah;Inca Z;Italian Z;E Japan;Jin z;Johor Z;Jolof Z;Joseon;Kaabu Z;Kachari Y;Kalmar Union;Kanem Z;Kanva z;Kara-Khanid Khanate;Kazakh Khanate;Khazar Khaganate;Khmer Z;Khilji z;Khwarazmian z;Kievan Rus';Konbaung z;Kong Z;Korean Z;Kushan Z;K Kush;Lakota;Latin Z;Later Lê z;Liao z;Lodi s;Khmer Z;Macedonian Z;Majapahit Z;Mali Z;Malacca Z;Mamluk s;Manchukuo;Maratha Z;Marinid z;Massina Z;Mataram s;Mauretania;Mauryan Z;Median Z;Mlechchha z;Ming z;Mitanni Z;Mongol Z;Mughal Z;Nanda Z;Nguyễn z;North Sea Z;E Nicaea;Numidia;Omani Z;Ottoman Z;Oyo Z;Pagan Z;Pahlavi z;Pala Z;Palmyrene Z;Parthian Z;Pontic Z;Portuguese Z;K Prussia;Ptolemaic Z;Qajar z;Qara Qoyunlu;Qin z;Qing z;Ramnad Sethupathis;Rashidun Caliphate;Rashtrakuta z;Roman Z;Rouran Khaganate;Rozwi Z;Rustamid z;Russian Z;Tsardom of Russia;Saadi z;Safavid z;Saffarid z;Sassanid z;Satavahana z;Samanid Z;Soviet Union;Saudeleur z;Duchy of Savoy;Seleucid Z;Serbian Z;Shu Han;Shang z;Siam Z;Sikh Z;Singhasari;Sokoto Caliphate;Song z;Songhai Z;Spanish Z;Srivijaya Z;Sui z;K Mysore;Shunga Z;S Sulu;Sumer;Sur Z;Swedish Z;Tahirid z;Tang z;Tây Sơn z;S Ternate;E Thessalonica;German Reich;Tibetan Z;Tondo z;S Tidore;Timurid Z;K Tlemcen;E Trebizond;Toltec Z;Toungoo z;Toucouleur Z;Tu'i Tonga Z;Turgesh Khaganate;Umayyad Caliphate;Uyunid Emirate;Uyghur Khaganate;Uzbek Khanate;Vandal Y;Vijayanagara Z;Republic of Venice;Wari Z;Wassoulou Z;Wattasids;Western Roman Z;Eastern Wu;Western Xia z;Xin z;Yuan z;Zand z;Zhou z;Zulu Z;Yugoslavia;Kosovo;Sikkim;Kanem–Bornu Z;Wadai Z;Ethiopian Z;Rozvi Z;Sasanian Z;E Vietnam;Shilluk Y;K Aksum;Gwiriko Y;Toro Y;Malindi Y;K Loango;K Mapungubwe;Ryukyu Y;K Cyprus;K Jerusalem;Garhwal Y;K Nepal;K Cambodia;Champa Y;Hanthawaddy Y;Phayao Y;K Sardinia;K Sicily;K Gwynedd;K Scotland;K Desmond;K Poland;K Hungary;K Croatia;K Bohemia;Albanian Y;K Georgia;K Portugal;Khanate of Sibir;K Romania;Cossack Hetmanate;Duchy of Bouillon;K Ireland;Lordship of Ireland;K Italy;Republic of Pisa;Idrisid z;Almoravid z;Almohad Caliphate;Marinid z;Wattasid z;Saadian z;Republic of Salé;Rif Republic;K Kush;Makuria;Alodia;Ayyubid z;Mamluk s;Egypt Eyalet;K Fazughli;S Sennar;S Darfur;Mahdist State;S Egypt;K Egypt;Emirate of Cyrenaica;K Libya;Republic of Egypt;Republic of the Sudan;United Arab Republic;Libyan Arab Republic;Zirid z;Hafsid z;K Kuku;Regency of Algiers;Gurunsi;Liptako;Tenkodogo;Wogodogo;Yatenga;Bilanga;Bilayanga;Bongandini;Con;Macakoali;Piela;Nungu;K Sine;K Saloum;K Baol;K Cayor;K Waalo;Bundu;Bonoman;Gyaaman;Denkyira;Mankessim Y;K Dahomey;Oyo Z;K Nri;Aro Confederacy;Kwararafa;Biafra;Buganda;Bunyoro;Ankole;Busoga;Tanganyika;Kuba Y;K Luba;K Lunda;Yeke Y;K Ndongo;Kasanje Y;K Matamba;Mbunda Y;Chokwe Y;Kazembe Y;K Butua;Ndebele Y;Mthethwa Z;Bophuthatswana;Ciskei;Transkei;Venda;Rhodesia;Kart z;Nogai Horde;Khanate of Bukhara;Khanate of Khiva;Khamag Mongol;Northern Fujiwara;Kamakura Shogunate;Ashikaga Shogunate;Jaxa;Republic of Ezo;Jiangxi Soviet;Hunan Soviet;Guangzhou Commune;Gojoseon;Alaiye;Beylik of Bafra;Kara Koyunlu;Kars Republic;K Iraq;Arab Federation;Kar-Kiya z;Baduspanids;Marashiyan z;Afrasiyab z;Mihrabanid z;Safavid Iran;Sheikhdom of Kuwait;Bani Khalid Emirate;Emirate of Diriyah;Emirate of Najd;Muscat and Oman;Emirate of Riyadh;S Najd;K Hejaz;Fadhli s;Emirate of Beihan;Emirate of Dhala;S Lahej;Republic of Kuwait;K Cochin;Jaffna Y;Laur Y;Pandya z;Jaunpur s;Jaintia Y;Hyderabad State;Travancore;Udaipur State;Manikya z;Lan Xang;K Vientiane;K Champasak;Lao Issara;K Laos;Pyu States;Ava;Mon Ys;Pegu;K Mrauk U;Taungoo z;Shan States;Arakan;Raktamaritika;Singhanavati;Dvaravati;Ngoenyang;Hariphunchai;Tambralinga;Lavo Y;Langkasuka;Sukhothai Y;S Singora;Ayutthaya Y;Thonburi Y;Lan Na;Pattani Y;Jambi s;Palembang s;S Deli;S Langkat;S Serdang;S Cirebon;K Pajang;K Bali;Bima s;K Larantuka;K Banggai;Luwu;S Bone;Caucasian Albania;Kabardia;Circassia;K Abkhazia;Elisu s;Avar Khanate;Caucasian Imamate;K Imereti;K Kartli;K Kakheti;Crown of Aragon;Emirate of Granada;K Majorca;Crown of Castile;K Haiti;Cocollán;Zapotec Civilization;Mosquito Y;Somoza Regime;Iroquois Confederacy;Cherokee Nation;Vermont Republic;State of Muskogee;K Alo;K Sigave;K Fiji;K Nauru;K Chile;Muisca Confederation;El Stronato;K Chimor;Jungle Republic;Liga Federal;Supreme Junta;Weimar Republic;K Bavaria;Bremen;Frankfurt;Hamburg;K Hanover;Holstein;Lippe;Nassau;Oldenburg;Pomerania;Reuss;Saxe-Altenburg;Saxony;Schleswig;Waldeck;Württemberg;Helvetic Republic;Republic of Florence;Duchy of Urbino;Republic of Cospaia;Duchy of Lucca;Duchy of Mantua;Duchy of Milan;Papal States" - .split(";"), aHw = "Infected Territory;Necromancer".split(";"); + .split(";"), aHw = + "Pestilent Dominion;Wretched Realm;Damned Province;Corrupt Zone;Cursed Territory;Blight Nation;Haunted Expanse;Malevolent State;Ruined Empire;Contaminated Land;Epidemic Domain;Forsaken District;Abandoned Wasteland;Necrotic Enclave;Tainted Domain;Decayed Principality;Infested Region;Malignant Territory;Toxic Dominion;Ravaged Sector;Ghostly Realm;Plagued Commonwealth;Afflicted State;Desolate Nation;Apocalyptic Zone;Radiated Province;Deathly District;Pestilence Haven;Doom Territory;Malefic Expanse;Abandoned State;Cursed Haven;Corroded Zone;Hauntland;Noxious Nation;Infected Enclave;Ruinous Domain;Wasteland Woe;Rotten Principality;Voided Land;Vile Dominion;Catastrophic Region;Eerie Expanse;Desolation State;Forsaken Outpost;Contagion District;Damaged Province;Abhorrent Sector;Accursed Nation;Doomstruck Land;Radiant Ruin;Deathly Enclave;Malefic Dominion;Plague District;Infected Haven;Corrupt State;Pestilent Territory;Razed Realm;Haunted Wasteland;Toxic Sector;Cursed Dominion;Decaying Province;Forsaken Enclave;Ruinous Region;Malignant Haven;Infested State;Ghostly Nation;Tainted Territory;Damned District;Radiated Dominion;Desolate Expanse;Apocalyptic Land;Death Zone;Wretched State;Malevolent Haven;Plagued Nation;Noxious Domain;Voided Territory;Eerie Sector;Accursed Province;Necrotic District;Doom Haven;Haunt Realm;Rotten Nation;Forsaken Territory;Infected State;Abhorrent Expanse;Malignant Land;Toxic Dominion;Ruined District;Ghostland;Cursed Sector;Radiant Nation;Necromancer" + .split(";"); for (var a5Q = ["K ", " Y", "E ", " Z", " z", " s", "S "], aHx = ["Kingdom of ", " Kingdom", "Empire of ", " Empire", " Dynasty", " Sultanate", "Sultanate of "], aA = aHv.length - 1; 0 <= aA; aA--) for (var et = a5Q.length - 1; 0 <= et; et--) aHv[aA] = aHv[aA].replace(a5Q[et], aHx[et]); if (__fx.settings.realisticNames) aHv = realisticNames; @@ -6719,7 +6721,7 @@ function cY() { }, this.a6 = function() { if (9 === aC.k7) { for (var e1 = aw.random(), aI3 = aHv, aI4 = aHw, hF = aD.hF, ea = aI3.length, kY = aC.data.teamPlayerCount[7], zL = af.zL, zP = af.zP, aA = kY - 1; aA >= aC.jq; aA--) zL[aA] = zP[aA] = aI3[(aA + e1) % ea]; - for (aA = kY; aA < aC.eX; aA++) zL[aA] = zP[aA] = aI4[hF[aA] ? 1 : 0] + for (ea = aI4.length - 1, aA = kY; aA < aC.eX; aA++) zL[aA] = zP[aA] = aI4[hF[aA] ? ea : aA % ea] } else(2 === aC.data.playerNamesType ? function() { for (var ea = aC.eX, zL = af.zL, zP = af.zP, playerNamesData = aC.data.playerNamesData, aA = aC.jq; aA < ea; aA++) zL[aA] = zP[aA] = playerNamesData[aA] } : 1 === aC.data.playerNamesType ? function() { @@ -6801,9 +6803,9 @@ function cZ() { aIE = [], 9 === aC.k7 && this.aIF() }, this.aIF = function() { var aIG = [59, 80, 105, 150, 190, 333]; - this.kG = [0, 0, 0, 0, 0, 0], this.kF = 0, aC.jq <= aIG[0] ? (this.kF = 256 - bJ.dn(256 * aC.jq, aIG[0]), this.kG[5] = bJ.dn(Math.max(aC.jq - 4, 0), 5) + aC.xG, this.kG[0] = aC.eX - aC.jq - this.kF - this.kG[5]) : (this.kG[5] = 11 + bJ - .dn(100 * (aC.jq - 59), 163), this.kG[0] = 512 - aC.jq - this.kG[5]), aC.kB = aC.eX - aC.jq, aC.data.numberTeams = (0 < aC.jq) + (0 < aC.kB), aC.data.playerCount = aC.w0 = aC.jq + aC.kB, aC.data.teamPlayerCount = new Uint16Array([ - 0, 0, 0, 0, 0, 0, 0, aC.jq + this.kF, aC.kB - this.kF + this.kG = [0, 0, 0, 0, 0, 0], this.kF = 0, aC.jq <= aIG[0] ? (this.kF = 256 - bJ.dn(256 * aC.jq, aIG[0]), this.kG[5] = bJ.dn(2 * Math.max(aC.jq - 5, 0), 11), this.kG[0] = aC.eX - aC.jq - this.kF - this.kG[5]) : (this.kG[5] = 9 + bJ.dn( + 100 * (aC.jq - 59), 161), this.kG[0] = 512 - aC.jq - this.kG[5]), aC.kB = aC.eX - aC.jq, aC.data.numberTeams = (0 < aC.jq) + (0 < aC.kB), aC.data.playerCount = aC.w0 = aC.jq + aC.kB, aC.data.teamPlayerCount = new Uint16Array([0, + 0, 0, 0, 0, 0, 0, aC.jq + this.kF, aC.kB - this.kF ]), aC.a3H.a3L() }, this.aFY = function(player) { aIE.push({ diff --git a/index.html b/index.html index a186b42..d3ed794 100644 --- a/index.html +++ b/index.html @@ -35,7 +35,7 @@ - +