Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var r = {
- scope: {}
- };
- r.defineProperty = "function" == typeof Object.defineProperties ? Object.defineProperty : function(e, a, t) {
- if (t.get || t.set) throw new TypeError("ES3 does not support getters and setters.");
- e != Array.prototype && e != Object.prototype && (e[a] = t.value)
- };
- r.getGlobal = function(e) {
- return "undefined" != typeof window && window === e ? e : "undefined" != typeof global ? global : e
- };
- r.global = r.getGlobal(this);
- r.polyfill = function(e, a, t, i) {
- if (a) {
- t = r.global;
- e = e.split(".");
- for (i = 0; i < e.length - 1; i++) {
- var s = e[i];
- s in t || (t[s] = {});
- t = t[s]
- }
- e = e[e.length - 1];
- i = t[e];
- a = a(i);
- a != i && null != a && r.defineProperty(t, e, {
- configurable: !0,
- writable: !0,
- value: a
- })
- }
- };
- r.polyfill("Math.trunc", function(e) {
- return e ? e : function(e) {
- e = Number(e);
- if (isNaN(e) || Infinity === e || -Infinity === e || 0 === e) return e;
- var a = Math.floor(Math.abs(e));
- return 0 > e ? -a : a
- }
- }, "es6-impl", "es3");
- r.polyfill("Array.prototype.fill", function(e) {
- return e ? e : function(e, a, t) {
- var i = this.length || 0;
- 0 > a && (a = Math.max(0, i + a));
- if (null == t || t > i) t = i;
- t = Number(t);
- 0 > t && (t = Math.max(0, i + t));
- for (a = Number(a || 0); a < t; a++) this[a] = e;
- return this
- }
- }, "es6-impl", "es3");
- var l = 211,
- t = !1;
- console.log("\n\n\n");
- console.log("--------------------------------------------");
- console.log("");
- console.log("# # #### ##### ###### # ####");
- console.log("## ## # # # # # # # #");
- console.log("# ## # # # # # ##### # # #");
- console.log("# # # # ##### # ### # # #");
- console.log("# # # # # # ### # # #");
- console.log("# # #### # ###### ### # ####");
- console.log("____ Mope.ioΓ’ΒΛ Copyright 2017- Mopeio Ltd.___");
- console.log("--------------------------------------------");
- console.log("-----------Game Version " + l + " ----------------");
- console.log("\n\n\n");
- var m = 1,
- f = 2,
- u = 3,
- b = 4,
- y = 5,
- w = 6,
- k = 7,
- P = 8,
- A = 9,
- T = 10,
- I = 11,
- v = 12,
- D = 13,
- M = 14,
- x = 15,
- C = 16,
- N = 17,
- _ = 18,
- S = 19,
- E = 20,
- U = 21,
- B = 22,
- O = 23,
- R = 24,
- F = 25,
- W = 26,
- G = 27,
- H = 28,
- z = 29,
- j = 30,
- L = 31,
- X = 32,
- Y = 33,
- V = 34,
- K = 35,
- J = 36,
- q = 37,
- Z = 38,
- Q = 39,
- $ = 40,
- ee = 42,
- a = 43,
- ae = 44,
- te = 46,
- ie = 47,
- se = 48,
- re = 49,
- ne = 50,
- oe = 51,
- le = 52,
- he = 53,
- ce = 54,
- de = 55,
- pe = 56,
- ge = 57,
- me = 58,
- fe = 59,
- ue = 60,
- be = 61,
- ye = 62,
- we = 63,
- ke = 64,
- Pe = 65,
- Ae = 66,
- Te = 67,
- i = 68,
- s = 69,
- n = 70,
- o = 71,
- h = {
- customClassesForOType: {},
- setClassForAnimalType: function(e, a) {
- this.setCustomClassForGameObjType(e, f, a)
- },
- setCustomClassForGameObjType: function(e, a, t) {
- a in this.customClassesForOType || (this.customClassesForOType[a] = {
- oTypeMainClass: null,
- secondaryTypeClasses: {}
- });
- var i = this.customClassesForOType[a];
- null == t ? (null != i.oTypeMainClass && console.log("ERROR 'GameObjType.setCustomClassForGameObjType': a class (" + this.customClassesForOType[a] + ") is already set for oType " + a + "! Check for duplicate calls!"), i.oTypeMainClass = e) : (t in i.secondaryTypeClasses && console.log("ERROR 'GameObjType.setCustomClassForGameObjType': a class is already set for oType " + a + " AND secondaryType (eg. animalType) " + t + "! Check for duplicate calls!"), i.secondaryTypeClasses[t] = e)
- },
- getClassForGameObjType: function(e, a) {
- if (e in this.customClassesForOType) {
- var t = this.customClassesForOType[e];
- return null == a || 0 == a ? t.oTypeMainClass : a in t.secondaryTypeClasses ? t.secondaryTypeClasses[a] : t.oTypeMainClass
- }
- return In
- },
- newlyVis_createGameObjFromMsg: function(e) {
- var a = e.readUInt8(),
- t = null;
- a == f && (t = e.readUInt8());
- var i = h.createGameObjOfOType(a, t);
- i.worldUpd_readMsgNewlyVisible(e, a, t);
- return i
- },
- createGameObjOfOType: function(e, a) {
- return new(this.getClassForGameObjType(e, a))(e)
- }
- },
- c = 1,
- p = 2,
- g = 3,
- Ie = 4,
- ve = 5,
- De = 6,
- Me = 7,
- xe = 8,
- Ce = 9,
- Ne = 10,
- _e = 11,
- Se = 12,
- Ee = 13,
- Ue = 14,
- Be = 15,
- Oe = 16,
- Re = 17,
- Fe = 18,
- We = 19,
- Ge = 20,
- He = 21,
- ze = 22,
- je = 23,
- Le = 24,
- Xe = 25,
- Ye = 26,
- Ve = 27,
- Ke = 28,
- Je = 29,
- qe = 30,
- Ze = 31,
- Qe = 32,
- $e = 33,
- ea = 34,
- aa = 35,
- ta = 36,
- ia = 37,
- sa = 38,
- ra = 39,
- na = 40,
- oa = 41,
- la = 42,
- ha = 43,
- ca = 44,
- da = 45,
- pa = 46,
- ma = 47,
- fa = 48,
- ua = 49,
- ba = 50,
- ya = 51,
- wa = 52,
- ka = 53,
- Pa = 54,
- Aa = 55,
- Ta = 56,
- Ia = 57,
- va = 58,
- Da = 59,
- Ma = 60,
- xa = 61,
- Ca = 62,
- Na = 63,
- _a = 64,
- Sa = 65,
- Ea = 66,
- Ua = 67,
- Ba = 68,
- Oa = 69,
- Ra = function(e) {
- var a = {};
- switch (e) {
- case da:
- a.aniName = "Snail";
- a.aniDesc = "";
- a.upgradeText = "You're a super slow snail!";
- a.aniCol = "#fcc02b";
- a.skinName = "snail";
- break;
- case c:
- a.aniName = "Mouse";
- a.aniDesc = "";
- a.upgradeText = "";
- a.aniCol = "#9BA9B9";
- a.skinName = "mouse";
- break;
- case p:
- a.aniName = "Rabbit";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to RABBIT! \nPress W to burrow a hole to hide in!";
- a.aniCol = "#AA937E";
- a.skinName = "rabbit";
- break;
- case g:
- a.aniName = "Pig";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to PIG!\n Pigs move FAST through MUD! (Can use 'stink' on mud/ hiding holes!)";
- a.aniCol = "#DD6BD4";
- a.skinName = "pig";
- break;
- case Ie:
- a.aniName = "Fox";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to FOX! ,\n You can kick players out of hiding holes! (Press W when in one!)\n+ Hide in red berry bushes!";
- a.aniCol = "#FF9D43";
- a.skinName = "fox";
- break;
- case ve:
- a.aniName = "Deer";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to DEER! \nPress W to dig up food! \nDig in mud for better food!\n Hint:Check water areas for new food sources!";
- a.aniCol = "#C4773E";
- a.skinName = "deer";
- break;
- case De:
- a.aniName = "Mole";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to MOLE!\n Hold W to dig underground!\nGo under anything, do surprise attacks!";
- a.aniCol = "#4C4A45";
- a.skinName = "mole";
- break;
- case Me:
- a.aniName = "Zebra";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to ZEBRA! \nPress W to kick side ways!";
- a.aniCol = "#FFFFFF";
- a.skinName = "zebra";
- break;
- case xe:
- a.aniName = "Lion";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to LION!\n Press W to release a mighty ROAR (Rawr!)!";
- a.aniCol = "#f8c923";
- a.skinName = "lion";
- break;
- case Ce:
- a.aniName = "Cheetah";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to CHEETAH!\n Press W to get a speed boost! (Every 8 seconds)!";
- a.aniCol = "#CAC05B";
- a.skinName = "cheetah";
- break;
- case Ne:
- a.aniName = "Bear";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to BEAR!\n Bears climb through green hills! (Press W to use your claw!)";
- a.aniCol = "#99591C";
- a.skinName = "bear";
- break;
- case _e:
- a.aniName = "Croc";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to CROCODILE!\n Press W to bite and drag around animals! \n+ (Now hide in water spots)+ Swim well in Mud, Lakes & Oceans!";
- a.aniCol = "#30F51C";
- a.skinName = "croc";
- break;
- case Ee:
- a.aniName = "Hippo";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to HIPPO!\nHippos are great swimmers, dominate the Lakes/Oceans/Mud!";
- a.aniCol = "#945A99";
- a.skinName = "hippo";
- break;
- case Se:
- a.aniName = "Rhino";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to RHINO!\n Press W to CHARGE with your mighty horn!";
- a.aniCol = "#94a3a9";
- a.skinName = "rhino";
- break;
- case Be:
- a.aniName = "Shrimp";
- a.aniDesc = "";
- a.upgradeText = "";
- a.aniCol = "#f88e37";
- a.skinName = "shrimp";
- break;
- case Oe:
- a.aniName = "Trout";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to TROUT!\nHint: Hold Left-click to RUN! (Uses extra water)";
- a.aniCol = "#ac8686";
- a.skinName = "trout";
- break;
- case Re:
- a.aniName = "Crab";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to CRAB!\n Crabs can survive on dry land!\n (On land, Press W to go into your shell!)";
- a.aniCol = "#bf2408";
- a.skinName = "crab";
- break;
- case Fe:
- a.aniName = "Squid";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to SQUID!\n Squids can use INK when injured (press W!) \n+ you can hide in plankton bushes!";
- a.aniCol = "#40dda4";
- a.skinName = "squid";
- break;
- case We:
- a.aniName = "Shark";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to SHARK!\n A vicious predator of the oceans!";
- a.aniCol = "#999fc6";
- a.skinName = "shark";
- break;
- case ze:
- a.aniName = "Sea-horse";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to SEA HORSE!\n An agile hunter!";
- a.aniCol = "#73BE2F";
- a.skinName = "seahorse";
- break;
- case je:
- a.aniName = "Jellyfish";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to JELLYFISH!\n A slowly-turning animal that can grow quite large!";
- a.aniCol = "#FDB9BA";
- a.skinName = "jellyfish";
- break;
- case He:
- a.aniName = "Turtle";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to TURTLE!\n Lives well on land & water! (On land, Press W to go into your shell!)";
- a.aniCol = "#502E1A";
- a.skinName = "turtle";
- break;
- case Ge:
- a.aniName = "Stringray";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to STINGRAY!\n Use electic shock (Release W key!) to shock animals! \n(Takes time to recharge)";
- a.aniCol = "#164336";
- a.skinName = "stingray";
- break;
- case Le:
- a.aniName = "The Kraken";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to THE KRAKEN!\n Terrorize the oceans, and be feared by all!\n (Release W to use whirlpool ability!)";
- a.aniCol = "#64a034";
- a.skinName = "kraken";
- break;
- case Xe:
- a.aniName = "Pufferfish";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to PUFFERFISH!\n (Hold W to inflate- become spiky, and dangerous to touch!)";
- a.aniCol = "#6C5C2C";
- a.skinName = "pufferfish";
- break;
- case Ye:
- a.aniName = "Killer Whale";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to Killer Whale! \nWhales blow out water when diving! (And sometimes other loot!)";
- a.aniCol = "#141414";
- a.skinName = "killerwhale";
- break;
- case Ve:
- a.aniName = "Swordfish";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n (Press W to rush with your sharp nose!)";
- a.aniCol = "#689CD7";
- a.skinName = "swordfish";
- break;
- case Ke:
- a.aniName = "Gorilla";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Gorillas are very fast on hills/trees!\n Press W to throw bananas! (from trees)";
- a.aniCol = "#323232";
- a.skinName = "gorilla";
- break;
- case Je:
- a.aniName = "Octopus";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to Octopus!\nHold W to use your 'Disguise' ability!\n(Hint: wait for prey to bite you- they get stunned!)";
- a.aniCol = "#ff8340";
- a.skinName = "octopus";
- break;
- case Ue:
- a.aniName = "Dragon";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n (You're amazing!) \nFly over everything, Hold W to shoot fire!";
- a.aniCol = "#22FF8A";
- a.skinName = "dragon";
- break;
- case pa:
- a.aniName = "Black Dragon";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Black dragons drink lava instead of water! Black dragons only heal on healing stones/lava!";
- a.aniCol = "black";
- a.skinName = "blackdragon";
- break;
- case wa:
- a.aniName = "Giant Spider";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Place web around the game to catch prey!";
- a.aniCol = "black";
- a.skinName = "giantSpider";
- break;
- case ba:
- a.aniName = "Cobra";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Hold W to Spit venom, and poison animals with your bite!";
- a.aniCol = "black";
- a.skinName = "cobra";
- break;
- case ya:
- a.aniName = "Boa Constrictor";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Coil and suffocate other animals!";
- a.aniCol = "black";
- a.skinName = "boaConstrictor";
- break;
- case ka:
- a.aniName = "T-REX";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + " The Dinosaur!\n This ancient dinosaur has powerful jaws that can drag prey around!!";
- a.aniCol = "#862A2A";
- a.skinName = "trex";
- break;
- case Pa:
- a.aniName = "Tiger";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to Tiger!\n Tigers can launch an ambush attack (HOLD W to grow a bush)!";
- a.aniCol = "#FF9000";
- a.skinName = "tiger";
- break;
- case Aa:
- a.aniName = "Giraffe";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to Giraffe!\nGiraffe have huge legs and stomp anyone in their way!";
- a.aniCol = "#E9BD23";
- a.skinName = "giraffe";
- break;
- case Ta:
- a.aniName = "Eagle";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to Eagle!\nEagles can fly up other animals in the air! !\nThey can also fly high (double click)";
- a.aniCol = "#5b400d";
- a.skinName = "eagle";
- break;
- case oa:
- a.aniName = "Arctic Fox";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n You can kick players out of hiding holes! (Press W when in one!)\n+ Hide in red berry bushes!";
- a.aniCol = "#CFCFCF";
- a.skinName = "arctic/arcticfox";
- break;
- case Ze:
- a.aniName = "Arctic Hare";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n \nPress W to burrow a hole to hide in!";
- a.aniCol = "#D5D5D5";
- a.skinName = "arctic/arctichare";
- break;
- case Qe:
- a.aniName = "The Yeti!";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n So it really exists... \n Hold W to turn into snow, release W to freeeeeze!";
- a.aniCol = "#839eb5";
- a.skinName = "arctic/yeti";
- break;
- case $e:
- a.aniName = "Chipmunk";
- a.aniDesc = "";
- a.upgradeText = "";
- a.aniCol = "#A77C30";
- a.skinName = "arctic/chipmunk";
- break;
- case ea:
- a.aniName = "Muskox";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Press W to charge with your horns! \nPlus move decently on ice!";
- a.aniCol = "#231f18";
- a.skinName = "arctic/muskox";
- break;
- case aa:
- a.aniName = "Penguin";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Left-click to run!\n (HOLD W to slide FAST on ice)!";
- a.aniCol = "#FFFFFF";
- a.skinName = "arctic/penguin";
- break;
- case ta:
- a.aniName = "Polar Bear";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Polar bears can climb hills! \n+ They're amazing swimmers!";
- a.aniCol = "#e4e4e4";
- a.skinName = "arctic/polarbear";
- break;
- case ia:
- a.aniName = "Seal";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Seals can slide on ice (Hold W) + can climb hills (rocks too!)";
- a.aniCol = "#cfcfcf";
- a.skinName = "arctic/seal";
- break;
- case sa:
- a.aniName = "Snow leopard";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Press W to get a speed boost! (Every 8 seconds)!";
- a.aniCol = "#cfcfcf";
- a.skinName = "arctic/snowleopard";
- break;
- case ra:
- a.aniName = "Walrus";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n You can slide on ice (Hold W) + can climb hills (rocks too!)";
- a.aniCol = "#633838";
- a.skinName = "arctic/walrus";
- break;
- case na:
- a.aniName = "Reindeer";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Press W to dig up food! \n Your sharp hooves let you turn very well on ice!";
- a.aniCol = "#a68976";
- a.skinName = "arctic/reindeer";
- break;
- case qe:
- a.aniName = "Wolf";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Wolf paws turn very well on ice!\n Press W to howl!";
- a.aniCol = "#6B6B6B";
- a.skinName = "arctic/wolf";
- break;
- case la:
- a.aniName = "Wolverine";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Press W to Let out a Powerful GROWL! (Knocks back prey!)";
- a.aniCol = "#843A0F";
- a.skinName = "arctic/wolverine";
- break;
- case ha:
- a.aniName = "Mammoth";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Press W to roll snowballs with your trunk!\n The bigger the snowball gets, the longer the freeze!";
- a.aniCol = "#9d4717";
- a.skinName = "arctic/mammoth";
- break;
- case ca:
- a.aniName = "Donkey";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Press W to Kick any animal behind you";
- a.aniCol = "#8c7c64";
- a.skinName = "donkey";
- break;
- case ma:
- a.aniName = "Sabertooth Tiger";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to Sabertooth Tiger!\nSabertooth Tigers are great swimmers, dominate the Lakes/Oceans/Mud!";
- a.aniCol = "#945A99";
- a.skinName = "sabertoothtiger";
- break;
- case fa:
- a.aniName = "Elephant";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Use your long trunk to attack and eat food!";
- a.aniCol = "#945A99";
- a.skinName = "elephant";
- break;
- case ua:
- a.aniName = "Blue Whale";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to Blue Whale!\n Smash with your powerful tail!";
- a.aniCol = "#945A99";
- a.skinName = "bluewhale";
- break;
- case va:
- a.aniName = "Duck";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to a DUCK!";
- a.aniCol = "#FF9000";
- a.skinName = "duck";
- break;
- case Da:
- a.aniName = "Duckling";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to a DUCK!";
- a.aniCol = "#FF9000";
- a.skinName = "duckling";
- break;
- case Ia:
- a.aniName = "Hedgehog";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to Hedgehog!\n (Hold W to become spiky, and dangerous to touch!)";
- a.aniCol = "#5b400d";
- a.skinName = "hedgehog";
- break;
- case xa:
- a.aniName = "King Crab";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to a KING CRAB!";
- a.aniCol = "#971f0e";
- a.skinName = "kingcrab";
- break;
- case Ma:
- a.aniName = "Lemming";
- a.aniDesc = "";
- a.upgradeText = "";
- a.aniCol = "#A77C30";
- a.skinName = "arctic/lemming";
- break;
- case Ca:
- a.aniName = "Frog";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to Frog!!";
- a.aniCol = "#FF9000";
- a.skinName = "frog/frog";
- break;
- case Na:
- a.aniName = "Ostrich";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to Ostrich! Lay eggs to hatch babies! \nCommand babies by placing your crosshair (right-click/W)-\n They can attack prey!";
- a.aniCol = "#FF9000";
- a.skinName = "ostrich/ostrich";
- break;
- case _a:
- a.aniName = "Pelican";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to Pelican! \nPick up water (and prey!) in your mouth,\nfly, and drop water on prey! (press W again)";
- a.aniCol = "#FF9000";
- a.skinName = "pelican/pelican";
- break;
- case Sa:
- a.aniName = "Falcon";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to Falcon! \nFly, and do a powerful dive attack! Aim it well.";
- a.aniCol = "#FF9000";
- a.skinName = "falcon/falcon";
- break;
- case Ea:
- a.aniName = "Snowy Owl";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to Snowy Owl!\n Aim the crosshair, \n right click/W when it's on top of prey, to attack!";
- a.aniCol = "#FF9000";
- a.skinName = "snowyowl/snowyowl";
- break;
- case Oa:
- a.aniName = "Baby Ostrich";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to Baby Ostrich!!";
- a.aniCol = "#FF9000";
- a.skinName = "ostrich/baby-ostrich";
- break;
- default:
- a.aniName = "(Animal)", a.aniDesc = "", a.upgradeText = "UPGRADED!"
- }
- return a
- },
- Fa = 100,
- Wa = 101,
- Ga = 0,
- Ha = 1,
- za = 2,
- ja = 3,
- La = 4,
- Xa = 5,
- Ya = 6,
- Va = 7,
- Ka = 8,
- Ja = 9,
- qa = 10,
- Za = 11,
- Qa = 12,
- $a = 13,
- et = 14,
- at = 15,
- tt = 16,
- it = 17,
- st = 18,
- rt = 19,
- nt = 20,
- ot = 21,
- lt = 22,
- ht = 23,
- ct = 24,
- dt = 25,
- pt = 26,
- gt = 27,
- mt = 28,
- ft = 30,
- ut = 31,
- bt = 32,
- yt = 33,
- wt = 34,
- kt = 35,
- Pt = 36,
- At = 37,
- Tt = 38,
- It = 39,
- vt = 40,
- Dt = 41,
- Mt = 42,
- xt = 43,
- Ct = 46,
- Nt = 47,
- _t = 48,
- St = 49,
- Et = 51,
- Ut = 54,
- Bt = 55,
- Ot = 56,
- Rt = 57,
- Ft = 58,
- Wt = 59,
- Gt = 60,
- Ht = 61,
- zt = 62,
- jt = function(e) {
- var a = {};
- switch (e) {
- case bt:
- a.abilName = "Tail Slap";
- a.abilImg = "skins/" + Ra(pr).skinName + ".png";
- break;
- case ut:
- a.abilName = "Trunk Hit";
- a.abilImg = "skins/" + Ra(pr).skinName + ".png";
- break;
- case Fa:
- a.abilName = "Dive";
- a.abilImg = "img/ability_dive.png";
- break;
- case dt:
- a.abilName = "Dig For Food";
- a.abilImg = "skins/" + Ra(pr).skinName + ".png";
- break;
- case za:
- a.abilName = "Shell";
- a.abilImg = "skins/" + Ra(pr).skinName + "2.png";
- break;
- case ot:
- a.abilName = "Bite Drag";
- a.abilImg = "skins/" + Ra(pr).skinName + ".png";
- break;
- case Pt:
- a.abilName = "Suffocate prey";
- a.abilImg = "skins/" + Ra(pr).skinName + ".png";
- break;
- case Bt:
- a.abilName = "Fly with water";
- a.abilImg = "skins/pelican/ability_pelican.png";
- break;
- case Va:
- a.abilName = "Disguise";
- a.abilImg = "skins/" + Ra(pr).skinName + ".png";
- break;
- case lt:
- a.abilName = "Burrow Hole";
- a.abilImg = "skins/" + Ra(pr).skinName + ".png";
- break;
- case ht:
- a.abilName = "Pull from Hole";
- a.abilImg = "skins/" + Ra(pr).skinName + ".png";
- break;
- case Ja:
- a.abilName = "Charge";
- a.abilImg = "skins/" + Ra(pr).skinName + ".png";
- break;
- case it:
- a.abilName = "Roll snow";
- a.abilImg = "img/snowball.png";
- break;
- case wt:
- a.abilName = "Venom Spit";
- a.abilImg = "skins/" + Ra(pr).skinName + ".png";
- break;
- case kt:
- a.abilName = "Spin Web";
- a.abilImg = "img/spiderWeb.png";
- break;
- case $a:
- a.abilName = "Throw Snow";
- a.abilImg = "skins/" + Ra(pr).skinName + ".png";
- break;
- case tt:
- a.abilName = "Drop Snow";
- a.abilImg = "img/snowball.png";
- break;
- case st:
- a.abilName = "Loud Noise";
- a.abilImg = "skins/" + Ra(pr).skinName + ".png";
- break;
- case et:
- a.abilName = "Claw Slash";
- a.abilImg = "img/ability_claw.png";
- break;
- case La:
- a.abilName = "Ink";
- a.abilImg = "skins/" + Ra(pr).skinName + ".png";
- break;
- case ja:
- a.abilName = "Shock";
- a.abilImg = "skins/" + Ra(pr).skinName + ".png";
- break;
- case Ha:
- a.abilName = "Hold to Dig";
- a.abilImg = "skins/" + Ra(pr).skinName + ".png";
- break;
- case Qa:
- a.abilName = "Howl";
- a.abilImg = "skins/" + Ra(pr).skinName + ".png";
- break;
- case ct:
- a.abilName = "Throw Banana";
- a.abilImg = "skins/" + Ra(pr).skinName + ".png";
- break;
- case mt:
- a.abilName = "Cause Wave";
- a.abilImg = "skins/" + Ra(pr).skinName + ".png";
- break;
- case at:
- a.abilName = "Extra Boost";
- a.abilImg = "skins/" + Ra(pr).skinName + ".png";
- break;
- case Ka:
- a.abilName = "Slide on ice";
- a.abilImg = "skins/" + Ra(pr).skinName + ".png";
- break;
- case qa:
- a.abilName = "Inflate";
- a.abilImg = "skins/" + Ra(pr).skinName + ".png";
- break;
- case St:
- a.abilName = "Spikes";
- a.abilImg = "skins/" + Ra(pr).skinName + "2.png";
- break;
- case rt:
- a.abilName = "Fire";
- a.abilImg = "img/fire.png";
- break;
- case ft:
- a.abilName = "Fire";
- a.abilImg = "img/fire.png";
- break;
- case Et:
- a.abilName = "Arm Smash";
- a.abilImg = "img/ability_crabSmashSkin.png";
- break;
- case At:
- a.abilName = "Jaws Bite";
- a.abilImg = "skins/" + Ra(pr).skinName + ".png";
- break;
- case Ct:
- a.abilName = "Jaws Bite";
- a.abilImg = "skins/" + Ra(pr).skinName + ".png";
- break;
- case Ut:
- a.abilName = "Command Babies";
- a.abilImg = "skins/ostrich/ostrich-baby.png";
- break;
- case Ft:
- a.abilName = "Target prey";
- a.abilImg = "skins/" + Ra(pr).skinName + ".png";
- break;
- case Rt:
- a.abilName = "Sky dive";
- a.abilImg = "skins/" + Ra(pr).skinName + ".png";
- break;
- case Tt:
- a.abilName = "Ambush Attack";
- a.abilImg = "skins/" + Ra(pr).skinName + ".png";
- break;
- case Mt:
- a.abilName = "Stomp";
- a.abilImg = "skins/" + Ra(pr).skinName + ".png";
- break;
- case Nt:
- a.abilName = "Fly with prey";
- a.abilImg = "skins/" + Ra(pr).skinName + ".png";
- break;
- case _t:
- a.abilName = "Stink";
- a.abilImg = "skins/" + Ra(pr).skinName + ".png";
- break;
- default:
- a.abilName = "Ability", a.abilImg = "skins/" + Ra(pr).skinName + ".png"
- }
- return a
- },
- Lt = function(e, a) {
- return Math.random() * (a - e) + e
- },
- Xt = function(e, a) {
- return Math.floor(Math.random() * (a - e + 1)) + e
- },
- Yt = function(e) {
- e = Math.trunc(e) % 360 + (e - Math.trunc(e));
- return 0 < e ? e : e + 360
- },
- Vt = function(e) {
- e = e.split(".");
- return 256 * (256 * (256 * +e[0] + +e[1]) + +e[2]) + +e[3]
- },
- Kt = function(e) {
- for (var a = e % 256, t = 3; 0 < t; t--) e = Math.floor(e / 256), a = e % 256 + "." + a;
- return a
- },
- Jt = function(e, a) {
- var t = a.split("?")[0],
- i, s;
- i = -1 !== a.indexOf("?") ? a.split("?")[1] : "";
- if ("" !== i) {
- s = i.split("&");
- for (var r = s.length - 1; 0 <= r; --r) i = s[r].split("=")[0], i === e && s.splice(r, 1);
- t = t + "?" + s.join("&")
- }
- return t
- },
- qt = function(e) {
- return 180 / Math.PI * e
- },
- Zt = function(e) {
- return Math.PI / 180 * e
- },
- Qt = function(e, a, t, i) {
- return Math.atan2(i - a, t - e)
- },
- $t = function(e, a) {
- return 0 != (e >> a) % 2
- },
- ei = function(e, a, t) {
- return t ? e | 1 << a : e & ~(1 << a)
- },
- ai = function(e, a) {
- var t = Yt(qt(a - e));
- 180 < t && (t -= 360);
- return Zt(t)
- },
- ti = function(e, a, t) {
- return Math.min(t, Math.max(a, e))
- },
- ii = function(e) {
- return unescape(encodeURIComponent(e))
- },
- si = function(e) {
- return decodeURIComponent(escape(e))
- },
- ri = function(e, a, t) {
- var i = 1.2 * Zi.measureText("M").width;
- e = e.split("\n");
- for (var s = 0; s < e.length; ++s) Zi.fillText(e[s], a, t), t += i
- },
- ni = function(e) {
- var a = parseInt(e, 10),
- t = Math.floor(a / 3600);
- e = Math.floor((a - 3600 * t) / 60);
- a = a - 3600 * t - 60 * e;
- 10 > a && (a = "0" + a);
- return e + ":" + a
- },
- oi = function(e) {
- return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")
- },
- li = function(e) {
- return hi(e)
- },
- hi = function(e, a) {
- if (null === e) return null;
- if (0 === e) return "0";
- a = !a || 0 > a ? 0 : a;
- var t = e.toPrecision(2).split("e"),
- t = 1 === t.length ? 0 : Math.floor(Math.min(t[1].slice(1), 14) / 3),
- i = 1 > t ? e.toFixed(0 + a) : (e / Math.pow(10, 3 * t)).toFixed(2);
- return (0 > i ? i : Math.abs(i)) + ["", "K", "M", "B", "T"][t]
- },
- ci = function(e, a, t, i) {
- Zi.fillStyle = i;
- Zi.beginPath();
- Zi.arc(e, a, Math.max(0, t), 0, 2 * Math.PI);
- Zi.fill()
- },
- di = function(e, a, t, i) {
- return t * Math.sin(i * Math.PI / a * e)
- };
- pi.prototype = {
- strokeW: 1,
- strokeColor: "#000000",
- multiLine: !1,
- _text: "",
- _color: "#000000",
- x: 0,
- y: 0,
- _fntSize: 16,
- _canvas: null,
- _ctx: null,
- _dirty: !1,
- renderScale: 1.5,
- _scale: 1,
- width: 0,
- height: 0,
- setColor: function(e) {
- this._color != e && (this._color = e, this._dirty = !0)
- },
- setFontSize: function(e) {
- this._fntSize != e && (this._fntSize = e, this._dirty = !0)
- },
- setText: function(e) {
- e != this._text && (this._text = e, this._dirty = !0)
- },
- getRenderedCanvas: function() {
- null == this._canvas && (this._canvas = document.createElement("canvas"), this._ctx = this._canvas.getContext("2d"));
- if (this._dirty) {
- this._dirty = !1;
- var e = this._canvas,
- a = this._ctx,
- t = this._text,
- i = this._scale,
- s = this._fntSize * this.renderScale,
- r = s + "px Arial";
- a.font = r;
- var n = ~~(.2 * s);
- a.font = r;
- if (this.multiLine) {
- for (var o = 1.2 * a.measureText("M").width, t = t.split("\n"), l = 0, h = 0; h < t.length; ++h) l = Math.max(l, a.measureText(t[h]).width);
- this.width = (l + 6) * i;
- this.height = (o * t.length + n) * i;
- e.width = this.width;
- e.height = this.height;
- this.width /= this.renderScale;
- this.height /= this.renderScale;
- a.globalAlpha = 1;
- a.font = r;
- 0 < this.strokeW && (a.shadowOffsetX = this.strokeW, a.shadowOffsetY = this.strokeW, a.shadowColor = this.strokeColor);
- a.fillStyle = this._color;
- a.textAlign = "center";
- e = 3 + e.width / 2;
- s -= n / 2;
- for (h = 0; h < t.length; ++h) a.fillText(t[h], e, s), s += o
- } else this.width = (a.measureText(t).width + 6) * i, this.height = (s + n) * i, e.width = this.width, e.height = this.height, this.width /= this.renderScale, this.height /= this.renderScale, a.globalAlpha = 1, a.font = r, 0 < this.strokeW && (a.shadowOffsetX = this.strokeW, a.shadowOffsetY = this.strokeW, a.shadowColor = this.strokeColor), a.fillStyle = this._color, a.fillText(t, 3, s - n / 2)
- }
- return this._canvas
- },
- draw: function() {
- if (this._text) {
- var e = this.renderScale,
- a = this.getRenderedCanvas(),
- t = a.width / e,
- e = a.height / e;
- Zi.drawImage(a, this.x - t / 2, this.y - e / 2, t, e)
- }
- }
- };
- function pi(e, a) {
- e && (this._fntSize = e);
- a && (this._color = a)
- }
- window.CachedText = pi;
- function gi(e, a, t, i, s, r) {
- this.x = e;
- this.y = a;
- this.w = t;
- this.h = i;
- this.aniT = s;
- this.buttonTXT = new pi(12, "white");
- this.buttonTXT.renderScale = 1.5;
- this.buttonTXT.setText(Ra(s).aniName);
- this.isHighLighted = !1;
- this.biomeNum = r;
- e = new Cn(0, f, 0, 0, 30);
- e.animalType = s;
- e.x = e.ox = e.nx = 0;
- e.y = e.oy = e.ny = 0;
- e.rad = e.oRad = e.nRad = 30;
- e.alwaysPlainOutline = !0;
- this.drawnAniObj = e;
- this.buttonScaleF = 1;
- this.testPosHitsButton = function(e, a) {
- return e < this.x - this.w / 2 || e > this.x + this.w / 2 ? !1 : a < this.y - this.w / 2 || a > this.y + this.w / 2 ? !1 : !0
- };
- this.setPosAndSize = function(e, a, t, i, s, r) {
- this.w = t;
- this.h = i;
- this.x = e + t * (.5 - s);
- this.y = a + i * (.5 - r)
- };
- this.draw = function() {
- Zi.save();
- Zi.translate(this.x, this.y);
- Zi.scale(this.buttonScaleF, this.buttonScaleF);
- var e = Zi.globalAlpha;
- Zi.globalAlpha = .75 * e;
- switch (this.biomeNum) {
- case 1:
- Zi.fillStyle = "#1C91B8";
- break;
- case 0:
- Zi.fillStyle = "#26A73A";
- break;
- case 2:
- Zi.fillStyle = "#B2B2B2"
- }
- Zi.fillRect(0 - this.w / 2, 0 - this.h / 2, this.w, this.h);
- this.isHighLighted && (Zi.fillStyle = "white", Zi.globalAlpha = .2 * e, Zi.fillRect(0 - this.w / 2, 0 - this.h / 2, this.w, this.h));
- Zi.globalAlpha = e;
- this.drawnAniObj.nRad = this.drawnAniObj.rad = .6 * t / 2 * fs;
- Zi.save();
- Zi.scale(2, 2);
- this.drawnAniObj.draw();
- Zi.restore();
- this.buttonTXT.setFontSize(23 * fs);
- this.buttonTXT.x = 0;
- this.buttonTXT.y = .375 * -this.h;
- this.buttonTXT.draw();
- Zi.restore()
- }
- }
- window.AniChoiceButton = gi;
- mi.prototype = {
- x: 0,
- y: 0,
- w: 0,
- h: 0,
- visible: !0,
- buttonTXT: null,
- pressed: !1,
- pressedTouchID: -1,
- touchEnabled: !0,
- testPosHitsButton: function(e, a) {
- return e < this.x - this.w / 2 || e > this.x + this.w / 2 ? !1 : a < this.y - this.w / 2 || a > this.y + this.w / 2 ? !1 : !0
- },
- setPosAndSize: function(e, a, t, i, s, r) {
- this.w = t;
- this.h = i;
- this.x = e + t * (.5 - s);
- this.y = a + i * (.5 - r)
- },
- onButtonTouchStart: function() {},
- onButtonTouchEnd: function() {}
- };
- function mi(e) {
- this.buttonTXT = new pi(10, "white");
- this.buttonTXT.renderScale = 1.5;
- this.buttonTXT.setText(e);
- this.draw = function() {
- this.visible && (Zi.save(), Zi.globalAlpha = .2, Zi.fillStyle = this.pressed ? "white" : "#000000", Zi.fillRect(this.x - this.w / 2, this.y - this.h / 2, this.w, this.h), Zi.globalAlpha = .2, this.buttonTXT.setFontSize(15 * $i), this.buttonTXT.x = this.x, this.buttonTXT.y = this.y, this.buttonTXT.draw(), Zi.restore())
- }
- }
- window.TouchButton = mi;
- var fi = function() {
- this.buttonTXT = new pi(10, "white");
- this.buttonTXT.renderScale = 1.5;
- this.isMiniRechargeBut = !1;
- this.abil_Type = 0;
- this.abil_possible = this.abil_usable = this.abil_recharging = this.abil_active = !1;
- this.abil_avilableA = this.abil_rechargeBarA = this.abil_rechargeTotalT = this.abil_rechargeEndT = 0;
- this.draw = function() {
- if (this.visible && (this.abil_rechargeBarA += .1 * ((this.abil_recharging ? 1 : 0) - this.abil_rechargeBarA), this.abil_avilableA += .1 * ((this.abil_usable || this.abil_active ? 1 : .2) - this.abil_avilableA), this.isMiniRechargeBut && (this.h = .6 * this.w), this.abil_possible)) {
- Zi.save();
- this.isMiniRechargeBut ? (this.h = .8 * this.w, Zi.translate(this.x, this.y + .36 * this.h), Zi.scale(.65, .65)) : Zi.translate(this.x, this.y);
- var e = .2 * this.abil_avilableA,
- a = this.pressed || Ts ? "#CECECE" : "#000000";
- this.abil_active && (a = Gi, e = .7);
- Zi.fillStyle = a;
- Zi.globalAlpha = 1 * e;
- Zi.fillRect(0 - this.w / 2, 0 - this.h / 2, this.w, this.h);
- e = jt(this.abil_Type);
- if (this.abil_Type == rt || this.abil_Type == ft) {
- if (a = Ns("img/fireball/" + Math.trunc(Yi / 120) % 5 + ".png")) {
- var t = .4 * this.w,
- i = 0;
- Fs[dr] && (i = di((Yi - Fs[dr].spawnTime) / 1e3, 1, 10, 2));
- Zi.globalAlpha = 1 * this.abil_avilableA;
- Zi.drawImage(a, -t, .85 * -t - i, 2 * t, 2 * t + i)
- }
- } else if (a = Ns(e.abilImg)) t = .4 * this.w, Zi.globalAlpha = 1 * this.abil_avilableA, Zi.drawImage(a, -t, .85 * -t, 2 * t, 2 * t);
- this.buttonTXT.setText(e.abilName);
- this.buttonTXT.setFontSize(15 * $i);
- this.buttonTXT.x = 0;
- this.buttonTXT.y = .35 * -this.w;
- this.buttonTXT.draw();
- e = Math.max(0, this.abil_rechargeEndT - Yi);
- this.abil_rechargeBarA += .1 * ((this.abil_recharging ? 1 : 0) - this.abil_rechargeBarA);
- .01 < this.abil_rechargeBarA && (Zi.globalAlpha = .35 * this.abil_rechargeBarA, Zi.fillStyle = "#000000", a = .8 * this.w, t = .5 * this.h, Zi.fillRect(0 - a / 2, 0 - t / 2, a, t), Zi.globalAlpha = 1 * this.abil_rechargeBarA, Zi.fillStyle = "#F3C553", Zi.fillRect(0 - a / 2, 0 - t / 2, e / this.abil_rechargeTotalT * a, t));
- Zi.restore()
- }
- }
- };
- fi.prototype = Object.create(mi.prototype);
- window.AbilityButton = fi;
- function ui(e) {
- e = e.split("+").join(" ");
- for (var a = {}, t, i = /[?&]?([^=]+)=([^&]*)/g; t = i.exec(e);) a[decodeURIComponent(t[1])] = decodeURIComponent(t[2]);
- return a
- }
- var bi = ui(document.location.search),
- yi = 0 < bi.mobileios,
- wi = 0 < bi.mobileAndroid,
- ki = yi || wi,
- Pi = 0 < bi.videoson,
- Ai = bi.server,
- Ti = .175,
- Ii = "#3FBA54",
- vi = "#f7f7f7",
- Di = "#09992F",
- Mi = "#007ec0",
- xi = "grey",
- Ci = "#09992F",
- Ni = "#4E66E4",
- _i = "#ff6000",
- Si = "#5e69a0",
- Ei = Si,
- Ui = "#c8b745",
- Bi = "#F35F53",
- Oi = "#CF6259",
- Ri = "#FF911E",
- Fi = "#C67019",
- Wi = "#EF3C31",
- Gi = "#4AE05E",
- Hi = "#8C9688",
- zi = function(e) {
- switch (e) {
- case Li:
- return Mi;
- case Xi:
- return xi;
- default:
- case ji:
- return Di
- }
- },
- ji = 0,
- Li = 1,
- Xi = 2,
- Yi = +new Date,
- Vi = +new Date,
- Ki = document.getElementById("gCanvas"),
- Ji = null,
- qi = null,
- Zi = Ki.getContext("2d");
- Zi.shadowColor = "black";
- var Qi = !1,
- $i = Math.min(window.devicePixelRatio, 2),
- es = 1 == ("ontouchstart" in window || navigator.maxTouchPoints);
- es && console.log("mobile touch device detected!");
- var as = {},
- ts = function(e) {
- if (!as.hasOwnProperty(e) && !$s) {
- var a = new Audio(e);
- console.log("loading audio: " + e);
- as[e] = a;
- a.volume = .7;
- a.muted = $s
- }
- return as[e]
- },
- is = null,
- ss = "",
- rs = "audio/music_game.mp3",
- ns = function(e) {
- is && (is.pause(), is.currentTime = 0);
- ss = e;
- if (!$s) {
- console.log("changed music to " + e);
- is = ts(e, !0);
- try {
- is.play()
- } catch (e) {}
- }
- },
- os = function() {
- var e = document.getElementById("button_mute_img");
- if (e) {
- e.src = $s ? "img/sound_off.png" : "img/sound_on.png";
- for (var a in as) as.hasOwnProperty(a) && (as[a].muted = $s);
- !$s && ss && null == is && ns(ss)
- }
- },
- ls = camzoom_n = 2.7,
- ls = 1,
- hs = 0,
- cs = 0,
- ds = 0,
- ps = 0,
- gs = 0,
- ms = 0,
- fs = 1,
- us = 0,
- bs = 0,
- ys = 0,
- ws = 0,
- ks = 0,
- Ps = 0,
- As = !1,
- Ts = !1,
- Is = 0,
- vs = 0,
- Ds = 0,
- Ms = 0,
- xs = 1,
- Cs = {},
- Ns = function(e) {
- Cs.hasOwnProperty(e) || (Cs[e] = new Image, Cs[e].src = e);
- return 0 != Cs[e].width && Cs[e].complete ? Cs[e] : null
- },
- _s = 100,
- Ss = Array.apply(null, Array(50)).map(Number.prototype.valueOf, 0),
- Es = Array.apply(null, Array(50)).map(Number.prototype.valueOf, 0),
- Us = Array.apply(null, Array(50)).map(Number.prototype.valueOf, 0),
- Bs = Array.apply(null, Array(50)).map(Number.prototype.valueOf, 0),
- Os = !1,
- Rs = [],
- Fs = {},
- Ws = [],
- Gs = !1,
- Hs = 0,
- zs = 1,
- js = !1,
- Ls = 0,
- Xs = 1,
- Ys = !1,
- Vs = +new Date,
- Ks = !1,
- Js = !1,
- qs = !1,
- Zs = !1,
- Qs = !1,
- $s = !1,
- er = !1;
- if (window.localStorage) {
- Ks = 0 < window.localStorage.getItem("options_noImages") + 0;
- document.getElementById("options_noImages").checked = Ks;
- Js = 0 < window.localStorage.getItem("options_noNames") + 0;
- document.getElementById("options_noNames").checked = Js;
- qs = 0 < window.localStorage.getItem("options_lowGraphics") + 0;
- document.getElementById("options_lowGraphics").checked = qs;
- Zs = 0 < window.localStorage.getItem("options_noJoystick") + 0;
- document.getElementById("options_noJoystick").checked = Zs;
- Zs = 0 < window.localStorage.getItem("options_noJoystick") + 0;
- document.getElementById("options_noJoystick").checked = Zs;
- var Qs = 0 < window.localStorage.getItem("options_leftHanded") + 0,
- ar = document.getElementById("options_leftHanded");
- ar && (ar.checked = Qs);
- $s = 0 < window.localStorage.getItem("options_muted") + 0;
- os()
- }
- var tr = 0,
- ir = 0,
- sr = +new Date,
- rr = "... fps",
- nr = +new Date,
- or = 0,
- lr = 0,
- hr = "...",
- cr = 0,
- dr = 0,
- pr = c,
- gr = !1,
- mr = !1,
- fr = !1,
- ur = !1,
- br = +new Date,
- yr = !1,
- wr = !1,
- kr = waterBarPerc_n = 100,
- Pr = xp = xpPer = 0,
- Ar = new pi(16, "white"),
- Tr = new pi(16, "white"),
- Ir = new pi(16, "white"),
- vr = new pi(10, "white");
- Ir.multiLine = !0;
- Ir.renderScale = 1;
- vr.renderScale = 1;
- var Dr = 0,
- Mr = 0,
- xr = "",
- Cr = [],
- Nr = new fi;
- Nr.onButtonTouchStart = function() {
- vl(Pl, !0)
- };
- Nr.onButtonTouchEnd = function() {
- vl(Pl, !1);
- Sr.pressed && -1 == Sr.pressedTouchID && (Sr.pressed = !1, vl(kl, !1))
- };
- Cr.push(Nr);
- var _r = new fi;
- _r.isMiniRechargeBut = !0;
- _r.touchEnabled = !1;
- Cr.push(_r);
- var Sr = new mi("RUN");
- Sr.onButtonTouchStart = function() {
- vl(kl, !0)
- };
- Sr.onButtonTouchEnd = function() {
- vl(kl, !1)
- };
- Cr.push(Sr);
- var Er = new mi("CHAT");
- Er.onButtonTouchStart = function() {
- ul()
- };
- Cr.push(Er);
- var Ur = new mi("S");
- Ur.onButtonTouchStart = function() {
- vl(Il, !0)
- };
- Cr.push(Ur);
- var Br = new mi("DOWNΓ’ΒΒ");
- Br.onButtonTouchStart = function() {
- vl(Tl, !0)
- };
- Cr.push(Br);
- var Or = !1,
- Rr = -1,
- Fr = 0,
- Wr = 0,
- Gr = 0,
- Hr = 0,
- zr = 50,
- jr = 0,
- Lr = 0,
- Xr = 0,
- Yr = 0,
- Vr = 0,
- Vi = +Date.now(),
- Kr = null,
- Jr = !1;
- if (!ki) {
- var qr = document.createElement("div");
- qr.innerHTML = " ";
- qr.className = "adsbox";
- document.body.appendChild(qr);
- window.setTimeout(function() {
- 0 === qr.offsetHeight && (Jr = !0, document.getElementById("blockedImg").style.display = "block");
- qr.remove();
- console.log("AdBlock Enabled? ", Jr)
- }, 1e3)
- }
- ki || (function(e, a, t, i, s, r, n) {
- e.GoogleAnalyticsObject = s;
- e[s] = e[s] || function() {
- (e[s].q = e[s].q || []).push(arguments)
- };
- e[s].l = 1 * new Date;
- r = a.createElement(t);
- n = a.getElementsByTagName(t)[0];
- r.async = 1;
- r.src = i;
- n.parentNode.insertBefore(r, n)
- }(window, document, "script", "https://www.google-analytics.com/analytics.js", "ga"), ga("create", "UA-36494583-11", "auto"), ga("send", "pageview"));
- var Zr = 0,
- Qr = 0;
- if (window.localStorage) var $r = 1 * window.localStorage.getItem("lastAdShowT") || 0,
- en = +new Date - $r,
- Qr = 0 < en ? $r : 0,
- Zr = 1 * window.localStorage.getItem("gamesSinceAd");
- var an = 0,
- tn = +new Date,
- sn = !1,
- rn = function() {
- return on() ? Pi ? (console.log("videoAd: test mode, always show video ad!"), !0) : Jr ? (console.log("videoAd: no show: ad blocker on!"), !1) : 120 < (+new Date - Qr) / 1e3 && 0 < Zr ? (console.log("videoAd: show: time limit passed!"), !0) : 2 <= Zr ? (console.log("videoAd: show: 3+ games passed!"), !0) : !1 : (console.log("videoAd: no show: ads disabled"), !1)
- },
- nn = !1,
- on = function() {
- var e = !ki && !t;
- return nn ? e && "undefined" != typeof adplayer : e
- },
- ln = function() {
- nn && mn("//api.adinplay.com/player/v2/MOP/mope.io/player.min.js", function() {
- "undefined" != typeof aipPlayer ? (console.log("Loading video preroll..."), adplayer = new aipPlayer({
- AD_WIDTH: 960,
- AD_HEIGHT: 540,
- AD_FULLSCREEN: !1,
- PREROLL_ELEM: document.getElementById("preroll"),
- AIP_COMPLETE: function() {
- console.log("Video ad finished.");
- gn(!0)
- }
- })) : (console.log("Video ad (blocked) -finished."), gn(!1))
- })
- },
- hn = !1,
- cn = !1,
- dn = new pi(10, "white");
- dn.setText("Connecting...");
- dn.renderScale = 1;
- var pn = function() {
- is && (is.volume = .2);
- sn = !0;
- document.getElementById("startMenuWrapper").style.display = "none";
- hn = !0;
- cn = !1;
- nn ? adplayer.startPreRoll() : (document.getElementById("pvVidContainer").style.display = "block", wn())
- },
- gn = function(e) {
- sn || console.log("ad isn't playing!");
- hn = cn = sn = !1;
- nn || (document.getElementById("pvVidContainer").style.display = "none", document.getElementById("my-content-2").style.display = "none");
- if (e && (Zr = 0, Qr = +new Date, window.localStorage)) try {
- window.localStorage.setItem("lastAdShowT", Qr), window.localStorage.setItem("gamesSinceAd", Zr)
- } catch (e) {}
- is && (is.volume = .7);
- var a = ts("audio/click.mp3");
- if (a) try {
- a.play()
- } catch (e) {}
- console.log("Video done (success: " + e + "), joining game!");
- dl(!1)
- },
- mn = function(e, a) {
- var t = document.head || document.getElementsByTagName("head")[0],
- i = document.createElement("script"),
- s = !0;
- i.async = "async";
- i.type = "text/javascript";
- i.charset = "UTF-8";
- i.src = e;
- i.onload = i.onreadystatechange = function() {
- !s || i.readyState && !/loaded|complete/.test(i.readyState) || (s = !1, a(), i.onload = i.onreadystatechange = null)
- };
- t.appendChild(i)
- };
- ki || ln();
- var fn = !1,
- un = null,
- bn = "player-2",
- yn = !0,
- wn = function(e) {
- fn = !1;
- e = document.getElementById("pvVidContainer");
- un = setTimeout(function() {
- console.log("Error: ad failed to start playing in time!");
- gn(!0)
- }, 1e4);
- try {
- script = document.createElement("script"), script.src = "http://cdn.playwire.com/bolt/js/zeus/embed.js", script.type = "text/javascript", script.id = "script", script.setAttribute("charset", "utf-8"), script.setAttribute("data-config", "http://config.playwire.com/1018393/v2/pre_content.json"), script.setAttribute("data-width", "100%"), script.setAttribute("data-height", "100%"), script.setAttribute("data-id", bn), script.setAttribute("data-onready", "onBoltLoaded"), script.setAttribute("data-post-ad-container", "my-content-2"), script.setAttribute("data-theme", "http://cdn.playwire.com/bolt/js/zeus/themes/orion/main.js"), e.appendChild(script), console.log("loading player...")
- } catch (e) {
- console.log("Error: " + e)
- }
- };
- window.onBoltLoaded = function(e) {
- console.log("onBoltLoaded: playerName '" + e + "'");
- clearTimeout(un);
- Bolt.on(e, "showHiddenContainer", function() {
- console.log("BOLT showHiddenContainer fired");
- gn(fn)
- });
- Bolt.on(e, Bolt.BOLT_AD_STARTED, function() {
- console.log("AD STARTED: SUCCESS");
- fn = cn = !0
- });
- Bolt.on(e, Bolt.BOLT_AD_ERROR, function() {
- console.log("AD ERROR EVENT FIRED");
- gn(fn)
- })
- };
- var kn;
- function Pn(e) {
- if (window.WebViewJavascriptBridge) return e(WebViewJavascriptBridge);
- if (window.WVJBCallbacks) return window.WVJBCallbacks.push(e);
- window.WVJBCallbacks = [e];
- var a = document.createElement("iframe");
- a.style.display = "none";
- a.src = "wvjbscheme://__BRIDGE_LOADED__";
- document.documentElement.appendChild(a);
- setTimeout(function() {
- document.documentElement.removeChild(a)
- }, 0)
- }
- yi && Pn(function(e) {
- kn = e
- });
- var An = function() {
- kn && yi && kn.callHandler("adShowCallBack", {
- foo: "bar"
- }, function(e) {
- console.log("JS got response " + e)
- })
- },
- Tn = function() {
- console.log("Showing ad android...");
- window.location = "myscheme://showAdmob"
- };
- In.prototype = {
- id: 0,
- oType: E,
- spawnTime: 0,
- rPer: 0,
- updateTime: 0,
- x: 0,
- y: 0,
- ox: 0,
- oy: 0,
- nx: 0,
- ny: 0,
- rad: 0,
- oRad: 0,
- nRad: 0,
- angle: 0,
- oAngle: 0,
- angleDelta: 0,
- moveUpdF: 0,
- z: 0,
- name: "",
- dead: !1,
- type: 0,
- curBiome: 0,
- isRectangle: !1,
- rectW: 0,
- rectH: 0,
- specType: 0,
- toString: function() {
- return "[GObj t=" + this.oType + " id=" + this.id + "]"
- }
- };
- In.prototype.flag_hurt = !1;
- In.prototype.hpPer = In.prototype.hpPer_n = In.prototype.hpBarA = 0;
- In.prototype.hpBarTimeoutT = 0;
- In.prototype.alwaysPlainOutline = !1;
- In.prototype.doesDrawEffectScale = !1;
- In.prototype.drawEffectScale_Slow = !1;
- In.prototype.customDraw = function(e) {
- switch (this.oType) {
- case u:
- switch (this.curBiome) {
- case Li:
- e ? ci(0, 0, this.rad, this.getOutlineColor()) : ci(0, 0, this.rad - 1.5, Ui);
- break;
- case Xi:
- e ? ci(0, 0, this.rad, "white") : ci(0, 0, this.rad - 1.5, vi);
- break;
- default:
- e ? ci(0, 0, this.rad, this.getOutlineColor()) : ci("", Di)
- }
- break;
- case G:
- Zi.save();
- var a;
- a = (Yi - this.spawnTime) / 1e3;
- var t;
- a = 1.5 * Math.sin(2 * Math.PI / 2 * a);
- t = this.curBiome == Li ? Fi : Oi;
- Zi.fillStyle = t;
- var i = .8 * this.rad;
- this.drawOutlinedCircle("", t);
- Zi.globalAlpha *= .98;
- var s = .5 * -i + 10 * this.rPer;
- e = Math.max(0, .65 * i + a) + 2;
- ci(.5 * -i, s, e, t);
- s = .5 * -i - 10 * this.rPer;
- e = Math.max(0, .73 * i - a);
- ci(.5 * i, s, e, t);
- e = Math.max(0, .78 * i + a);
- ci(.6 * i, .4 * i, e, t);
- s = .5 * i + 10 * this.rPer;
- e = Math.max(0, .6 * i + this.rPer - a);
- ci(.5 * -i, s, e, t);
- Zi.restore();
- break;
- case x:
- this.drawOutlinedCircle("", "#1AAE31");
- Zi.save();
- a = (Yi - this.spawnTime) / 1e3;
- a = 1.5 * Math.sin(2 * Math.PI / 2 * a);
- Zi.fillStyle = Ii;
- s = .75 * this.rad;
- Zi.globalAlpha *= .8;
- Zi.beginPath();
- Zi.arc(.5 * -s, .5 * -s + 10 * this.rPer, Math.max(0, .65 * s + a), 0, 2 * Math.PI);
- Zi.fill();
- Zi.beginPath();
- Zi.arc(.5 * s, .5 * -s - 10 * this.rPer, Math.max(0, .73 * s - a), 0, 2 * Math.PI);
- Zi.fill();
- Zi.beginPath();
- Zi.arc(.6 * s, .4 * s, Math.max(0, .78 * s + a), 0, 2 * Math.PI);
- Zi.fill();
- Zi.beginPath();
- Zi.arc(.5 * -s, .5 * s, Math.max(0, .6 * s + this.rPer - a), 0, 2 * Math.PI);
- Zi.fill();
- Zi.restore();
- break;
- case H:
- Zi.save();
- a = (Yi - this.spawnTime) / 1e3;
- a = 1.5 * Math.sin(2 * Math.PI / 2 * a);
- i = .8 * this.rad;
- t = Fi;
- this.drawOutlinedCircle("", t);
- Zi.globalAlpha *= .98;
- s = .5 * -i + 10 * this.rPer;
- e = Math.max(0, .65 * i + a) + 2;
- ci(.5 * -i, s, e, t);
- s = .5 * -i - 10 * this.rPer;
- e = Math.max(0, .73 * i - a);
- ci(.5 * i, s, e, t);
- e = Math.max(0, .78 * i + a);
- ci(.6 * i, .4 * i, e, t);
- s = .5 * i + 10 * this.rPer;
- e = Math.max(0, .6 * i + this.rPer - a);
- ci(.5 * -i, s, e, t);
- Zi.restore();
- break;
- case b:
- Zi.save();
- a = this.curBiome == Xi ? "#7790d8" : Si;
- this.drawOutlinedCircle("", a);
- qs || Zi.rotate(2 * this.rPer * Math.PI);
- a = (Yi - this.spawnTime) / 1e3;
- a = 4 * Math.sin(2 * Math.PI / 7 * a);
- Zi.fillStyle = this.curBiome == Xi ? "#7790d8" : Si;
- Zi.beginPath();
- Zi.arc(0, 0, Math.max(0, this.rad - s + a), 0, 2 * Math.PI);
- Zi.fill();
- qs || (Zi.beginPath(), Zi.arc(.3 * this.rad, .35 * -this.rad + 15 * this.rPer, Math.max(0, .35 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.5 * this.rad, .5 * this.rad + 15 * this.rPer, Math.max(0, .4 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.55 * -this.rad * .707, .55 * +this.rad * .707 + 15 * this.rPer, Math.max(0, .5 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.75 * -this.rad, .35 * -this.rad + 15 * this.rPer, Math.max(0, .3 * this.rad + a), 0, 2 * Math.PI), Zi.fill());
- Zi.restore();
- break;
- case E:
- s = Bi;
- this.curBiome == Xi && (s = "#ac443c");
- this.drawOutlinedCircle("", s);
- break;
- case z:
- if (a = Ns("img/banana" + (this.isEdibleOutlined() ? "_e" : "") + ".png")) s = this.rad, Zi.rotate(this.rPer * Math.PI * 2), Zi.drawImage(a, -s, -s, 2 * s, 2 * s);
- break;
- case L:
- if (a = Ns("img/rasp" + (this.isEdibleOutlined() ? "_e" : "") + ".png")) s = this.rad, Zi.rotate(this.rPer * Math.PI * 2), Zi.drawImage(a, -s, -s, 2 * s, 2 * s);
- break;
- case X:
- if (a = Ns("img/pear" + (this.isEdibleOutlined() ? "_e" : "") + ".png")) s = this.rad, Zi.rotate(this.rPer * Math.PI * 2), Zi.drawImage(a, -s, -s, 2 * s, 2 * s);
- break;
- case K:
- if (a = Ns("img/seaweed" + (this.isEdibleOutlined() ? "_e" : "") + ".png")) s = this.rad, Zi.rotate(this.rPer * Math.PI * 2), Zi.drawImage(a, -s, -s, 2 * s, 2 * s);
- break;
- case J:
- if (a = Ns("img/starfish" + (this.isEdibleOutlined() ? "_e" : "") + ".png")) s = this.rad, Zi.rotate(this.rPer * Math.PI * 2), Zi.drawImage(a, -s, -s, 2 * s, 2 * s);
- break;
- case q:
- if (a = Ns("img/kelp" + (this.isEdibleOutlined() ? "_e" : "") + ".png")) s = this.rad, Zi.rotate(this.rPer * Math.PI * 2), Zi.drawImage(a, -s, -s, 2 * s, 2 * s);
- break;
- case Z:
- if (a = Ns("img/clam" + (this.isEdibleOutlined() ? "_e" : "") + ".png")) s = this.rad, Zi.rotate(this.rPer * Math.PI * 2), Zi.drawImage(a, -s, -s, 2 * s, 2 * s);
- break;
- case Q:
- if (a = Ns("img/conch" + (this.isEdibleOutlined() ? "_e" : "") + ".png")) s = 1 * this.rad, Zi.save(), Zi.rotate(this.rPer * Math.PI * 2), Zi.drawImage(a, -s, -s, 2 * s, 2 * s), Zi.restore();
- break;
- case j:
- if (a = Ns("img/coconut" + (this.isEdibleOutlined() ? "_e" : "") + ".png")) s = this.rad, Zi.rotate(this.rPer * Math.PI * 2), Zi.drawImage(a, -s, -s, 2 * s, 2 * s);
- break;
- case ye:
- case be:
- break;
- case ke:
- if (a = Ns("img/santa/sleig.png")) s = this.rad, Zi.save(), Zi.rotate(this.angle), Zi.drawImage(a, -s, -s, 2 * s, 2 * s), Zi.restore();
- break;
- case Ae:
- if (a = Ns("img/ostrichEgg" + (this.isEdibleOutlined() ? "_e" : "") + ".png")) s = this.rad, Zi.save(), Zi.rotate(this.rPer * Math.PI * 2), Zi.drawImage(a, -s, -s, 2 * s, 2 * s), Zi.restore();
- break;
- case we:
- s = "";
- 1 == this.specType && (s = "golden");
- if (a = Ns("img/" + s + "egg" + (this.isEdibleOutlined() ? "_e" : "") + ".png")) s = this.rad, Zi.save(), Zi.rotate(this.rPer * Math.PI * 2), Zi.drawImage(a, -s, -s, 2 * s, 2 * s), Zi.restore();
- break;
- case Pe:
- if (a = Ns("img/quill.png")) s = this.rad, Zi.rotate(this.angle), Zi.drawImage(a, -s, -s, 2 * s, 2 * s);
- break;
- case W:
- this.drawOutlinedCircle("", Ri);
- Zi.rotate(this.rPer * Math.PI * 2);
- ci(.25 * this.rad, .4 * this.rad, (.3 + .15 * this.rPer) * this.rad, "#905113");
- break;
- case te:
- switch (this.curBiome) {
- case Li:
- s = "_ocean";
- break;
- case Xi:
- s = "_arctic";
- break;
- default:
- s = ""
- }
- if (a = Ns("img/healingStone" + s + ".png")) s = this.rad, Zi.save(), Zi.rotate(this.rPer * Math.PI * 2), Zi.drawImage(a, -s, -s, 2 * s, 2 * s), Zi.restore();
- break;
- case ee:
- ci(0, 0, Math.max(0, 1 * this.rad), "#815427");
- ci(0, 0, Math.max(0, .6 * this.rad), "#6e4b29");
- ci(0, 0, Math.max(0, .5 * this.rad), "#543d28");
- ci(0, 0, Math.max(0, .45 * this.rad), "#3f3124");
- ci(0, 0, Math.max(0, .33 * this.rad), "#241e19");
- ci(0, 0, Math.max(0, .25 * this.rad), "#120f0d");
- ci(0, 0, Math.max(0, .2 * this.rad), _i);
- break;
- case ae:
- Zi.save();
- a = (Yi - this.spawnTime) / 1e3;
- a = 2.5 * Math.sin(2 * Math.PI / 4 * a);
- if (e) Zi.fillStyle = _i, Zi.beginPath(), Zi.arc(0, 0, this.rad, 0, 2 * Math.PI), Zi.fill();
- else {
- Zi.fillStyle = _i;
- Zi.beginPath();
- Zi.arc(0, 0, Math.max(0, this.rad - s + a), 0, 2 * Math.PI);
- Zi.fill();
- qs || (Zi.beginPath(), Zi.arc(.45 * this.rad, .45 * -this.rad + 15 * this.rPer, Math.max(0, .5 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.5 * this.rad, .5 * this.rad + 15 * this.rPer, Math.max(0, .4 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.55 * -this.rad * .707, .55 * +this.rad * .707 + 15 * this.rPer, Math.max(0, .5 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.75 * -this.rad, .35 * -this.rad + 15 * this.rPer, Math.max(0, .3 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(this.rad + 10 * this.rPer, 50 * this.rPer, 8, 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(this.rad - 20 * this.rPer, 50 * this.rPer, 10, 0, 2 * Math.PI), Zi.fill());
- Zi.save();
- Zi.globalAlpha = 1 - this.underwaterA;
- a = (Yi - this.spawnTime) / 1e3;
- s = 8 * Math.sin(2 * Math.PI / 1.5 * a);
- this.flag_underWater && (Zi.globalAlpha *= .5, this.animalType == _e && (Zi.globalAlpha = .3));
- Zi.fillStyle = "yellow";
- a = .15 * this.rad;
- Zi.beginPath();
- for (Vn = e = 1; Vn <= e; Vn++) Zi.save(), Zi.globalAlpha = .2, Zi.rotate(this.rPer * Math.PI * 2 * Vn), Zi.beginPath(), Zi.arc(-.35 * this.rad, -.33 * this.rad, Math.max(0, a + s), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.35 * this.rad, -.32 * this.rad, Math.max(0, a - s), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.35 * this.rad, .36 * this.rad, Math.max(0, a + s), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(-.35 * this.rad, .35 * this.rad, Math.max(0, a - s), 0, 2 * Math.PI), Zi.fill(), Zi.restore();
- Zi.restore()
- }
- Zi.restore();
- break;
- case me:
- Zi.save();
- a = (Yi - this.spawnTime) / 1e3;
- a = 2.5 * Math.sin(2 * Math.PI / 4 * a);
- if (e) Zi.fillStyle = "#5e5348", Zi.beginPath(), Zi.arc(0, 0, this.rad, 0, 2 * Math.PI), Zi.fill();
- else {
- Zi.fillStyle = "#706962";
- Zi.beginPath();
- Zi.arc(0, 0, Math.max(0, this.rad - s + a), 0, 2 * Math.PI);
- Zi.fill();
- qs || (Zi.beginPath(), Zi.arc(.45 * this.rad, .45 * -this.rad + 15 * this.rPer, Math.max(0, .5 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.5 * this.rad, .5 * this.rad + 15 * this.rPer, Math.max(0, .4 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.55 * -this.rad * .707, .55 * +this.rad * .707 + 15 * this.rPer, Math.max(0, .5 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.75 * -this.rad, .35 * -this.rad + 15 * this.rPer, Math.max(0, .3 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(this.rad + 10 * this.rPer, 50 * this.rPer, 8, 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(this.rad - 20 * this.rPer, 50 * this.rPer, 10, 0, 2 * Math.PI), Zi.fill());
- Zi.save();
- Zi.globalAlpha = 1 - this.underwaterA;
- a = (Yi - this.spawnTime) / 1e3;
- s = 8 * Math.sin(2 * Math.PI / 1.5 * a);
- this.flag_underWater && (Zi.globalAlpha *= .5, this.animalType == _e && (Zi.globalAlpha = .3));
- Zi.fillStyle = "yellow";
- a = .15 * this.rad;
- Zi.beginPath();
- for (Vn = e = 1; Vn <= e; Vn++) Zi.save(), Zi.globalAlpha = .2, Zi.rotate(this.rPer * Math.PI * 2 * Vn), Zi.beginPath(), Zi.arc(-.35 * this.rad, -.33 * this.rad, Math.max(0, a + s), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.35 * this.rad, -.32 * this.rad, Math.max(0, a - s), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.35 * this.rad, .36 * this.rad, Math.max(0, a + s), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(-.35 * this.rad, .35 * this.rad, Math.max(0, a - s), 0, 2 * Math.PI), Zi.fill(), Zi.restore();
- Zi.restore()
- }
- Zi.restore();
- break;
- case ue:
- if (a = Ns("img/cloudberry" + (this.isEdibleOutlined() ? "_e" : "") + ".png")) Zi.save(), s = this.rad, Zi.rotate(this.rPer * Math.PI * 2), Zi.drawImage(a, -s, -s, 2 * s, 2 * s), Zi.restore();
- break;
- case se:
- if (a = Ns("img/arcticNut" + (this.isEdibleOutlined() ? "_e" : "") + ".png")) Zi.save(), s = this.rad, Zi.rotate(this.rPer * Math.PI * 2), Zi.drawImage(a, -s, -s, 2 * s, 2 * s), Zi.restore();
- break;
- case re:
- if (a = Ns("img/carrot" + (this.isEdibleOutlined() ? "_e" : "") + ".png")) s = this.rad, Zi.save(), Zi.rotate(this.rPer * Math.PI * 2), Zi.drawImage(a, -s, -s, 2 * s, 2 * s), Zi.restore();
- break;
- case ne:
- if (a = Ns("img/watermelon" + (this.isEdibleOutlined() ? "_e" : "") + ".png")) s = this.rad, Zi.save(), Zi.rotate(this.rPer * Math.PI * 2), Zi.drawImage(a, -s, -s, 2 * s, 2 * s), Zi.restore();
- break;
- case pe:
- Zi.save();
- ci(0, 0, this.rad, this.isEdibleOutlined() ? Gi : zi(this.curBiome));
- ci(0, 0, Math.max(0, this.rad - 2), "#74e61e");
- Zi.restore();
- break;
- case oe:
- if (a = Ns("img/watermelonSlice" + (this.isEdibleOutlined() ? "_e" : "") + ".png")) s = this.rad, Zi.save(), Zi.rotate(this.rPer * Math.PI * 2), Zi.drawImage(a, -s, -s, 2 * s, 2 * s), Zi.restore();
- break;
- case le:
- case he:
- case ce:
- if (a = Ns("img/meat" + (this.isEdibleOutlined() ? "_e" : "") + ".png")) s = this.rad, Zi.save(), Zi.rotate(this.rPer * Math.PI * 2), Zi.drawImage(a, -s, -s, 2 * s, 2 * s), Zi.restore();
- break;
- case B:
- case R:
- s = 2;
- a = this.oType == R ? 15 : 9;
- Zi.fillStyle = this.getOutlineColor();
- Zi.beginPath();
- Zi.rect(-a / 2 - s, -s, a + 2 * s, .8 * this.rad + 2 * s);
- Zi.fill();
- Zi.fillStyle = "#FFCA49";
- Zi.beginPath();
- Zi.rect(-a / 2, 0 + s / 2, a, .8 * this.rad - s / 2);
- Zi.fill();
- qs || (Zi.beginPath(), Zi.arc(0, 0, Math.max(0, this.rad), Math.PI, 2 * Math.PI), Zi.fillStyle = this.getOutlineColor(), Zi.fill());
- Zi.beginPath();
- Zi.arc(0, 0, Math.max(0, this.rad - s), Math.PI, 2 * Math.PI);
- Zi.fillStyle = this.oType == R ? "#B8413B" : "#CFAD59";
- Zi.fill();
- break;
- case F:
- s = 2;
- Zi.save();
- a = (Yi - this.spawnTime) / 1e3;
- a = 1.5 * Math.sin(2 * Math.PI / 2 * a);
- Zi.fillStyle = "#45D157";
- Zi.globalAlpha *= .93;
- Zi.beginPath();
- Zi.arc(.5 * -this.rad, .5 * -this.rad + 10 * this.rPer, Math.max(0, .55 * this.rad + a), 0, 2 * Math.PI);
- Zi.fill();
- Zi.beginPath();
- Zi.arc(.5 * this.rad, .5 * -this.rad - 10 * this.rPer, Math.max(0, .43 * this.rad - a), 0, 2 * Math.PI);
- Zi.fill();
- Zi.beginPath();
- Zi.arc(.6 * this.rad, .4 * this.rad, Math.max(0, .48 * this.rad + a), 0, 2 * Math.PI);
- Zi.fill();
- Zi.beginPath();
- Zi.arc(.5 * -this.rad, .5 * this.rad, Math.max(0, .4 * this.rad + this.rPer - a), 0, 2 * Math.PI);
- Zi.fill();
- Zi.restore();
- a = 20;
- Zi.fillStyle = this.getOutlineColor();
- Zi.beginPath();
- Zi.rect(-a / 2 - s, -s, a + 2 * s, .8 * this.rad + 2 * s);
- Zi.fill();
- Zi.fillStyle = "#FFCA49";
- Zi.beginPath();
- Zi.rect(-a / 2, 0 + s / 2, a, .8 * this.rad - s / 2);
- Zi.fill();
- Zi.beginPath();
- Zi.arc(0, 0, Math.max(0, .8 * this.rad), Math.PI, 2 * Math.PI);
- Zi.fillStyle = this.getOutlineColor();
- Zi.fill();
- Zi.beginPath();
- Zi.arc(0, 0, Math.max(0, .8 * this.rad - s), Math.PI, 2 * Math.PI);
- Zi.fillStyle = "#B8413B";
- Zi.fill();
- break;
- case O:
- if (a = Ns("img/lillypad" + (this.isEdibleOutlined() ? "_e" : "") + ".png")) s = this.rad, Zi.rotate(this.rPer * Math.PI * 2), Zi.drawImage(a, -s, -s, 2 * s, 2 * s);
- break;
- case y:
- this.drawOutlinedCircle("", "#9F8641");
- ci(0 - this.rPer, 0 - this.rPer, Math.max(0, this.rad - 7), "#7E6A35");
- ci(0 + this.rPer, 1, Math.max(0, this.rad - 12), "#5C4E28");
- break;
- case M:
- switch (this.type) {
- case Ut:
- case St:
- break;
- case Za:
- Zi.save();
- e = Zi.globalAlpha;
- Zi.globalAlpha = .4 * e;
- ci(0, 0, this.rad, "#7EBCC0");
- Zi.globalAlpha = 1 * e;
- Zi.strokeStyle = "white";
- Zi.beginPath();
- a = 10;
- Zi.translate(-5, -.7 * this.rad);
- Zi.moveTo(0, -a);
- Zi.lineTo(0, a);
- Zi.moveTo(-a, -a);
- Zi.lineTo(a, a);
- Zi.moveTo(a, -a);
- Zi.lineTo(-a, a);
- Zi.moveTo(-a, 0);
- Zi.lineTo(a, 0);
- Zi.lineWidth = 3;
- Zi.stroke();
- Zi.restore();
- break;
- case at:
- Zi.save();
- e = Zi.globalAlpha;
- Zi.globalAlpha = .15 * e;
- ci(0, 0, this.rad, "#755A2A");
- Zi.restore();
- break;
- case yt:
- Zi.save();
- e = Zi.globalAlpha;
- Zi.globalAlpha = 1 * e;
- if (a = Ns("img/ability_sabertoothJawAttack.png")) e = Math.min(1, (Yi - this.spawnTime) / 200), s = this.rad - 2.5, Zi.rotate(this.rPer * Math.PI * 2), Zi.drawImage(a, 0, 0, a.width * e, a.height, -s, -s, 2 * s * e, 2 * s);
- Zi.restore();
- break;
- case et:
- Zi.save();
- e = Zi.globalAlpha;
- Zi.globalAlpha = 1 * e;
- if (a = Ns("img/ability_claw.png")) e = Math.min(1, (Yi - this.spawnTime) / 200), s = this.rad - 2.5, Zi.rotate(this.rPer * Math.PI * 2), Zi.drawImage(a, 0, 0, a.width * e, a.height, -s, -s, 2 * s * e, 2 * s);
- Zi.restore();
- break;
- case bt:
- Zi.save();
- e = Zi.globalAlpha;
- Zi.globalAlpha = .1 * e;
- ci(0, 0, this.rad, "#5B7EC7");
- Zi.globalAlpha = 1 * e;
- if (a = Ns("img/ability_whaleTailHit.png")) {
- e = Math.min(1, (Yi - this.spawnTime) / 200);
- s = .85 * this.rad;
- Zi.rotate(this.angle);
- i = this.rad;
- t = 2 * s;
- var r = 2 * s * e,
- n;
- Zi.drawImage(a, 0 + -.5 * t, i + -.95 * r, t, r)
- }
- Zi.restore();
- break;
- case zt:
- e = Zi.globalAlpha;
- Zi.save();
- a = (Yi - this.spawnTime) / 1e3;
- s = 1 * Math.sin(2 * Math.PI / 1.5 * a);
- Zi.globalAlpha = .6 * Zi.globalAlpha * s;
- Zi.rotate(this.angle);
- Zi.globalAlpha = .15 * e;
- 0 == this.specType2 ? ci(0, 0, this.rad, "#96661C") : ci(0, 0, this.rad, "#e0dfde");
- Zi.restore();
- Zi.save();
- if (a = Ns("img/ability_bearSlash" + this.specType2 + ".png")) e = Math.min(1, (Yi - this.spawnTime) / 200), s = ti((Yi - this.spawnTime) / 300, 0, 1), i = -(-.5 + s) * Zt(90), Zi.rotate(this.angle + i * (0 == this.specType ? 1 : -1)), s = 1 * -this.rad, i = this.rad, t = 2 * s, r = 2 * s * e, Zi.drawImage(a, 0 + -.5 * t, i + -.8 * r + s, t, r);
- Zi.restore();
- break;
- case _t:
- a = (Yi - this.spawnTime) / 1e3;
- e = di(a, 1, .1, 1);
- Zi.save();
- Zi.globalAlpha = .1 - e;
- Zi.restore();
- Zi.save();
- a = (Yi - this.spawnTime) / 1e3;
- a = 1.5 * Math.sin(2 * Math.PI / 2 * a);
- Zi.fillStyle = "white";
- i = .7 * this.rad;
- Zi.globalAlpha = .3 - e;
- s = .5 * -i + 10 * this.rPer;
- e = Math.max(0, .65 * i + a) + 2;
- ci(.6 * -i, s, e, "#654321");
- s = .5 * -i - 10 * this.rPer;
- e = Math.max(0, .73 * i - a);
- ci(.5 * i, s, e, "#654321");
- e = Math.max(0, .78 * i + a);
- ci(.6 * i, .5 * i, e, "#654321");
- s = .5 * i + 10 * this.rPer;
- e = Math.max(0, .6 * i + this.rPer - a);
- ci(.5 * -i, s, e, "#654321");
- Zi.restore();
- break;
- case Nt:
- break;
- case Rt:
- Zi.globalAlpha = .2;
- ci(0, 0, this.rad, "limegreen");
- break;
- case Gt:
- Zi.globalAlpha = .2;
- break;
- case Ht:
- Zi.globalAlpha = .5;
- ci(0, 0, this.rad, "#ef6e24");
- break;
- case Wt:
- this.doesDrawEffectScale = this.drawEffectScale_Slow = !0;
- Zi.globalAlpha = .2;
- ci(0, 0, .85 * this.rad, "white");
- if (a = Ns("img/target" + (3 == this.specType ? "_e" : "") + ".png")) s = this.rad, Zi.save(), Zi.globalAlpha = .5, Zi.drawImage(a, -s, -s, 2 * s, 2 * s), Zi.restore();
- break;
- case Ft:
- Zi.globalAlpha = .5;
- break;
- case Et:
- Zi.save();
- e = Zi.globalAlpha;
- Zi.globalAlpha = .05 * e;
- ci(0, 0, this.rad, "#B32E10");
- Zi.globalAlpha = 1 * e;
- if (a = Ns("img/ability_crabSmash" + this.specType + ".png")) s = ti((Yi - this.spawnTime) / 200, 0, 1), e = 1 == this.specType ? -1 : 1, Zt(-90 * e), i = e * (.3 + s) + Zt(-30 * e), s = .6 * this.rad, Zi.rotate(this.angle + i), i = this.rad, t = 1.4 * s, r = 2 * s, e = .75, n = .95, 1 == this.specType && (e = .25, n = .95), Zi.drawImage(a, 0 + t * -e, i + r * -n, t, r);
- Zi.restore();
- break;
- case ut:
- Zi.save();
- e = Zi.globalAlpha;
- Zi.globalAlpha = .05 * e;
- ci(0, 0, this.rad, "#E4E7C8");
- Zi.globalAlpha = 1 * e;
- if (a = Ns("img/ability_elephantTrunkSmack.png")) s = ti((Yi - this.spawnTime) / 300, 0, 1), i = -(-.5 + s) * Zt(90), s = .6 * this.rad, Zi.rotate(this.angle + i), i = this.rad, t = 1.4 * s, r = 2 * s, Zi.drawImage(a, 0 + -.75 * t, i + -.95 * r, t, r);
- Zi.restore();
- break;
- case nt:
- Zi.save();
- e = Zi.globalAlpha;
- Zi.globalAlpha = .1 * e;
- ci(0, 0, this.rad, "#755A2A");
- Zi.globalAlpha = 1 * e;
- if (a = Ns("img/ability_backkick.png")) e = Math.min(1, (Yi - this.spawnTime) / 200), s = .6 * this.rad, Zi.rotate(this.angle), i = this.rad, t = 2 * s, r = 2 * s * e, Zi.drawImage(a, 0 + -.5 * t, i + -.95 * r, t, r);
- Zi.restore();
- break;
- case ot:
- Zi.save();
- e = Zi.globalAlpha;
- Zi.globalAlpha = .25 * e;
- ci(0, 0, this.rad, "#44d31f");
- Zi.globalAlpha = 1 * e;
- if (a = Ns("img/ability_crocBite.png")) e = Math.min(1, (Yi - this.spawnTime) / 200), s = .6 * this.rad, Zi.rotate(this.angle), i = this.rad, t = 2.5 * s, r = 2.5 * s * e, Zi.drawImage(a, 0 + -.5 * t, i + -.95 * r, t, r), Zi.rotate(Math.PI), i = .5 * this.rad, t = 2.5 * s, r = 2.5 * s * e, Zi.drawImage(a, 0 + -.5 * t, i + -.95 * r, t, r);
- Zi.restore();
- break;
- case Pt:
- Zi.save();
- e = Zi.globalAlpha;
- Zi.globalAlpha = .25 * e;
- ci(0, 0, this.rad, "#44d31f");
- Zi.globalAlpha = 1 * e;
- if (a = Ns("img/ability_boaBite.png")) e = Math.min(1, (Yi - this.spawnTime) / 200), s = .6 * this.rad, Zi.rotate(this.angle), i = this.rad, t = 2.5 * s, r = 2.5 * s * e, Zi.drawImage(a, 0 + -.5 * t, i + -.95 * r, t, r), Zi.rotate(Math.PI), i = .5 * this.rad, t = 2.5 * s, r = 2.5 * s * e, Zi.drawImage(a, 0 + -.5 * t, i + -.95 * r, t, r);
- Zi.restore();
- break;
- case vt:
- Zi.save();
- e = Zi.globalAlpha;
- Zi.globalAlpha = .1 * e;
- ci(0, 0, this.rad, "#755A2A");
- Zi.globalAlpha = 1 * e;
- if (a = Ns("img/ability_tigerJump.png")) e = Math.min(1, (Yi - this.spawnTime) / 100), s = 1.1 * this.rad, Zi.rotate(this.angle), i = this.rad, t = 2 * s, r = 2 * s * e, Zi.drawImage(a, 0 + -.5 * t, i + -1 * r, t, r);
- Zi.restore();
- break;
- case Dt:
- Zi.save();
- e = Zi.globalAlpha;
- Zi.globalAlpha = .05 * e;
- ci(0, 0, this.rad, "#44d31f");
- Zi.globalAlpha = 1 * e;
- a = Ns("img/ability_pounce2.png");
- n = Ns("img/ability_pounce1.png");
- a && n && (e = Math.min(1, (Yi - this.spawnTime) / 200), s = .4 * this.rad, Zi.rotate(this.angle), i = this.rad, t = 2.5 * s, r = 2.5 * s * e, Zi.drawImage(a, 0 + -.5 * t, i + -.95 * r, t, r), s = .6 * this.rad, i = .5 * this.rad, t = 2.5 * s, r = 2.5 * s * e, Zi.drawImage(n, 0 + -.5 * t, i + -.95 * r, t, r));
- Zi.restore();
- break;
- case It:
- Zi.save();
- e = Zi.globalAlpha;
- Zi.globalAlpha = .05 * e;
- ci(0, 0, this.rad, "#E4E7C8");
- Zi.globalAlpha = 1 * e;
- if (a = Ns("img/ability_tigerSlash" + this.specType + ".png")) s = ti((Yi - this.spawnTime) / 300, 0, 1), i = (1 == this.specType ? 1 : -1) * (-.6 + s) * Zt(90), s = 1.2 * this.rad, Zi.rotate(this.angle + i), i = this.rad, t = 1.4 * s, r = 2 * s, Zi.drawImage(a, 0 + -.2 * t, i + -.5 * r, t, r);
- Zi.restore();
- break;
- case xt:
- Zi.save();
- e = Zi.globalAlpha;
- Zi.globalAlpha = .1 * e;
- ci(0, 0, this.rad, "#755A2A");
- Zi.globalAlpha = 1 * e;
- if (a = Ns("img/ability_zebraKick.png")) e = Math.min(1, (Yi - this.spawnTime) / 200), s = .6 * this.rad, Zi.rotate(this.angle), i = this.rad, t = 2 * s, r = 3 * s * e, Zi.drawImage(a, 0 + -.5 * t, i + -1 * r, t, r);
- Zi.restore();
- break;
- case Mt:
- e = Zi.globalAlpha;
- Zi.save();
- a = (Yi - this.spawnTime) / 1e3;
- s = 1 * Math.sin(2 * Math.PI / 1.5 * a);
- a = Zi.globalAlpha;
- Zi.globalAlpha = .6 * Zi.globalAlpha * s;
- Zi.rotate(this.angle);
- Zi.globalAlpha = .15 * e;
- ci(.3 * this.rad, 0, this.rad * (.9 + .12 * s), "#E4E7C8");
- ci(.3 * -this.rad, 0, this.rad * (1.05 + .09 * s), "#E4E7C8");
- Zi.globalAlpha = a;
- Zi.restore();
- Zi.save();
- if (a = Ns("img/ability_giraffeStompLeg.png")) e = Math.min(1, (Yi - this.spawnTime) / 200), s = this.angle, Zi.rotate(s), s = 1 * -this.rad, i = this.rad, t = 2 * s, r = 2 * s * e, Zi.drawImage(a, 0 + -.5 * t, i + -.8 * r + s, t, r);
- Zi.restore();
- break;
- case Ct:
- Zi.save();
- e = Zi.globalAlpha;
- Zi.globalAlpha = .15 * e;
- Zi.globalAlpha = 1 * e;
- if (a = Ns("img/ability_sharkBite.png")) e = Math.min(1, (Yi - this.spawnTime) / 200), s = .6 * this.rad, Zi.rotate(this.angle), i = this.rad, t = 2.5 * s, r = 2.5 * s * e, Zi.drawImage(a, 0 + -.5 * t, i + -.95 * r, t, r), Zi.rotate(Math.PI), i = .5 * this.rad, t = 2.5 * s, r = 2.5 * s * e, Zi.drawImage(a, 0 + -.5 * t, i + -1.35 * r, t, r);
- if (a = Ns("img/shark-head.png")) e = Math.min(1, (Yi - this.spawnTime) / 200), Zi.globalAlpha = .9, s = 1.75 * -this.rad, Zi.rotate(Zt(180)), i = this.rad, t = 2 * s, r = 2 * s * e, Zi.drawImage(a, 0 + -.5 * t, i + -.5 * r + s, t, r);
- Zi.restore();
- break;
- case Ot:
- Zi.save();
- e = Zi.globalAlpha;
- Zi.globalAlpha = .5 * e;
- s = this.rad;
- a = (Yi - this.spawnTime) / 1e3;
- t = 2.2;
- i = 6.5 * Math.cos(2 * Math.PI / t * a);
- a = 6.5 * Math.sin(2 * Math.PI / t * a);
- Zi.globalAlpha = .3 * e;
- ci(0, 0, s, "#2CAAC4");
- Zi.globalAlpha = .5 * e;
- ci(0 + i / 4.5 + this.rPer, 1 + a / 1.5, Math.max(0, s - 14), "#29A0BA");
- ci(0 + i / 1.5 - 2 * this.rPer, a, Math.max(0, s - 38.5 + a / 5), "#2B8CAA");
- ci(0 + i / 1.5 - 2 * this.rPer, a, Math.max(0, s - 54.5 + a / 11), "#28829E");
- Zi.restore();
- break;
- case Bt:
- if (0 == this.specType || 2 == this.specType) {
- Zi.save();
- if (a = Ns("skins/pelican/ability_pelican.png")) s = 1.5 * -this.rad, Zi.rotate(this.angle), i = this.rad, r = t = s, Zi.drawImage(a, 0 + -.5 * t, i + -.5 * r + s, t, r);
- Zi.restore()
- }
- break;
- case At:
- Zi.save();
- e = Zi.globalAlpha;
- Zi.globalAlpha = .15 * e;
- Zi.globalAlpha = 1 * e;
- if (a = Ns("img/ability_trexBite.png")) e = Math.min(1, (Yi - this.spawnTime) / 200), s = .6 * this.rad, Zi.rotate(this.angle), i = this.rad, t = 2.5 * s, r = 2.5 * s * e, Zi.drawImage(a, 0 + -.5 * t, i + -.95 * r, t, r), Zi.rotate(Math.PI), i = .5 * this.rad, t = 2.5 * s, r = 2.5 * s * e, Zi.drawImage(a, 0 + -.5 * t, i + -.95 * r, t, r);
- if (a = Ns("img/trex-head.png")) e = Math.min(1, (Yi - this.spawnTime) / 200), s = 1.5 * -this.rad, Zi.rotate(Zt(180)), i = this.rad, t = 2 * s, r = 2 * s * e, Zi.drawImage(a, 0 + -.5 * t, i + -.5 * r + s, t, r);
- Zi.restore();
- break;
- case Qa:
- Zi.save();
- e = Zi.globalAlpha;
- Zi.globalAlpha = .15 * e;
- ci(0, 0, this.rad, "#6D7471");
- Zi.restore();
- break;
- case wt:
- Zi.save();
- e = Zi.globalAlpha;
- Zi.globalAlpha = .15 * e;
- ci(0, 0, this.rad, "#6D7471");
- Zi.restore();
- break;
- case kt:
- Zi.save();
- e = Zi.globalAlpha;
- Zi.globalAlpha = .15 * e;
- ci(0, 0, this.rad, "#f2f2f2");
- Zi.restore();
- break;
- case mt:
- Zi.save();
- Zi.rotate(this.angle + Zt(180));
- e = Zi.globalAlpha;
- Zi.globalAlpha = .8 * e;
- if (a = Ns("img/wave.png")) s = this.rad, Zi.drawImage(a, -s, -s, 2 * s, 2 * s);
- Zi.restore();
- break;
- case st:
- Zi.save();
- e = Zi.globalAlpha;
- Zi.globalAlpha = .2 * e;
- ci(0, 0, this.rad, "#746B3E");
- Zi.restore();
- break;
- case ja:
- Zi.save();
- e = Zi.globalAlpha;
- Zi.globalAlpha = .5 * e;
- ci(0, 0, this.rad, "#62C5FF");
- Zi.globalAlpha = 1 * e;
- Zi.strokeStyle = "#62C5FF";
- Zi.beginPath();
- s = -.7 * this.rad;
- Zi.moveTo(s, -5);
- Zi.lineTo(s - 4, 5);
- Zi.lineTo(s + 4, 2);
- Zi.lineTo(s + 2, 15);
- Zi.lineWidth = 3;
- Zi.stroke();
- Zi.restore();
- break;
- case Xa:
- Zi.save();
- e = Zi.globalAlpha;
- Zi.globalAlpha = .5 * e;
- s = Math.max(0, this.rad - 30);
- a = (Yi - this.spawnTime) / 1e3;
- t = 2.2;
- i = 6.5 * Math.cos(2 * Math.PI / t * a);
- a = 6.5 * Math.sin(2 * Math.PI / t * a);
- Zi.globalAlpha = .4 * e;
- ci(0, 0, s, "#2CAAC4");
- Zi.globalAlpha = .7 * e;
- qs || ci(0 + i / 2 - this.rPer, 0 + a / 2 - this.rPer, Math.max(0, s - 6), "#2D93B0");
- ci(0 + i / 4.5 + this.rPer, 1 + a / 1.5, Math.max(0, s - 14), "#29A0BA");
- ci(0 + i / 1.5 - 2 * this.rPer, a, Math.max(0, s - 38.5 + a / 5), "#2B8CAA");
- ci(0 + i / 1.5 - 2 * this.rPer, a, Math.max(0, s - 54.5 + a / 11), "#28829E");
- Zi.restore();
- break;
- case La:
- Zi.save();
- e = Zi.globalAlpha;
- qs || Zi.rotate(2 * this.rPer * Math.PI);
- a = (Yi - this.spawnTime) / 1e3;
- a = 1.5 * Math.sin(2 * Math.PI / 6 * a);
- Zi.globalAlpha = .7 * e;
- s = 4;
- Zi.fillStyle = "black";
- Zi.beginPath();
- Zi.arc(0, 0, this.rad, 0, 2 * Math.PI);
- Zi.fill();
- qs || (Zi.fillStyle = "black", Zi.globalAlpha = .5 * e, Zi.beginPath(), Zi.arc(0, 0, Math.max(0, this.rad - s + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.45 * this.rad, .45 * -this.rad + 15 * this.rPer, Math.max(0, .5 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.5 * this.rad, .5 * this.rad + 15 * this.rPer, Math.max(0, .4 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.55 * -this.rad * .707, .55 * +this.rad * .707 + 15 * this.rPer, Math.max(0, .5 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.75 * -this.rad, .35 * -this.rad + 15 * this.rPer, Math.max(0, .3 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.beginPath(), Zi.arc(this.rad + 10 * this.rPer, 50 * this.rPer, 8, 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.beginPath(), Zi.arc(this.rad - 20 * this.rPer, 50 * this.rPer, 10, 0, 2 * Math.PI), Zi.fill(), Zi.beginPath());
- Zi.restore();
- break;
- case lt:
- Zi.save();
- e = Zi.globalAlpha;
- Zi.globalAlpha = .25 * e;
- ci(0, 0, this.rad, "#9F8641");
- Zi.restore();
- break;
- case ht:
- Zi.save();
- e = Zi.globalAlpha;
- Zi.globalAlpha = .25 * e;
- ci(0, 0, this.rad, "#785228");
- Zi.restore();
- break;
- default:
- Zi.save(), e = Zi.globalAlpha, Zi.globalAlpha = .15 * e, ci(0, 0, this.rad, "black"), Zi.restore()
- }
- break;
- case D:
- a = (Yi - this.spawnTime) / 1e3;
- t = 1.2;
- i = 2.5 * Math.cos(2 * Math.PI / t * a);
- a = 2.5 * Math.sin(2 * Math.PI / t * a);
- this.drawOutlinedCircle("", "#2CAAC4");
- qs || ci(0 + i / 2 - this.rPer, 0 + a / 2 - this.rPer, Math.max(0, this.rad - 6), "#2D93B0");
- ci(0 + i / 4.5 + this.rPer, 1 + a / 1.5, Math.max(0, this.rad - 14), "#29A0BA");
- ci(0 + i / 1.5 - 2 * this.rPer, a, Math.max(0, this.rad - 18.5 + a / 5), "#2B8CAA");
- ci(0 + i / 1.5 - 2 * this.rPer, a, Math.max(0, this.rad - 24.5 + a / 11), "#28829E");
- break;
- case A:
- this.drawOutlinedCircle("", "#9F8641");
- qs || ci(0 - this.rPer, 0 - this.rPer, Math.max(0, this.rad - 7), "#7E6A35");
- ci(0 + this.rPer, 1, Math.max(0, this.rad - 14), "#5C4E28");
- ci(0 - 2 * this.rPer - 3, 1, Math.max(0, this.rad - 18.5), "#40371D");
- break;
- case w:
- Zi.save();
- a = (Yi - this.spawnTime) / 1e3;
- a = 1.5 * Math.sin(2 * Math.PI / 2 * a);
- switch (this.curBiome) {
- case Li:
- s = "#786810";
- break;
- case Xi:
- s = "#CED0D0";
- break;
- default:
- case ji:
- s = "#45D157"
- }
- Zi.fillStyle = s;
- Zi.globalAlpha *= .93;
- Zi.beginPath();
- Zi.arc(.5 * -this.rad, .5 * -this.rad + 10 * this.rPer, Math.max(0, .65 * this.rad + a), 0, 2 * Math.PI);
- Zi.fill();
- Zi.beginPath();
- Zi.arc(.5 * this.rad, .5 * -this.rad - 10 * this.rPer, Math.max(0, .73 * this.rad - a), 0, 2 * Math.PI);
- Zi.fill();
- Zi.beginPath();
- Zi.arc(.6 * this.rad, .4 * this.rad, Math.max(0, .78 * this.rad + a), 0, 2 * Math.PI);
- Zi.fill();
- Zi.beginPath();
- Zi.arc(.5 * -this.rad, .5 * this.rad, Math.max(0, .6 * this.rad + this.rPer - a), 0, 2 * Math.PI);
- Zi.fill();
- Zi.restore();
- break;
- case ie:
- Zi.save();
- qs || Zi.rotate(2 * this.rPer * Math.PI);
- a = (Yi - this.spawnTime) / 1e3;
- a = 1.5 * Math.sin(2 * Math.PI / 6 * a);
- s = 4;
- Zi.fillStyle = "#604729";
- Zi.beginPath();
- Zi.arc(0, 0, this.rad, 0, 2 * Math.PI);
- Zi.fill();
- qs || (Zi.fillStyle = "#8A681B", Zi.beginPath(), Zi.arc(0, 0, Math.max(0, this.rad - s + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.45 * this.rad, .45 * -this.rad + 15 * this.rPer, Math.max(0, .5 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.5 * this.rad, .5 * this.rad + 15 * this.rPer, Math.max(0, .4 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.55 * -this.rad * .707, .55 * +this.rad * .707 + 15 * this.rPer, Math.max(0, .5 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.75 * -this.rad, .35 * -this.rad + 15 * this.rPer, Math.max(0, .3 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.beginPath(), Zi.arc(this.rad + 10 * this.rPer, 50 * this.rPer, 8, 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.beginPath(), Zi.arc(this.rad - 20 * this.rPer, 50 * this.rPer, 10, 0, 2 * Math.PI), Zi.fill(), Zi.beginPath());
- Zi.restore();
- break;
- case de:
- Zi.save();
- qs || Zi.rotate(2 * this.rPer * Math.PI);
- a = (Yi - this.spawnTime) / 1e3;
- a = 1.5 * Math.sin(2 * Math.PI / 6 * a);
- s = 4;
- Zi.fillStyle = "#605649";
- Zi.beginPath();
- Zi.arc(0, 0, this.rad, 0, 2 * Math.PI);
- Zi.fill();
- qs || (Zi.fillStyle = "#5e4f36", Zi.beginPath(), Zi.arc(0, 0, Math.max(0, this.rad - s + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.45 * this.rad, .45 * -this.rad + 15 * this.rPer, Math.max(0, .5 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.5 * this.rad, .5 * this.rad + 15 * this.rPer, Math.max(0, .4 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.55 * -this.rad * .707, .55 * +this.rad * .707 + 15 * this.rPer, Math.max(0, .5 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.75 * -this.rad, .35 * -this.rad + 15 * this.rPer, Math.max(0, .3 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.beginPath(), Zi.arc(this.rad + 10 * this.rPer, 50 * this.rPer, 8, 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.beginPath(), Zi.arc(this.rad - 20 * this.rPer, 50 * this.rPer, 10, 0, 2 * Math.PI), Zi.fill(), Zi.beginPath());
- Zi.restore();
- break;
- case k:
- Zi.save();
- qs || Zi.rotate(2 * this.rPer * Math.PI);
- a = (Yi - this.spawnTime) / 1e3;
- a = 1.5 * Math.sin(2 * Math.PI / 6 * a);
- s = 4;
- Zi.fillStyle = "#8B7833";
- Zi.beginPath();
- Zi.arc(0, 0, this.rad, 0, 2 * Math.PI);
- Zi.fill();
- qs || (Zi.fillStyle = "#98803A", Zi.beginPath(), Zi.arc(0, 0, Math.max(0, this.rad - s + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.45 * this.rad, .45 * -this.rad + 15 * this.rPer, Math.max(0, .5 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.5 * this.rad, .5 * this.rad + 15 * this.rPer, Math.max(0, .4 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.55 * -this.rad * .707, .55 * +this.rad * .707 + 15 * this.rPer, Math.max(0, .5 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.75 * -this.rad, .35 * -this.rad + 15 * this.rPer, Math.max(0, .3 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.beginPath(), Zi.arc(this.rad + 10 * this.rPer, 50 * this.rPer, 8, 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.beginPath(), Zi.arc(this.rad - 20 * this.rPer, 50 * this.rPer, 10, 0, 2 * Math.PI), Zi.fill(), Zi.beginPath());
- Zi.restore();
- break;
- case N:
- Zi.save();
- qs || Zi.rotate(2 * this.rPer * Math.PI);
- a = (Yi - this.spawnTime) / 1e3;
- a = 1.5 * Math.sin(2 * Math.PI / 6 * a);
- s = 4;
- Zi.fillStyle = "#8CC3C7";
- Zi.beginPath();
- Zi.arc(0, 0, this.rad, 0, 2 * Math.PI);
- Zi.fill();
- qs || (Zi.fillStyle = "#9DDADE", Zi.beginPath(), Zi.arc(0, 0, Math.max(0, this.rad - s + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.45 * this.rad, .45 * -this.rad + 15 * this.rPer, Math.max(0, .5 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.5 * this.rad, .5 * this.rad + 15 * this.rPer, Math.max(0, .4 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.55 * -this.rad * .707, .55 * +this.rad * .707 + 15 * this.rPer, Math.max(0, .5 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.75 * -this.rad, .35 * -this.rad + 15 * this.rPer, Math.max(0, .3 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.beginPath(), Zi.arc(this.rad + 10 * this.rPer, 50 * this.rPer, 8, 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.beginPath(), Zi.arc(this.rad - 20 * this.rPer, 50 * this.rPer, 10, 0, 2 * Math.PI), Zi.fill(), Zi.beginPath());
- Zi.restore();
- break;
- case T:
- Zi.save();
- qs || Zi.rotate(2 * this.rPer * Math.PI);
- a = (Yi - this.spawnTime) / 1e3;
- a = 5.5 * Math.sin(2 * Math.PI / 4 * a);
- s = 4;
- Zi.fillStyle = Ui;
- Zi.beginPath();
- Zi.arc(0, 0, this.rad, 0, 2 * Math.PI);
- Zi.fill();
- Zi.fillStyle = this.curBiome == Xi ? "#8da0d6" : Si;
- Zi.beginPath();
- Zi.arc(0, 0, Math.max(0, this.rad - s + a), 0, 2 * Math.PI);
- Zi.fill();
- qs || (Zi.beginPath(), Zi.arc(.45 * this.rad, .45 * -this.rad + 15 * this.rPer, Math.max(0, .5 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.5 * this.rad, .5 * this.rad + 15 * this.rPer, Math.max(0, .4 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.55 * -this.rad * .707, .55 * +this.rad * .707 + 15 * this.rPer, Math.max(0, .5 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(.75 * -this.rad, .35 * -this.rad + 15 * this.rPer, Math.max(0, .3 * this.rad + a), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(this.rad + 10 * this.rPer, 50 * this.rPer, 8, 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(this.rad - 20 * this.rPer, 50 * this.rPer, 10, 0, 2 * Math.PI), Zi.fill());
- Zi.restore();
- break;
- case V:
- Zi.save();
- qs || Zi.rotate(2 * this.rPer * Math.PI);
- a = (Yi - Vs) / 1e3;
- a = 5.5 * Math.sin(2 * Math.PI / 5 * a);
- s = 4;
- e || (Zi.fillStyle = Ei, Zi.beginPath(), Zi.arc(0, 0, Math.max(0, this.rad - s + a), 0, 2 * Math.PI), Zi.fill(), qs || (Zi.beginPath(), Zi.arc(this.rad + 10 * this.rPer, 50 * this.rPer, 8, 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(this.rad - 20 * this.rPer, 50 * this.rPer, 10, 0, 2 * Math.PI), Zi.fill()));
- Zi.restore();
- break;
- case v:
- a = (Yi - Vs) / 1e3;
- s = -8.5 * Math.sin(2 * Math.PI / 5 * a);
- 1 == (this.x > Ds / 2 ? 1 : 0) ? (Zi.fillStyle = Ei, Zi.fillRect(-this.rectW / 2 + s, -this.rectH / 2 + s + 10, this.rectW - s, this.rectH - s - 10), Zi.beginPath(), Zi.arc(-this.rectW / 2 + 50, -this.rectH / 2 + 50, 70 - s, 0, 2 * Math.PI), Zi.fill(), s = 35) : (Zi.fillStyle = Ei, s *= -1, Zi.fillRect(-this.rectW / 2, -this.rectH / 2 - s + 10, this.rectW + s, this.rectH + s - 10), s = 25);
- fillGrid(-this.rectW / 2 + s, -this.rectH / 2 + s, this.rectW / 2 - s, this.rectH / 2 - s, this.x, this.y);
- break;
- case Y:
- Zi.fillStyle = Ui;
- e = -this.rectW / 2;
- i = this.rectW / 2;
- t = -this.rectH / 2;
- r = this.rectH / 2;
- Zi.beginPath();
- Zi.moveTo(e, t);
- n = 20;
- var o = [-15, 10, -10, 12, 0, 5, -10, 5, -12, 5, 10, 0, -6],
- l = 45,
- h = 0,
- c = Ds - this.x,
- d = 0 - this.x,
- p = Ms - this.y,
- g = 0 - this.y;
- a = e - n;
- for (s = t; s < r; s += l) Zi.lineTo(Math.min(c, Math.max(d, a + o[h])), s), h = (h + 1) % o.length;
- Zi.lineTo(e, r);
- s = r + n;
- for (a = e; a < i; a += l) Zi.lineTo(a, Math.min(p, Math.max(g, s + o[h]))), h = (h + 1) % o.length;
- Zi.lineTo(i, r);
- a = i + n;
- for (s = r; s > t; s -= l) Zi.lineTo(Math.min(c, Math.max(d, a + o[h])), s), h = (h + 1) % o.length;
- Zi.lineTo(i, t);
- s = t - n;
- for (a = i; a > e; a -= l) Zi.lineTo(a, Math.min(p, Math.max(g, s + o[h]))), h = (h + 1) % o.length;
- Zi.closePath();
- Zi.fill();
- break;
- case C:
- Zi.fillStyle = "#ececec";
- Zi.fillRect(-this.rectW / 2, -this.rectH / 2, this.rectW, this.rectH);
- e = -this.rectW / 2;
- i = this.rectW / 2;
- t = this.rectH / 2 - 20;
- r = this.rectH / 2;
- snowLandWidth = this.rectW;
- snowLandHeight = this.rectH;
- Zi.beginPath();
- Zi.moveTo(e, t);
- n = 20;
- o = [-15, 5, 10, 0, -10, 3, 12, 4, 0, 3, 5, -10, 5, -12, 5, 10, 0, -6];
- l = 60;
- h = 0;
- p = Ms - this.y;
- g = 0 - this.y;
- Zi.lineTo(e, r);
- s = r + n;
- for (a = e; a < i; a += l) Zi.lineTo(a, Math.min(p, Math.max(g, s + o[h]))), h = (h + 1) % o.length;
- Zi.lineTo(i, r);
- Zi.lineTo(i, t);
- Zi.closePath();
- Zi.fill();
- s = 20;
- fillGrid(-this.rectW / 2 + s, -this.rectH / 2 + s, this.rectW / 2 - s, this.rectH / 2 - s, this.x, this.y);
- break;
- case $:
- Zi.fillStyle = Si;
- Zi.fillRect(-this.rectW / 2, -this.rectH / 2, this.rectW, this.rectH);
- Zi.fillStyle = Si;
- e = -this.rectW / 2;
- i = this.rectW / 2;
- t = -this.rectH / 2 + 3;
- r = -this.rectH / 2 - 15;
- Zi.beginPath();
- Zi.moveTo(e, t);
- n = 0;
- o = [-15, 5, 10, 0, -10, 3, 12, 4, 0, 3, 5, -10, 5, -12, 5, 10, 0, -6];
- l = 60;
- h = 0;
- p = Ms - this.y;
- g = 0 - this.y;
- Zi.lineTo(e, r);
- s = r + n;
- for (a = e; a < i; a += l) Zi.lineTo(a, Math.min(p, Math.max(g, s + o[h]))), h = (h + 1) % o.length;
- Zi.lineTo(i, r);
- Zi.lineTo(i, t);
- Zi.closePath();
- Zi.fill();
- Zi.fillStyle = Si;
- e = -this.rectW / 2;
- i = this.rectW / 2;
- t = this.rectH / 2 - 3;
- r = this.rectH / 2 + 15;
- Zi.beginPath();
- Zi.moveTo(e, t);
- n = 0;
- o = [-15, 5, 10, 0, -10, 3, 12, 4, 0, 3, 5, -10, 5, -12, 5, 10, 0, -6];
- l = 60;
- h = 0;
- p = Ms - this.y;
- g = 0 - this.y;
- Zi.lineTo(e, r);
- s = r + n;
- for (a = e; a < i; a += l) Zi.lineTo(a, Math.min(p, Math.max(g, s + o[h]))), h = (h + 1) % o.length;
- Zi.lineTo(i, r);
- Zi.lineTo(i, t);
- Zi.closePath();
- Zi.fill();
- if (a = Ns("img/riverCurrent" + this.riverSpecT + ".png"))
- for (s = -this.rectW / 2, Vn = 0; 40 > Vn; Vn++) e = 100 / 120 * this.riverFlowSpeedX * 1e3, e = (Yi - this.spawnTime) % e / e, Zi.drawImage(a, s + 100 * e, -this.rectH / 2, 100, this.rectH), s += 100;
- break;
- case m:
- Zi.fillStyle = Ii;
- Zi.fillRect(-this.rectW / 2, -this.rectH / 2, this.rectW, this.rectH);
- s = 20;
- fillGrid(-this.rectW / 2 + s, -this.rectH / 2 + s, this.rectW / 2 - s, this.rectH / 2 - s, this.x, this.y);
- break;
- case P:
- e ? ci(0, 0, this.rad, this.getOutlineColor()) : ci(0, 0, this.rad - 1.5, Hi);
- break;
- case I:
- Zi.fillStyle = Ui;
- Zi.beginPath();
- Zi.arc(0, 0, Math.max(0, this.rad), 0, 2 * Math.PI);
- Zi.fill();
- Zi.fillStyle = "#E4D04C";
- Zi.beginPath();
- Zi.arc(-5 + 10 * this.rPer, -5 + 10 * this.rPer, .8 * this.rad, 0, 2 * Math.PI);
- Zi.fill();
- break;
- case Te:
- a = (Yi - this.spawnTime) / 1e3;
- e = di(a, 1, 5, 2);
- s = di(a, 1, .2, 2);
- Zi.globalAlpha = .5;
- ci(0, 0, this.rad, Ni);
- i = -(-.2 + e) * Zt(90);
- Zi.save();
- Zi.scale(1, 1 + s);
- Zi.globalAlpha = .3;
- Zi.rotate(i);
- ci(0, 0, this.rad - e, "#2CAAC4");
- Zi.restore();
- Zi.save();
- Zi.scale(1 + s, 1);
- Zi.globalAlpha = .1;
- Zi.rotate(i);
- ci(0, 0, .9 * this.rad - e, "white");
- Zi.restore();
- break;
- case U:
- a = this.curBiome == Xi ? "#8fa4e0" : Ni;
- this.drawOutlinedCircle("", a);
- break;
- case S:
- (a = Ns("img/snowball.png")) ? (s = this.rad, Zi.rotate(this.rPer * Math.PI * 2), Zi.drawImage(a, -s, -s, 2 * s, 2 * s)) : this.drawOutlinedCircle("", "white");
- break;
- case ge:
- break;
- case fe:
- Zi.save();
- ci(0, 0, this.rad, this.isEdibleOutlined() ? Gi : zi(this.curBiome));
- ci(0, 0, Math.max(0, this.rad - 2), Ni);
- Zi.restore();
- Zi.save();
- s = .3;
- a = .5 * (.7 - s);
- Zi.globalAlpha *= s + a + a * Math.sin(2 * Math.PI / 1.2 * ((Yi - this.spawnTime) / 1e3));
- Zi.globalAlpha *= this.effA_poison;
- ci(0, 0, this.rad + 2.6, "#7FF600");
- Zi.restore();
- break;
- case _:
- s = .15;
- a = .5 * (.8 - s);
- s = s + a + a * Math.sin(2 * Math.PI / 1 * (Yi / 1e3));
- Zi.save();
- Zi.globalAlpha *= s;
- ci(0, 0, Math.max(0, this.rad), "#F6EA65");
- Zi.restore();
- s = .85;
- a = .5 * (1 - s);
- s = s + a + a * Math.sin(2 * Math.PI / 1 * (Yi / 1e3));
- if (a = Ns(1 == Math.trunc(Yi / 300) % 2 ? "img/fire.png" : "img/fire2.png")) i = .3 * this.rad, t = 2 * this.rad * (2 + 2 * s) / 3, r = 2 * this.rad * s, e = .5, n = .95, Zi.save(), a && (Zi.globalAlpha = Zi.globalAlpha * this.onFireEffA * s, Zi.drawImage(a, 0 + t * -e, i + r * -n, t, r)), Zi.restore();
- break;
- case f:
- break;
- default:
- this.isRectangle ? (Zi.fillStyle = "black", Zi.fillRect(-this.rectW / 2, -this.rectH / 2, this.rectW, this.rectH)) : this.drawOutlinedCircle("????", "black")
- }
- };
- In.prototype.draw = function(e) {
- this.moveUpdF = this.moveUpdate();
- Zi.save();
- Zi.translate(this.x, this.y);
- if (this.doesDrawEffectScale && !qs) {
- var a;
- a = (Yi - this.spawnTime) / 1e3;
- var t = 1.5,
- i = .1;
- this.drawEffectScale_Slow && (t = 2.5, i = .04);
- a = i * Math.sin(2 * Math.PI / t * a);
- Zi.scale(1 + a, 1 + a / 2)
- }
- this.getOutlineColor();
- Zi.globalAlpha = this.dead ? Zi.globalAlpha * (1 - this.moveUpdF) : Zi.globalAlpha * Math.min(1, (Yi - this.spawnTime) / (1e3 * Ti));
- this.customDraw(e);
- this.flag_hurt && (Zi.fillStyle = "rgba(255,0,0,0.3)", Zi.beginPath(), Zi.arc(0, 0, Math.max(0, this.rad - 2), 0, 2 * Math.PI), Zi.fill());
- this.drawHealthBar();
- Zi.restore()
- };
- In.prototype.drawHealthBar = function() {
- Zi.save();
- this.hpBarA += .04 * ((Yi < this.hpBarTimeoutT ? 1 : 0) - this.hpBarA);
- if (.001 < this.hpBarA) {
- this.hpPer += .1 * (this.hpPer_n - this.hpPer);
- var e = Math.max(1, this.rad / 25),
- a = 20 * e,
- t = 5 * e,
- e = -this.rad - 10 * e;
- Zi.globalAlpha *= this.hpBarA;
- Zi.fillStyle = "rgba(0,0,0,0.35)";
- Zi.fillRect(0 - a / 2, e - t / 2, a, t);
- Zi.fillStyle = "#16D729";
- Zi.fillRect(0 - a / 2, e - t / 2, this.hpPer / 100 * a, t)
- }
- Zi.restore()
- };
- In.prototype.drawChat = function() {
- if (!(1 > this.chatLines.length)) {
- Zi.save();
- Zi.font = "10px Arial";
- Zi.lineWidth = 1;
- Zi.textAlign = "center";
- Zi.textBaseline = "middle";
- for (var e = .01 < this.hpBarA ? -10 : 0, a = [], t = this.chatLines.length - 1; 0 <= t; t--) {
- var i = this.chatLines[t],
- s = -13 * (this.chatLines.length - 1 - t) + e,
- r = Yi > i.chatFadeT ? 0 : 1;
- i.chatA += .1 * (r - i.chatA);
- Zi.shadowOffsetX = 0;
- Zi.shadowOffsetY = 0;
- .02 > i.chatA ? (.02 > r && (i.chatTxt = ""), a.push(t)) : (r = Zi.measureText(i.chatTxt).width, Zi.globalAlpha = .8 * i.chatA, Zi.fillStyle = zi(this.curBiome), Zi.fillRect(this.x - 1 - r / 2, s + this.y - this.rad - 10 - 5 - 1, r + 2, 12), Zi.fillStyle = "#F1C34C", qs || (Zi.shadowOffsetX = 1, Zi.shadowOffsetY = 1, Zi.shadowColor = "black"), Zi.globalAlpha = i.chatA, Zi.fillText(i.chatTxt, this.x, s + this.y - this.rad - 10))
- }
- for (t = 0; t < a.length; t++) this.chatLines.splice(a[t], 1);
- Zi.restore()
- }
- };
- In.prototype.getOutlineColor = function() {
- if (this.alwaysPlainOutline) return Di;
- if (this.isEdibleOutlined()) return Gi;
- if (this.oType == f && 0 < Ss[this.animalType - 1] && this.id != dr) return Wi;
- var e = this.curBiome;
- if (this.flag_inWater) e = Li;
- else if (this.flag_inLava) return _i;
- return zi(e)
- };
- In.prototype.isEdibleOutlined = function() {
- return this.oType == f ? 0 < Es[this.animalType - 1] && this.id != dr : 0 < Bs[this.oType - 1]
- };
- In.prototype.gotChat = function(e) {
- this.chatLines.push({
- chatTxt: e,
- chatFadeT: Yi + 4e3,
- chatA: 0
- });
- 5 < this.chatLines.length && this.chatLines.splice(this.chatLines.length - 1, 1)
- };
- In.prototype.drawOutlinedCircle = function(e, a) {
- var t = this.getOutlineColor();
- qs && t == Di || ci(0, 0, this.rad, t);
- ci(0, 0, Math.max(0, this.rad - 1.5), a)
- };
- In.prototype.moveUpdate = function() {
- var e = (Yi - this.updateTime) / 1e3 / Ti,
- e = 0 > e ? 0 : 1 < e ? 1 : e;
- this.dead && 1 <= e && Ws.push(this);
- this.x = e * (this.nx - this.ox) + this.ox;
- this.y = e * (this.ny - this.oy) + this.oy;
- this.rad += .1 * (this.nRad - this.rad);
- if (void 0 != this.angle) {
- var a = .1 * this.angleDelta;
- this.angleDelta -= a;
- this.angle += a
- }
- return Math.min(1, e)
- };
- In.prototype.readCustomData_onUpdate = function(e) {
- this.oType == M && (this.specType = e.readUInt8(), this.specType2 = e.readUInt8(), this.hasAngleUpdate && (e = 3 * e.readUInt8(), this.angle = Zt(e)))
- };
- In.prototype.readCustomData_onNewlyVisible = function(e) {
- if (this.oType == M) {
- this.type = e.readUInt8();
- this.hasAngleUpdate = 1 == e.readUInt8();
- this.specType = e.readUInt8();
- this.specType2 = e.readUInt8();
- if (this.hasAngleUpdate || this.type == yt || this.type == ut || this.type == bt || this.type == nt || this.type == ot || this.type == Pt || this.type == mt || this.type == At || this.type == Dt || this.type == Mt || this.type == It || this.type == vt || this.type == xt) {
- var a = 3 * e.readUInt8() + 180;
- this.angle = Zt(a)
- }
- if (this.type == Za || this.type == Qa || this.type == mt || this.type == st || this.type == ht) this.rad = this.oRad = 0
- }
- this.oType == $ && (this.riverSpecT = a = e.readUInt8(), this.riverFlowSpeedX = 0 == a ? 1 : -1);
- this.oType == pe && (this.specType = e.readUInt8())
- };
- In.prototype.setObjTypes = function(e, a) {
- this.oType = e
- };
- In.prototype.worldUpd_readMsgNewlyVisible = function(e, a, t) {
- this.setObjTypes(a, t);
- t = e.readUInt32();
- var i = e.readUInt16() / 4,
- s = e.readUInt16() / 4,
- r = e.readUInt16() / 4;
- this.id = t;
- this.ox = this.x = this.nx = s;
- this.oy = this.y = this.ny = r;
- this.nRad = i;
- this.oRad = this.rad = 0;
- if (a == de || a == ie || a == k || a == N || a == T || a == M || a == u || a == P || a == x || a == I) this.oRad = this.rad = i;
- i = e.readBitGroup();
- a = i.getBool();
- t = i.getBool();
- this.curBiome = i.getInt0to3();
- i = null;
- a && (i = Fs[e.readUInt32()]);
- i && (this.updateTime = Yi, this.nx = this.x, this.ny = this.y, this.ox = i.x, this.oy = i.y, this.x = i.x, this.y = i.y);
- t && (this.isRectangle = !0, this.rectW = e.readUInt16(), this.rectH = e.readUInt16());
- if (this.objGetsAngleUpdate = 1 == e.readUInt8()) a = 3 * e.readUInt8(), this.angle = Zt(a + 90), this.specType = e.readUInt8();
- this.readCustomData_onNewlyVisible(e)
- };
- In.prototype.worldUpd_readMsgUpdate = function(e) {
- var a = e.readUInt16() / 4,
- t = e.readUInt16() / 4,
- i = e.readUInt16() / 10;
- this.specType = e.readUInt8();
- var s = e.readBitGroup(),
- r = s.getBool(),
- s = s.getBool();
- this.updateTime = Yi;
- this.ox = this.x;
- this.oy = this.y;
- this.nx = a;
- this.ny = t;
- this.oRad = this.rad;
- this.nRad = i;
- this.flag_hurt = s;
- r ? (a = e.readUInt8(), .001 > this.hpBarA && (this.hpPer = a), this.hpPer_n = a, this.hpBarTimeoutT = +new Date + 3e3) : this.hpBarTimeoutT = +new Date;
- this.objGetsAngleUpdate && (a = 3 * e.readUInt8(), this.angle = Zt(a + 90), this.specType = e.readUInt8());
- this.readCustomData_onUpdate(e);
- this.firstPosUpd = !1
- };
- In.prototype.worldUpd_readMsgRemovedObj = function(e) {
- e = 0 < e.readUInt8() ? e.readUInt32() : 0;
- e = 0 < e ? Fs[e] : void 0;
- this.dead = !0;
- this.updateTime = Yi;
- this.oType == M ? (this.ox = this.x, this.oy = this.y, this.nx = this.x, this.ny = this.y) : e ? (this.ox = this.x, this.oy = this.y, this.oRad = this.rad, this.nx = e.nx, this.ny = e.ny, this.nRad = Math.min(this.rad, e.rad), this.hp_n = 0) : (this.ox = this.x, this.oy = this.y, this.oRad = this.rad, this.nx = this.x, this.ny = this.y, this.nRad = 0)
- };
- In.prototype.updateZ = function() {
- switch (this.oType) {
- case m:
- this.z = -220;
- break;
- case C:
- this.z = -210;
- break;
- case ie:
- case de:
- this.z = -209;
- break;
- case Y:
- this.z = -202;
- break;
- case V:
- this.z = -201;
- break;
- case $:
- case T:
- case ae:
- case me:
- this.z = -159;
- break;
- case v:
- case k:
- this.z = -158;
- break;
- case ee:
- this.z = -158;
- break;
- case N:
- this.z = -156;
- break;
- case b:
- this.z = -155;
- break;
- case I:
- this.z = -154;
- break;
- case M:
- if (this.type == Nt || this.type == Rt || this.type == Ft || this.type == Wt || this.type == zt) {
- this.z = 100002;
- break
- }
- this.type == Ka || this.type == et || this.type == nt || this.type == bt || this.type == ut || this.type == Et || this.type == ot || this.type == Pt || this.type == yt || this.type == At || this.type == It || this.type == Dt || this.type == Mt || this.type == xt || this.type == Ct || this.type == _t ? this.z = 10001 : this.type == mt ? this.z = 1002 : this.type == Ot ? this.z = 10001 : this.type == Bt ? 1 == this.specType ? this.z = 10001 : 2 == this.specType && (this.z = 1013) : this.z = -152;
- break;
- case D:
- this.z = -150;
- break;
- case A:
- this.z = -101;
- break;
- case y:
- this.z = -100;
- break;
- case te:
- this.z = -99;
- break;
- case u:
- this.z = 999;
- break;
- case Pe:
- case x:
- this.z = 1e3;
- break;
- case P:
- this.z = 1001;
- break;
- case ge:
- this.z = 1002;
- break;
- case G:
- case H:
- this.z = 1004;
- break;
- case Te:
- this.z = 1015;
- break;
- case j:
- case z:
- this.z = 1006;
- break;
- case _:
- case fe:
- this.z = 1006;
- break;
- case w:
- this.z = 1e4;
- break;
- case ke:
- this.z = 1002;
- 0 != this.specType && (this.z = 10001);
- break;
- case f:
- this.flag_flying ? (this.z = 10001 + this.rad - (this.flag_usingAbility ? 0 : this.rad / 2), 100 == this.specType2 && (this.z = 1014)) : this.z = !this.flag_usingAbility || this.animalType != Ta && this.animalType != _a ? this.flag_underWater || this.flag_usingAbility && this.animalType == De ? -100 : this.animalType == Ta ? 1010 : this.animalType == pa ? 1009 : this.animalType == ka ? 1008 + (this.flag_usingAbility ? 1 : 0) : this.animalType == Ue ? 1007 : this.flag_canClimbHill || this.animalType == Ne || this.animalType == Se || this.animalType == Ke || this.animalType == ta || this.animalType == Re || this.animalType == He || this.animalType == ia || this.animalType == ra || this.animalType == Qe || this.animalType == ma || this.animalType == Je || this.animalType == ba || this.animalType == ya || this.animalType == wa ? 1003 : this.animalType == Pa ? 1e3 : this.rad : 10001;
- break;
- default:
- this.z = this.rad
- }
- };
- function In(e) {
- this.oType = e;
- this.rPer = Lt(0, 1);
- this.updateTime = this.spawnTime = Yi;
- this.firstPosUpd = !0;
- this.chatLines = [];
- switch (this.oType) {
- case E:
- case z:
- case L:
- case X:
- case j:
- case U:
- case _:
- case fe:
- case ge:
- case B:
- case R:
- case O:
- case y:
- case D:
- case A:
- case W:
- case K:
- case J:
- case q:
- case Z:
- case Q:
- case ue:
- case se:
- case re:
- case pe:
- case ne:
- case oe:
- case le:
- case he:
- case ce:
- case we:
- case Ae:
- case Pe:
- this.doesDrawEffectScale = !0
- }
- if (this.oType == y || this.oType == A || this.oType == D || this.oType == ge) this.drawEffectScale_Slow = !0
- }
- window.GameObj = In;
- var vn = Mn,
- Dn = In;
- vn.prototype = Object.create(Dn.prototype);
- vn.prototype.constructor = vn;
- function Mn() {
- this.objs = [];
- this.updateZ = function() {
- 0 < this.objs.length && (this.objs[0].updateZ(), this.z = this.objs[0].z)
- };
- this.draw = function() {
- for (var e = 0; e < this.objs.length; e++) {
- var a = this.objs[e];
- a.draw(!0)
- }
- for (e = 0; e < this.objs.length; e++) a = this.objs[e], a.draw(!1)
- };
- this.addBatchedObj = function(e) {
- 0 == this.objs.length && (this.oType = e.oType, this.objs = []);
- this.objs.push(e)
- }
- }
- window.GameObjBatchDraw = Mn;
- var c = 1,
- p = 2,
- g = 3,
- Ie = 4,
- ve = 5,
- De = 6,
- Me = 7,
- xe = 8,
- Ce = 9,
- Ne = 10,
- _e = 11,
- Se = 12,
- Ee = 13,
- Ue = 14,
- Be = 15,
- Oe = 16,
- Re = 17,
- Fe = 18,
- We = 19,
- Ge = 20,
- He = 21,
- ze = 22,
- je = 23,
- Le = 24,
- Xe = 25,
- Ye = 26,
- Ve = 27,
- Ke = 28,
- Je = 29,
- qe = 30,
- Ze = 31,
- Qe = 32,
- $e = 33,
- ea = 34,
- aa = 35,
- ta = 36,
- ia = 37,
- sa = 38,
- ra = 39,
- na = 40,
- oa = 41,
- la = 42,
- ha = 43,
- ca = 44,
- da = 45,
- pa = 46,
- ma = 47,
- fa = 48,
- ua = 49,
- ba = 50,
- ya = 51,
- wa = 52,
- ka = 53,
- Pa = 54,
- Aa = 55,
- Ta = 56,
- Ia = 57,
- va = 58,
- Da = 59,
- Ma = 60,
- xa = 61,
- Ca = 62,
- Na = 63,
- _a = 64,
- Sa = 65,
- Ea = 66,
- Ua = 67,
- Ba = 68,
- Oa = 69,
- Ra = function(e) {
- var a = {};
- switch (e) {
- case da:
- a.aniName = "Snail";
- a.aniDesc = "";
- a.upgradeText = "You're a super slow snail!";
- a.aniCol = "#fcc02b";
- a.skinName = "snail";
- break;
- case c:
- a.aniName = "Mouse";
- a.aniDesc = "";
- a.upgradeText = "";
- a.aniCol = "#9BA9B9";
- a.skinName = "mouse";
- break;
- case p:
- a.aniName = "Rabbit";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to RABBIT! \nPress W to burrow a hole to hide in!";
- a.aniCol = "#AA937E";
- a.skinName = "rabbit";
- break;
- case g:
- a.aniName = "Pig";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to PIG!\n Pigs move FAST through MUD! (Can use 'stink' on mud/ hiding holes!)";
- a.aniCol = "#DD6BD4";
- a.skinName = "pig";
- break;
- case Ie:
- a.aniName = "Fox";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to FOX! ,\n You can kick players out of hiding holes! (Press W when in one!)\n+ Hide in red berry bushes!";
- a.aniCol = "#FF9D43";
- a.skinName = "fox";
- break;
- case ve:
- a.aniName = "Deer";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to DEER! \nPress W to dig up food! \nDig in mud for better food!\n Hint:Check water areas for new food sources!";
- a.aniCol = "#C4773E";
- a.skinName = "deer";
- break;
- case De:
- a.aniName = "Mole";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to MOLE!\n Hold W to dig underground!\nGo under anything, do surprise attacks!";
- a.aniCol = "#4C4A45";
- a.skinName = "mole";
- break;
- case Me:
- a.aniName = "Zebra";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to ZEBRA! \nPress W to kick side ways!";
- a.aniCol = "#FFFFFF";
- a.skinName = "zebra";
- break;
- case xe:
- a.aniName = "Lion";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to LION!\n Press W to release a mighty ROAR (Rawr!)!";
- a.aniCol = "#f8c923";
- a.skinName = "lion";
- break;
- case Ce:
- a.aniName = "Cheetah";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to CHEETAH!\n Press W to get a speed boost! (Every 8 seconds)!";
- a.aniCol = "#CAC05B";
- a.skinName = "cheetah";
- break;
- case Ne:
- a.aniName = "Bear";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to BEAR!\n Bears climb through green hills! (Press W to use your claw!)";
- a.aniCol = "#99591C";
- a.skinName = "bear";
- break;
- case _e:
- a.aniName = "Croc";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to CROCODILE!\n Press W to bite and drag around animals! \n+ (Now hide in water spots)+ Swim well in Mud, Lakes & Oceans!";
- a.aniCol = "#30F51C";
- a.skinName = "croc";
- break;
- case Ee:
- a.aniName = "Hippo";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to HIPPO!\nHippos are great swimmers, dominate the Lakes/Oceans/Mud!";
- a.aniCol = "#945A99";
- a.skinName = "hippo";
- break;
- case Se:
- a.aniName = "Rhino";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to RHINO!\n Press W to CHARGE with your mighty horn!";
- a.aniCol = "#94a3a9";
- a.skinName = "rhino";
- break;
- case Be:
- a.aniName = "Shrimp";
- a.aniDesc = "";
- a.upgradeText = "";
- a.aniCol = "#f88e37";
- a.skinName = "shrimp";
- break;
- case Oe:
- a.aniName = "Trout";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to TROUT!\nHint: Hold Left-click to RUN! (Uses extra water)";
- a.aniCol = "#ac8686";
- a.skinName = "trout";
- break;
- case Re:
- a.aniName = "Crab";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to CRAB!\n Crabs can survive on dry land!\n (On land, Press W to go into your shell!)";
- a.aniCol = "#bf2408";
- a.skinName = "crab";
- break;
- case Fe:
- a.aniName = "Squid";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to SQUID!\n Squids can use INK when injured (press W!) \n+ you can hide in plankton bushes!";
- a.aniCol = "#40dda4";
- a.skinName = "squid";
- break;
- case We:
- a.aniName = "Shark";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to SHARK!\n A vicious predator of the oceans!";
- a.aniCol = "#999fc6";
- a.skinName = "shark";
- break;
- case ze:
- a.aniName = "Sea-horse";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to SEA HORSE!\n An agile hunter!";
- a.aniCol = "#73BE2F";
- a.skinName = "seahorse";
- break;
- case je:
- a.aniName = "Jellyfish";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to JELLYFISH!\n A slowly-turning animal that can grow quite large!";
- a.aniCol = "#FDB9BA";
- a.skinName = "jellyfish";
- break;
- case He:
- a.aniName = "Turtle";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to TURTLE!\n Lives well on land & water! (On land, Press W to go into your shell!)";
- a.aniCol = "#502E1A";
- a.skinName = "turtle";
- break;
- case Ge:
- a.aniName = "Stringray";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to STINGRAY!\n Use electic shock (Release W key!) to shock animals! \n(Takes time to recharge)";
- a.aniCol = "#164336";
- a.skinName = "stingray";
- break;
- case Le:
- a.aniName = "The Kraken";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to THE KRAKEN!\n Terrorize the oceans, and be feared by all!\n (Release W to use whirlpool ability!)";
- a.aniCol = "#64a034";
- a.skinName = "kraken";
- break;
- case Xe:
- a.aniName = "Pufferfish";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to PUFFERFISH!\n (Hold W to inflate- become spiky, and dangerous to touch!)";
- a.aniCol = "#6C5C2C";
- a.skinName = "pufferfish";
- break;
- case Ye:
- a.aniName = "Killer Whale";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to Killer Whale! \nWhales blow out water when diving! (And sometimes other loot!)";
- a.aniCol = "#141414";
- a.skinName = "killerwhale";
- break;
- case Ve:
- a.aniName = "Swordfish";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n (Press W to rush with your sharp nose!)";
- a.aniCol = "#689CD7";
- a.skinName = "swordfish";
- break;
- case Ke:
- a.aniName = "Gorilla";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Gorillas are very fast on hills/trees!\n Press W to throw bananas! (from trees)";
- a.aniCol = "#323232";
- a.skinName = "gorilla";
- break;
- case Je:
- a.aniName = "Octopus";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to Octopus!\nHold W to use your 'Disguise' ability!\n(Hint: wait for prey to bite you- they get stunned!)";
- a.aniCol = "#ff8340";
- a.skinName = "octopus";
- break;
- case Ue:
- a.aniName = "Dragon";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n (You're amazing!) \nFly over everything, Hold W to shoot fire!";
- a.aniCol = "#22FF8A";
- a.skinName = "dragon";
- break;
- case pa:
- a.aniName = "Black Dragon";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Black dragons drink lava instead of water! Black dragons only heal on healing stones/lava!";
- a.aniCol = "black";
- a.skinName = "blackdragon";
- break;
- case wa:
- a.aniName = "Giant Spider";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Place web around the game to catch prey!";
- a.aniCol = "black";
- a.skinName = "giantSpider";
- break;
- case ba:
- a.aniName = "Cobra";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Hold W to Spit venom, and poison animals with your bite!";
- a.aniCol = "black";
- a.skinName = "cobra";
- break;
- case ya:
- a.aniName = "Boa Constrictor";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Coil and suffocate other animals!";
- a.aniCol = "black";
- a.skinName = "boaConstrictor";
- break;
- case ka:
- a.aniName = "T-REX";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + " The Dinosaur!\n This ancient dinosaur has powerful jaws that can drag prey around!!";
- a.aniCol = "#862A2A";
- a.skinName = "trex";
- break;
- case Pa:
- a.aniName = "Tiger";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to Tiger!\n Tigers can launch an ambush attack (HOLD W to grow a bush)!";
- a.aniCol = "#FF9000";
- a.skinName = "tiger";
- break;
- case Aa:
- a.aniName = "Giraffe";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to Giraffe!\nGiraffe have huge legs and stomp anyone in their way!";
- a.aniCol = "#E9BD23";
- a.skinName = "giraffe";
- break;
- case Ta:
- a.aniName = "Eagle";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to Eagle!\nEagles can fly up other animals in the air! !\nThey can also fly high (double click)";
- a.aniCol = "#5b400d";
- a.skinName = "eagle";
- break;
- case oa:
- a.aniName = "Arctic Fox";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n You can kick players out of hiding holes! (Press W when in one!)\n+ Hide in red berry bushes!";
- a.aniCol = "#CFCFCF";
- a.skinName = "arctic/arcticfox";
- break;
- case Ze:
- a.aniName = "Arctic Hare";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n \nPress W to burrow a hole to hide in!";
- a.aniCol = "#D5D5D5";
- a.skinName = "arctic/arctichare";
- break;
- case Qe:
- a.aniName = "The Yeti!";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n So it really exists... \n Hold W to turn into snow, release W to freeeeeze!";
- a.aniCol = "#839eb5";
- a.skinName = "arctic/yeti";
- break;
- case $e:
- a.aniName = "Chipmunk";
- a.aniDesc = "";
- a.upgradeText = "";
- a.aniCol = "#A77C30";
- a.skinName = "arctic/chipmunk";
- break;
- case ea:
- a.aniName = "Muskox";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Press W to charge with your horns! \nPlus move decently on ice!";
- a.aniCol = "#231f18";
- a.skinName = "arctic/muskox";
- break;
- case aa:
- a.aniName = "Penguin";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Left-click to run!\n (HOLD W to slide FAST on ice)!";
- a.aniCol = "#FFFFFF";
- a.skinName = "arctic/penguin";
- break;
- case ta:
- a.aniName = "Polar Bear";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Polar bears can climb hills! \n+ They're amazing swimmers!";
- a.aniCol = "#e4e4e4";
- a.skinName = "arctic/polarbear";
- break;
- case ia:
- a.aniName = "Seal";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Seals can slide on ice (Hold W) + can climb hills (rocks too!)";
- a.aniCol = "#cfcfcf";
- a.skinName = "arctic/seal";
- break;
- case sa:
- a.aniName = "Snow leopard";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Press W to get a speed boost! (Every 8 seconds)!";
- a.aniCol = "#cfcfcf";
- a.skinName = "arctic/snowleopard";
- break;
- case ra:
- a.aniName = "Walrus";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n You can slide on ice (Hold W) + can climb hills (rocks too!)";
- a.aniCol = "#633838";
- a.skinName = "arctic/walrus";
- break;
- case na:
- a.aniName = "Reindeer";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Press W to dig up food! \n Your sharp hooves let you turn very well on ice!";
- a.aniCol = "#a68976";
- a.skinName = "arctic/reindeer";
- break;
- case qe:
- a.aniName = "Wolf";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Wolf paws turn very well on ice!\n Press W to howl!";
- a.aniCol = "#6B6B6B";
- a.skinName = "arctic/wolf";
- break;
- case la:
- a.aniName = "Wolverine";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Press W to Let out a Powerful GROWL! (Knocks back prey!)";
- a.aniCol = "#843A0F";
- a.skinName = "arctic/wolverine";
- break;
- case ha:
- a.aniName = "Mammoth";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Press W to roll snowballs with your trunk!\n The bigger the snowball gets, the longer the freeze!";
- a.aniCol = "#9d4717";
- a.skinName = "arctic/mammoth";
- break;
- case ca:
- a.aniName = "Donkey";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Press W to Kick any animal behind you";
- a.aniCol = "#8c7c64";
- a.skinName = "donkey";
- break;
- case ma:
- a.aniName = "Sabertooth Tiger";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to Sabertooth Tiger!\nSabertooth Tigers are great swimmers, dominate the Lakes/Oceans/Mud!";
- a.aniCol = "#945A99";
- a.skinName = "sabertoothtiger";
- break;
- case fa:
- a.aniName = "Elephant";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to " + a.aniName + "!\n Use your long trunk to attack and eat food!";
- a.aniCol = "#945A99";
- a.skinName = "elephant";
- break;
- case ua:
- a.aniName = "Blue Whale";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to Blue Whale!\n Smash with your powerful tail!";
- a.aniCol = "#945A99";
- a.skinName = "bluewhale";
- break;
- case va:
- a.aniName = "Duck";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to a DUCK!";
- a.aniCol = "#FF9000";
- a.skinName = "duck";
- break;
- case Da:
- a.aniName = "Duckling";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to a DUCK!";
- a.aniCol = "#FF9000";
- a.skinName = "duckling";
- break;
- case Ia:
- a.aniName = "Hedgehog";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to Hedgehog!\n (Hold W to become spiky, and dangerous to touch!)";
- a.aniCol = "#5b400d";
- a.skinName = "hedgehog";
- break;
- case xa:
- a.aniName = "King Crab";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to a KING CRAB!";
- a.aniCol = "#971f0e";
- a.skinName = "kingcrab";
- break;
- case Ma:
- a.aniName = "Lemming";
- a.aniDesc = "";
- a.upgradeText = "";
- a.aniCol = "#A77C30";
- a.skinName = "arctic/lemming";
- break;
- case Ca:
- a.aniName = "Frog";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to Frog!!";
- a.aniCol = "#FF9000";
- a.skinName = "frog/frog";
- break;
- case Na:
- a.aniName = "Ostrich";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to Ostrich! Lay eggs to hatch babies! \nCommand babies by placing your crosshair (right-click/W)-\n They can attack prey!";
- a.aniCol = "#FF9000";
- a.skinName = "ostrich/ostrich";
- break;
- case _a:
- a.aniName = "Pelican";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to Pelican! \nPick up water (and prey!) in your mouth,\nfly, and drop water on prey! (press W again)";
- a.aniCol = "#FF9000";
- a.skinName = "pelican/pelican";
- break;
- case Sa:
- a.aniName = "Falcon";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to Falcon! \nFly, and do a powerful dive attack! Aim it well.";
- a.aniCol = "#FF9000";
- a.skinName = "falcon/falcon";
- break;
- case Ea:
- a.aniName = "Snowy Owl";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to Snowy Owl!\n Aim the crosshair, \n right click/W when it's on top of prey, to attack!";
- a.aniCol = "#FF9000";
- a.skinName = "snowyowl/snowyowl";
- break;
- case Oa:
- a.aniName = "Baby Ostrich";
- a.aniDesc = "";
- a.upgradeText = "UPGRADED to Baby Ostrich!!";
- a.aniCol = "#FF9000";
- a.skinName = "ostrich/baby-ostrich";
- break;
- default:
- a.aniName = "(Animal)", a.aniDesc = "", a.upgradeText = "UPGRADED!"
- }
- return a
- },
- xn = Cn,
- Dn = In;
- xn.prototype = Object.create(Dn.prototype);
- xn.prototype.constructor = xn;
- xn.superClass = Dn;
- Cn.prototype.animalType = c;
- Cn.prototype.nickName = "";
- Cn.prototype.skinImgName = null;
- Cn.prototype.skinNotLoadedColor = "#75ce67";
- Cn.prototype.flag_lowWat = !1;
- Cn.prototype.flag_tailBitten = !1;
- Cn.prototype.flag_underWater = !1;
- Cn.prototype.flag_eff_stunned = !1;
- Cn.prototype.flag_eff_frozen = !1;
- Cn.prototype.flag_usingAbility = !1;
- Cn.prototype.flag_eff_invincible = !1;
- Cn.prototype.flag_eff_healing = Cn.prototype.flag_eff_poison = Cn.prototype.flag_eff_bleeding = !1;
- Cn.prototype.flag_iceSliding = !1;
- Cn.prototype.underwaterA = 0;
- Cn.prototype.nickNameA = 0;
- Cn.prototype.bleedingA = 0;
- Cn.prototype.stunA = 0;
- Cn.prototype.frozenEffA = Cn.prototype.onFireEffA = Cn.prototype.effA_healing = 0;
- Cn.prototype.effA_poison = Cn.prototype.effA_bleeding = Cn.prototype.effA_stunk = 0;
- Cn.prototype.effA_constricted = Cn.prototype.effA_slimed = Cn.prototype.effA_webStuck = 0;
- Cn.prototype.nameA = 0;
- Cn.prototype.loadedSkinImg = null;
- Cn.prototype.outlineW = null;
- Cn.prototype.getNameSize = function() {
- return 10
- };
- Cn.prototype.setNick = function(e) {
- this.nickName = e;
- null == this.nickTXT ? (this.nickTXT = new pi(this.getNameSize(), "#FFFFFF"), this.nickTXT.strokeW = 1.5, this.nickTXT.renderScale = 5) : this.nickTXT.setFontSize(this.getNameSize());
- this.nickTXT.setText(this.nickName)
- };
- Cn.prototype.drawEyeAtPos = function(e, a) {
- Zi.beginPath();
- Zi.arc(e, a, 4.5, 0, 2 * Math.PI);
- Zi.fillStyle = "black";
- Zi.fill();
- Zi.beginPath();
- Zi.fillStyle = "white";
- Zi.arc(e - 2, a - 1, .99, 0, 2 * Math.PI);
- Zi.fill()
- };
- Cn.prototype.customDraw = function(e) {
- var a = Ra(this.animalType);
- e = a.aniCol;
- this.skinImgName = a.skinName;
- a = .1 * this.rad;
- this.skinNotLoadedColor = e;
- switch (this.animalType) {
- case Xe:
- case ea:
- case Ve:
- case He:
- case _e:
- a = .16 * this.rad
- }
- var t = this.getSkinName();
- this.loadedSkinImg = null;
- t && !Ks && (this.loadedSkinImg = Ns("./skins/" + t + ".png"));
- Zi.save();
- Zi.rotate(this.angle);
- var i, s = (Yi - this.spawnTime) / 1e3;
- i = .7 * Math.sin(2 * Math.PI / 2.5 * s);
- t = this.flag_underWater || this.flag_usingAbility && (this.animalType == De || this.animalType == Je || this.animalType == Qe) ? 0 : 1;
- this.flag_stealth && (t = this.animalType == ze ? 0 : .2);
- this.flag_flying && this.id != dr && !this.flag_isGrabbed && (t = .6);
- this.underwaterA += .1 * (t - this.underwaterA);
- Zi.globalAlpha *= this.underwaterA;
- if (this.flag_eff_invincible) {
- var s = .3,
- r = .5 * (1 - s);
- Zi.globalAlpha *= s + r + r * Math.sin(2 * Math.PI / 1 * ((Yi - this.spawnTime) / 1e3))
- }
- this.outlineW = 2 + i;
- i = this.getOutlineColor();
- this.flag_flying || qs && i != Gi && i != Wi ? this.outlineW = 0 : ci(0, 0, this.rad, i);
- if (this.animalType != p && this.animalType != c && this.animalType != Re) {
- var s = (Yi - this.spawnTime) / 1e3,
- s = 4 * Math.sin(2 * Math.PI / 5 * s),
- r = 2.5 * this.outlineW,
- n = Math.PI / 180;
- Zi.fillStyle = this.flag_tailBitten ? Wi : 0 < Us[this.animalType - 1] && this.id != dr ? Gi : i;
- qs && Zi.fillStyle != Di || this.flag_flying || (Zi.beginPath(), Zi.moveTo((this.rad - this.outlineW + 1) * Math.cos((282.5 + r) * n), (this.rad - this.outlineW + 1) * Math.sin(282.5 * n)), Zi.lineTo((this.rad - this.outlineW + 1) * Math.cos((257.5 - r) * n), (this.rad - this.outlineW + 1) * Math.sin(257.5 * n)), Zi.lineTo((this.rad + a + this.outlineW) * Math.cos((270 + s) * n), (this.rad + a + this.outlineW) * Math.sin((270 + s) * n)), Zi.lineTo((this.rad - this.outlineW + 1) * Math.cos((282.5 + r) * n), (this.rad - this.outlineW + 1) * Math.sin(282.5 * n)), Zi.fill());
- qs || this.loadedSkinImg && !this.flag_tailBitten || (Zi.fillStyle = this.flag_tailBitten ? Wi : e, Zi.beginPath(), Zi.moveTo((this.rad - this.outlineW) * Math.cos(282.5 * n), (this.rad - this.outlineW) * Math.sin(282.5 * n)), Zi.lineTo((this.rad - this.outlineW) * Math.cos(257.5 * n), (this.rad - this.outlineW) * Math.sin(257.5 * n)), Zi.lineTo((this.rad + a) * Math.cos((270 + s) * n), (this.rad + a) * Math.sin((270 + s) * n)), Zi.lineTo((this.rad - this.outlineW) * Math.cos(282.5 * n), (this.rad - this.outlineW) * Math.sin(282.5 * n)), Zi.fill())
- }
- this.drawUnderSkinImgOutline();
- this.drawUnderSkinImg();
- this.drawSkinImg();
- this.drawOnTopOfSkinImg();
- Zi.restore();
- this.drawTopEffects();
- this.flag_lowWat && (s = .2, r = .5 * (.8 - s), e = s + r + r * Math.sin(2 * Math.PI / 1.2 * (Yi / 1e3)), Zi.save(), Zi.globalAlpha = e, Zi.fillStyle = this.animalType == pa ? _i : Ni, Zi.beginPath(), Zi.arc(0, this.rad + 5, 5, 0, 2 * Math.PI), Zi.fill(), Zi.restore());
- this.drawNickName(t)
- };
- Cn.prototype.drawNickName = function(e) {
- this.nickNameA += .1 * (e - this.nickNameA);
- this.nickName && this.nickTXT && !Js && (Zi.save(), Zi.globalAlpha = this.dead ? Zi.globalAlpha * (1 - this.moveUpdF) : 1, Zi.globalAlpha *= this.nickNameA, this.nickTXT.x = 0, this.nickTXT.y = this.rad + 9, this.nickTXT.draw(), Zi.restore())
- };
- Cn.prototype.drawUnderSkinImgOutline = function() {
- if (this.flag_underWater || this.flag_usingAbility && this.animalType == De) Zi.save(), Zi.globalAlpha = 1 - this.underwaterA, this.drawWhenUnderwater(), Zi.restore();
- if (this.flag_eff_stunk) {
- Zi.save();
- var e = .3,
- a = .5 * (1 - e),
- e = e + a + a * Math.sin(2 * Math.PI / 1 * ((Yi - this.spawnTime) / 1e3));
- Zi.globalAlpha *= e;
- ci(0, 0, this.rad + 2.6 * e, "brown");
- Zi.restore()
- }
- this.flag_iceSliding && (e = (Yi - this.spawnTime) / 1e3, e = 1 * Math.sin(2 * Math.PI / .75 * e), a = Zi.globalAlpha, Zi.globalAlpha *= .8 - .2 * e, ci(0, .3 * this.rad, this.rad * (.9 + .15 * e), "#7BB7BB"), ci(0, .3 * -this.rad, this.rad * (1.05 + .1 * e), "#7BB7BB"), console.log("drawing ice slide"), Zi.globalAlpha = a);
- !this.flag_usingAbility || this.animalType != ve && this.animalType != na || (e = (Yi - this.spawnTime) / 1e3, e = 1 * Math.sin(2 * Math.PI / 1.5 * e), a = Zi.globalAlpha, Zi.globalAlpha *= .8, ci(0, .3 * this.rad, this.rad * (.9 + .12 * e), "#7F582B"), ci(0, .3 * -this.rad, this.rad * (1.05 + .09 * e), "#7F582B"), Zi.globalAlpha = a);
- e = this.flag_eff_frozen || this.flag_cold ? 1 : 0;
- this.frozenEffA += .1 * (e - this.frozenEffA);
- .01 < this.frozenEffA && (a = Zi.globalAlpha, Zi.globalAlpha *= this.frozenEffA, ci(0, 0, this.rad + 1.6 * this.frozenEffA, "white"), Zi.globalAlpha = a);
- e = this.flag_eff_healing ? 1 : 0;
- this.effA_healing += .1 * (e - this.effA_healing);
- .01 < this.effA_healing && (Zi.save(), Zi.globalAlpha *= this.effA_healing, ci(0, 0, this.rad + 2.6 * this.effA_healing, "purple"), Zi.restore());
- e = this.flag_eff_poison ? 1 : 0;
- this.effA_poison += .1 * (e - this.effA_poison);
- .01 < this.effA_poison && (Zi.save(), e = .3, a = .5 * (1 - e), Zi.globalAlpha *= e + a + a * Math.sin(2 * Math.PI / 1.2 * ((Yi - this.spawnTime) / 1e3)), Zi.globalAlpha *= this.effA_poison, ci(0, 0, this.rad + 2.6 * this.effA_poison, "#7FF600"), Zi.restore());
- e = this.flag_eff_bleeding ? 1 : 0;
- this.effA_bleeding += .1 * (e - this.effA_bleeding);
- .01 < this.effA_bleeding && (Zi.save(), e = .3, a = .5 * (1 - e), Zi.globalAlpha *= e + a + a * Math.sin(2 * Math.PI / 1.2 * ((Yi - this.spawnTime) / 1e3)), Zi.globalAlpha *= this.effA_bleeding, ci(0, 0, this.rad + 2.6 * this.effA_bleeding, "red"), Zi.restore());
- e = this.flag_eff_slimed ? 1 : 0;
- this.effA_slimed += .1 * (e - this.effA_slimed);
- .01 < this.effA_slimed && (Zi.save(), e = .3, a = .5 * (1 - e), Zi.globalAlpha *= e + a + a * Math.sin(2 * Math.PI / 1.2 * ((Yi - this.spawnTime) / 1e3)), Zi.globalAlpha *= this.effA_slimed, ci(0, 0, this.rad + 2.6 * this.effA_slimed, "grey"), Zi.restore())
- };
- Cn.prototype.drawUnderSkinImg = function() {};
- Cn.prototype.drawWhenUnderwater = function() {
- var e = (Yi - this.spawnTime) / 1e3,
- a = 1 * Math.sin(2 * Math.PI / 1.5 * e);
- this.animalType == _e && (Zi.globalAlpha *= .3);
- Zi.fillStyle = this.flag_underWater ? "#4E71C3" : "#7E6A35";
- var t = this.flag_underWater ? .15 * this.rad : .1 * this.rad;
- Zi.beginPath();
- Zi.arc(-.35 * this.rad, -.33 * this.rad, Math.max(0, t + a), 0, 2 * Math.PI);
- Zi.fill();
- Zi.beginPath();
- Zi.arc(.35 * this.rad, -.32 * this.rad, Math.max(0, t - a), 0, 2 * Math.PI);
- Zi.fill();
- Zi.beginPath();
- Zi.arc(.35 * this.rad, .36 * this.rad, Math.max(0, t + a), 0, 2 * Math.PI);
- Zi.fill();
- Zi.beginPath();
- Zi.arc(-.35 * this.rad, .35 * this.rad, Math.max(0, t - a), 0, 2 * Math.PI);
- Zi.fill();
- this.animalType == We ? (Zi.globalAlpha = 1 - this.underwaterA, Zi.fillStyle = "#73799b", Zi.beginPath(), e = this.rad, a = .25 * e, Zi.moveTo(-.07 * e, a), Zi.lineTo(0, a - .5 * e), Zi.lineTo(.35 * e, a), Zi.closePath(), Zi.fill()) : this.animalType == Ye ? ci(0, .2 * this.rad, .12 * this.rad, "#4D4D4D") : this.animalType == ua ? ci(0, .45 * this.rad, .08 * this.rad, "#202A65") : this.animalType == xa ? (e = di(e, 1, 1, 1), Zi.save(), Zi.rotate(Zt(40)), Zi.scale(1, 2), Zi.globalAlpha = .08, ci(1 * this.rad, .2 * this.rad, .1 * this.rad + .1 * this.rad * e, "#B32E10"), Zi.globalAlpha = .2, ci(1 * this.rad, .2 * this.rad, .15 * this.rad, "#B32E10"), Zi.restore(), Zi.save(), Zi.globalAlpha = 1, Zi.rotate(Zt(-40)), Zi.scale(1, 2), Zi.globalAlpha = .08, ci(-1 * this.rad, .2 * this.rad, .1 * this.rad + .1 * this.rad * -e, "#B32E10"), Zi.globalAlpha = .2, ci(-1 * this.rad, .2 * this.rad, .15 * this.rad, "#B32E10"), Zi.restore()) : this.animalType == Le ? (Zi.globalAlpha = 1 - this.underwaterA, ci(.4 * this.rad, .75 * this.rad, .12 * this.rad, "#598b30"), ci(.65 * this.rad, .55 * this.rad, .1 * this.rad, "#64a034"), ci(-.4 * this.rad, .75 * this.rad, .12 * this.rad, "#64a034"), ci(-.65 * this.rad, .55 * this.rad, .1 * this.rad, "#598b30")) : this.animalType == ka && (Zi.save(), Zi.globalAlpha = .2, Zi.scale(1, 2), ci(0, .24 * this.rad, .08 * this.rad, "#202A65"), ci(0, -.02 * this.rad, .06 * this.rad, "#202A65"), ci(0, -.28 * this.rad, .05 * this.rad, "#202A65"), ci(0, -.54 * this.rad, .04 * this.rad, "#202A65"), Zi.restore())
- };
- Cn.prototype.basicDrawSkinImg = function() {
- var e = 500 / 340,
- a = this.rad - this.outlineW;
- this.loadedSkinImg ? this.animalType == ka ? (overSizeOffset = a / 2, Zi.drawImage(this.loadedSkinImg, -a - overSizeOffset, -a - overSizeOffset, 2 * a * e, 2.4 * a * e)) : Zi.drawImage(this.loadedSkinImg, -a * e, -a * e, 2 * a * e, 2 * a * e) : this.loadedSkinImg && (Zi.fillStyle = this.skinNotLoadedColor, Zi.beginPath(), Zi.arc(0, 0, Math.max(0, this.rad - this.outlineW), 0, 2 * Math.PI), Zi.fill())
- };
- Cn.prototype.drawSkinImg = function() {
- this.basicDrawSkinImg();
- this.drawSkinCustomization()
- };
- Cn.prototype.drawSkinCustomization = function() {};
- Cn.prototype.drawOnTopOfSkinImg = function() {
- if (!this.loadedSkinImg) {
- Zi.save();
- var e = Math.max(1, this.rad / 25);
- Zi.scale(e, e);
- this.drawEyeAtPos(6, .32 * this.rad);
- this.drawEyeAtPos(-6, .32 * this.rad);
- Zi.restore()
- }
- if (this.animalType == Se) {
- Zi.fillStyle = "#E5CF79";
- Zi.beginPath();
- var e = this.rad - this.outlineW,
- a = 1 * e;
- Zi.moveTo(-.16 * e, a);
- Zi.lineTo(0, e * (this.flag_usingAbility ? 1.41 : .7));
- Zi.lineTo(.153 * e, a);
- Zi.closePath();
- Zi.fill()
- }
- this.flag_usingAbility && this.animalType == Qe && (Zi.save(), Zi.globalAlpha = 1 - this.underwaterA, (a = Ns("img/snowball.png")) ? (e = this.rad, Zi.rotate(this.rPer * Math.PI * 2), Zi.drawImage(a, -e, -e, 2 * e, 2 * e)) : this.drawOutlinedCircle("", "white"), Zi.restore())
- };
- Cn.prototype.drawTopEffects = function() {
- var e = this.flag_eff_stunned ? 1 : 0;
- this.stunA += .1 * (e - this.stunA);
- if (.01 < this.stunA) {
- Zi.save();
- var a = 2.5,
- a = Yi % (1e3 * a) / (1e3 * a);
- Zi.rotate(2 * a * Math.PI);
- Zi.globalAlpha *= this.stunA;
- var t = .2 * this.rad,
- a = (Yi - this.spawnTime) / 1e3,
- e = (.5 + .07 * t) * Math.sin(2 * Math.PI / 1 * a);
- Zi.fillStyle = "#F3D444";
- Zi.beginPath();
- Zi.arc(-.22 * this.rad, -.22 * this.rad, Math.max(0, t + e), 0, 2 * Math.PI);
- Zi.fill();
- Zi.beginPath();
- Zi.arc(.22 * this.rad, -.22 * this.rad, Math.max(0, t - e), 0, 2 * Math.PI);
- Zi.fill();
- Zi.beginPath();
- Zi.arc(.22 * this.rad, .22 * this.rad, Math.max(0, t + e), 0, 2 * Math.PI);
- Zi.fill();
- Zi.beginPath();
- Zi.arc(-.22 * this.rad, .22 * this.rad, Math.max(0, t - e), 0, 2 * Math.PI);
- Zi.fill();
- Zi.restore()
- }
- e = this.flag_eff_onFire ? 1 : 0;
- this.onFireEffA += .1 * (e - this.onFireEffA);
- if (.01 < this.onFireEffA) {
- e = .15;
- t = .5 * (.4 - e);
- e = e + t + t * Math.sin(2 * Math.PI / 1 * (Yi / 1e3));
- Zi.save();
- Zi.globalAlpha = Zi.globalAlpha * e * this.onFireEffA;
- ci(0, 0, Math.max(0, this.rad), "orange");
- Zi.restore();
- var e = .5,
- t = .5 * (1 - e),
- e = e + t + t * Math.sin(2 * Math.PI / 1 * (Yi / 1e3)),
- i = Math.trunc(Yi / 150) % 5,
- t = Ns("img/fire/" + Math.trunc(Yi / 100) % 5 + ".png"),
- i = Ns("img/fire/" + i + ".png");
- if (t || i) {
- var s = 0 - .3 * this.rad,
- r = .2 * this.rad - .3 * this.rad,
- n = 1 * this.rad * (2 + 2 * e) / 3,
- o = 1 * this.rad * e;
- Zi.save();
- t && (Zi.globalAlpha = Zi.globalAlpha * this.onFireEffA * e, Zi.drawImage(t, s + -.5 * n, r + -.95 * o, n, o));
- i && (Zi.globalAlpha = Zi.globalAlpha * this.onFireEffA * e, Zi.drawImage(i, s + .5 * this.rad + -.5 * n, r + .5 * this.rad + -.95 * o, n, o));
- Zi.restore()
- }
- }
- .01 < this.frozenEffA && this.flag_eff_frozen && (Zi.save(), a = 7, a = Yi % (1e3 * a) / (1e3 * a), Zi.rotate(2 * a * Math.PI), Zi.globalAlpha *= this.frozenEffA, t = .2 * this.rad, a = (Yi - this.spawnTime) / 1e3, e = (.5 + .07 * t) * Math.sin(2 * Math.PI / 1 * a), Zi.fillStyle = "white", i = .27 * this.rad, Zi.beginPath(), Zi.arc(-i, -i, Math.max(0, t + e), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(i, -i, Math.max(0, t - e), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(i, i, Math.max(0, t + e), 0, 2 * Math.PI), Zi.fill(), Zi.beginPath(), Zi.arc(-i, i, Math.max(0, t - e), 0, 2 * Math.PI), Zi.fill(), Zi.restore());
- .01 < this.frozenEffA && (Zi.save(), Zi.globalAlpha = .3 * Zi.globalAlpha * this.frozenEffA, ci(0, 0, Math.max(0, this.rad - this.outlineW), "white"), Zi.restore());
- .01 < this.effA_healing && (Zi.save(), Zi.globalAlpha = .3 * Zi.globalAlpha * this.effA_healing, ci(0, 0, Math.max(0, this.rad - this.outlineW), "#ef24ed"), Zi.restore());
- .01 < this.effA_poison && (Zi.save(), Zi.globalAlpha = .3 * Zi.globalAlpha * this.effA_poison, e = .3, t = .5 * (1 - e), Zi.globalAlpha *= e + t + t * Math.sin(2 * Math.PI / 1.2 * ((Yi - this.spawnTime) / 1e3)), ci(0, 0, Math.max(0, this.rad - this.outlineW), "#9FDA00"), Zi.restore());
- e = this.flag_eff_bleeding ? .8 : 0;
- this.effA_bleeding += .1 * (e - this.effA_bleeding);
- .01 < this.effA_bleeding && (Zi.save(), e = .3, t = .3 * (1 - e), Zi.globalAlpha *= e + t + t * Math.sin(2 * Math.PI / 1.2 * ((Yi - this.spawnTime) / 1e3)), Zi.globalAlpha *= this.effA_bleeding, ci(0, 0, this.rad + -2.6 * this.effA_bleeding, "red"), Zi.restore());
- e = this.flag_eff_slimed ? .8 : 0;
- this.effA_slimed += .1 * (e - this.effA_slimed);
- .01 < this.effA_slimed && (Zi.save(), e = .3, t = .3 * (1 - e), Zi.globalAlpha *= e + t + t * Math.sin(2 * Math.PI / 1.2 * ((Yi - this.spawnTime) / 1e3)), Zi.globalAlpha *= this.effA_slimed, ci(0, 0, this.rad + -2.6 * this.effA_slimed, "grey"), Zi.restore());
- e = this.flag_eff_stunk ? .8 : 0;
- this.effA_stunk += .1 * (e - this.effA_stunk);
- .01 < this.effA_stunk && (Zi.save(), e = .3, t = .3 * (1 - e), Zi.globalAlpha *= e + t + t * Math.sin(2 * Math.PI / 1.2 * ((Yi - this.spawnTime) / 1e3)), Zi.globalAlpha *= this.effA_stunk, ci(0, 0, this.rad + -2.6 * this.effA_stunk, "brown"), Zi.restore());
- this.animalType == wa && this.flag_usingAbility && (e = 1 * Math.sin(2 * Math.PI / .75 * a), a = Zi.globalAlpha, Zi.globalAlpha *= .8 - .2 * e, ci(.15 * this.rad, 1.27 * -this.rad, this.rad * (.1 + .05 * e), "#efefef"), ci(.15 * -this.rad, 1.27 * -this.rad, this.rad * (.1 - .05 * e), "#efefef"), Zi.globalAlpha = a);
- e = this.flag_webStuck ? 1 : 0;
- this.effA_webStuck += .02 * (e - this.effA_webStuck);
- if (.01 < this.effA_webStuck) {
- Zi.save();
- Zi.globalAlpha = .9 * Zi.globalAlpha * this.effA_webStuck;
- if (t = Ns("img/spiderWeb_stuck.png")) a = 1.3 * this.rad, Zi.drawImage(t, -a, -a, 2 * a, 2 * a);
- Zi.restore()
- }
- e = this.flag_constricted ? 1 : 0;
- this.effA_constricted += .04 * (e - this.effA_constricted);
- if (.01 < this.effA_constricted) {
- Zi.save();
- Zi.globalAlpha = .9 * Zi.globalAlpha * this.effA_constricted;
- if (t = Ns("img/constrict.png")) a = 1.3 * this.rad, Zi.rotate(-this.angle), Zi.drawImage(t, -a, -a, 2 * a, 2 * a);
- Zi.restore()
- }
- };
- Cn.prototype.getSkinName = function() {
- var e = this.skinImgName;
- switch (this.animalType) {
- case Xe:
- case ea:
- case Ve:
- case He:
- case Re:
- case da:
- case ba:
- case ya:
- case Ia:
- this.flag_usingAbility && (e += "2");
- break;
- case Pa:
- this.z *= 2, this.flag_usingAbility && 4 == this.specType && (e += "2")
- }!this.flag_flying || this.flag_isGrabbed || this.animalType != va && this.animalType != pa || (e = "flying_" + e);
- return e
- };
- Cn.prototype.setObjTypes = function(e, a) {
- this.oType = e;
- this.animalType = a
- };
- Cn.prototype.readCustomData_onNewlyVisible = function(e) {
- Cn.superClass.prototype.readCustomData_onNewlyVisible.call(this, e);
- e = e.readString();
- this.setNick(e ? e : "mope.io")
- };
- Cn.prototype.readCustomData_onUpdate = function(e) {
- Cn.superClass.prototype.readCustomData_onUpdate.call(this, e);
- if (this.oType == f) {
- this.specType = e.readUInt8();
- this.specType2 = e.readUInt8();
- var a = 2 * e.readUInt8(),
- a = Zt(a - 90);
- this.angleDelta = ai(this.angle, a);
- this.oAngle = this.angle;
- this.firstPosUpd && (this.oAngle = this.angle = a, this.angleDelta = 0);
- e = e.readBitGroup();
- this.curBiome = e.getIntWithXBits(3);
- this.flag_lowWat = e.getBool();
- this.flag_underWater = e.getBool();
- this.flag_eff_invincible = e.getBool();
- this.flag_usingAbility = e.getBool();
- this.flag_tailBitten = e.getBool();
- this.flag_eff_stunned = e.getBool();
- this.flag_iceSliding = e.getBool();
- this.flag_eff_frozen = e.getBool();
- this.flag_eff_onFire = e.getBool();
- this.flag_eff_healing = e.getBool();
- this.flag_eff_poison = e.getBool();
- this.flag_constricted = e.getBool();
- this.flag_webStuck = e.getBool();
- this.flag_stealth = e.getBool();
- this.flag_eff_bleeding = e.getBool();
- this.flag_flying = e.getBool();
- this.flag_isGrabbed = e.getBool();
- this.flag_eff_aniInClaws = e.getBool();
- this.flag_eff_stunk = e.getBool();
- this.flag_cold = e.getBool();
- this.flag_inWater = e.getBool();
- this.flag_inLava = e.getBool();
- this.flag_canClimbHill = e.getBool();
- this.flag_isDevMode = e.getBool();
- this.flag_eff_slimed = e.getBool()
- }
- };
- function Cn() {
- Dn.call(this, f)
- }
- window.Animal = Cn;
- h.setCustomClassForGameObjType(Cn, f);
- Dn = In;
- Nn.prototype = Object.create(Dn.prototype);
- Nn.prototype.constructor = Nn;
- Nn.superClass = Dn;
- Nn.prototype.updateZ = function() {
- this.z = 1002
- };
- Nn.prototype.readCustomData_onUpdate = function(e) {
- this.webTransparency = this.specType = e.readUInt8()
- };
- Nn.prototype.customDraw = function(e) {
- Zi.save();
- Zi.globalAlpha = this.specType / 100 * Zi.globalAlpha * .9;
- if (e = Ns("img/spiderWeb.png")) {
- var a = this.rad;
- Zi.rotate(this.rPer * Math.PI * 2);
- Zi.drawImage(e, -a, -a, 2 * a, 2 * a)
- }
- Zi.restore()
- };
- Nn.prototype.readCustomData_onNewlyVisible = function(e) {
- this.webTransparency = this.specType = e.readUInt8()
- };
- function Nn() {
- Nn.superClass.call(this, ge);
- this.webTransparency = 0;
- this.drawEffectScale_Slow = this.doesDrawEffectScale = !0
- }
- window.SpiderWeb = Nn;
- h.setCustomClassForGameObjType(Nn, ge);
- Dn = Cn;
- _n.prototype = Object.create(Dn.prototype);
- _n.prototype.constructor = _n;
- _n.superClass = Dn;
- _n.prototype.readCustomData_onNewlyVisible = function(e) {
- _n.superClass.prototype.readCustomData_onNewlyVisible.call(this, e)
- };
- _n.prototype.readCustomData_onUpdate = function(e) {
- _n.superClass.prototype.readCustomData_onUpdate.call(this, e);
- if (this.flag_usingAbility) {
- var a = 0 < e.readUInt8();
- e = e.readUInt16();
- if (this.octoIsAnimal != a || this.octoDisguiseObjT != e || null == this.octoDrawObj) {
- var t = a ? e : null,
- i = h.createGameObjOfOType(a ? f : e, t);
- a && (i.animalType = t);
- i.oRad = this.oRad;
- i.nRad = this.nRad;
- i.curBiome = this.curBiome;
- this.octoDrawObj = i
- }
- this.octoIsAnimal = a;
- this.octoDisguiseObjT = e
- }
- };
- _n.prototype.drawUnderSkinImgOutline = function() {
- _n.superClass.prototype.drawUnderSkinImgOutline.call(this)
- };
- _n.prototype.drawUnderSkinImg = function() {
- _n.superClass.prototype.drawUnderSkinImg.call(this)
- };
- _n.prototype.drawOnTopOfSkinImg = function() {
- _n.superClass.prototype.drawOnTopOfSkinImg.call(this);
- this.flag_usingAbility && (Zi.save(), Zi.globalAlpha = 1 - this.underwaterA, this.octoDisguiseObjT == R ? this.octoDrawObj.nRad = 25 : this.octoDisguiseObjT == W ? this.octoDrawObj.nRad = 17 : this.octoDisguiseObjT == te && (this.octoDrawObj.nRad = 15), this.octoDrawObj.nRad = this.rad, this.octoDrawObj.draw(), Zi.restore())
- };
- _n.prototype.drawWhenUnderwater = function() {
- _n.superClass.prototype.drawWhenUnderwater.call(this)
- };
- _n.prototype.octoDisguiseObjT = 0;
- _n.prototype.octoIsAnimal = !1;
- _n.prototype.drawHealthBar = function() {
- if (this.flag_usingAbility)
- if (this.octoIsAnimal) _n.superClass.prototype.drawNickName.call(this, 1), this.octoDrawObj.curBiome = this.curBiome, this.hpPer_n = 2, this.hpPer = 25, this.hpBarA = 1;
- else return;
- Zi.save();
- this.hpBarA += .04 * ((Yi < this.hpBarTimeoutT ? 1 : 0) - this.hpBarA);
- if (.001 < this.hpBarA) {
- this.hpPer += .1 * (this.hpPer_n - this.hpPer);
- var e = Math.max(1, this.rad / 25),
- a = 20 * e,
- t = 5 * e,
- e = -this.rad - 10 * e;
- Zi.globalAlpha *= this.hpBarA;
- Zi.fillStyle = "rgba(0,0,0,0.35)";
- Zi.fillRect(0 - a / 2, e - t / 2, a, t);
- Zi.fillStyle = "#16D729";
- var i = this.hpPer / 100 * a;
- this.flag_usingAbility && this.octoIsAnimal && (i = .25 * a);
- Zi.fillRect(0 - a / 2, e - t / 2, i, t)
- }
- Zi.restore()
- };
- _n.prototype.getSkinName = function() {
- return "octopus"
- };
- function _n() {
- _n.superClass.call(this, f)
- }
- window.Octopus = _n;
- h.setCustomClassForGameObjType(_n, f, Je);
- Dn = Cn;
- Sn.prototype = Object.create(Dn.prototype);
- Sn.prototype.constructor = Sn;
- Sn.superClass = Dn;
- Sn.prototype.getSkinName = function() {
- return "eagle/eagle" + (0 == this.specType ? "" : this.specType)
- };
- Sn.prototype.drawSkinCustomization = function() {
- if (this.flag_usingAbility) {
- var e = 500 / 340;
- if (this.flag_flying && !this.flag_isGrabbed) {
- Zi.save();
- var a = (Yi - this.spawnTime) / 1e3,
- a = di(a, .9, .3, 2),
- t = Ns("skins/eagle/eagle_wing1.png");
- if (t) {
- Zi.save();
- var i = -(-.2 + a) * Zt(90),
- s = .8 * this.rad;
- Zi.rotate(Zt(45) + i);
- var i = this.rad,
- r = 1.24 * s,
- s = 2.5 * s;
- Zi.drawImage(t, 0 + -.2 * r, i + -1.7 * s, r, s);
- Zi.restore()
- }
- if (t = Ns("skins/eagle/eagle_wing2.png")) Zi.save(), i = -(-.2 + a) * Zt(-90), s = .8 * this.rad, Zi.rotate(Zt(-45) + i), i = this.rad, r = 1.24 * s, s *= 2.5, Zi.drawImage(t, 0 + -.8 * r, i + -1.7 * s, r, s), Zi.restore();
- Zi.restore()
- } else if (1 == this.specType) {
- Zi.save();
- a = (Yi - this.spawnTime) / 1e3;
- a = di(a, .7, .3, 2);
- if (t = Ns("skins/eagle/eagle_wing1.png")) Zi.save(), i = -(-.2 + a) * Zt(45), s = .8 * this.rad, Zi.rotate(Zt(15) + i), i = this.rad, r = 1.6 * s, s *= 2.2, Zi.drawImage(t, 0 + -0 * r, i + -1.5 * s, r, s), Zi.restore();
- if (t = Ns("skins/eagle/eagle_wing2.png")) Zi.save(), i = -(-.2 + a) * Zt(-45), s = .8 * this.rad, Zi.rotate(Zt(-15) + i), i = this.rad, r = 1.6 * s, s *= 2.2, Zi.drawImage(t, 0 + -1 * r, i + -1.5 * s, r, s), Zi.restore();
- Zi.restore()
- }
- 0 != this.specType && void 0 != this.specType && (a = Ns("skins/eagle/eagle_head.png")) && (Zi.save(), s = this.rad, Zi.drawImage(a, -s * e, (-s + .1 * s) * e, 2 * s * e, 2 * s * e), Zi.restore())
- }
- };
- function Sn() {
- Sn.superClass.call(this, f)
- }
- window.Eagle = Sn;
- h.setCustomClassForGameObjType(Sn, f, Ta);
- Dn = Cn;
- En.prototype = Object.create(Dn.prototype);
- En.prototype.constructor = En;
- En.superClass = Dn;
- En.prototype.getSkinName = function() {
- return "ostrich/ostrich"
- };
- function En() {
- En.superClass.call(this, f)
- }
- window.Ostrich = En;
- h.setCustomClassForGameObjType(En, f, Na);
- Dn = Cn;
- Un.prototype = Object.create(Dn.prototype);
- Un.prototype.constructor = Un;
- Un.superClass = Dn;
- Un.prototype.getSkinName = function() {
- return "ostrich/ostrich-baby"
- };
- Un.prototype.isEdibleOutlined = function() {
- if (this.mommyID == dr) return !1;
- var e = Fs[dr];
- return e && (e = e.animalType, e == Ee || e == ya || e == Ye) ? !1 : Un.superClass.prototype.isEdibleOutlined.call(this)
- };
- Un.prototype.readCustomData_onNewlyVisible = function(e) {
- Un.superClass.prototype.readCustomData_onNewlyVisible.call(this, e);
- this.mommyID = e.readUInt32()
- };
- function Un() {
- Un.superClass.call(this, f)
- }
- window.OstrichBaby = Un;
- h.setCustomClassForGameObjType(Un, f, Oa);
- Dn = Cn;
- Bn.prototype = Object.create(Dn.prototype);
- Bn.prototype.constructor = Bn;
- Bn.superClass = Dn;
- Bn.prototype.getSkinName = function() {
- return "falcon/falcon" + (0 == this.specType || void 0 == this.specType ? "" : this.specType)
- };
- Bn.prototype.drawSkinCustomization = function() {
- if (this.flag_usingAbility) {
- var e = 500 / 340;
- if (this.flag_flying && !this.flag_isGrabbed && 1 == this.specType) {
- Zi.save();
- var a = (Yi - this.spawnTime) / 1e3,
- t = di(a, .7, .4, 2),
- i = Ns("skins/falcon/falcon_wing1.png");
- if (i) {
- Zi.save();
- var s = -(-.2 + t) * Zt(80),
- a = .8 * this.rad;
- Zi.rotate(Zt(25) + s);
- var s = this.rad,
- r = 1.3 * a,
- a = 2.5 * a;
- Zi.drawImage(i, 0 + -0 * r, s + -1.5 * a, r, a);
- Zi.restore()
- }
- if (i = Ns("skins/falcon/falcon_wing2.png")) Zi.save(), s = -(-.2 + t) * Zt(-80), a = .8 * this.rad, Zi.rotate(Zt(-25) + s), s = this.rad, r = 1.3 * a, a *= 2.5, Zi.drawImage(i, 0 + -1 * r, s + -1.5 * a, r, a), Zi.restore();
- Zi.restore()
- } else if (this.flag_flying && 2 == this.specType) {
- Zi.save();
- a = (Yi - this.spawnTime) / 1e3;
- di(a, .7, .3, 2);
- if (i = Ns("skins/falcon/falcon_wing1.png")) Zi.save(), s = .2 * Zt(25), a = .8 * this.rad, Zi.rotate(s), s = this.rad, r = 1.4 * a, a *= 2.2, Zi.drawImage(i, 0 + -0 * r, s + -1.5 * a, r, a), Zi.restore();
- if (i = Ns("skins/falcon/falcon_wing2.png")) Zi.save(), s = .2 * Zt(-25), a = .8 * this.rad, Zi.rotate(s), s = this.rad, r = 1.4 * a, a *= 2.2, Zi.drawImage(i, 0 + -1 * r, s + -1.5 * a, r, a), Zi.restore();
- Zi.restore()
- } else if (this.flag_flying && 3 == this.specType) {
- Zi.save();
- a = (Yi - this.spawnTime) / 1e3;
- t = di(a, .5, .4, 2);
- if (i = Ns("skins/falcon/falcon_wing1.png")) Zi.save(), s = -(-.2 + t) * Zt(45), a = .8 * this.rad, Zi.rotate(Zt(15) + s), s = this.rad, r = 2 * a, a *= 2.2, Zi.drawImage(i, 0 + -0 * r, s + -1.5 * a, r, a), Zi.restore();
- if (i = Ns("skins/falcon/falcon_wing2.png")) Zi.save(), s = -(-.2 + t) * Zt(-45), a = .8 * this.rad, Zi.rotate(Zt(-15) + s), s = this.rad, r = 2 * a, a *= 2.2, Zi.drawImage(i, 0 + -1 * r, s + -1.5 * a, r, a), Zi.restore();
- Zi.restore()
- }
- 0 != this.specType && void 0 != this.specType && (t = Ns("skins/falcon/falcon_head.png")) && (Zi.save(), a = this.rad * (3 == this.specType ? 1.2 : 1), i = .2 * a, 3 == this.specType && (i = -.15 * a), Zi.drawImage(t, -a * e, (-a + i) * e, 2 * a * e, 2 * a * e), Zi.restore())
- }
- };
- function Bn() {
- Bn.superClass.call(this, f)
- }
- window.Falcon = Bn;
- h.setCustomClassForGameObjType(Bn, f, Sa);
- Dn = Cn;
- On.prototype = Object.create(Dn.prototype);
- On.prototype.constructor = On;
- On.superClass = Dn;
- On.prototype.getSkinName = function() {
- return "snowyowl/snowyowl" + (0 == this.specType ? "" : this.specType)
- };
- On.prototype.drawSkinCustomization = function() {
- if (this.flag_usingAbility) {
- var e = 500 / 340;
- if (this.flag_flying && !this.flag_isGrabbed && 1 == this.specType) {
- Zi.save();
- var a = (Yi - this.spawnTime) / 1e3,
- a = di(a, .7, .4, 2),
- t = Ns("skins/snowyowl/snowyowl_wing1.png");
- if (t) {
- Zi.save();
- var i = -(-.2 + a) * Zt(80),
- s = .8 * this.rad;
- Zi.rotate(Zt(25) + i);
- var i = this.rad,
- r = 1.3 * s,
- s = 2.5 * s;
- Zi.drawImage(t, 0 + -0 * r, i + -1.5 * s, r, s);
- Zi.restore()
- }
- if (t = Ns("skins/snowyowl/snowyowl_wing2.png")) Zi.save(), i = -(-.2 + a) * Zt(-80), s = .8 * this.rad, Zi.rotate(Zt(-25) + i), i = this.rad, r = 1.3 * s, s *= 2.5, Zi.drawImage(t, 0 + -1 * r, i + -1.5 * s, r, s), Zi.restore();
- Zi.restore()
- } else if (this.flag_flying && 2 == this.specType) {
- Zi.save();
- a = (Yi - this.spawnTime) / 1e3;
- a = di(a, .7, .3, 2);
- if (t = Ns("skins/snowyowl/snowyowl_wing1.png")) Zi.save(), i = -(-.2 + a) * Zt(45), s = .8 * this.rad, Zi.rotate(Zt(15) + i), i = this.rad, r = 1.4 * s, s *= 2.2, Zi.drawImage(t, 0 + -0 * r, i + -1.5 * s, r, s), Zi.restore();
- if (t = Ns("skins/snowyowl/snowyowl_wing2.png")) Zi.save(), i = -(-.2 + a) * Zt(-45), s = .8 * this.rad, Zi.rotate(Zt(-15) + i), i = this.rad, r = 1.4 * s, s *= 2.2, Zi.drawImage(t, 0 + -1 * r, i + -1.5 * s, r, s), Zi.restore();
- Zi.restore()
- } else if (this.flag_flying && 3 == this.specType) {
- Zi.save();
- a = (Yi - this.spawnTime) / 1e3;
- a = di(a, .5, .5, 2);
- if (t = Ns("skins/snowyowl/snowyowl_wing1.png")) Zi.save(), i = -(-.2 + a) * Zt(45), s = .8 * this.rad, Zi.rotate(Zt(25) + i), i = this.rad, r = 1.4 * s, s *= 2.2, Zi.drawImage(t, 0 + -0 * r, i + -1.5 * s, r, s), Zi.restore();
- if (t = Ns("skins/snowyowl/snowyowl_wing2.png")) Zi.save(), i = -(-.2 + a) * Zt(-45), s = .8 * this.rad, Zi.rotate(Zt(-25) + i), i = this.rad, r = 1.4 * s, s *= 2.2, Zi.drawImage(t, 0 + -1 * r, i + -1.5 * s, r, s), Zi.restore();
- Zi.restore()
- }
- 0 != this.specType && void 0 != this.specType && (a = Ns("skins/snowyowl/snowyowl_head.png")) && (Zi.save(), s = .8 * this.rad, Zi.drawImage(a, -s * e, (-s + .1 * s) * e, 2 * s * e, 2 * s * e), Zi.restore())
- }
- };
- function On() {
- On.superClass.call(this, f)
- }
- window.SnowyOwl = On;
- h.setCustomClassForGameObjType(On, f, Ea);
- Dn = Cn;
- Rn.prototype = Object.create(Dn.prototype);
- Rn.prototype.constructor = Rn;
- Rn.superClass = Dn;
- Rn.prototype.getSkinName = function() {
- return "pelican/pelican" + (0 == this.specType ? "" : this.specType)
- };
- Rn.prototype.drawSkinCustomization = function() {
- if (this.flag_usingAbility) {
- var e = 500 / 340,
- a;
- if (this.flag_flying) {
- Zi.save();
- a = (Yi - this.spawnTime) / 1e3;
- var t = di(a, .9, .3, 2),
- i = Ns("skins/pelican/pelican_wing1.png");
- if (i) {
- Zi.save();
- var s = -(-.2 + t) * Zt(90);
- a = .8 * this.rad;
- Zi.rotate(Zt(45) + s);
- var s = this.rad,
- r = 1.2 * a;
- a *= 2.3;
- Zi.drawImage(i, 0 + -0 * r, s + -1.7 * a, r, a);
- Zi.restore()
- }
- if (i = Ns("skins/pelican/pelican_wing2.png")) Zi.save(), s = -(-.2 + t) * Zt(-90), a = .8 * this.rad, Zi.rotate(Zt(-45) + s), s = this.rad, r = 1.2 * a, a *= 2.3, Zi.drawImage(i, 0 + -1 * r, s + -1.7 * a, r, a), Zi.restore();
- Zi.restore()
- } else if (1 == this.specType) {
- Zi.save();
- a = (Yi - this.spawnTime) / 1e3;
- t = di(a, .9, .3, 2);
- if (i = Ns("skins/pelican/pelican_wing11.png")) Zi.save(), s = -(-.2 + t) * Zt(45), a = .8 * this.rad, Zi.rotate(Zt(45) + s), s = this.rad, r = 1.4 * a, a *= 2.2, Zi.drawImage(i, 0 + -0 * r, s + -1.7 * a, r, a), Zi.restore();
- if (i = Ns("skins/pelican/pelican_wing21.png")) Zi.save(), s = -(-.2 + t) * Zt(-45), a = .8 * this.rad, Zi.rotate(Zt(-45) + s), s = this.rad, r = 1.4 * a, a *= 2.2, Zi.drawImage(i, 0 + -1 * r, s + -1.7 * a, r, a), Zi.restore();
- Zi.restore()
- }
- 0 != this.specType && !this.flag_isGrabbed && (2 == this.specType && (i = Ns("skins/pelican/ability_pelican.png")) && (Zi.save(), Zi.rotate(Zt(180)), a = .3 * this.rad, t = 1 * this.rad, Zi.drawImage(i, -a * e, -a - t * e, 2 * a * e, 2 * a * e), Zi.restore()), i = Ns("skins/pelican/pelican_head" + (3 == this.specType ? "2" : "") + ".png")) && (Zi.save(), a = 1 * this.rad, t = .3 * -this.rad, Zi.drawImage(i, -a * e, -a + t * e, 2 * a * e, 2 * a * e), Zi.restore())
- }
- };
- function Rn() {
- Rn.superClass.call(this, f)
- }
- window.Pelican = Rn;
- h.setCustomClassForGameObjType(Rn, f, _a);
- Dn = Cn;
- Fn.prototype = Object.create(Dn.prototype);
- Fn.prototype.constructor = Fn;
- Fn.superClass = Dn;
- Fn.prototype.updateZ = function() {
- this.z = 1003 + this.rad
- };
- Fn.prototype.getSkinName = function() {
- var e = "";
- this.flag_usingAbility && !this.flag_underWater && 1 == specType && (e = "2");
- return "frog/frog" + e
- };
- Fn.prototype.drawUnderSkinImg = function() {
- if (this.flag_usingAbility && !this.flag_underWater && 1 == this.specType) {
- var e = this.rad - this.outlineW,
- a = 500 / 340,
- t = Ns("./skins/frog/frogLegs.png");
- t && Zi.drawImage(t, -e * a, (-e - e) * a, 2 * e * a, 2 * e * a)
- }
- };
- Fn.prototype.drawWhenUnderwater = function() {
- Zi.save();
- Zi.globalAlpha = .2;
- Zi.scale(1, 1.5);
- ci(0, 0, .5 * this.rad, "#598b30");
- ci(0, -.6 * this.rad, .3 * this.rad, "#64a034");
- Zi.restore()
- };
- function Fn() {
- Fn.superClass.call(this, f)
- }
- window.Frog = Fn;
- h.setCustomClassForGameObjType(Fn, f, Ca);
- xn = Wn;
- Dn = Cn;
- xn.prototype = Object.create(Dn.prototype);
- xn.prototype.constructor = xn;
- xn.superClass = Dn;
- xn.prototype.getSkinName = function() {
- return "duck/duck_" + this.specType
- };
- xn.prototype.drawSkinCustomization = function() {
- var e = 500 / 340;
- if (this.flag_flying && !this.flag_isGrabbed) {
- Zi.save();
- var a = di((Yi - this.spawnTime) / 1e3, .9, .3, 2),
- t = Ns("skins/duck/duck_wing1.png");
- if (t) {
- Zi.save();
- var i = -(-.2 + a) * Zt(90),
- s = .8 * this.rad;
- Zi.rotate(Zt(45) + i);
- var i = this.rad,
- r = 1 * s,
- s = 2.2 * s;
- Zi.drawImage(t, 0 + -0 * r, i + -1.7 * s, r, s);
- Zi.restore()
- }
- if (t = Ns("skins/duck/duck_wing2.png")) Zi.save(), i = -(-.2 + a) * Zt(-90), s = .8 * this.rad, Zi.rotate(Zt(-45) + i), i = this.rad, r = 1 * s, s *= 2.2, Zi.drawImage(t, 0 + -1 * r, i + -1.7 * s, r, s), Zi.restore();
- if (a = Ns("skins/duck/head_duck.png")) s = this.rad - this.outlineW, Zi.drawImage(a, -s * e, -s * e, 2 * s * e, 2 * s * e);
- Zi.restore()
- }
- };
- function Wn() {
- Dn.call(this, f)
- }
- window.Duck = Wn;
- h.setCustomClassForGameObjType(Wn, f, va);
- Dn = Cn;
- Gn.prototype = Object.create(Dn.prototype);
- Gn.prototype.constructor = Gn;
- Gn.superClass = Dn;
- Gn.prototype.getSkinName = function() {
- return "duck/duckling"
- };
- function Gn() {
- Gn.superClass.call(this, f)
- }
- window.Duckling = Gn;
- h.setCustomClassForGameObjType(Gn, f, Da);
- Dn = Cn;
- Hn.prototype = Object.create(Dn.prototype);
- Hn.prototype.constructor = Hn;
- Hn.superClass = Dn;
- Hn.prototype.updateZ = function() {
- this.z = 1003 + this.rad
- };
- Hn.prototype.getSkinName = function() {
- return "blackdragon"
- };
- Hn.prototype.readCustomData_onNewlyVisible = function(e) {
- Hn.superClass.prototype.readCustomData_onNewlyVisible.call(this, e);
- this.lava = e.readUInt8()
- };
- Hn.prototype.readCustomData_onUpdate = function(e) {
- Hn.superClass.prototype.readCustomData_onUpdate.call(this, e);
- this.lava = e.readUInt8()
- };
- Hn.prototype.drawSkinCustomization = function() {
- var e = 500 / 340,
- a = Ns("skins/bd-nostrils.png");
- if (a) {
- var t = (Yi - this.spawnTime) / 1e3,
- i = di(t, 5, 1, 1);
- Zi.save();
- Zi.globalAlpha = Math.max(0, i);
- t = this.rad - this.outlineW;
- Zi.drawImage(a, -t * e, -t * e, 2 * t * e, 2 * t * e);
- Zi.restore()
- }
- a = this.lava;
- 50 > a && (i = a / 50, a = Ns("skins/bd-lowlava-wings.png")) && (Zi.save(), Zi.globalAlpha = 1 - i, t = this.rad - this.outlineW, Zi.drawImage(a, -t * e, -t * e, 2 * t * e, 2 * t * e), Zi.restore());
- if (this.flag_flying && !this.flag_isGrabbed) {
- Zi.save();
- var t = (Yi - this.spawnTime) / 1e3,
- i = di(t, 2.1, .4, 1.5),
- e = di(t, 2.1, -8, 1.5),
- s = di(t, 2.1, .4, 1.5),
- r = di(t, 2.1, .3, 1.5),
- a = Ns("img/blackdragon_wing1.png"),
- t = .6 * this.rad;
- if (a) {
- Zi.save();
- var n = -(-.3 + i) * Zt(90);
- Zi.rotate(n);
- var n = this.rad,
- o = 1.6 * t,
- l = 2 * t + 5 * e;
- imAnchorY = 1.75 - (s + s / 4 - r);
- Zi.drawImage(a, 0 + .65 * o, n + l * -imAnchorY, o, l);
- Zi.restore()
- }
- if (a = Ns("img/blackdragon_wing2.png")) Zi.save(), n = -(-.3 + i) * Zt(-90), Zi.rotate(n), n = this.rad, o = 1.6 * t, l = 2 * t + 5 * e, imAnchorY = 1.75 - (s + s / 4) + r, Zi.drawImage(a, 0 + -1.65 * o, n + l * -imAnchorY, o, l), Zi.restore();
- Zi.restore()
- }
- };
- function Hn() {
- this.lava = 0;
- Hn.superClass.call(this, f)
- }
- window.BlackDragon = Hn;
- h.setCustomClassForGameObjType(Hn, f, pa);
- Dn = In;
- zn.prototype = Object.create(Dn.prototype);
- zn.prototype.constructor = zn;
- zn.superClass = Dn;
- zn.prototype.updateZ = function() {
- this.z = 1005
- };
- zn.prototype.customDraw = function(e) {
- e = .15;
- var a = .5 * (.8 - e);
- e = e + a + a * Math.sin(2 * Math.PI / 1 * (Yi / 1e3));
- Zi.save();
- Zi.globalAlpha *= e;
- Zi.restore();
- e = .85;
- a = .5 * (1 - e);
- e = e + a + a * Math.sin(2 * Math.PI / 1 * (Yi / 1e3));
- if (a = Ns("img/fire/" + Math.trunc(Yi / 120) % 5 + ".png")) {
- var t = .4 * this.rad,
- i = 2 * this.rad * (2 + 2 * e) / 3,
- s = 2 * this.rad * e;
- Zi.save();
- a && (Zi.globalAlpha = Zi.globalAlpha * this.onFireEffA * e, Zi.rotate(this.angle), Zi.drawImage(a, 0 + -.5 * i, t + -.95 * s, i, s));
- Zi.restore()
- }
- };
- function zn() {
- zn.superClass.call(this, n);
- this.webTransparency = 0;
- this.drawEffectScale_Slow = this.doesDrawEffectScale = !0
- }
- window.Fire = zn;
- h.setCustomClassForGameObjType(zn, n);
- Dn = In;
- jn.prototype = Object.create(Dn.prototype);
- jn.prototype.constructor = jn;
- jn.superClass = Dn;
- jn.prototype.updateZ = function() {
- this.z = 1005
- };
- jn.prototype.customDraw = function(e) {
- e = .15;
- var a = .5 * (.8 - e);
- e = e + a + a * Math.sin(2 * Math.PI / 1 * (Yi / 1e3));
- Zi.save();
- Zi.globalAlpha *= e;
- Zi.restore();
- e = .85;
- a = .5 * (1 - e);
- e = e + a + a * Math.sin(2 * Math.PI / 1 * (Yi / 1e3));
- if (a = Ns("img/fireball/" + Math.trunc(Yi / 120) % 5 + ".png")) {
- var t = .4 * this.rad,
- i = 2 * this.rad * (2 + 2 * e) / 3,
- s = 3.5 * this.rad * e;
- Zi.save();
- a && (Zi.globalAlpha = Zi.globalAlpha * this.onFireEffA * e, Zi.rotate(this.angle), Zi.drawImage(a, 0 + -.5 * i, t + -.95 * s, i, s));
- Zi.restore()
- }
- };
- function jn() {
- jn.superClass.call(this, _)
- }
- window.FireBall = jn;
- h.setCustomClassForGameObjType(jn, _);
- for (var Ln = [], Xn = ["USA-East", "USA-West", "Brazil/ USA-South", "Europe", "Asia/Australia"], Yn = {}, Vn = 0; Vn < Xn.length; Vn++) Yn[Xn[Vn]] = [];
- function Kn(e, a, t) {
- e = {
- name: e,
- ip: a,
- serverConnURL: a,
- region: t,
- playersCount: -1,
- ping: 1e4,
- domOptionIndex: 0
- };
- Ln.push(e);
- Yn[t].push(e);
- return e
- }
- if (t) {
- var Jn = "USA-East";
- Kn("LOCAL TEST", "127.0.0.1", Jn)
- } else Jn = "USA-East", Kn("USA 1", "104.207.132.63", Jn), Kn("USA 2", "107.191.40.35", Jn), Kn("USA 3", "107.191.43.180", Jn), Kn("USA 4", "45.63.17.44", Jn), Kn("USA 5", "107.191.40.38", Jn), Kn("USA 6", "104.238.138.249", Jn), Kn("USA 7", "45.76.20.213", Jn), Kn("USA 8", "45.76.28.156", Jn), Kn("USA 9", "104.238.135.150", Jn), Kn("USA 10", "207.246.83.246", Jn), Kn("USA 11", "104.238.131.13", Jn), Kn("USA 12", "108.61.87.46", Jn), Jn = "USA-West", Kn("USA W 1", "45.63.87.103", Jn), Kn("USA W 2", "45.32.137.149", Jn), Kn("USA W 3", "45.76.67.64", Jn), Kn("USA W 4", "45.63.51.60", Jn), Kn("USA W 5", "45.32.228.141", Jn), Kn("USA W 6", "104.207.158.226", Jn), Jn = "Brazil/ USA-South", Kn("USA S 1", "108.61.224.165", Jn), Kn("USA S 2", "107.191.55.233", Jn), Kn("USA S 3", "45.32.198.173", Jn), Kn("USA S 4", "104.238.147.152", Jn), Kn("USA S 5", "108.61.205.88", Jn), Jn = "Europe", Kn("Europe 1", "45.77.88.81", Jn), Kn("Europe 2", "104.238.170.8", Jn), Kn("Europe 3", "45.76.129.33", Jn), Kn("Europe 4", "45.76.134.74", Jn), Kn("Europe 5", "45.76.135.33", Jn), Kn("Europe 6", "45.76.129.125", Jn), Kn("Europe 7", "45.32.144.28", Jn), Kn("Europe 8", "185.92.221.137", Jn), Kn("Europe 9", "45.32.152.68", Jn), Kn("Europe 10", "45.32.156.214", Jn), Kn("Europe 11", "45.32.154.83", Jn), Kn("Europe 12", "45.63.117.122", Jn), Kn("Europe 13", "104.238.159.143", Jn), Kn("Europe 14", "45.32.157.75", Jn), Kn("Europe 15", "45.77.67.70", Jn), Kn("Europe 16", "45.76.81.117", Jn), Kn("Europe 17", "45.63.117.130", Jn), Kn("Europe 18", "45.63.116.195", Jn), Kn("Europe 19", "45.77.52.178", Jn), Kn("Europe 20", "45.76.91.16", Jn), Kn("Europe 21", "108.61.211.119", Jn), Kn("Europe 22", "45.76.89.189", Jn), Kn("Europe 23", "45.76.87.177", Jn), Jn = "Asia/Australia", Kn("Asia 1", "45.63.28.66", Jn), Kn("Asia 2", "45.76.112.176", Jn), Kn("Asia 3", "45.32.101.8", Jn);
- var qn = 2,
- Zn = function(e) {
- this.serverObj = e;
- e = "https:" === window.location.protocol ? "wss://" : "ws://";
- this.testWs = new WebSocket(e + this.serverObj.serverConnURL + ":" + ("wss://" == e ? 7021 : 7020));
- this.startT = +new Date;
- this.testWs.binaryType = "arraybuffer";
- var a = this;
- this.pingsDelayMsTot = this.pingsRec = 0;
- this.testWs.onopen = function() {
- a.sendPing()
- };
- this.sendPing = function() {
- var e = new fo(1);
- e.writeUInt8(255);
- a.testWs.send(e.dataView.buffer);
- this.startT = +new Date
- };
- this.testWs.onmessage = function(e) {
- e = new mo(new DataView(e.data));
- 255 == e.readUInt8() && (e = +new Date - a.startT, a.pingsRec += 1, a.pingsDelayMsTot += e, 3 <= a.pingsRec ? (a.serverObj.ping = a.pingsDelayMsTot / a.pingsRec, a.testWs.close(), oo(a)) : a.sendPing())
- }
- },
- Qn = t ? Xn[0] : Xn[Xt(0, Math.max(0, Xn.length - 1 - 1))],
- $n = 0,
- eo = Yn[Qn][$n],
- Qn = eo.region,
- ao = eo,
- to = [],
- io = !1,
- so = !1,
- ro;
- function no() {
- if (so) lo();
- else if (!io) {
- io = !0;
- for (var e in Yn) Yn.hasOwnProperty(e) && 0 < Yn[e].length && "SANDBOX" != e && to.push(new Zn(Yn[e][0]));
- ro = setTimeout(function() {
- for (var e = 0; e < to.length; e++) to[e].testWs.close();
- lo()
- }, 3e3)
- }
- }
- function oo(e) {
- e.serverObj.ping < ao.ping && (ao = e.serverObj);
- e = to.indexOf(e); - 1 != e && to.splice(e, 1);
- 0 == to.length && (ro && clearTimeout(ro), lo())
- }
- function lo() {
- io && (so = !0);
- io = !1;
- console.log("@@@@ Fastest region is " + ao.region + " with ping " + ao.ping + "ms ");
- Qn = ao.region;
- po()
- }
- var ho = 400,
- co = 500;
- function po() {
- var e = Yn[Qn].slice();
- e.sort(function(e, a) {
- return e.playersCount < a.playersCount ? 1 : e.playersCount > a.playersCount ? -1 : 0
- });
- for (var a = !1, t = !0, i = 0; i < e.length; i++)
- if (e[i].playersCount < co && 0 <= e[i].playersCount && (t = !1), e[i].playersCount < ho && 0 <= e[i].playersCount) {
- eo = e[i];
- $n = Yn[Qn].indexOf(eo);
- a = !0;
- break
- }
- if (!a)
- if (t && Io)
- for (console.log("All servers in region " + Qn + " are full/offline! Picking random server..."), t = !0, i = 0; i < Ln.length; i++) {
- if (Ln[i].playersCount < co) {
- eo = Ln[i];
- $n = Yn[eo.region].indexOf(eo);
- Qn = eo.region;
- break
- }
- } else eo = e[Xt(0, e.length - 1)], $n = e.indexOf(eo);
- console.log("Connecting to best server...");
- wo(eo)
- }
- function go(e) {
- var a = ts("audio/click.mp3");
- if (a) try {
- a.play()
- } catch (e) {}
- newMsg = new fo(2);
- newMsg.writeUInt8(24);
- newMsg.writeUInt8(tl.indexOf(e));
- Oo(newMsg);
- il && (Os = !1, dl(!1));
- il = el = !1
- }
- function mo(e) {
- this.data = e;
- this.offset = 0;
- this.readUInt8 = function() {
- var e = this.data.getUint8(this.offset);
- this.offset += 1;
- return e
- };
- this.readUInt16 = function() {
- try {
- var e = this.data.getUint16(this.offset, !1);
- this.offset += 2;
- return e
- } catch (e) {
- return 0
- }
- };
- this.readUInt32 = function() {
- var e = this.data.getUint32(this.offset, !1);
- this.offset += 4;
- return e
- };
- this.readString = function() {
- for (var e = this.readUInt16(), a = "", t, i = 0; i < e; i++) t = this.readUInt8(), i != e - 1 && (a += String.fromCharCode(t));
- return si(a)
- };
- this.readMsgReaderBitsGroup = function() {};
- this.readBitGroup = function() {
- return new uo(this)
- }
- }
- function fo(e) {
- this.len = 0;
- this.dataView = new DataView(new ArrayBuffer(e));
- this.writeUInt8 = function(e) {
- this.dataView.setUint8(this.len, e);
- this.len += 1
- };
- this.writeUInt16 = function(e) {
- this.dataView.setUint16(this.len, e, !1);
- this.len += 2
- };
- this.writeInt16 = function(e) {
- this.dataView.setInt16(this.len, e, !1);
- this.len += 2
- };
- this.writeUInt32 = function(e) {
- this.dataView.setUint32(this.len, e, !1);
- this.len += 4
- };
- this.writeString = function(e) {
- e = ii(e);
- len = e.length;
- this.writeUInt16(e.length);
- for (var a = 0; a < len; a++) this.writeUInt8(e.charCodeAt(a))
- }
- }
- function uo(e) {
- this.bytesArray = new Uint8Array(20);
- this.bytesLen = 0;
- this.rBitIndex = 1;
- this.rByteIndex = 0;
- this.getBool = function() {
- var e = 0 < $t(this.bytesArray[this.rByteIndex], this.rBitIndex);
- this.rBitIndex += 1;
- 7 < this.rBitIndex && (this.rBitIndex = 1, this.rByteIndex += 1);
- return e
- };
- this.getInt0to3 = function() {
- return this.getIntWithXBits(2)
- };
- this.getIntWithXBits = function(e) {
- for (var a = 0, t = 0; t < e; t++) var i = this.getBool(),
- a = ei(a, t, i);
- return a
- };
- this.byteToStr = function(e) {
- for (var a = "", t = 0; 8 > t; t++) a += 0 < $t(e, t) ? "1" : "0";
- return a
- };
- var a = !0;
- do {
- a = e.readUInt8(), this.bytesArray[this.bytesLen++] = a, a = 0 < $t(a, 0)
- } while (a)
- }
- var bo, yo = 0;
- function wo(a) {
- Eo();
- So();
- _o();
- eo = a;
- Qn = a.region;
- $n = Yn[a.region].indexOf(a);
- Ro() && (theWs = Kr, Kr = null, theWs.close());
- 1 < yo && ($n += 1, $n > Yn[Qn].length - 1 && ($n = 0), eo = Ln[$n], Qn = eo.region, _o());
- yr = !1;
- document.getElementById("connecting").style.visibility = "visible";
- var e = "https:" === window.location.protocol ? "wss://" : "ws://",
- e = e + eo.serverConnURL + ":" + ("wss://" == e ? 7021 : 7020);
- console.log("Connecting to " + eo.name + " (" + e + ")...");
- Kr = new WebSocket(e);
- Kr.binaryType = "arraybuffer";
- Kr.onopen = function() {
- yo = 0;
- document.getElementById("startMenu").style.visibility = "visible";
- document.getElementById("connecting").style.visibility = "hidden"
- };
- Kr.onmessage = function(e) {
- Bo(new DataView(e.data))
- };
- Kr.onclose = function(e) {
- this == Kr && (yo += 1, mr = gr = fr = !1, yr || (bo = setTimeout(function() {
- wo(a)
- }, 2e3), document.getElementById("connecting").style.visibility = "visible"))
- };
- Kr.onerror = function() {
- console.log("socket error!")
- }
- }
- ts("audio/click.mp3");
- wl();
- El();
- var ko = null;
- if (Ai)
- for (var Ai = Ai.replace(/\W/g, "").toUpperCase(), Po = !1, Vn = 0; Vn < Ln.length; Vn++) {
- var Ao = Ln[Vn],
- To = Ao.name.toUpperCase(),
- To = To.replace(/\W/g, "");
- if (To == Ai) {
- ko = Ao;
- break
- }
- }
- ko ? (console.log("Connecting to URL server..."), wo(ko)) : no();
- var Io = !1;
- function vo() {
- var e = "https:" === window.location.protocol ? "wss://" : "ws://",
- a = new WebSocket(e + "master1.mope.io:" + ("wss://" == e ? 7501 : 7500));
- a.binaryType = "arraybuffer";
- a.onopen = function() {
- var e = new fo(1);
- e.writeUInt8(200);
- a.send(e.dataView.buffer)
- };
- a.onmessage = function(e) {
- e = new mo(new DataView(e.data));
- if (100 == e.readUInt8()) {
- Io = !0;
- var a = e.readUInt32();
- vr.setText(oi(a) + " players");
- for (var a = e.readUInt16(), t = 0; t < a; t++)
- for (var i = Kt(e.readUInt32()), s = e.readUInt16(), r = 0; r < Ln.length; r++)
- if (Ln[r].ip == i) {
- Ln[r].playersCount = 6e4 == s ? -1 : s;
- break
- }
- }
- Eo();
- So()
- };
- a.onerror = function(e) {};
- a.onclose = function(e) {}
- }
- vo();
- var Do = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform),
- Mo = -1 < navigator.userAgent.toLowerCase().indexOf("android");
- if ((Do || Mo) && !ki) {
- var xo = !1;
- if (window.localStorage) {
- xo = 0 < window.localStorage.getItem("oldVisitor");
- try {
- window.localStorage.setItem("oldVisitor", 1)
- } catch (e) {
- xo = !0
- }
- }
- xo || (Do ? window.location.href = "https://itunes.apple.com/us/app/mope.io/id1086471119?ls=1&mt=8" : Mo && (window.location.href = "https://play.google.com/store/apps/details?id=tatarnykov.stan.mopeioandroid"))
- }
- document.getElementById("serverSelect").onchange = Co;
- function Co() {
- $n = document.getElementById("serverSelect").selectedIndex - 1;
- eo = Yn[Qn][$n];
- _o();
- console.log("Server changed...");
- Ro() && Kr.close();
- document.getElementById("spawnXpLabel").style.opacity = 0;
- partyLinkKey = partyLinkIP = null;
- wo(eo)
- }
- document.getElementById("regionSelect").onchange = No;
- function No() {
- console.log("Region changed...");
- var e = document.getElementById("regionSelect").selectedIndex - 1;
- Qn = Xn[e];
- Ro() && Kr.close();
- document.getElementById("spawnXpLabel").style.opacity = 0;
- po()
- }
- function _o() {
- document.getElementById("serverSelect").selectedIndex = $n + 1
- }
- function So() {
- for (var e = document.getElementById("serverSelect"); e.lastChild;) e.removeChild(e.lastChild);
- var a = document.createElement("option");
- a.text = "Choose a server:";
- a.disabled = !0;
- e.add(a);
- for (var t = -1, i = Yn[Qn], s = 0; s < i.length; s++) a = document.createElement("option"), a.text = i[s].name + " [" + (0 > i[s].playersCount ? "..." : i[s].playersCount) + " players " + (i[s].playersCount >= co ? "-FULL!" : "") + "]", i[s].ip == eo.ip && (t = s), e.add(a); - 1 == t && (t = 0);
- e.selectedIndex = t + 1
- }
- function Eo() {
- for (var e = document.getElementById("regionSelect"); e.lastChild;) e.removeChild(e.lastChild);
- var a = document.createElement("option");
- a.text = "Choose a region:";
- a.disabled = !0;
- e.add(a);
- for (var t = -1, i = 0; i < Xn.length; i++) {
- for (var s = Xn[i], a = Yn[s], r = 0; r < a.length; r++);
- a = document.createElement("option");
- a.text = s;
- s == Qn && (t = i);
- e.add(a)
- } - 1 == t && (t = 0);
- e.selectedIndex = t + 1
- }
- function Uo() {
- if (!ki) {
- var e = eo.name.replace(/\W/g, "").toUpperCase(),
- a = window.location.href.split("?")[0];
- window.history.replaceState({
- foo: "foo"
- }, "mope.io (" + e + ")", a + "?server=" + e)
- }
- document.getElementById("startMenuWrapper").style.display = "block";
- dl(!0)
- }
- function Bo(e) {
- e = new mo(e);
- switch (e.readUInt8()) {
- case 1:
- nPlayers = e.readUInt16();
- vr.setText(oi(nPlayers) + " players");
- serverVer = e.readUInt16();
- serverVer > l ? setTimeout(function() {
- ki || (window.onbeforeunload = null);
- console.log("Old client (ver " + l + "/" + serverVer + ")");
- alert("mope.io has been updated! You need to refresh to get the latest version of the game! (If this keeps appearing, hold SHIFT when pressing refresh!)");
- window.location.reload(!0)
- }, 1500) : (serverVer < l && console.log("Old server version detected!"), Uo());
- break;
- case 2:
- var a = e.readUInt8();
- if (1 == a) {
- spectating = 2 == e.readUInt8();
- gr = !spectating;
- mr = spectating;
- fr = !0;
- ur || (document.getElementById("onconnectDiv").style.visibility = "visible");
- ur = !0;
- Ds = e.readUInt16();
- Ms = e.readUInt16();
- xs = e.readUInt8();
- hs = gs = ds = e.readUInt16() / 4;
- cs = ms = ps = e.readUInt16() / 4;
- camzoom_n = e.readUInt16() / 1e3;
- ls = 1.2 * camzoom_n;
- spectating || zo(e);
- spectating || (document.getElementById("startMenuWrapper").style.display = "none", ns(rs), ki || (window.onbeforeunload = function(e) {
- return "You're alive in a game, close mope.io?"
- }));
- if (!spectating && (an += 1, Zr += 1, window.localStorage)) try {
- window.localStorage.setItem("gamesSinceAd", Zr)
- } catch (e) {}
- El()
- } else if (0 == a) {
- e = document.getElementById("spawnXpLabel");
- e.style.display = "block";
- e.style.opacity = 1;
- e.textContent = "Error: this server is full!";
- var t = eo;
- setTimeout(function() {
- gr || eo != t || (yo = 100, wo(eo))
- }, 1e3)
- }
- break;
- case 24:
- var i = e.readUInt8();
- 5 == i && (el = !1);
- if (0 == i || 1 == i) {
- var a = 1 == i,
- i = e.readUInt8(),
- s = e.readUInt8();
- el = !0;
- al = 0;
- tl = [];
- il = a;
- sl = +new Date;
- rl = sl + 1e3 * i;
- for (i = 0; i < s; i++) {
- var r = e.readUInt8(),
- n = e.readUInt8(),
- r = new gi(0, 0, 100, 100, r, n);
- tl.push(r)
- }
- }
- Vo = +new Date;
- a && (document.getElementById("startMenuWrapper").style.display = "none");
- break;
- case 8:
- a = e.readUInt16();
- s = e.readUInt8();
- lbData = [];
- for (i = 0; i < s; ++i) lbData.push({
- rank: e.readUInt16(),
- name: e.readString(),
- score: e.readUInt32()
- });
- jo(lbData, 0, a);
- break;
- case 10:
- nPlayers = e.readUInt16();
- vr.setText(oi(nPlayers) + " players");
- break;
- case 18:
- a = e.readUInt8();
- i = 0 < e.readUInt8();
- dr = e.readUInt32();
- _s = e.readUInt32();
- s = Ra(a);
- Xo = i ? "You downgraded to " + s.aniName + "! \nDont lose too much xp!" : s.upgradeText;
- Yo = "white";
- Vo = +new Date + 9e3;
- Os || (Os = !0, Ss = Array.apply(null, Array(50)).map(Number.prototype.valueOf, 0), Es = Array.apply(null, Array(50)).map(Number.prototype.valueOf, 0), Us = Array.apply(null, Array(50)).map(Number.prototype.valueOf, 0), Bs = Array.apply(null, Array(50)).map(Number.prototype.valueOf, 0));
- Ss = Array.apply(null, Array(50)).map(Number.prototype.valueOf, 0);
- i = e.readUInt8();
- for (s = 0; s < i; s++) Ss[e.readUInt8() - 1] = 1;
- Es = Array.apply(null, Array(50)).map(Number.prototype.valueOf, 0);
- i = e.readUInt8();
- for (s = 0; s < i; s++) r = e.readUInt8(), Es[r - 1] = 1;
- Us = Array.apply(null, Array(50)).map(Number.prototype.valueOf, 0);
- i = e.readUInt8();
- for (s = 0; s < i; s++) Us[e.readUInt8() - 1] = 1;
- Bs = Array.apply(null, Array(50)).map(Number.prototype.valueOf, 0);
- i = e.readUInt8();
- for (s = 0; s < i; s++) Bs[e.readUInt8() - 1] = 1;
- $o = a == c || a == Be;
- Jo = +new Date + 9e3;
- qo = 0;
- break;
- case 14:
- var a = e.readUInt8(),
- o = e.readUInt32();
- Xo = 1 == a ? "Oh no, You were eaten! \n Watch out for red-circled players!" : 2 == a ? "Oh no, You died from a tail-bite!\n Watch your tail!" : 4 == a ? "You died of thirst :( Don't let your water run out!" : 13 == a ? "You died from burning! (Get to water when on fire!)" : "You died! Watch your health!";
- Yo = "#F1C34C";
- Vo = +new Date + 3500;
- gr = !1;
- mr = !0;
- el = !1;
- resetAfk();
- try {
- ki || setTimeout(factorem.refreshAds.bind(factorem, null, !0), 800)
- } catch (e) {}
- window.setTimeout(function() {
- if (!gr) {
- yi && An();
- wi && Tn();
- document.getElementById("startMenuWrapper").style.display = "block";
- xr = 0 < o ? "You'll spawn with +" + li(o) + " XP!" : "";
- Mr = 0;
- var e = document.getElementById("spawnXpLabel");
- e.style.opacity = 0;
- xr && setTimeout(function() {
- gr || (e.style.display = "block", e.style.opacity = 1)
- }, 1e3);
- document.getElementById("spawnXpLabel").textContent = xr;
- ki || (window.onbeforeunload = null)
- }
- }, 2e3);
- break;
- case 4:
- Fo(e);
- break;
- case 19:
- a = e.readUInt32();
- if (a = Fs[a]) e = e.readString(), a.gotChat(e);
- break;
- case 23:
- a = e.readUInt8();
- if (gr) switch (Vo = Yi + 3500, Yo = "white", a) {
- case 255:
- Xo = e.readString();
- break;
- case 2:
- Xo = "Ouch! Your tail got bitten!";
- break;
- case 12:
- Xo = "You've been stung by a jellyfish!";
- break;
- case 3:
- Xo = "ZAP! You've been shocked by a STINGRAY!";
- break;
- case 8:
- Xo = "You've been inked!";
- break;
- case 5:
- Xo = "Oh no! Escape the kraken's pull!";
- break;
- case 6:
- Xo = "Ouch! Pufferfish are pointy!";
- break;
- case 7:
- Xo = "That's an octopus in disguise!";
- break;
- case 9:
- Xo = "Brrr! You've been frozen!";
- break;
- case 10:
- Xo = "Ahh! The wolf's howl scared you!";
- break;
- case 11:
- Xo = "Ouch! A VERY LOUD sound hit you!";
- break;
- case 13:
- Xo = "Ah! You're on fire!";
- break;
- case 14:
- Xo = "BAM! You got kicked by a donkey!";
- break;
- case 16:
- Xo = "Ouch! You're getting dragged by a croc!";
- break;
- case 17:
- Xo = "A fox DUG you out of the hole!";
- break;
- case 18:
- Xo = "A wave has swept you away!"
- }
- break;
- case 25:
- a = 0 < e.readUInt8(), e = e.readUInt8() / 10, a ? (Ls = 1e3 * e, Xs = +new Date + 1e3 * e, js = !0) : (Hs = 1e3 * e, zs = +new Date + 1e3 * e, Gs = !0)
- }
- }
- function Oo(e) {
- Kr.send(e.dataView.buffer)
- }
- function Ro() {
- return null != Kr && Kr.readyState == Kr.OPEN
- }
- function Fo(e) {
- Vi = Yi = +new Date;
- Wo(e);
- for (var a = e.readUInt16(), t = 0; t < a; t++) {
- var i = h.newlyVis_createGameObjFromMsg(e),
- s = i.id,
- r = Fs[s];
- delete Fs[s];
- r = Rs.indexOf(r); - 1 != r && Rs.splice(r, 1);
- Fs[s] = i;
- Rs.push(i)
- }
- a = e.readUInt16();
- for (t = 0; t < a; t++) s = e.readUInt32(), (i = Fs[s]) ? i.worldUpd_readMsgUpdate(e) : console.log("Error: Updated GameObj id " + s + " doesn't exist!");
- a = e.readUInt16();
- for (t = 0; t < a; t++) i = e.readUInt32(), (i = Fs[i]) ? i.worldUpd_readMsgRemovedObj(e) : console.log("Error: Removed GameObj id " + s + " doesn't exist!")
- }
- function Wo(e) {
- gs = hs;
- ms = cs;
- ds = e.readUInt16() / 4;
- ps = e.readUInt16() / 4;
- camzoom_n = e.readUInt16() / 1e3;
- var a = e.readUInt8(),
- t = $t(a, 0),
- i = $t(a, 1),
- s = $t(a, 2);
- Ys = $t(a, 3);
- wr = $t(a, 7);
- if (!t) {
- var t = Gs = abil_active = !1,
- r = Ga;
- i && (t = $t(a, 4), Gs = $t(a, 5), abil_active = $t(a, 6), r = e.readUInt8());
- a = js = abil_dive_active = !1;
- if (s) {
- var n = e.readUInt8(),
- a = $t(n, 0);
- js = $t(n, 1);
- abil_dive_active = $t(n, 2)
- }
- Ys ? (_r.abil_usable = t, _r.abil_recharging = Gs, _r.abil_possible = i, _r.abil_active = abil_active, _r.abil_Type = r, Nr.abil_usable = a, Nr.abil_recharging = js, Nr.abil_possible = s, Nr.abil_active = abil_dive_active, Nr.abil_Type = Fa, js && (Nr.abil_rechargeTotalT = Ls, Nr.abil_rechargeEndT = Xs), Gs && (_r.abil_rechargeTotalT = Hs, _r.abil_rechargeEndT = zs)) : (Nr.abil_usable = t, Nr.abil_recharging = Gs, Nr.abil_possible = i, Nr.abil_active = abil_active, Nr.abil_Type = r, _r.abil_usable = a, _r.abil_recharging = js, _r.abil_possible = s, _r.abil_active = abil_dive_active, _r.abil_Type = Fa, Gs && (Nr.abil_rechargeTotalT = Hs, Nr.abil_rechargeEndT = zs), js && (_r.abil_rechargeTotalT = Ls, _r.abil_rechargeEndT = Xs));
- waterBarPerc_n = e.readUInt8();
- xp = e.readUInt32();
- Pr = e.readUInt8()
- }
- }
- drawCrossAt = function(e, a) {
- crossHx = e;
- crossHy = a;
- crossL = 30;
- Zi.beginPath();
- Zi.moveTo(crossHx, crossHy - crossL / 2);
- Zi.lineTo(crossHx, crossHy + crossL / 2);
- Zi.stroke();
- Zi.moveTo(crossHx - crossL / 2, crossHy);
- Zi.lineTo(crossHx + crossL / 2, crossHy);
- Zi.stroke()
- };
- fillGrid = function(e, a, t, i, s, r) {
- if (!qs) {
- Zi.save();
- var n = t - e,
- o = i - a,
- l = Is / 2 / ls,
- h = vs / 2 / ls;
- e = Math.max(e, hs - l - s + 0);
- a = Math.max(a, cs - h - r + 0);
- t = Math.min(t, hs + l - s - 0);
- i = Math.min(i, cs + h - r - 0);
- Zi.strokeStyle = "black";
- Zi.globalAlpha = .055;
- t -= e;
- fillH = i - a;
- for (i = -.5 + e + (n - e) % 30; i < e + t; i += 30) Zi.beginPath(), Zi.moveTo(i, a), Zi.lineTo(i, a + fillH), Zi.stroke();
- for (dy = -.5 + a + (o - a) % 30; dy < a + fillH; dy += 30) Zi.beginPath(), Zi.moveTo(e, dy), Zi.lineTo(e + t, dy), Zi.stroke();
- Zi.restore()
- }
- };
- var Go = 250,
- Ho = 250;
- function zo(e) {
- Go = Ds / Ms * Ho;
- qi = document.createElement("canvas");
- qi.width = Go;
- qi.height = Ho;
- var a = qi.getContext("2d");
- a.globalAlpha = .35;
- a.fillStyle = "#000000";
- a.fillRect(0, 0, qi.width, qi.height);
- for (var t = Go / 200, i = Ho / 200, s = e.readUInt16(), r = e.readUInt16(), n = e.readUInt16(), o = 0; 2 > o; o++) {
- a.fillStyle = Ei;
- a.globalAlpha = .5;
- var l = Go / Ds;
- 0 == o ? a.fillRect(0 * l, n * l, s * l, Ms * l) : a.fillRect((Ds - s) * l, n * l, s * l, Ms * l)
- }
- a.fillStyle = "white";
- a.globalAlpha = .5;
- l = Go / Ds;
- a.fillRect((Ds / 2 - r / 2) * l, 0 * l, r * l, n * l);
- s = e.readUInt16();
- a.fillStyle = Ei;
- a.globalAlpha = .5;
- for (o = 0; o < s; o++) {
- var r = e.readUInt16() * (Go / Ds),
- n = e.readUInt16() * (Ho / Ms),
- l = e.readUInt16() * (Go / Ds),
- h = e.readUInt16() * (Ho / Ms);
- a.globalAlpha = .5;
- a.fillRect(l - r / 2, h - n / 2, r, n)
- }
- s = e.readUInt16();
- a.fillStyle = _i;
- for (o = 0; o < s; o++) r = 5 * e.readUInt8(), n = e.readUInt16() * (Go / Ds), l = e.readUInt16() * (Ho / Ms), a.beginPath(), a.arc(n, l, Math.max(1, Go / Ds * r), 0, 2 * Math.PI), a.fill();
- s = e.readUInt16();
- a.fillStyle = Ni;
- a.globalAlpha = .5;
- for (o = 0; o < s; o++) r = e.readUInt8() * t, n = e.readUInt8() * i, l = 5 * e.readUInt8(), a.beginPath(), a.arc(r, n, Math.max(1, Go / Ds * l), 0, 2 * Math.PI), a.fill();
- s = e.readUInt16();
- a.fillStyle = "#907A33";
- a.globalAlpha = .7;
- for (o = 0; o < s; o++) r = e.readUInt8() * t, n = e.readUInt8() * i, l = 5 * e.readUInt8(), a.beginPath(), a.arc(r, n, Math.max(1, Go / Ds * l), 0, 2 * Math.PI), a.fill();
- s = e.readUInt16();
- a.fillStyle = "#7BB7BB";
- a.globalAlpha = .85;
- for (o = 0; o < s; o++) r = e.readUInt8() * t, n = e.readUInt8() * i, l = 5 * e.readUInt8(), a.beginPath(), a.arc(r, n, Math.max(1, Go / Ds * l), 0, 2 * Math.PI), a.fill();
- s = e.readUInt16();
- a.fillStyle = Di;
- a.globalAlpha = 1;
- for (o = 0; o < s; o++) r = e.readUInt8() * t, n = e.readUInt8() * i, l = 5 * e.readUInt8(), a.beginPath(), a.arc(r, n, Math.max(1, Go / Ds * l), 0, 2 * Math.PI), a.fill();
- s = e.readUInt16();
- a.fillStyle = "#A89937";
- a.globalAlpha = .6;
- for (o = 0; o < s; o++) r = e.readUInt8() * t, n = e.readUInt8() * i, l = 5 * e.readUInt8(), a.beginPath(), a.arc(r, n, Math.max(1, Go / Ds * l), 0, 2 * Math.PI), a.fill();
- s = e.readUInt16();
- a.fillStyle = Bi;
- a.globalAlpha = 1;
- for (o = 0; o < s; o++) r = e.readUInt8() * t, n = e.readUInt8() * i, a.beginPath(), a.arc(r, n, Math.max(2.5, Go / Ds * 40), 0, 2 * Math.PI), a.fill();
- s = e.readUInt16();
- a.fillStyle = Ni;
- a.globalAlpha = 1;
- for (o = 0; o < s; o++) r = e.readUInt8() * t, n = e.readUInt8() * i, a.beginPath(), a.arc(r, n, Math.max(2.5, Go / Ds * 50), 0, 2 * Math.PI), a.fill()
- }
- function jo(e, a, t) {
- Ji = null;
- if (0 != e.length) {
- Ji = document.createElement("canvas");
- a = Ji.getContext("2d");
- var i;
- i = 55 + 22 * e.length;
- Ji.width = 220;
- Ji.height = i;
- a.globalAlpha = .35;
- a.fillStyle = "#000000";
- a.fillRect(0, 0, 200, i);
- a.globalAlpha = 1;
- a.fillStyle = "#FFFFFF";
- i = eo.name;
- a.font = "27px Arial";
- qs || (a.shadowOffsetX = 1, a.shadowOffsetY = 1);
- a.shadowColor = "black";
- a.fillText(i, 95 - a.measureText(i).width / 2, 40);
- var s;
- a.textAlign = "left";
- a.font = "17px Arial";
- for (s = 0; s < e.length; ++s) i = Js ? "" : e[s].name || "mope.io", t == e[s].rank ? (a.fillStyle = "#FEED92", Js && (i = "you")) : a.fillStyle = "#FFFFFF", i = e[s].rank + ". " + i + " (" + li(e[s].score) + ")", a.fillText(i, 15, 65 + 22 * s)
- }
- }
- function Lo() {
- Zi.save();
- if (gr) {
- kr += .1 * (waterBarPerc_n - kr);
- xpPer += .03 * (Pr - xpPer);
- var e = Fs[dr];
- e && (pr = e.animalType);
- var a = 1,
- t = 25 >= kr;
- t && (a = .7 + .3 * Math.sin(2 * Math.PI / 1.2 * (Yi / 1e3)));
- var i = Math.min(450, .9 * Is) * fs,
- s = 30 * fs,
- r = Is / 2,
- n = vs - 60 * fs;
- Zi.globalAlpha = .35 * a;
- Zi.fillStyle = "#000000";
- Zi.fillRect(r - i / 2, n - s / 2, i, s);
- Zi.globalAlpha = a;
- Zi.fillStyle = pr == pa ? _i : wr ? "#8CCEF4" : Ni;
- Zi.fillRect(r - i / 2, n - s / 2, kr / 100 * i, s);
- Zi.fillStyle = As ? t ? Bi : "orange" : t ? Bi : "white";
- Zi.globalAlpha = 1 * a;
- Ar.setText(wr ? t ? "LOW Air" : "Air" : e && e.animalType == pa ? t ? "LOW Lava" : "Lava" : t ? "LOW Water" : "Water");
- Ar.setFontSize(22 * fs);
- Ar.setColor(t ? Bi : "white");
- Ar.x = r;
- Ar.y = n;
- Zi.globalAlpha *= t ? 1 : .5;
- Ar.draw();
- Zi.globalAlpha = .35;
- Zi.fillStyle = "#000000";
- n = vs - s / 2 - 5;
- i = .9 * Is;
- Zi.fillRect(r - i / 2, n - s / 2, i, s);
- Zi.globalAlpha = 1;
- Zi.fillStyle = "#F3C553";
- Zi.fillRect(r - i / 2, n - s / 2, xpPer / 100 * i, s);
- Zi.globalAlpha = 1;
- Tr.setText("" + li(xp) + " xp (" + li(_s) + " xp Next Animal)");
- Tr.setFontSize(22 * fs);
- Tr.x = r;
- Tr.y = n;
- Tr.draw();
- for (e = 0; e < Cr.length; e++) Cr[e].draw();
- es && (jr += .1 * ((Or ? 1 : 0) - jr), .005 < jr && gr && (Zi.globalAlpha = .3 * jr, Zi.beginPath(), Zi.arc(Fr, Wr, zr * $i, 0, 2 * Math.PI), Zi.fillStyle = "#000000", Zi.fill(), Zi.globalAlpha = .5 * jr, Zi.beginPath(), Zi.arc(Gr, Hr, zr * $i * .57, 0, 2 * Math.PI), Zi.fillStyle = "#000000", Zi.fill(), e = .3 * Xr, Xr -= e, Lr += e, Yr += .1 * (Vr - Yr), Zi.save(), Zi.translate(Is / 2, vs / 2), Zi.rotate(Lr), Zi.globalAlpha = .5 * jr, Zi.beginPath(), Zi.fillStyle = "#000000", e = 40 * $i, Fs[dr] && (e = (9 + Fs[dr].rad) * ls), e *= .1 + .9 * Yr, a = 15 * $i, Zi.moveTo(e + 30 * $i * (.2 + .8 * Yr), 0), Zi.lineTo(e, a / 2), Zi.lineTo(e, -a / 2), Zi.closePath(), Zi.fill(), Zi.restore()))
- }
- Zi.restore()
- }
- var Xo = "Ready to survive!",
- Yo = "white",
- Vo = +new Date + 0,
- Ko = [],
- Jo = +new Date + 0,
- qo = 0,
- Zo = 100,
- Qo = 2,
- $o = !1,
- el = !1,
- al = 0,
- tl = [],
- il = !1,
- sl = 0,
- rl = 0;
- function nl(e, a) {
- Xo = e;
- Vo = +new Date + a
- }
- function ol() {
- var e = (Vo - Yi) / 1e3 / 1,
- e = 0 > e ? 0 : 1 < e ? 1 : e;
- 0 < e && (Zi.save(), Zi.globalAlpha = e, Ir.setText(Xo), Ir.setColor(Yo), Ir.setFontSize(25 * fs), Ir.x = Is / 2, Ir.y = .3 * vs, Ir.draw(), Zi.restore());
- e = 0 < Jo - Yi ? 1 : 0;
- qo += .05 * (e - qo);
- if (.01 < qo && !qs && $o) {
- Zi.save();
- Zi.translate(Is / 2, vs * (.9 + .3 * (1 - qo)));
- if (e = Ns("./img/howToPlay1.png")) {
- var a = .2 * vs / e.height * qo;
- Zi.drawImage(e, -.5 * e.width * a, -1 * e.height * a, e.width * a, e.height * a)
- }
- Zi.restore()
- }
- e = el ? 1 : 0;
- al += .1 * (e - al);
- if (.01 < al) {
- if (0 < tl.length) {
- Zi.save();
- Zi.translate(0, -.5 * vs * (1 - al));
- for (var e = 170 * fs, a = e + 20, t = Is / 2 - (Math.max(0, tl.length - 1) * (10 + e) + (a - e)) / 2, i = 0; i < tl.length; i++) {
- var s = tl[i];
- s.buttonScaleF = 0 == i ? a / e : 1;
- s.w = e;
- s.h = e;
- s.x = t;
- s.y = .25 * vs;
- t += s.w / 2 * s.buttonScaleF + e / 2 + 10
- }
- Zi.globalAlpha = al;
- for (i = 0; i < tl.length; i++) s = tl[i], s.draw()
- }
- e = Math.max(0, rl - Yi) / 1e3;
- a = 1;
- 0 != e && 8 > e && (a = .7 + .3 * Math.sin(2 * Math.PI / 1.2 * (Yi / 1e3)));
- Zi.save();
- Zi.globalAlpha = al * a;
- Zi.fillStyle = 0 != e && 8 > e ? "red" : "white";
- Zi.font = 25 * fs + "px Arial";
- Zi.lineWidth = 1;
- Zi.textAlign = "center";
- Zi.textBaseline = "middle";
- qs || (Zi.shadowOffsetX = 1, Zi.shadowOffsetY = 1, Zi.shadowColor = "black");
- e = 0 < e ? " (auto in " + Math.trunc(e) + "s)" : "";
- Zi.fillText(il ? "Choose which animal to spawn as:" : "Choose an upgrade:" + e, Is / 2, tl[0].y - tl[0].w / 2 - 25);
- Zi.restore();
- Zi.restore()
- }
- }
- var ll = +new Date;
- function hl(a) {
- Yi = +new Date;
- window.requestAnimationFrame(hl);
- 1 != Zi.globalAlpha && (Zi.setTransform(1, 0, 0, 1, 0, 0), Zi.globalAlpha = 1);
- Zi.clearRect(0, 0, Is, vs);
- a = (Yi - Vi) / 1e3 / .2;
- a = 0 > a ? 0 : 1 < a ? 1 : a;
- hs = a * (ds - gs) + gs;
- cs = a * (ps - ms) + ms;
- ls = (25 * ls + camzoom_n) / 26;
- Ml();
- Zi.save();
- a = Is / 2;
- var t = vs / 2;
- Zi.translate(a * (1 - ls) + (a - hs) * ls, t * (1 - ls) + (t - cs) * ls);
- Zi.scale(ls, ls);
- Zi.save();
- ur ? (a = 10, a = 600, Zi.globalAlpha = 1, Zi.fillStyle = Di, Zi.fillRect(0, 0 - a, Ds, a), Zi.fillRect(0, Ms, Ds, a), Zi.fillRect(-a, -a, a, Ms + 2 * a), Zi.fillRect(Ds, -a, a, Ms + 2 * a)) : fillGrid(Nl(0), _l(0), Nl(Is), _l(vs), 0, 0);
- Zi.restore();
- a = Rs.slice();
- for (var t = [u, P, ae, me], i = {}, s = 0; s < t.length; s++) {
- var r = new Mn;
- i[t[s]] = r;
- a.push(r)
- }
- for (d = a.length - 1; 0 <= d; d--)
- for (s = a[d], e = 0; e < t.length; e++)
- if (r = t[e], r == s.oType && !(s instanceof Mn)) {
- i[r].addBatchedObj(s);
- a.splice(d, 1);
- break
- }
- Ws = [];
- for (d = 0; d < a.length; d++) a[d].updateZ();
- a.sort(function(e, a) {
- return e.z == a.z ? e.id - a.id : e.z - a.z
- });
- for (d = 0; d < a.length; d++) s = a[d], s.draw();
- if (!Js)
- for (d = 0; d < a.length; d++) "undefined" != typeof a[d].chatLines && a[d].drawChat();
- for (d = 0; d < Ws.length; d++) a = Ws[d], Fs.hasOwnProperty(a.id) && delete Fs[a.id], a = Rs.indexOf(a), -1 != a && Rs.splice(a, 1);
- Zi.restore();
- gr && (Ji && Ji.width && Zi.drawImage(Ji, 10 * $i, 10 * $i, Ji.width * fs, Ji.height * fs), qi && qi.width && Zi.drawImage(qi, Is - (10 * $i + qi.width * fs), 10 * $i, Go * fs, Ho * fs), a = Fs[dr]) && (Zi.fillStyle = "white", Zi.beginPath(), Zi.arc(Is - (10 * $i + qi.width * fs) + a.x * qi.width * fs / Ds, 10 * $i + a.y * qi.height * fs / Ms, 3, 0, 2 * Math.PI), Zi.fill());
- Lo();
- ol();
- hn && (dn.setFontSize(40 * fs), dn.x = Is / 2, dn.y = .2 * vs, cn ? dn.setText("") : dn.setText("Connecting to game..."), dn.draw(), !cn && (a = Is / 2, t = .25 * vs + 120 * fs, i = Ns("skins/mouse.png"))) && (Zi.save(), Zi.translate(a, t), Zi.rotate(Yi % 800 / 800 * Math.PI * 2), Zi.drawImage(i, -75, -75, 150, 150), Zi.restore());
- 370 < bl && !gr && (qs && (tr += 1, 1e3 < Yi - sr && (sr = +new Date, vr.setText(tr + " fps"), tr = 0), or += 1), vr.setFontSize(15 * fs), vr.x = Is - 5 - vr.width / 2, vr.y = vs - 2 - vr.height / 2, vr.draw())
- }
- window.requestAnimationFrame ? window.requestAnimationFrame(hl) : setInterval(draw, 1e3 / 60);
- var cl = 0;
- function dl(e) {
- if (Ro() && !gr) {
- playerName = nickInput.value.replace(/(<([^>]+)>)/gi, "").substring(0, 20);
- var a = 9 + ii(playerName).length + 1;
- mes = new fo(a);
- mes.writeUInt8(2);
- mes.writeString(playerName);
- mes.writeUInt16(Is);
- mes.writeUInt16(vs);
- mes.writeUInt8(e ? 1 : 0);
- Oo(mes);
- if (!e && window.localStorage) try {
- window.localStorage.setItem("nick", playerName + "")
- } catch (e) {}
- }
- }
- document.getElementById("startButton").onclick = function() {
- resetAfk();
- var e = ts("audio/click.mp3");
- if (e) try {
- e.play()
- } catch (e) {}!sn && fr && (rn() ? pn() : dl(!1))
- };
- var pl = document.getElementById("button_mute");
- pl && (pl.onclick = function() {
- $s = !$s;
- os();
- try {
- window.localStorage.setItem("options_muted", $s ? 1 : 0)
- } catch (e) {}
- });
- document.getElementById("settingsButton").onclick = function() {
- var e = document.getElementById("optionsDiv");
- e.style.display = "block" == e.style.display ? "none" : "block";
- if (e = ts("audio/click.mp3")) try {
- e.play()
- } catch (e) {}
- };
- document.getElementById("closeBut").onclick = function() {
- var e = document.getElementById("optionsDiv");
- e.style.display = "block" == e.style.display ? "none" : "block";
- if (e = ts("audio/click.mp3")) try {
- e.play()
- } catch (e) {}
- };
- document.getElementById("options_noImages").onchange = function() {
- if (window.localStorage) {
- Ks = document.getElementById("options_noImages").checked;
- try {
- window.localStorage.setItem("options_noImages", Ks ? 1 : 0)
- } catch (e) {}
- console.log("options_noimages: saved as " + window.localStorage.getItem("options_noImages"))
- }
- };
- document.getElementById("options_noNames").onchange = function() {
- if (window.localStorage) {
- Js = document.getElementById("options_noNames").checked;
- try {
- window.localStorage.setItem("options_noNames", Js ? 1 : 0)
- } catch (e) {}
- console.log("options_noNames: saved as " + window.localStorage.getItem("options_noNames"))
- }
- };
- document.getElementById("options_lowGraphics").onchange = function() {
- if (window.localStorage) {
- qs = document.getElementById("options_lowGraphics").checked;
- try {
- window.localStorage.setItem("options_lowGraphics", qs ? 1 : 0)
- } catch (e) {}
- wl();
- console.log("options_lowGraphics: saved as " + window.localStorage.getItem("options_lowGraphics"))
- }
- };
- document.getElementById("options_noJoystick").onchange = function() {
- if (window.localStorage) {
- Zs = document.getElementById("options_noJoystick").checked;
- try {
- window.localStorage.setItem("options_noJoystick", Zs ? 1 : 0)
- } catch (e) {}
- wl();
- console.log("options_noJoystick: saved as " + window.localStorage.getItem("options_noJoystick"))
- }
- };
- var gl = document.getElementById("options_leftHanded");
- gl && (gl.onchange = function() {
- if (window.localStorage) {
- Qs = gl.checked;
- try {
- window.localStorage.setItem("options_leftHanded", Qs ? 1 : 0)
- } catch (e) {}
- wl();
- console.log("options_leftHanded: saved as " + window.localStorage.getItem("options_leftHanded"))
- }
- });
- var ml = !1,
- fl = !1;
- document.onkeydown = function(e) {
- resetAfk();
- var a = e.keyCode || e.which;
- if (!ml && gr) switch (a) {
- case 32:
- e.preventDefault();
- vl(kl, !0);
- break;
- case 87:
- e.preventDefault();
- vl(Pl, !0);
- break;
- case 83:
- e.preventDefault();
- vl(Il, !0);
- break;
- case 27:
- t && (e.preventDefault(), fl = !fl, nl("Movement Lock (ESC KEY): " + (fl ? "ON" : "OFF"), 2500))
- }
- };
- document.onkeyup = function(e) {
- var a = e.keyCode || e.which;
- if (13 == a) {
- if (!gr && !el) {
- document.getElementById("startButton").click();
- return
- }
- if (el) {
- go(tl[0]);
- return
- }
- }
- if (gr)
- if (a = e.keyCode || e.which, 13 == a) ul();
- else if (!ml && gr) switch (a) {
- case 32:
- e.preventDefault();
- vl(kl, !1);
- break;
- case 87:
- e.preventDefault();
- vl(Pl, !1);
- break;
- case 38:
- e.preventDefault();
- vl(Al, !1);
- break;
- case 40:
- e.preventDefault(), vl(Tl, !1)
- }
- };
- function ul() {
- var e = document.getElementById("chatinput");
- if (!ml && gr) e.style.visibility = "visible", e.focus(), ml = !0, e.onblur = function() {
- ml && ul()
- };
- else if (ml) {
- var a = e.value + "";
- ml = !1;
- e.style.visibility = "hidden";
- e.blur();
- 0 < a.length && gr && (newMsg = new fo(3 + ii(a).length), newMsg.writeUInt8(19), newMsg.writeString(a), Oo(newMsg));
- e.value = ""
- }
- }
- window.onresize = wl;
- var bl = 100,
- yl = 100;
- function wl() {
- bl = window.innerWidth;
- yl = window.innerHeight;
- yi && (bl = document.body.clientWidth, yl = document.body.clientHeight);
- $i = window.devicePixelRatio;
- Is = bl * $i;
- vs = yl * $i;
- Ki.width = Is;
- Ki.height = vs;
- Ki.style.width = bl + "px";
- Ki.style.height = yl + "px";
- document.getElementById("chatinput").style.marginTop = yl / 2 - 50 + "px";
- Sr.w = Sr.h = 95 * $i;
- Nr.w = Nr.h = 95 * $i;
- _r.w = _r.h = 95 * $i;
- Er.w = 60 * $i;
- Er.h = 30 * $i;
- Sr.x = 25 * $i + Sr.w / 2;
- Sr.y = vs - (40 * $i + Sr.w / 2);
- Qs && (Sr.x = Is - Sr.x);
- Nr.x = Sr.x;
- Nr.y = es ? Sr.y - (10 * $i + Nr.w / 2 + Sr.w / 2) : Sr.y;
- _r.x = Sr.x;
- _r.y = Nr.y - (10 * $i + _r.w / 2 + Nr.w / 2);
- Er.x = 72.5 * $i + 125 * $i;
- Er.y = 15 * $i + Er.h / 2;
- Ur.setPosAndSize(Er.x - (Er.w / 2 + 10 * $i), Er.y, 60 * $i, 30 * $i, 1, .5);
- Br.setPosAndSize(Ur.x, Ur.y + Ur.h / 2 + 10 * $i, 60 * $i, 30 * $i, .5, 0);
- for (var e = 0; e < Cr.length; e++) Cr[e].visible = es;
- Nr.visible = !0;
- _r.visible = !0;
- Ur.visible = Ur.touchEnabled = es;
- Br.visible = Br.touchEnabled = es && t;
- fs = Math.max(Is / 1344, vs / 756);
- fs = Math.min(1, Math.max(.4, fs * $i));
- 500 > Math.min(bl, yl) && (fs = $i / 2 * .9);
- Ro() && (mes = new fo(5), mes.writeUInt8(17), mes.writeUInt16(Is), mes.writeUInt16(vs), Oo(mes))
- }
- var kl = 1,
- Pl = 2,
- Al = 3,
- Tl = 4,
- Il = 5;
- function vl(e, a) {
- switch (e) {
- case kl:
- As != a && Ro() && gr && (a && Sl(), mes = new fo(2), mes.writeUInt8(21), mes.writeUInt8(a ? 1 : 0), Oo(mes));
- As = a;
- break;
- case Pl:
- Ts != a && Ro() && gr && (a && Sl(), mes = new fo(2), mes.writeUInt8(20), mes.writeUInt8(a ? 1 : 0), Oo(mes));
- Ts = a;
- break;
- case Al:
- t && gr && (mes = new fo(1), mes.writeUInt8(26), Oo(mes));
- break;
- case Tl:
- t && gr && (mes = new fo(1), mes.writeUInt8(27), Oo(mes));
- break;
- case Il:
- gr && (mes = new fo(1), mes.writeUInt8(28), Oo(mes))
- }
- }
- Ki.addEventListener("gesturestart", function(e) {
- e.preventDefault()
- });
- function Dl() {
- for (var e = 0; e < Cr.length; e++) {
- var a = Cr[e];
- a.pressed = !1;
- a.pressedTouchID = -1
- }
- Or = !1
- }
- Ki.ontouchstart = function(e) {
- resetAfk();
- 1 == e.touches.length && (console.log("Resetting all buttons (joytick bug fix)"), Dl());
- if (gr) {
- for (var a = 0; a < e.changedTouches.length; a++)
- for (var t = e.changedTouches[a], i = 0; i < Cr.length; i++) {
- var s = Cr[i];
- if (s.testPosHitsButton(t.clientX * $i, t.clientY * $i) && !s.pressed && s.touchEnabled) {
- e.preventDefault();
- s.pressed = !0;
- s.pressedTouchID = t.identifier;
- s.onButtonTouchStart();
- return
- }
- }
- Zs || Or ? (us = e.touches[0].clientX * $i, bs = e.touches[0].clientY * $i, Ml()) : (t = e.changedTouches[0], Or = !0, Fr = t.clientX * $i, Wr = t.clientY * $i, Gr = Fr, Hr = Wr, Rr = t.identifier)
- }
- };
- Ki.ontouchmove = function(e) {
- resetAfk();
- e.preventDefault();
- for (var a = 0; a < e.changedTouches.length; a++) {
- var t = e.changedTouches[a];
- if (t.identifier == Nr.pressedTouchID) {
- if (-1 == Sr.pressedTouchID) {
- var i = Sr.testPosHitsButton(t.clientX * $i, t.clientY * $i),
- t = Sr.pressed;
- (Sr.pressed = i) && !t ? vl(kl, !0) : !i && t && vl(kl, !1)
- }
- } else if (Zs) us = t.clientX * $i, bs = t.clientY * $i, Ml();
- else if (Or && t.identifier == Rr) {
- var i = t.clientX * $i - Fr,
- t = t.clientY * $i - Wr,
- s = Math.sqrt(i * i + t * t);
- if (0 < s) {
- var i = i / s,
- t = t / s,
- s = Math.min(1, s / (zr * $i)),
- r = Math.pow(s, 3);
- .1 > r && (r = 0);
- r *= 300 * $i;
- Xr = ai(Lr, Math.atan2(t, i));
- Vr = s;
- Gr = Fr + zr * $i * i * s;
- Hr = Wr + zr * $i * t * s;
- us = Is / 2 + i * r;
- bs = vs / 2 + t * r;
- Ml()
- }
- }
- }
- };
- Ki.ontouchend = function(e) {
- for (var a = 0; a < e.changedTouches.length; a++) {
- var t = e.changedTouches[a];
- if (Or && t.identifier == Rr) Or = !1, Rr = -1;
- else
- for (var i = 0; i < Cr.length; i++) {
- var s = Cr[i];
- if (s.pressed && s.pressedTouchID == t.identifier && s.touchEnabled) {
- s.pressed = !1;
- s.pressedTouchID = -1;
- if (gr) s.onButtonTouchEnd();
- return
- }
- }
- }
- };
- Ki.ontouchcancel = function(e) {
- console.log("touch cancel");
- Ki.ontouchend(e)
- };
- Ki.ontouchleave = function(e) {
- console.log("touch leave")
- };
- Ki.onmousemove = function(e) {
- us = e.clientX * $i;
- bs = e.clientY * $i;
- Ml();
- yr || resetAfk();
- if (el && 650 < Yi - sl)
- for (var a = 0; a < tl.length; a++) {
- var t = tl[a];
- t.isHighLighted = t.testPosHitsButton(us, bs)
- }
- e.preventDefault()
- };
- Ki.onmousedown = function(e) {
- resetAfk();
- 1 == e.which && vl(kl, !0);
- 3 == e.which && vl(Pl, !0);
- e.preventDefault()
- };
- Ki.onmouseup = function(e) {
- if (1 == e.which && (vl(kl, !1), el && 650 < Yi - sl)) {
- us = e.clientX * $i;
- bs = e.clientY * $i;
- for (var a = 0; a < tl.length; a++) {
- var t = tl[a];
- if (t.testPosHitsButton(us, bs)) {
- go(t);
- break
- }
- }
- }
- 3 == e.which && vl(Pl, !1);
- e.preventDefault()
- };
- Ki.onblur = function(e) {
- vl(kl, !1);
- vl(Pl, !1)
- };
- window.onfocus = function(e) {
- resetAfk()
- };
- window.onmouseout = function(e) {
- null == e.toElement && null == e.relatedTarget && (vl(kl, !1), vl(Pl, !1))
- };
- document.oncontextmenu = document.body.oncontextmenu = function() {
- return !gr
- };
- function Ml() {
- var e = vs / 2;
- ys = (us - (Is / 2 - hs * ls)) / ls;
- ws = (bs - (e - cs * ls)) / ls
- }
- function xl(e) {
- return e * ls + (Is / 2 - hs * ls)
- }
- function Cl(e) {
- return e * ls + (vs / 2 - cs * ls)
- }
- function Nl(e) {
- return (e - (Is / 2 - hs * ls)) / ls
- }
- function _l(e) {
- return (e - (vs / 2 - cs * ls)) / ls
- }
- function Sl() { //mouse
- if (fl) {
- var e = Fs[dr];
- if (e) ys = e.x, ws = e.y + 2;
- else return
- }
- Ro() && gr && (.1 < Math.abs(ks - ys) || .1 < Math.abs(Ps - ws)) && (ks = ys, Ps = ws, mes = new fo(7), mes.writeUInt8(5), mes.writeInt16(ys), mes.writeInt16(ws), mes.writeInt16(Ul), window.fo = mes, Oo(mes))
- }
- setInterval(Sl, 20);
- resetAfk = function() {
- br = +new Date;
- yr && (yr = !1, ki || (window.onbeforeunload = null), document.getElementById("connecting").style.visibility = "visible", window.location.reload())
- };
- setInterval(function() {
- +new Date - br > 6e4 * (gr ? 2400 : 10) && !yr && fr && (console.log("Disconnected for afk..."), yr = !0, Ro() && Kr.close())
- }, 5e3);
- function El() {
- wl();
- Fs = {};
- Rs = [];
- Ws = [];
- Pr = xpPer = xp = waterBarPerc_n = kr = 0;
- Ji = null;
- xr = "";
- var e = document.getElementById("spawnXpLabel");
- e.style.display = xr ? "block" : "none";
- e.textContent = xr;
- for (e = 0; e < Cr.length; e++) Cr[e].pressed = !1;
- el = Or = !1;
- al = 0;
- tl = [];
- il = !1
- }
- window.onload = function() {
- wl();
- if (window.localStorage) {
- var e = document.getElementById("nickInput");
- e.value = window.localStorage.getItem("nick");
- e.setSelectionRange(0, e.value.length);
- es || e.focus()
- }
- };
- Ki.addEventListener ? (Ki.addEventListener("mousewheel", Ol, !1), Ki.addEventListener("DOMMouseScroll", Ol, !1)) : Ki.attachEvent("onmousewheel", Ol);
- var Ul = 0,
- Bl = 1;
- function Ol(e) {
- e = window.event || e;
- Bl = e = Math.max(-1, Math.min(1, e.wheelDelta || -e.detail));
- Ul = 1 == e ? Ul + 1 : Ul - 1;
- 400 < Ul ? Ul = 400 : -100 > Ul && (Ul = -100)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement