Compare commits
No commits in common. "e03045606388e0bef903fddaaaf277d83fd6933a" and "4508d17dea06309307ef123c86341b601205c321" have entirely different histories.
e030456063
...
4508d17dea
19
patches.js
19
patches.js
|
@ -22,10 +22,10 @@ export default ({ replace, replaceOne, replaceRawCode, dictionary, matchOne, mat
|
||||||
// TODO: test this; it might cause issues with new boat mechanics?
|
// TODO: test this; it might cause issues with new boat mechanics?
|
||||||
|
|
||||||
{ // Add Troop Density and Maximum Troops in side panel
|
{ // Add Troop Density and Maximum Troops in side panel
|
||||||
const { valuesArray } = replaceRawCode(`,labels[5]=aV.nU[76],labels[6]=aV.nU[77],labels[7]=aV.nU[78],(valuesArray=new Array(labels.length))[0]=game.io?`,
|
const { valuesArray } = replaceRawCode(`,labels[5]=aV.nU[76],labels[6]=aV.nU[77],labels[7]=aV.nU[78],game.tn,eT(game.tn,100),(valuesArray=new Array(labels.length))[0]=game.io?`,
|
||||||
`,labels[5]=aV.nU[76],labels[6]=aV.nU[77],labels[7]=aV.nU[78],
|
`,labels[5]=aV.nU[76],labels[6]=aV.nU[77],labels[7]=aV.nU[78],
|
||||||
labels.push("Max Troops", "Density"), // add labels
|
labels.push("Max Troops", "Density"), // add labels
|
||||||
(valuesArray=new Array(labels.length))[0]=game.io?`);
|
a0Z=game.tn-eT(game.tn,100),(valuesArray=new Array(labels.length))[0]=game.io?`);
|
||||||
replaceOne(new RegExp(/(:(?<valueIndex>\w+)<7\?\w+\.\w+\.\w+\(valuesArray\[\2\]\)):(\w+\.\w+\(valuesArray\[7\]\))}/
|
replaceOne(new RegExp(/(:(?<valueIndex>\w+)<7\?\w+\.\w+\.\w+\(valuesArray\[\2\]\)):(\w+\.\w+\(valuesArray\[7\]\))}/
|
||||||
.source.replace(/valuesArray/g, valuesArray), "g"),
|
.source.replace(/valuesArray/g, valuesArray), "g"),
|
||||||
'$1 : $<valueIndex> === 7 ? $3 '
|
'$1 : $<valueIndex> === 7 ? $3 '
|
||||||
|
@ -36,12 +36,12 @@ export default ({ replace, replaceOne, replaceRawCode, dictionary, matchOne, mat
|
||||||
}
|
}
|
||||||
|
|
||||||
// Increment win counter on wins
|
// Increment win counter on wins
|
||||||
replaceRawCode(`=function(sE){o.ha(sE,2),b.h9<100?xD(0,aZ.tG(4,[a8.jx[sE]]),3,sE,ad.gN,ad.kl,-1,!0):xD(0,aZ.tG(12,[a8.jx[sE]]),3,sE,ad.gN,ad.kl,-1,!0)`,
|
replaceRawCode(`=function(sE){o.ha(sE,2),b.h9<100?xD(0,aZ.tG(4,[a8.jx[sE]]),3,sE,ad.gN,ad.kl,-1,!0):xD(0,aZ.tG(12,[a8.jx[sE]]),3,sE,ad.gN,ad.kl,-1,!0),`,
|
||||||
`=function(sE){
|
`=function(sE){
|
||||||
if (${playerId} === sE && !${gIsSingleplayer})
|
if (${playerId} === sE && !${gIsSingleplayer})
|
||||||
wins_counter++, window.localStorage.setItem("fx_winCount", wins_counter),
|
wins_counter++, window.localStorage.setItem("fx_winCount", wins_counter),
|
||||||
xD(0,"Your Win Count is now " + wins_counter,3,sE,ad.gN,ad.kl,-1,!0);
|
xD(0,"Your Win Count is now " + wins_counter,3,sE,ad.gN,ad.kl,-1,!0);
|
||||||
o.ha(sE,2),b.h9<100?xD(0,aZ.tG(4,[a8.jx[sE]]),3,sE,ad.gN,ad.kl,-1,!0):xD(0,aZ.tG(12,[a8.jx[sE]]),3,sE,ad.gN,ad.kl,-1,!0)`);
|
o.ha(sE,2),b.h9<100?xD(0,aZ.tG(4,[a8.jx[sE]]),3,sE,ad.gN,ad.kl,-1,!0):xD(0,aZ.tG(12,[a8.jx[sE]]),3,sE,ad.gN,ad.kl,-1,!0),`);
|
||||||
|
|
||||||
|
|
||||||
{ // Add settings button and win count
|
{ // Add settings button and win count
|
||||||
|
@ -256,7 +256,7 @@ canvas.font=aY.g0.g1(1,fontSize),canvas.fillStyle="rgba("+gR+","+tD+","+hj+",0.6
|
||||||
}
|
}
|
||||||
|
|
||||||
{ // Hovering tooltip
|
{ // Hovering tooltip
|
||||||
replaceRawCode("this.click=function(gG,gH,uH){var fd=an.fe(gG),ff=an.fg(gH),fh=an.fi(fd,ff),fj=an.fk(fh);if(!an.fl(fd,ff))return!1;fd=(bB.d3.isUIZoomEnabled()?.025:.0144)*aO.g4,ff=performance.now();if(Math.abs(gG-wK)>fd||Math.abs(gH-wL)>fd||dg+500<ff)return!1;if(dg=ff,uH&&!function(gG,gH,fj){a3.ek(fj)||-1===(gG=ao.fr.wq(gG,gH))?l.wp(fj):l.wr(gG)}(gG,gH,fj),",
|
replaceRawCode("this.click=function(gG,gH,uH){var fd=an.fe(gG),ff=an.fg(gH),fh=an.fi(fd,ff),fj=an.fk(fh);return!(!an.fl(fd,ff)||(fd=(bB.d3.isUIZoomEnabled()?.025:.0144)*aO.g4,ff=performance.now(),Math.abs(gG-wK)>fd)||Math.abs(gH-wL)>fd||dg+500<ff)&&(dg=ff,uH?(function(gG,gH,fj){a3.ek(fj)||-1===(gG=ao.fr.wq(gG,gH))?l.wp(fj):l.wr(gG)}(gG,gH,fj),",
|
||||||
`hoveringTooltip.display = function(mouseX, mouseY) {
|
`hoveringTooltip.display = function(mouseX, mouseY) {
|
||||||
var coordX = an.fe(mouseX), coordY = an.fg(mouseY),
|
var coordX = an.fe(mouseX), coordY = an.fg(mouseY),
|
||||||
coord = an.fi(coordX, coordY), point = an.fk(coord);
|
coord = an.fi(coordX, coordY), point = an.fk(coord);
|
||||||
|
@ -265,7 +265,14 @@ canvas.font=aY.g0.g1(1,fontSize),canvas.fillStyle="rgba("+gR+","+tD+","+hj+",0.6
|
||||||
a3.ek(fj) || -1 === (gG = ao.fr.wq(gG, gH)) ? l.wp(fj) : l.wr(gG)
|
a3.ek(fj) || -1 === (gG = ao.fr.wq(gG, gH)) ? l.wp(fj) : l.wr(gG)
|
||||||
}(mouseX, mouseY, point))
|
}(mouseX, mouseY, point))
|
||||||
}
|
}
|
||||||
this.click=function(gG,gH,uH){var fd=an.fe(gG),ff=an.fg(gH),fh=an.fi(fd,ff),fj=an.fk(fh);if(!an.fl(fd,ff))return!1;fd=(bB.d3.isUIZoomEnabled()?.025:.0144)*aO.g4,ff=performance.now();if(Math.abs(gG-wK)>fd||Math.abs(gH-wL)>fd||dg+500<ff)return!1;if(dg=ff,uH&&!function(gG,gH,fj){a3.ek(fj)||-1===(gG=ao.fr.wq(gG,gH))?l.wp(fj):l.wr(gG)}(gG,gH,fj),`)
|
this.click = function(gG, gH, uH) {
|
||||||
|
var fd = an.fe(gG),
|
||||||
|
ff = an.fg(gH),
|
||||||
|
fh = an.fi(fd, ff),
|
||||||
|
fj = an.fk(fh);
|
||||||
|
return !(!an.fl(fd, ff) || (fd = (bB.d3.isUIZoomEnabled() ? .025 : .0144) * aO.g4, ff = performance.now(), Math.abs(gG - wK) > fd) || Math.abs(gH - wL) > fd || dg + 500 < ff) && (dg = ff, uH ? (function(gG, gH, fj) {
|
||||||
|
a3.ek(fj) || -1 === (gG = ao.fr.wq(gG, gH)) ? l.wp(fj) : l.wr(gG)
|
||||||
|
}(gG, gH, fj),`)
|
||||||
replaceRawCode("aK.nH=(window.devicePixelRatio||1)*aEr,",
|
replaceRawCode("aK.nH=(window.devicePixelRatio||1)*aEr,",
|
||||||
`aK.nH = (window.devicePixelRatio || 1) * aEr, hoveringTooltip.canvasPixelScale = aK.nH,`)
|
`aK.nH = (window.devicePixelRatio || 1) * aEr, hoveringTooltip.canvasPixelScale = aK.nH,`)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue