forked from Grimy/Grimy.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzfarm.js
1 lines (1 loc) · 18.5 KB
/
zfarm.js
1
"use strict";function remove(a){a.parentNode.removeChild(a)}function switch_theme(){var a=$("#dark");localStorage.dark=(a.disabled=!a.disabled)?"":"1"}function show_alert(a,b){$("#alert").innerHTML+="<p class="+a+">\n <span class=badge onclick='remove(this.parentNode)'>×</span>\n "+b+"\n </p>"}function create_share(a){var b=localStorage.notation+":";b+=$$("input,select").map(function(a){return a.value.replace(":","")}).join(":");var c=location.href.replace(/[#?].*/,"");c+="?"+LZString.compressToEncodedURIComponent(b),a(c)}function exit_share(){history.pushState({},"","perks.html"),$("textarea").removeEventListener("click",exit_share),$$("[data-saved]").forEach(function(a){return a.value=localStorage[a.id]||a.value})}function load_share(a){var b=LZString.decompressFromEncodedURIComponent(a).split(":"),c=localStorage.notation;localStorage.notation=b.shift(),$$("input,select").forEach(function(a){return a.value=b.shift()}),$("textarea").addEventListener("click",exit_share),$("form").submit(),localStorage.notation=c||1}function prettify(a){if(0>a)return"-"+prettify(-a);if(1e4>a)return+a.toPrecision(4)+"";if("0"===localStorage.notation)return a.toExponential(2).replace("+","");for(var b=0;a>=999.5;)a/=1e3,++b;var c=notations[localStorage.notation||1],d=b>c.length?"e"+3*b:c[b-1];return+a.toPrecision(3)+d}function parse_suffixes(a){a=a.replace(/\*.*|[^--9+a-z]/gi,"");for(var b=notations["3"===localStorage.notation?3:1],c=b.length;c>0;--c)a=a.replace(new RegExp(b[c-1]+"$","i"),"E"+3*c);return+a}function input(a){return parse_suffixes($("#"+a).value)}function check_input(a){var b=isFinite(parse_suffixes(a.value)),c="3"===localStorage.notation?"alphabetic ":"";a.setCustomValidity(b?"":"Invalid "+c+"number: "+a.value)}function mastery(a){if(!game.talents[a])throw"unknown mastery: "+a;return game.talents[a].purchased}function toggle_spoilers(){$$("[data-hide]").forEach(function(a){a.style.display=+localStorage.hze>=+a.getAttribute("data-hide")?"":"none"})}function set_hze(a){+localStorage.hze>a||(localStorage.hze=a,toggle_spoilers())}function handle_paste(a,b,c){var d=a.clipboardData.getData("text/plain").replace(/\s/g,"");try{game=JSON.parse(LZString.decompressFromBase64(d));var e=4.9,f=4.91;game.global.version>f+.009?show_alert("warning","This calculator only supports up to v"+f+" of Trimps, but your save is from v"+game.global.version+". Results may be inaccurate."):game.global.version<e&&show_alert("warning","Trimps v"+e+" is out! Your save is still on v"+game.global.version+", so you should refresh the game’s page.")}catch(g){if(game&&game.Looting)throw"This is a perk string. You have to export your save (from the main screen), not your perks.";throw"Your clipboard did not contain a valid Trimps save. Open the game, click “Export” then “Copy to Clipboard”, and try again."}localStorage.save=d,localStorage.notation=game.options.menu.standardNotation.enabled,jobless="Job"==game.global.ShieldEquipped.name,set_hze(game.global.highestLevelCleared+1),b(),c()}function get_paste_back(){$("#save").value=localStorage.save,$("#save").onfocus=null,$("#save").focus(),$("#save").select()}function challengeActive(a){return game.global.multiChallenge[a]||game.global.challengeActive==a}function read_save(){for(var a=0,b=0,c=["Chronoimp","Jestimp","Titimp","Flutimp","Goblimp"];b<c.length;b++){var d=c[b];a+=game.unlocks.imps[d]}game.talents.magimp.purchased&&a++;var e=2===game.global.universe,f=game.heirlooms.Shield,g=game.global.soldierCurrentAttack*(1+f.trimpAttack.currentBonus/100),h=5*game.portal.Relentlessness.level+f.critChance.currentBonus,i=100+30*game.portal.Relentlessness.level+f.critDamage.currentBonus,j=5,k=.8+.02*game.portal.Range.level,l=1.2,m=1,n=1,o=game.global.world,p=game.global.highestLevelCleared>=109,q=game.empowerments[["Poison","Wind","Ice"][ceil(o/5)%3]],r=236,s=mastery("nature2")?5:0,t=10*Math.pow(.95,game.portal.Agility.level)-mastery("hyperspeed"),u=game.global.autoBattleData.oneTimers.hasOwnProperty("Burstier")?4:5;death_stuff={max_hp:game.global.soldierHealthMax,block:e?0:game.global.soldierCurrentBlock,gammaMult:game.global.gammaMult,gammaCharges:u,challenge_attack:1,enemy_cd:1,breed_timer:compute_breed_timer(),weakness:0,plague:0,bleed:0,explosion:0,angelic:mastery("angelic"),nom:challengeActive("Nom"),slow:challengeActive("Slow"),devastation:challengeActive("Devastation"),domination:challengeActive("Domination"),frigid:challengeActive("Frigid"),magma:o>=230,fluctuation:e?.5:.2},(mastery("hyperspeed2")&&o<=ceil(game.global.highestLevelCleared/2)||jobless)&&--t,g*=1+.02*game.global.antiStacks*game.portal.Anticipation.level,g*=1+.01*game.global.achievementBonus,g*=1+.2*game.global.roboTrimpLevel,g*=1+game.goldenUpgrades.Battle.currentBonus,g*=1+.01*game.global.totalSquaredReward,g*=1+game.global.frigidCompletions/2*(game.global.frigidCompletions+1)/40,g*=1+game.global.mayhemCompletions/2*(game.global.mayhemCompletions+1)/10,g*=1+game.global.pandCompletions/2*(game.global.pandCompletions+1)/10,g*=1+game.global.desoCompletions/2*(game.global.desoCompletions+1)/10,g/=[1,.5,4,.5,.5,1][game.global.formation],death_stuff.max_hp/=[1,4,.5,.5,.5,1][game.global.formation],death_stuff.block/=[1,.5,.5,4,.5,1][game.global.formation],o>=60&&game.global.highestLevelCleared>=70&&(death_stuff.max_hp*=.5,death_stuff.block*=.5);var v=game.portal.Capable.level,w=game.global.fluffyPrestige,x=log(.003*game.global.fluffyExp/Math.pow(5,w)+1)/log(4),y=min(floor(x),v),z=y==v?0:(Math.pow(4,x-y)-1)/3,A=w+y+mastery("fluffyAbility");g*=1+.1*Math.pow(5,w)*(y/2+z)*(y+1);var B=1+ +(A>=13)+ +(A>=10)+mastery("overkill");if(A>=14&&(h+=50),A>=15&&(j+=2),game.global.sugarRush>0&&(g*=floor(o/100)),game.singleRunBonuses.sharpTrimps.owned&&(g*=1.5),mastery("stillRowing2")&&(g*=1+.06*game.global.spireRows),game.playerSpire&&(g*=1+.15*(1+game.playerSpire.traps.Strength.level)*game.playerSpire.traps.Strength.owned),mastery("magmamancer")){var C=((new Date).getTime()-game.global.zoneStarted)/6e4,D=Math.pow(1.2,min(12,floor((C+5)/10)))-1;g*=1+3*(1-Math.pow(.9999,game.jobs.Magmamancer.owned))*D}if(mastery("healthStrength")){var E=min(o,100*game.global.lastSpireCleared+199),F=300>E?0:floor((E-270)/15);g*=1+.15*F}if(g*=mastery("amalg")?Math.pow(1.5,game.jobs.Amalgamator.owned):1+.5*game.jobs.Amalgamator.owned,mastery("crit")&&(j+=1,h+=.5*f.critChance.currentBonus),mastery("kerfluffle")&&(g*=pow(1.1,w+1)),mastery("herbalist")&&(g*=1+log(game.resources.food.owned)/Math.LN10/83.3),challengeActive("Discipline")&&(k=.005,l=1.995),challengeActive("Balance")&&(m*=2,n*=2.35),challengeActive("Meditate")&&(m*=2,n*=1.5),challengeActive("Electricity")&&(death_stuff.weakness=.1,death_stuff.plague=.1),challengeActive("Daily")){mastery("daily")&&(g*=1.5);var G=function(a){return game.global.dailyChallenge[a]?game.global.dailyChallenge[a].strength:0};g*=o%2==1?1-.02*G("oddTrimpNerf"):1+.2*G("evenTrimpBuff"),g*=1+.1*ceil(G("rampage")/10)*(1+G("rampage")%10),h+=10*G("trimpCritChanceUp"),h-=10*G("trimpCritChanceDown"),k-=G("minDamage")?.09+.01*G("minDamage"):0,l+=G("maxDamage"),m*=1+.2*G("badHealth"),m*=1+.3*G("badMapHealth"),n*=1+.2*G("badStrength"),n*=1+.3*G("badMapStrength"),death_stuff.plague=.01*G("plague"),death_stuff.bleed=.01*G("bogged"),death_stuff.weakness=.01*G("weakness"),death_stuff.enemy_cd=1+.5*G("crits"),death_stuff.explosion=G("explosive")}challengeActive("Life")&&(m*=11,n*=6,g*=1+.1*game.challenges.Life.stacks,death_stuff.max_hp*=1+.1*game.challenges.Life.stacks),challengeActive("Crushed")&&(death_stuff.enemy_cd=5),challengeActive("Nom")&&(death_stuff.bleed=.05),challengeActive("Toxicity")&&(m*=2,n*=5,death_stuff.bleed=.05),challengeActive("Watch")&&(n*=1.25),challengeActive("Lead")&&(o%2==1?g*=1.5:show_alert("warning","Are you <b>sure</b> you want to farm on an even Lead zone?"),m*=1+.04*game.challenges.Lead.stacks,n*=1+.04*game.challenges.Lead.stacks),challengeActive("Corrupted")&&(n*=3),challengeActive("Obliterated")&&(m*=1e12*Math.pow(10,floor(o/10)),n*=1e12*Math.pow(10,floor(o/10))),challengeActive("Eradicated")&&(m*=1e20*Math.pow(3,floor(o/2)),n*=1e20*Math.pow(3,floor(o/2)),r=1,death_stuff.magma=!0),challengeActive("Frigid")&&(m*=pow(10,game.global.frigidCompletions),n*=pow(10,game.global.frigidCompletions),h=0),challengeActive("Experience")&&(m*=pow(1.15,game.challenges.Experience.wonders),n*=pow(1.15,game.challenges.Experience.wonders)),g*=h>=100?(1+i/100)*Math.pow(j,floor(h/100)-1):Math.pow(j,floor(h/100)),i=h>=100?100*(j-1):i,h%=100,$("#attack").value=prettify(g*k),$("#cc").value=h,$("#cd").value=i,$("#challenge").value=prettify(m),$("#coordinate").checked=challengeActive("Coordinate"),$("#difficulty").value=prettify((p?75:80)+(challengeActive("Mapocalypse")?300:0)),$("#fragments").value=prettify(game.resources.fragments.owned),$("#hze").value=prettify(game.global.highestLevelCleared+1),$("#imports").value=prettify(a),$("#nature").value=o>=r?q.level+s:0,$("#ok_spread").value=prettify(B),$("#overkill").value=game.portal.Overkill.level,$("#plaguebringer").value=f.plaguebringer.currentBonus,$("#range").value=prettify(l/k),$("#reducer").checked=mastery("mapLoot"),$("#size").value=prettify(mastery("mapLoot2")?20:p?25:27),$("#speed").value=prettify(t),$("#titimp").checked=game.unlocks.imps.Titimp,$("#transfer").value=o>=236?q.retainLevel+s:0,$("#zone").value=o,death_stuff.challenge_attack=n}function get_best(a,b){for(var c={overall:"",stance:"",second:"",second_stance:"",ratio:0},d=function(b){a.sort(function(a,c){return c[b].value-a[b].value}),c[b]=a[0].zone},e=0,f=b;e<f.length;e++){var g=f[e];d(g)}return a.sort(function(a,b){return b.value-a.value}),c.overall=a[0].zone,c.stance=a[0].stance,a[1]&&(c.second=a[1].zone,c.second_stance=a[1].stance,c.ratio=a[0].value/a[1].value),c}function display(a){var b=a[0],c=a[1];if(0===b.length)throw"Your attack is too low to farm anywhere.";var d=get_best(b.slice(),c),e=input("zone")>=60,f="";c.length>1&&(f+="<tr><th colspan=2>"+c.replace(/(?!$)/g,"<th colspan=2>")+"</tr>"),f+="<tr><th>Level<th>Base loot";for(var g=0,h=c;g<h.length;g++){h[g];f+="<th>Cells/s<th>Total"}for(var i=0,j=b;i<j.length;i++){var k=j[i],l=k.zone;f+="</tr><tr><td class=align-right>";for(var m=0,n=c;m<n.length;m++){var o=n[m];l===d[o]&&e&&(f+="<b>"+o+"</b> ")}f+=l===d.overall?"<b>"+l+"</b>":l,f+="<td>"+prettify(k.loot)+"%";for(var p=0,q=c;p<q.length;p++){var o=q[p],r=prettify(k[o].value);f+="<td>"+k[o].speed.toFixed(3)+"<td>",f+=l===d[o]?"<b>"+r+"</b>":r}}if($("#details").innerHTML=f+"</tr>",$("#results").style.opacity="1",e&&(d.overall+=" in "+d.stance,d.second+=" in "+d.second_stance),1==b.length)return void(input("zone")%100===0&&input("zone")>100?($("#result").textContent="You should definitely farm on "+d.overall,$("#comment").textContent="Good luck with the Spire!"):($("#result").textContent="You should really be pushing rather than farming",$("#comment").textContent=""));var s=100*(d.ratio-1),t=[""," probably",""," really"," definitely"][min(floor(s/2),4)];$("#result").textContent="You should "+t+" farm on "+d.overall,2>s&&($("#result").textContent+=" or "+d.second),$("#comment").textContent=2>s?"They’re equally efficient.":4>s?"But "+d.second+" is almost as good.":"It’s "+s.toFixed(1)+"% more efficient than "+d.second+"."}function main(){display(stats(parse_inputs()))}function rng(){return seed^=seed>>11,seed^=seed<<8,seed^=seed>>19,seed*rand_mult}function simulate(a,b){function c(b){a.frigid&&b>=a.max_hp/5&&(b=a.max_hp),e-=b}function d(b){var d=b*(1+a.fluctuation*(2*rng()-1));d*=rng()<.25?a.enemy_cd:1,d*=Math.pow(.366,s*a.ice),d=max(0,d-a.block),c(d),++f}var e=a.max_hp,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;a.frigid&&(a.cc=0);for(var t=[],u=[],v=0;v<a.size;++v){var w=14.3*sqrt(b)*Math.pow(3.265,b/2)-12.1;w*=60>b?3+3/110*v:(5+.08*v)*Math.pow(1.1,b-59),death_stuff.magma&&(w*=round(50*Math.pow(1.05,floor((a.zone-150)/6)))/10),game&&mastery("bionic2")&&b>a.zone&&(w/=1.5);var x=5.5*sqrt(b)*Math.pow(3.27,b/2)-1.1;x*=60>b?3.1875+.0595*v:(4+.09*v)*Math.pow(1.15,b-59),death_stuff.magma&&(x*=round(15*Math.pow(1.05,floor((a.zone-150)/6)))/10),a.domination&&(v===a.size-1?(x*=2.5,w*=7.5):(x*=.1,w*=.1)),t.push(a.difficulty*a.challenge_health*w),u.push(a.difficulty*a.challenge_attack*x)}for(;max_ticks>k;){var y=rng(),z=y<a.import_chance?[1,1,!1]:a.biome[floor(rng()*a.biome.length)],x=z[0]*u[h],w=z[1]*t[h],A=w,B=a.slow||z[2]&&!a.nom,C=0;0!==p&&(w-=o,--p),w=min(w,max(.05*A,w-l)),l=0;for(var D=0;w>=1&&max_ticks>k;)if(++D,a.angelic&&(e+=a.max_hp/2,e>a.max_hp&&(e=a.max_hp)),B&&d(x),e>=1&&(p=a.ok_spread,C=a.atk*(1+a.range*rng()),C*=rng()<a.cc?a.cd:1,C*=g>k?2:1,C*=2-Math.pow(.366,s*a.ice),C*=1-a.weakness*min(f,9),w-=C+q*a.poison,q+=C,++s,w>=1&&(l+=C*a.plaguebringer)),e-=a.bleed*a.max_hp,e-=f*a.plague*a.max_hp,!B&&w>=1&&e>=1&&d(x),w>=1&&e>=1&&a.gammaMult>1&&(m++,m>=a.gammaCharges&&(m=0,n=C*a.gammaMult,w-=n,a.plaguebringer&&w>=1&&(l+=n*a.plaguebringer))),1>e){k+=ceil(D*a.speed),k=max(k,j+a.breed_timer),j=k;var E=max(-e,0);e=a.max_hp,a.devastation&&c(7.5*E),k+=1,D=1,f=0,m=0,a.nom&&(w=min(w+.05*A,A))}a.explosion&&(a.explosion<=15||a.block>=a.max_hp)&&(e-=max(0,a.explosion*x-a.block)),r=min(r+D,200),i+=1+r*a.wind,o=-w*a.overkill,k+=+(D>0)+ +(a.speed>9)+ceil(D*a.speed),a.titimp&&.03>y&&(g=min(max(k,g)+300,k+450)),q=ceil(a.transfer*q+l)+1,r=ceil(a.transfer*r)+1+ceil((D-1)*a.plaguebringer),s=ceil(a.transfer*s)+1+ceil((D-1)*a.plaguebringer),++h,h==a.size&&(h=0,l=0,o=0)}return 10*i/max_ticks}function zone_stats(a,b,c){for(var d={zone:"z"+a,value:0,stance:"",loot:100*(a<c.zone?Math.pow(.8,c.zone-c.reducer-a):Math.pow(1.1,a-c.zone))},e=0,f=b;e<f.length;e++){var g=f[e];c.atk=c.attack*("D"==g?4:"X"==g?1:.5);var h=simulate(c,a),i=h*d.loot*("S"==g?2:1);d[g]={speed:h,value:i},i>d.value&&(d.value=i,d.stance=g)}return d}function map_cost(a,b){return a+=b,a*Math.pow(1.14,a)*b*Math.pow(1.03+b/5e4,b)/42.75}function compute_breed_timer(){var a=.1*game.resources.trimps.potency;a*=Math.pow(1.1,game.upgrades.Potency.done),a*=Math.pow(1.01,game.buildings.Nursery.owned),a*=Math.pow(.98,game.jobs.Geneticist.owned),a*=Math.pow(1.003,game.unlocks.impCount.Venimp),a*=1+.1*game.portal.Pheromones.level,game.global.brokenPlanet&&(a*=.1),game.singleRunBonuses.quickTrimps.owned&&(a*=2);for(var b=1,c=0;c<game.upgrades.Coordination.done;++c)b=ceil(b*(1+.25*Math.pow(.98,game.portal.Coordinated.level)));b*=Math.pow(1e3,game.jobs.Amalgamator.owned);var d=game.resources.trimps.max*game.resources.trimps.maxMod;d*=Math.pow(1.1,game.portal.Carpentry.level),d*=1+.0025*game.portal.Carpentry_II.level;for(var e=0,f=game.jobs;e<f.length;e++){var g=f[e];d-=game.jobs[g].owned}return ceil(log(d/(d-b))/log(1+a))}function stats(a){var b=[],c=(a.zone<70?"X":"D")+(a.hze>=181&&a.zone>=60?"S":"");console.time();var d=0;if(a.hze>=210)for(;10>d&&a.fragments>map_cost(53.98+10*d,a.zone);)++d;d=d||-a.reducer;for(var e=a.zone+d;e>=6;--e){if(a.coordinate){for(var f=1,g=1;e>g;++g)f=ceil(1.25*f);a.challenge_health=f,a.challenge_attack=f}var h=zone_stats(e,c,a);if(!(h.value<1&&e>=a.zone)){if(b.length&&h.value<.804*b[0].value)break;b.unshift(h)}}return console.timeEnd(),[b,c]}var __assign=this&&this.__assign||Object.assign||function(a){for(var b,c=1,d=arguments.length;d>c;c++){b=arguments[c];for(var e in b)Object.prototype.hasOwnProperty.call(b,e)&&(a[e]=b[e])}return a},abs=Math.abs,ceil=Math.ceil,floor=Math.floor,log=Math.log,max=Math.max,min=Math.min,pow=Math.pow,round=Math.round,sqrt=Math.sqrt,jobless=!1,$=function(a){return document.querySelector(a)},$$=function(a){return[].slice.apply(document.querySelectorAll(a))};$("#dark").disabled=!localStorage.dark;var notations=[[],"KMBTQaQiSxSpOcNoDcUdDdTdQadQidSxdSpdOdNdVUvDvTvQavQivSxvSpvOvNvTgUtgDtgTtgQatgQitgSxtgSptgOtgNtgQaaUqaDqaTqaQaqaQiqaSxqaSpqaOqaNqaQiaUqiDqiTqiQaqiQiqiSxqiSpqiOqiNqiSxaUsxDsxTsxQasxQisxSxsxSpsxOsxNsxSpaUspDspTspQaspQispSxspSpspOspNspOgUogDogTogQaogQiogSxogSpogOogNogNaUnDnTnQanQinSxnSpnOnNnCtUc".split(/(?=[A-Z])/),[],"a b c d e f g h i j k l m n o p q r s t u v w x y z aa ab ac ad ae af ag ah ai aj ak al am an ao ap aq ar as at au av aw ax ay az ba bb bc bd be bf bg bh bi bj bk bl bm bn bo bp bq br bs bt bu bv bw bx by bz ca cb cc cd ce cf cg ch ci cj ck cl cm cn co cp cq cr cs ct cu cv cw cx".split(" "),"KMBTQaQiSxSpOcNoDcUdDdTdQadQidSxdSpdOdNdVUvDvTvQavQivSxvSpvOvNvTg".split(/(?=[A-Z])/),[]];window.addEventListener("error",function(a){return"string"==typeof a.error?void show_alert("ko",a.error):void("Script error."!=a.message&&create_share(function(b){return show_alert("ko","Oops! It’s not your fault, but something went wrong. You can go pester the dev on\n <a href=https://github.com/Grimy/Grimy.github.io/issues/new>GitHub</a> or\n <a href=https://www.reddit.com/message/compose/?to=Grimy_>Reddit</a>, they’ll fix it.\n If you do, please include the following data:<br>\n <tt>"+b+"<br>"+a.filename+" l"+(a.lineno||0)+"c"+(a.colno||0)+" "+a.message+"</tt>.")}))});var game;document.addEventListener("DOMContentLoaded",toggle_spoilers),document.addEventListener("DOMContentLoaded",function(){var a="2.4";a>localStorage.version&&show_alert("ok","Welcome to Trimps tools v"+a+"! See what’s new in the <a href=changelog.html>changelog</a>."),localStorage.version=a,location.search&&load_share(location.search.substr(1)),$$("[data-saved]").forEach(function(a){"checkbox"===a.type?(a.checked="true"===localStorage[a.id],a.addEventListener("change",function(){return localStorage[a.id]=a.checked})):(a.value=localStorage[a.id]||a.value,a.addEventListener("change",function(){return localStorage[a.id]=a.value}))})},!1);var death_stuff={max_hp:1e300,block:0,gammaMult:0,gammaCharges:1/0,challenge_attack:1,enemy_cd:1,breed_timer:300,weakness:0,plague:0,bleed:0,explosion:0,angelic:!1,nom:!1,slow:!1,devastation:!1,domination:!1,frigid:!1,magma:!1,fluctuation:.2},parse_inputs=function(){return __assign((a={attack:input("attack"),trimpShield:0,biome:biomes.all.concat(biomes[$("#biome").value]),cc:input("cc")/100,cd:1+input("cd")/100,challenge_health:input("challenge"),coordinate:$("#coordinate").checked,difficulty:input("difficulty")/100,fragments:input("fragments"),hze:input("hze"),import_chance:.03*input("imports"),ok_spread:input("ok_spread"),overkill:.005*input("overkill"),plaguebringer:.01*input("plaguebringer"),range:input("range")-1,reducer:$("#reducer").checked,size:input("size"),speed:input("speed"),titimp:$("#titimp").checked,transfer:input("transfer")/100,zone:input("zone"),poison:0,wind:0,ice:0},a[["poison","wind","ice"][ceil(input("zone")/5)%3]]=input("nature")/100,a),death_stuff);var a},max_ticks=864e3,test=[1,2],biomes={all:[[.8,.7,!0],[.9,1.3,!1],[.9,1.3,!1],[1,1,!1],[1.1,.7,!1],[1.05,.8,!0],[.9,1.1,!0]],gardens:[[1.3,.95,!1],[.95,.95,!0],[.8,1,!1],[1.05,.8,!1],[.6,1.3,!0],[1,1.1,!1],[.8,1.4,!1]],sea:[[.8,.9,!0],[.8,1.1,!0],[1.4,1.1,!1]],mountain:[[.5,2,!1],[.8,1.4,!1],[1.15,1.4,!1],[1,.85,!0]],forest:[[.75,1.2,!0],[1,.85,!0],[1.1,1.5,!1]],depths:[[1.2,1.4,!1],[.9,1,!0],[1.2,.7,!1],[1,.8,!0]]},seed=42,rand_mult=Math.pow(2,-31);