Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function () {
- // Elemental Arts v1.0
- // This mod is the result of a cross between multiple mods, three of which are EzEdit, Monsterparty, and Gumangi Awakens.
- // Many of the lines and functions you'll see here were either edited, created, or otherwise copy-pasted from the said sources.
- // Credits to original makers. I can never make something original. T-T
- // This mod is still in its infancy. There's more to come! :D
- // ----------------------------------------------------------------------------------------------------- VARIABLES
- var reqTal;
- var reqStr;
- var reqStrHol;
- var perfSpell = false;
- var talcnt;
- var setDex;
- var setStv;
- var setDeh;
- var setStr;
- var setTal;
- var reset = 0;
- var nadx;
- var nady;
- var heaHol;
- var deus = 0;
- var nope = 0;
- // ----------------------------------------------------------------------------------------------------- TESTS
- // Ignore this section. It's for testing stuff.
- // Use the reset button for resetting stats to full.
- $("#optionswindow").append('<button type="button" id="testing">TEST</button>');
- $("#optionswindow").on("click", '#testing', function () {
- ui.message("tesmes", 'normal');
- ui.message("sucmes", 'normal');
- });
- $("#optionswindow").append('<button type="button" id="setting">SET</button>');
- $("#optionswindow").on("click", '#setting', function () {
- if (reset === 0) {
- $("#optionswindow").append('<button type="button" id="resetting">RESET</button>');
- reset = 1;
- setDex = player.dexterity;
- setDeh = player.dehydration;
- setStv = player.starvation;
- setStr = player.strength;
- setTal = player.talent;
- } else {
- setDex = player.dexterity;
- setDeh = player.dehydration;
- setStv = player.starvation;
- setStr = player.strength;
- setTal = player.talent;
- }
- });
- $("#optionswindow").on("click", '#resetting', function () {
- player.status.bleeding = false;
- player.status.burning = false;
- player.status.poisoned = false;
- player.dexterity = setDex;
- player.dehydration = setDeh;
- player.starvation = setStv;
- player.strength = setStr;
- player.talent = setTal;
- player.stamina = 999;
- player.hunger = 999;
- player.thirst = 999;
- player.health = 999;
- ui.message("resmes", 'normal');
- });
- // ----------------------------------------------------------------------------------------------------- HINTS
- hints.deusMode = {
- name: "Nox Deus Mode",
- description: "You have activated your Nox Deus mode! You've gained a tremendous amount of mana at the cost of your life force.<br /><br />The mana surge puts a tremendous strain on your body, forcing you to bleed out of your eyes. The large amount of mana itself will poison you, and the heat produced by it will make you feel like you're on fire. Using this mana for a spell shaves off a tenth of your life force.<br /><br />Warning: Nox Deus mode CAN and WILL kill you if left unchecked! The poison, bleeding, and burning sensation will not stop even after you turn it off. Each spell you cast while in this form will cut your current health by 10%, and permanently reduce your maximum health by 1%"
- }
- hints.elementalArts = {
- name: "Elemental Arts v1.0",
- description: "Due to your uncontrollable magic, you were sent to a distant school for young mages. Unfortunately, on the way there, one of your Chaos style spells went haywire, and now you're in this godforsaken place.<br /><br />You realize, however, that this just might be a new opportunity for you: this isolated group of islands is the perfect training grounds!"
- }
- hints.spellAct = {
- name: "Casting Spells",
- description: "At first, your spells consume stamina. If you do not have enough stamina, they consume both thirst and hunger. Finally, you have to use your own life force in order to successfully cast the spell. Costs double when casting spells that are beyond your current talent level.<br /><br />Be careful! The spells themselves won't kill you, but they just might weaken you enough for monsters to finish you off!"
- }
- // ----------------------------------------------------------------------------------------------------- DONT TOUCH
- var saveBlob, saveLink, fileInput;
- function saveToFile() {
- if (!saveLink) {
- saveLink = document.createElement("a");
- document.body.appendChild(saveLink);
- }
- // Save game without nullfilter as it makes the game unstable if it keeps running
- saveGame(true);
- // Avoid saving whole localStorage as it's a privacy risk if playing locally
- var data = JSON.stringify({
- version: localStorage.getItem('version'),
- options: localStorage.getItem('options'),
- seeds: localStorage.getItem('seeds'),
- player: localStorage.getItem('player'),
- crafted: localStorage.getItem('crafted'),
- envitems: localStorage.getItem('envitems'),
- monsters: localStorage.getItem('monsters'),
- tileData: localStorage.getItem('tileData'),
- tileitems: localStorage.getItem('tileitems'),
- milestoneCount: localStorage.getItem('milestoneCount'),
- });
- if (window.URL) {
- if (saveBlob) window.URL.revokeObjectURL(saveBlob);
- saveLink.href = saveBlob = window.URL.createObjectURL(new Blob([data], {
- type: 'text/json'
- }));
- } else {
- // Give poor Opera 12 at least some way to save
- saveLink.target = "_blank";
- saveLink.href = 'data:application/octet-stream;charset=utf-8,' + escape(data);
- }
- var d = new Date();
- saveLink.download = ["Wayward_save_", d.getFullYear(), "_", (101 + d.getMonth() + "").slice(-2), (100 + d.getDate() + "").slice(-2), "_", (100 + d.getHours() + "").slice(-2), (100 + d.getMinutes() + "").slice(-2), (100 + d.getSeconds() + "").slice(-2), ".json"].join("");
- saveLink.click();
- }
- function loadFromFile() {
- if (!fileInput) {
- fileInput = document.createElement("input");
- fileInput.type = "file";
- fileInput.accept = ".json";
- document.body.appendChild(fileInput);
- fileInput.addEventListener("change", function (e) {
- var reader = new FileReader();
- reader.onload = function (evt) {
- var result = JSON.parse(evt.target.result);
- for (var re in result) localStorage[re] = result[re];
- window.onbeforeunload = null;
- location.reload();
- };
- reader.readAsText(e.target.files[0], "ascii");
- }, false);
- }
- fileInput.click();
- }
- // Check if already loaded
- if (document.getElementById("saveToFile")) return;
- // Add buttons to main menu
- var saveButton = $('<button type="button" id="saveToFile">Save to file</button>');
- saveButton.click(saveToFile);
- var loadButton = $('<button type="button" id="loadFromFile">Load from file</button>');
- loadButton.click(loadFromFile);
- $("#saveAndExit").after(loadButton).after(saveButton).after("<br /><br />");
- // Increase main menu height accordingly
- var gm = $('#gameMenu');
- gm.dialog("option", "height", gm.dialog("option", "height") + 80);
- // ----------------------------------------------------------------------------------------------------- CHECKS
- // Checks if the player has enough talent and energy for casting spells.
- // This is in representation of spells in fantasy. It's easier to cast spells that you understand, and once you run out of mana, you use your own life force.
- function spellCheck() {
- if (ui.options.hints && !player.hintseen.spellAct) {
- ui.hintDisplay("spellAct");
- }
- reqStrHol = reqStr;
- if (player.talent >= reqTal) {
- if (player.stamina >= reqStr) {
- player.stamina -= reqStr;
- perfSpell = true;
- } else {
- reqStrHol -= player.stamina;
- if (player.thirst > reqStrHol && player.hunger > reqStrHol) {
- reqStr -= player.stamina;
- player.stamina = 1;
- player.thirst = reqStr / 2;
- player.hunger = reqStr / 2;
- perfSpell = true;
- } else if (player.thirst <= reqStrHol && player.hunger > reqStrHol) {
- reqStrHol -= player.thirst;
- if (player.health > reqStrHol) {
- reqStr -= player.stamina;
- reqStr -= player.thirst;
- player.stamina = 1;
- player.thirst = 1;
- player.hunger -= reqStr / 2;
- player.health -= reqStr / 2;
- perfSpell = true;
- } else {
- ui.message("nomanames", 'normal');
- }
- } else if (player.thirst > reqStrHol && player.hunger <= reqStrHol) {
- reqStrHol -= player.hunger;
- if (player.health > reqStrHol) {
- reqStr -= player.stamina;
- reqStr -= player.hunger;
- player.stamina = 1;
- player.hunger = 1;
- player.thirst -= reqStr / 2;
- player.health -= reqStr / 2;
- perfSpell = true;
- } else {
- ui.message("nomanames", 'normal');
- }
- } else if (player.thirst <= reqStrHol && player.hunger <= reqStrHol) {
- reqStrHol -= player.thirst;
- reqStrHol -= player.hunger;
- if (player.health > reqStrHol) {
- reqStr -= player.stamina;
- reqStr -= player.hunger;
- reqStr -= player.thirst;
- player.stamina = 1;
- player.hunger = 1;
- player.thirst = 1;
- player.health -= reqStr;
- perfSpell = true;
- } else {
- ui.message("nomanames", 'normal');
- }
- }
- }
- } else {
- reqStr = reqStr * 2
- reqStrHol = reqStr;
- if (player.stamina >= reqStr) {
- player.stamina -= reqStr;
- perfSpell = true;
- } else {
- reqStrHol -= player.stamina;
- if (player.thirst > reqStrHol && player.hunger > reqStrHol) {
- reqStr -= player.stamina;
- player.stamina = 1;
- player.thirst = reqStr / 2;
- player.hunger = reqStr / 2;
- perfSpell = true;
- } else if (player.thirst <= reqStrHol && player.hunger > reqStrHol) {
- reqStrHol -= player.thirst;
- if (player.health > reqStrHol) {
- reqStr -= player.stamina;
- reqStr -= player.thirst;
- player.stamina = 1;
- player.thirst = 1;
- player.hunger -= reqStr / 2;
- player.health -= reqStr / 2;
- perfSpell = true;
- } else {
- ui.message("nomanames", 'normal');
- }
- } else if (player.thirst > reqStrHol && player.hunger <= reqStrHol) {
- reqStrHol -= player.hunger;
- if (player.health > reqStrHol) {
- reqStr -= player.stamina;
- reqStr -= player.hunger;
- player.stamina = 1;
- player.hunger = 1;
- player.thirst -= reqStr / 2;
- player.health -= reqStr / 2;
- perfSpell = true;
- } else {
- ui.message("nomanames", 'normal');
- }
- } else if (player.thirst <= reqStrHol && player.hunger <= reqStrHol) {
- reqStrHol -= player.thirst;
- reqStrHol -= player.hunger;
- if (player.health > reqStrHol) {
- reqStr -= player.stamina;
- reqStr -= player.hunger;
- reqStr -= player.thirst;
- player.stamina = 1;
- player.hunger = 1;
- player.thirst = 1;
- player.health -= reqStr;
- perfSpell = true;
- } else {
- ui.message("nomanames", 'normal');
- }
- }
- }
- }
- };
- $("#optionswindow").append('<button type="button" id="deumod">Deus Mode</button>');
- $("#optionswindow").on("click", '#deumod', function () {
- if (deus === 0) {
- deus = 1;
- ui.message("infmes", 'normal');
- player.status.bleeding = true;
- player.status.poisoned = true;
- player.status.burning = true;
- player.strength -= 10;
- if (ui.options.hints && !player.hintseen.deusMode) {
- ui.hintDisplay("deusMode");
- }
- } else {
- deus = 0;
- ui.message("noninfmes", 'normal');
- }
- });
- // Activates Nox Deus mode. Basically infinite spellcasting, but at the cost of health.
- function deusCheck() {
- if (deus === 0) {
- spellCheck();
- } else {
- perfSpell = true;
- player.status.bleeding = true;
- player.status.poisoned = true;
- player.status.burning = true;
- player.health = (((player.health / 10) - ((player.health % 10) / 10)) * 9);
- player.strength = (((player.strength / 100) - ((player.strength % 100) / 100)) * 99);
- }
- }
- function postSpell() {
- perfSpell = false;
- reqTal = 0;
- reqStr = 0;
- nadx = 0;
- nady = 0;
- heaHol = 0;
- talcnt = 0;
- }
- // Cleanup
- // ----------------------------------------------------------------------------------------------------- PASSIVES
- // Passives do not need to be activated. They can be attributed to the player's (slightly) higher intelligence.
- if (ui.options.hints && !player.hintseen.elementalArts) {
- ui.hintDisplay("elementalArts");
- }
- groups.unrefinediron = {
- name: "Unrefined Iron"
- }
- groups.ironitem = {
- name: "Iron Equipment"
- }
- groups.ironlump = {
- name: "Iron Lump"
- }
- items.scrapiron = new Object
- items.scrapiron.id = 254
- items.scrapiron.x = 58
- items.scrapiron.y = 1
- items.scrapiron.name = "Scrap Iron"
- items.scrapiron.weight = 2
- items.scrapiron.recipe = new Object
- items.scrapiron.recipe.requires = [["ironitem", 1, 1], ["wroughtironhammer", 1, 0]]
- items.scrapiron.recipe.skill = "blacksmithing"
- items.scrapiron.recipe.level = "intermediate"
- items.scrapiron.recipe.requiredenv = "forgeandanvil_lit"
- items.scrapiron.group = ["unrefinediron"]
- items.ironblob = new Object
- items.ironblob.id = 255
- items.ironblob.x = 58
- items.ironblob.y = 1
- items.ironblob.name = "Iron Blob"
- items.ironblob.weight = 2
- items.ironblob.recipe = new Object
- items.ironblob.recipe.requires = [["ironlump", 10, 10], ["wroughtironhammer", 1, 0]]
- items.ironblob.recipe.skill = "blacksmithing"
- items.ironblob.recipe.level = "intermediate"
- items.ironblob.recipe.requiredenv = "forgeandanvil_lit"
- items.ironblob.group = ["unrefinediron"]
- items.ironore.group = ["unrefinediron"]
- items.wroughtiron.recipe.requires = [["unrefinediron", 1, 1], ["hammerlike", 1, 0]]
- items.wroughtironpickaxe.group = ["ironitem"]
- items.wroughtironlockpick.recipe.requires = [["wroughtiron", 1, 0], ["hammerlike", 1, 0]]
- items.wroughtirondoubleaxe.group = ["sharpeneditem", "ironitem"]
- items.wroughtironshovel.group = ["ironitem"]
- items.wroughtironspear.group = ["utensil", "ironitem"]
- items.wroughtironhammer.group = ["hammerlike", "repair", "ironitem"]
- items.wroughtironshield.group = ["ironitem"]
- items.wroughtirongauntlets.group = ["ironitem"]
- items.wroughtirongreaves.group = ["ironitem"]
- items.wroughtirongorget.group = ["ironitem"]
- items.wroughtironhelmet.group = ["ironitem"]
- items.wroughtironboots.group = ["ironitem"]
- items.wroughtironbreastplate.group = ["ironitem"]
- items.wroughtironsword.group = ["sharpeneditem", "ironitem"]
- items.wroughtirontongs.group = ["tongs", "utensil", "ironitem"]
- items.wroughtironarrowhead.group = ["sharpeneditem", "ironlump"]
- items.wroughtironbullet.group = ["bullet", "ironlump"]
- items.ironbullet.group = ["bullet", "ironlump"]
- items.ironarrowhead.group = ["sharpeneditem", "ironlump"]
- items.ironpickaxe.group = ["ironitem"]
- items.irondoubleaxe.group = ["sharpeneditem", "ironitem"]
- items.ironshovel.group = ["ironitem"]
- items.ironspear.group = ["utensil", "ironitem"]
- items.ironhammer.group = ["hammerlike", "repair", "ironitem"]
- items.ironshield.group = ["ironitem"]
- items.irongauntlets.group = ["ironitem"]
- items.irongreaves.group = ["ironitem"]
- items.irongorget.group = ["ironitem"]
- items.ironhelmet.group = ["ironitem"]
- items.ironboots.group = ["ironitem"]
- items.ironbreastplate.group = ["ironitem"]
- items.ironsword.group = ["sharpeneditem", "ironitem"]
- items.irontongs.group = ["tongs", "utensil", "ironitem"]
- // Allows reverting unused iron tools into scrap iron. Recycling ftw!
- items.stick = new Object
- items.stick.id = 256
- items.stick.x = 10
- items.stick.y = 1
- items.stick.name = "A Stick"
- items.stick.weight = .5
- items.stick.durability = 10
- items.stick.recipe = new Object
- items.stick.recipe.requires = [["log", 1, 1], ["sharpeneditem", 1, 0]]
- items.stick.recipe.skill = "woodworking"
- items.stick.recipe.level = "simple"
- items.stick.group = ["polelike", "utensil"]
- items.stick.equip = "held"
- items.stick.attack = "held"
- items.stick.damageType = ['blunt']
- items.stick.use = ["lightItem"]
- items.stick.lit = "poletorch_lit"
- items.stick.onBurn = "charcoal"
- // Pet peeve of mine is that you can't chop logs into wooden poles, so I made sticks!
- items.wroughtironknife = new Object
- items.wroughtironknife.id = 257
- items.wroughtironknife.x = 45
- items.wroughtironknife.y = 3
- items.wroughtironknife.name = "A Wroughtiron Knife"
- items.wroughtironknife.weight = 1
- items.wroughtironknife.durability = 75
- items.wroughtironknife.equip = "held"
- items.wroughtironknife.attack = 2
- items.wroughtironknife.damageType = ['slashing']
- items.wroughtironknife.group = ["sharpeneditem", "ironitem"]
- items.wroughtironknife.use = ["carve"]
- items.wroughtironknife.recipe = new Object
- items.wroughtironknife.recipe.requires = [["wroughtiron", 2, 2]]
- items.wroughtironknife.recipe.skill = "blacksmithing"
- items.wroughtironknife.recipe.level = "simple"
- items.wroughtironknife.recipe.requiredenv = "forgeandanvil_lit"
- items.ironknife = new Object
- items.ironknife.id = 258
- items.ironknife.x = 45
- items.ironknife.y = 3
- items.ironknife.name = "An Iron Knife"
- items.ironknife.weight = 1.3
- items.ironknife.durability = 100
- items.ironknife.equip = "held"
- items.ironknife.attack = 5
- items.ironknife.damageType = ['slashing']
- items.ironknife.group = ["sharpeneditem", "ironitem"]
- items.ironknife.use = ["carve"]
- items.ironknife.recipe = new Object
- items.ironknife.recipe.requires = [["ironingot", 2, 2]]
- items.ironknife.recipe.skill = "blacksmithing"
- items.ironknife.recipe.level = "intermediate"
- items.ironknife.recipe.requiredenv = "forgeandanvil_lit"
- // Sturdier, heavier, more expensive knives. Murica!
- environmentals.campfire_lit.blockmove = true
- environmentals.torchstand_lit.blockmove = true
- environmentals.stonewaterstill_lit.blockmove = true
- // Blocks stepping into some fire environmentals, coz some players (me) are stupid enough to step into them accidentally
- items.redberries.use.push("plant")
- items.redberries.onUse.plant = "bush"
- environmentals.bush.spread = 8
- environmentals.bush.allowedtiles = ["grass", "dirt", "gravel"]
- environmentals.bush.garden = true
- // Allows berry bushes to be planted
- environmentals.pineappleplant.garden = true
- environmentals.pineappleplant.spread = 8
- environmentals.pineappleplant.allowedtiles = ["dirt", "grass", "sand"]
- environmentals.pineappleplant.trample = true
- items.pineapple.use.push("plant")
- items.pineapple.onUse.plant = "pineappleplant"
- items.pineapple.skillUse = "botany"
- // Allows pineapples to be planted
- items.seaweed.use.push("plant")
- items.seaweed.onUse.plant = "seaweed_ground"
- environmentals.seaweed_ground.spread = 8
- environmentals.seaweed_ground.garden = true
- // Allows seaweeds to be planted
- items.nopal.use.push("plant")
- items.nopal.onUse.plant = "cactus"
- environmentals.cactus.spread = 8
- environmentals.cactus.garden = true
- environmentals.cactus.allowedtiles = ["dirt", "grass", "sand"]
- // Allows nopals to be planted
- items.potion = new Object
- items.potion.id = 251
- items.potion.name = "Omni Potion"
- items.potion.weight = 2
- items.potion.use = ["cure"]
- items.potion.onUse = new Object
- items.potion.onUse.cure = [5, 20, 16, 8]
- items.potion.recipe = new Object
- items.potion.recipe.requires = [["cookedmeat", 2, 2], ["potablebottle", 1, 1]]
- items.potion.recipe.skill = "alchemy"
- items.potion.recipe.level = "intermediate"
- items.potion.durability = 25
- items.potion.returnOnUse = "glassbottle"
- items.potion2 = new Object
- items.potion2.id = 252
- items.potion2.name = "Omini Potion"
- items.potion2.weight = 2
- items.potion2.use = ["cure"]
- items.potion2.onUse = new Object
- items.potion2.onUse.cure = [5, 15, 8, 8]
- items.potion2.recipe = new Object
- items.potion2.recipe.requires = [["cookedmeat", 1, 1], ["potablebottle", 1, 1]]
- items.potion2.recipe.skill = "alchemy"
- items.potion2.recipe.level = "intermediate"
- items.potion2.durability = 25
- items.potion2.returnOnUse = "glassbottle"
- // Allows the crafting of two kinds of potions. This is in preparation for a future addition I call "iron man mode"
- // The potions are slightly less effective than their respective ingredients, but they don't decay
- items.saplingseed = new Object
- items.saplingseed.id = 253
- items.saplingseed.name = "Tree Seed"
- items.saplingseed.weight = 2
- items.saplingseed.use = ["plant"]
- items.saplingseed.onUse = new Object
- items.saplingseed.onUse.plant = "sapling_ground"
- items.saplingseed.recipe = new Object
- items.saplingseed.recipe.requires = [["redberries", 1, 1], ["pileofcompost", 1, 1]]
- items.saplingseed.recipe.skill = "botany"
- items.saplingseed.recipe.level = "intermediate"
- items.saplingseed.durability = 5
- environmentals.sapling_ground.spread = 8
- // Allows crafting of sapling seeds, and the spread of saplings. Let the world be eaten by Mother Nature once again!
- // But seriously though, I haven't tested how dangerous the rate of spreading for saplings is, since I made it for barren maps.
- items.stones.group = ["bullet"]
- items.stones.attack = 1
- items.stones.damageType = ['blunt']
- // Allows stones to be loaded as bullets, coz they're just taking up space if you're not planning on making cobblestones
- environmentals.woodenchest_unlocked.maxWeight = 75 + (75 * ((player.talent / 20000) - ((player.talent % 20000) / 20000)))
- // Increases wooden chests' storage space by 75 units for each 20000 talent.
- // Reload the game every time you get to a multiple of 20000 talent to refresh this code.
- // ----------------------------------------------------------------------------------------------------- ACTIVES
- Messages.mokgenmes = "Nature Style Variation: Genesis!";
- Messages.mokmanmes = "Nature Style Variation: Manna!";
- Messages.moktanmes = "Nature Style Variation: Tangle!";
- Messages.chaclumes = "Well, here goes nothing. Chaos Style: Creature Clusterfuck!";
- Messages.chaclumesnope = "This caused the ship to sink in the first place. Who knows what kinds of hellspawn will appear in this God-forsaken lands if this spell is used. Well, it might be a different matter if you could harness the power of the night though.";
- Messages.chatommes = "Chaos Style Variation: Tombstone!";
- Messages.chatomntrmes = "You can't cast that right now.";
- Messages.dotfismes = "Earth Style: Fissure!";
- Messages.mokfismes = "Nature Style: Fissure!";
- Messages.dotsherocmes = "Earth Style: Rock Shield!";
- Messages.dotsheiromes = "Earth Style: Pull Iron!";
- Messages.dotshecoames = "Earth Style: Pull Coal!";
- Messages.dotshetalmes = "Earth Style: Pull Talc!";
- Messages.dotshelimmes = "Earth Style: Pull Limestone!";
- Messages.mokshemes = "Nature Style: Shield!";
- Messages.dotplames = "Earth Style Variation: Planar Cleansing!";
- Messages.dotformes = "Earth Style Variation: Fortification!";
- Messages.medmes = "Chaos Style: Eyes of the Nox Deus!";
- Messages.medalrmes = "The Eyes are already open.";
- Messages.enlmes = "The Eyes have closed.";
- Messages.enlalrmes = "The Eyes are already closed.";
- Messages.suifismes = "Water Style: Fissure!";
- Messages.suiravmes = "Water Style: Ravine!";
- Messages.suilakmes = "Water Style Variation: Lake!";
- Messages.suicovmes = "Water Style Variation: Sea!";
- Messages.chasummes = "Chaos Style: Summon Creature!";
- Messages.tesmes = "Test activated.";
- Messages.resmes = "Status reset.";
- Messages.recmes = "Chaos Style: Dynamic Reconstitution!";
- Messages.nomanames = "Too weak to cast this spell right now.";
- Messages.sucmes = "Activation success.";
- Messages.infmes = "Status: Nox Deus";
- Messages.noninfmes = "Status: Magus";
- Messages.casfaimes = "Spell casting failed.";
- Messages.chaheames = "Heal!";
- Messages.chacurmes = "Cure!";
- Messages.chaheaparmes = "You are exhausted, so you have gained only some of your health back.";
- Messages.chaheanopmes = "You are already at maximum health.";
- Messages.chaheafulmes = "You have fully healed yourself.";
- Messages.recfaimes = "You do not understand this spell yet.";
- Messages.deunopmes = "Curing yourself does not work while in Nox Deus form!";
- // Ignore the cheesy lines. It's got something to do with the mod's backstory.
- $("#optionswindow").append('<button type="button" id="dotfisr">Fissure R</button>'); // "Fissure right", 6 rock tiles in a straight line to the right
- $("#optionswindow").append('<button type="button" id="dotfisl">Fissure L</button>'); // "Fissure left"
- $("#optionswindow").append('<button type="button" id="dotfisu">Fissure U</button>'); // "Fissure up"
- $("#optionswindow").append('<button type="button" id="dotfisd">Fissure D</button>'); // "Fissure down"
- $("#optionswindow").append('<button type="button" id="dotsherocs">Shield S</button>'); // "Shield small", hollow 3x3 rock tiles around the player
- $("#optionswindow").append('<button type="button" id="dotsherocl">Shield L</button>'); // "Shield large", hollow 5x5
- $("#optionswindow").append('<button type="button" id="dotshecoa">Coal</button>'); // Creates 2 walls of coalrock tiles to the sides of the player
- $("#optionswindow").append('<button type="button" id="dotsheiro">Iron</button>'); // ironrock tiles
- $("#optionswindow").append('<button type="button" id="dotshetal">Talc</button>'); // talcrock tiles
- $("#optionswindow").append('<button type="button" id="dotshelim">Limestone</button>'); // limestone tiles
- $("#optionswindow").append('<button type="button" id="dotpla">Plane</button>'); // Changes the tiles around the player into grass tiles, 7x7. Works even in the middle of the ocean.
- $("#optionswindow").append('<button type="button" id="dotfor">Fort</button>'); // Creates a 9x9 house around the player. Works well with planar cleansing if you want a walled garden.
- $("#optionswindow").append('<button type="button" id="mokshes">TShield S</button>'); // "Tree shield small"
- $("#optionswindow").append('<button type="button" id="mokshel">TShield L</button>'); // "Tree shield large"
- $("#optionswindow").append('<button type="button" id="mokfisr">TFissure R</button>'); // "Tree fissure right"
- $("#optionswindow").append('<button type="button" id="mokfisl">TFissure L</button>');
- $("#optionswindow").append('<button type="button" id="mokfisu">TFissure U</button>');
- $("#optionswindow").append('<button type="button" id="mokfisd">TFissure D</button>');
- $("#optionswindow").append('<button type="button" id="mokman">Manna</button>');
- $("#optionswindow").append('<button type="button" id="moktan">Tangle</button>');
- $("#optionswindow").append('<button type="button" id="mokgen">Genesis</button>'); // Creates an 11x11 forest around the player. Each layer is different.
- $("#optionswindow").append('<button type="button" id="suifisr">FWFissure R</button>'); // "Fresh water fissure right"
- $("#optionswindow").append('<button type="button" id="suifisl">FWFissure L</button>');
- $("#optionswindow").append('<button type="button" id="suifisu">FWFissure U</button>');
- $("#optionswindow").append('<button type="button" id="suifisd">FWFissure D</button>');
- $("#optionswindow").append('<button type="button" id="suiravr">SWRavine R</button>'); // "Salt water ravine right", same with fissure but with salt water
- $("#optionswindow").append('<button type="button" id="suiravl">SWRavine L</button>');
- $("#optionswindow").append('<button type="button" id="suiravu">SWRavine U</button>');
- $("#optionswindow").append('<button type="button" id="suiravd">SWRavine D</button>');
- $("#optionswindow").append('<button type="button" id="suilak">FWLake</button>'); // "Fresh water lake", 'nuff said.
- $("#optionswindow").append('<button type="button" id="suicov">SWCove</button>'); // "Salt water cove", same as the lake but with salt water
- $("#optionswindow").append('<button type="button" id="chaclu">Clusterfuck</button>'); // Monsterparty aka iron man mode #11. Can only be turned on when in Nox Deus mode.
- $("#optionswindow").append('<button type="button" id="chatom">Tombstone</button>'); // Turns the monster you are facing into Living Rock
- $("#optionswindow").append('<button type="button" id="chicken">Chicken</button>'); // Normal summon in face-up attack position
- $("#optionswindow").append('<button type="button" id="bear">Bear</button>'); // Green vanilla creature, with power 2, toughness 2, usually dropped for 1G
- $("#optionswindow").append('<button type="button" id="kraken">Kraken</button>'); // "Have you finished those errands?"
- $("#optionswindow").append('<button type="button" id="recsta">Stamina</button>'); // Increase stats depending on the amount of talent, but costs more depending on the amount of stats increased. Fails if talent is too low. Costs are not affected by Deus Mode.
- $("#optionswindow").append('<button type="button" id="recstr">HP</button>');
- $("#optionswindow").append('<button type="button" id="rechun">Fill</button>');
- $("#optionswindow").append('<button type="button" id="rechyd">Hydration</button>');
- $("#optionswindow").append('<button type="button" id="showMap">Eyes Open</button>'); // Sends a satellite to space
- $("#optionswindow").append('<button type="button" id="closeMap">Eyes Closed</button>'); // temporarily disables satellite
- $("#optionswindow").append('<button type="button" id="chahea">Heal</button>'); // Exchanges stamina for HP. Costs are not affected by Deus Mode.
- $("#optionswindow").append('<button type="button" id="chacur">Cure</button>'); // Removes status debuffs (bleeding, poison, burning), one at a time, in that order
- // The names have a reason. It helps me remember what one does.
- $("#optionswindow").on("click", '#chahea', function () {
- heaHol = player.strength - player.health;
- ui.message("chaheames", 'normal');
- if (heaHol === 0) {
- postSpell();
- ui.message("chaheanopmes", 'good');
- } else if (heaHol <= player.stamina) {
- player.stamina -= heaHol;
- player.health += heaHol;
- postSpell();
- ui.message("chaheafulmes", 'good');
- } else {
- player.strength += player.stamina;
- player.stamina = 0;
- postSpell();
- ui.message("chaheaparmes", 'good');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#recsta', function () {
- talcnt = (player.talent / 5000) - ((player.talent % 5000) / 5000);
- reqStr = talcnt * 15;
- reqTal = 10000;
- if (player.talent >= 5000) {
- spellCheck();
- if (perfSpell === true) {
- player.dexterity += talcnt;
- ui.message("recmes", 'normal');
- ui.message("dexterityGain", 'normal');
- } else {
- ui.message("casfaimes", 'normal');
- }
- } else {
- ui.message("recfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#recstr', function () {
- talcnt = (player.talent / 7500) - ((player.talent % 7500) / 7500);
- reqStr = talcnt * 20;
- reqTal = 10000;
- if (player.talent >= 7500) {
- spellCheck();
- if (perfSpell === true) {
- player.strength += talcnt;
- ui.message("recmes", 'normal');
- ui.message("strengthGain", 'normal');
- } else {
- ui.message("casfaimes", 'normal');
- }
- } else {
- ui.message("recfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#rechun', function () {
- talcnt = (player.talent / 10000) - ((player.talent % 10000) / 10000);
- reqStr = talcnt * 40;
- reqTal = 15000;
- if (player.talent >= 10000) {
- spellCheck();
- if (perfSpell === true) {
- player.starvation += talcnt;
- ui.message("recmes", 'normal');
- ui.message("metabolismGain", 'normal');
- } else {
- ui.message("casfaimes", 'normal');
- }
- } else {
- ui.message("recfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#rechyd', function () {
- talcnt = (player.talent / 10000) - ((player.talent % 10000) / 10000);
- reqStr = talcnt * 40;
- reqTal = 15000;
- if (player.talent >= 10000) {
- spellCheck();
- if (perfSpell === true) {
- player.dehydration += talcnt;
- ui.message("recmes", 'normal');
- ui.message("metabolismGain", 'normal');
- } else {
- ui.message("casfaimes", 'normal');
- }
- } else {
- ui.message("recfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#chacur', function () {
- if (player.status.bleeding) {
- player.status.bleeding = false;
- ui.message('curedBleeding', 'good');
- if (deus === 1) {
- ui.message("deunopmes", 'bad');
- player.status.bleeding = true;
- }
- } else if (player.status.poisoned) {
- player.status.poisoned = false;
- ui.message('curedPoison', 'good');
- if (deus === 1) {
- ui.message("deunopmes", 'bad');
- player.status.poisoned = true;
- }
- } else if (player.status.burning) {
- player.status.burning = false;
- ui.message('curedBurning', 'good');
- if (deus === 1) {
- ui.message("deunopmes", 'bad');
- player.status.burning = true;
- }
- } else {
- ui.message('casfaimes', 'normal');
- }
- });
- $("#optionswindow").on("click", '#chicken', function () {
- reqTal = 0;
- reqStr = 30;
- deusCheck();
- if (perfSpell === true) {
- spawnMonster("chicken", player.x + 2, player.y);
- ui.message("chasummes", 'normal');
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#bear', function () {
- reqTal = 1000;
- reqStr = 75;
- deusCheck();
- if (perfSpell === true) {
- spawnMonster("bear", player.x + 2, player.y);
- ui.message("chasummes", 'normal');
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#kraken', function () {
- reqTal = 5000;
- reqStr = 100;
- deusCheck();
- if (perfSpell === true) {
- spawnMonster("kraken", player.x + 2, player.y);
- ui.message("chasummes", 'normal');
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#chatom', function () {
- reqTal = 10000;
- reqStr = 80;
- deusCheck();
- if (perfSpell === true) {
- try {
- var monsterId = tile[player.x + player.direction.x][player.y + player.direction.y].monster;
- deleteMonsters(monsterId);
- spawnMonster("livingrock", player.x + player.direction.x, player.y + player.direction.y);
- ui.message("chatommes", 'normal');
- }
- catch (error) {
- ui.message("casfaimes", 'normal');
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#chaclu', function () {
- if (deus !== 1) {
- ui.message("chaclumesnope", 'bad');
- } else {
- reqTal = 25000;
- reqStr = 500;
- spellCheck();
- if (perfSpell === true) {
- var monsterSpawned = 0;
- for (var i = 0; i < 100; i++) {
- var monsterX = 0;
- var monsterY = 0;
- monsterX = Math.floor(Math.random() * 80 + player.x - 40);
- monsterY = Math.floor(Math.random() * 80 + player.y - 40);
- if (tile[monsterX] && tile[monsterX][monsterY] && tiletypes[tile[monsterX][monsterY].type].water) {
- if (spawnMonster("water", monsterX, monsterY)) {
- monsterSpawned++;
- }
- } else if (tile[monsterX] && tile[monsterX][monsterY]) {
- if (spawnMonster("", monsterX, monsterY)) {
- monsterSpawned++;
- }
- }
- }
- ui.message("chaclumes", 'normal');
- passturn();
- } else {
- ui.message("casfaimes", 'normal');
- }
- }
- });
- $("#optionswindow").on("click", '#mokfisr', function () {
- reqTal = 0;
- reqStr = 35;
- deusCheck();
- if (perfSpell === true) {
- ui.message("mokfismes", 'normal');
- nadx = 1;
- while (nadx <= 7) {
- changeTile({
- type: "forest"
- }, player.x + 1 + nadx, player.y);
- nadx++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- });
- $("#optionswindow").on("click", '#mokfisl', function () {
- reqTal = 0;
- reqStr = 35;
- deusCheck();
- if (perfSpell === true) {
- ui.message("mokfismes", 'normal');
- nadx = 1;
- while (nadx <= 7) {
- changeTile({
- type: "forest"
- }, player.x - (1 + nadx), player.y);
- nadx++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- });
- $("#optionswindow").on("click", '#mokfisu', function () {
- reqTal = 0;
- reqStr = 35;
- deusCheck();
- if (perfSpell === true) {
- ui.message("mokfismes", 'normal');
- nadx = 1;
- while (nadx <= 7) {
- changeTile({
- type: "forest"
- }, player.x, player.y - (1 + nadx));
- nadx++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- });
- $("#optionswindow").on("click", '#mokfisd', function () {
- reqTal = 0;
- reqStr = 35;
- deusCheck();
- if (perfSpell === true) {
- ui.message("mokfismes", 'normal');
- nadx = 1;
- while (nadx <= 7) {
- changeTile({
- type: "forest"
- }, player.x, player.y + 1 + nadx);
- nadx++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- });
- $("#optionswindow").on("click", '#showMap', function () {
- reqTal = 0;
- reqStr = 1;
- if (nope === 0) {
- deusCheck();
- if (perfSpell === true) {
- $("#map").show();
- ui.message("medmes", 'normal');
- player.status.bleeding = true;
- nope = 1;
- } else {
- ui.message("casfaimes", 'normal');
- }
- } else {
- ui.message("medalrmes", 'normal');
- }
- });
- $("#optionswindow").on("click", '#closeMap', function () {
- if (nope === 1) {
- $("#map").hide();
- ui.message("enlmes", 'normal');
- player.status.bleeding = false;
- nope = 0;
- } else {
- ui.message("enlalrmes", 'normal');
- }
- });
- $("#optionswindow").on("click", '#dotfor', function () {
- reqTal = 0;
- reqStr = 150;
- deusCheck();
- if (perfSpell === true) {
- ui.message("dotformes", 'normal');
- var nadx = -3;
- var nady = -3;
- while (nady <= 3) {
- nadx = -3;
- while (nadx <= 3) {
- changeTile({
- type: "woodenfloor"
- }, player.x + nadx, player.y + nady);
- nadx++;
- }
- nady++;
- }
- changeTile({
- type: "woodendoor"
- }, player.x - 2, player.y - 4);
- changeTile({
- type: "woodendoor"
- }, player.x + 2, player.y - 4);
- changeTile({
- type: "woodendoor"
- }, player.x - 4, player.y - 2);
- changeTile({
- type: "woodendoor"
- }, player.x + 4, player.y - 2);
- changeTile({
- type: "woodendoor"
- }, player.x - 4, player.y + 2);
- changeTile({
- type: "woodendoor"
- }, player.x + 4, player.y + 2);
- changeTile({
- type: "woodendoor"
- }, player.x - 2, player.y + 4);
- changeTile({
- type: "woodendoor"
- }, player.x + 2, player.y + 4);
- changeTile({
- type: "stonewall"
- }, player.x - 4, player.y - 4);
- changeTile({
- type: "stonewall"
- }, player.x - 3, player.y - 4);
- changeTile({
- type: "stonewall"
- }, player.x - 1, player.y - 4);
- changeTile({
- type: "stonewall"
- }, player.x, player.y - 4);
- changeTile({
- type: "stonewall"
- }, player.x + 1, player.y - 4);
- changeTile({
- type: "stonewall"
- }, player.x + 3, player.y - 4);
- changeTile({
- type: "stonewall"
- }, player.x + 4, player.y - 4);
- changeTile({
- type: "stonewall"
- }, player.x - 4, player.y - 3);
- changeTile({
- type: "stonewall"
- }, player.x + 4, player.y - 3);
- changeTile({
- type: "stonewall"
- }, player.x - 4, player.y - 1);
- changeTile({
- type: "stonewall"
- }, player.x + 4, player.y - 1);
- changeTile({
- type: "stonewall"
- }, player.x - 4, player.y);
- changeTile({
- type: "stonewall"
- }, player.x + 4, player.y);
- changeTile({
- type: "stonewall"
- }, player.x - 4, player.y + 1);
- changeTile({
- type: "stonewall"
- }, player.x + 4, player.y + 1);
- changeTile({
- type: "stonewall"
- }, player.x - 4, player.y + 3);
- changeTile({
- type: "stonewall"
- }, player.x + 4, player.y + 3);
- changeTile({
- type: "stonewall"
- }, player.x - 4, player.y + 4);
- changeTile({
- type: "stonewall"
- }, player.x - 3, player.y + 4);
- changeTile({
- type: "stonewall"
- }, player.x - 1, player.y + 4);
- changeTile({
- type: "stonewall"
- }, player.x, player.y + 4);
- changeTile({
- type: "stonewall"
- }, player.x + 1, player.y + 4);
- changeTile({
- type: "stonewall"
- }, player.x + 3, player.y + 4);
- changeTile({
- type: "stonewall"
- }, player.x + 4, player.y + 4);
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#dotpla', function () {
- reqTal = 0;
- reqStr = 50;
- deusCheck();
- if (perfSpell === true) {
- ui.message("dotplames", 'normal');
- var nadx = -3;
- var nady = -3;
- while (nady <= 3) {
- nadx = -3;
- while (nadx <= 3) {
- changeTile({
- type: "grass"
- }, player.x + nadx, player.y + nady);
- nadx++;
- }
- nady++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#dotsherocs', function () {
- reqTal = 0;
- reqStr = 40;
- ui.message("dotsherocmes", 'normal');
- deusCheck();
- if (perfSpell === true) {
- var nadx = -1;
- var nady = -1;
- while (nady <= 1) {
- nadx = -1;
- while (nadx <= 1) {
- if (nady === -1 || nady === 1) {
- changeTile({
- type: "rock"
- }, player.x + nadx, player.y + nady);
- nadx++;
- } else {
- if (nadx === -1 || nadx === 1) {
- changeTile({
- type: "rock"
- }, player.x + nadx, player.y + nady);
- nadx++;
- } else {
- nadx++;
- }
- }
- }
- nady++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#dotsherocl', function () {
- reqTal = 500;
- reqStr = 80;
- deusCheck();
- if (perfSpell === true) {
- ui.message("dotsherocmes", 'normal');
- var nadx = -2;
- var nady = -2;
- while (nady <= 2) {
- nadx = -2;
- while (nadx <= 2) {
- if (nady === -2 || nady === 2) {
- changeTile({
- type: "rock"
- }, player.x + nadx, player.y + nady);
- nadx++;
- } else {
- if (nadx === -2 || nadx === 2) {
- changeTile({
- type: "rock"
- }, player.x + nadx, player.y + nady);
- nadx++;
- } else {
- nadx++;
- }
- }
- }
- nady++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#dotshecoa', function () {
- reqTal = 5000;
- reqStr = 150;
- deusCheck();
- if (perfSpell === true) {
- ui.message("dotshecoames", 'normal');
- var nadx = -2;
- var nady = -2;
- while (nady <= 2) {
- nadx = -2;
- while (nadx <= 2) {
- if (nadx !== 0) {
- changeTile({
- type: "coalrock"
- }, player.x + nadx, player.y + nady);
- nadx++;
- } else {
- nadx++;
- }
- }
- nady++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#dotsheiro', function () {
- reqTal = 12500;
- reqStr = 200;
- deusCheck();
- if (perfSpell === true) {
- ui.message("dotsheiromes", 'normal');
- var nadx = -2;
- var nady = -2;
- while (nady <= 2) {
- nadx = -2;
- while (nadx <= 2) {
- if (nadx !== 0) {
- changeTile({
- type: "ironrock"
- }, player.x + nadx, player.y + nady);
- nadx++;
- } else {
- nadx++;
- }
- }
- nady++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#dotfisr', function () {
- reqTal = 0;
- reqStr = 35;
- deusCheck();
- if (perfSpell === true) {
- ui.message("dotfismes", 'normal');
- nadx = 1;
- while (nadx <= 7) {
- changeTile({
- type: "rock"
- }, player.x + 1 + nadx, player.y);
- nadx++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#dotfisl', function () {
- reqTal = 0;
- reqStr = 35;
- deusCheck();
- if (perfSpell === true) {
- ui.message("dotfismes", 'normal');
- nadx = 1;
- while (nadx <= 7) {
- changeTile({
- type: "rock"
- }, player.x - (1 + nadx), player.y);
- nadx++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#dotfisu', function () {
- reqTal = 0;
- reqStr = 35;
- deusCheck();
- if (perfSpell === true) {
- ui.message("dotfismes", 'normal');
- nadx = 1;
- while (nadx <= 7) {
- changeTile({
- type: "rock"
- }, player.x, player.y - (1 + nadx));
- nadx++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#dotfisd', function () {
- reqTal = 0;
- reqStr = 35;
- deusCheck();
- if (perfSpell === true) {
- ui.message("dotfismes", 'normal');
- nadx = 1;
- while (nadx <= 7) {
- changeTile({
- type: "rock"
- }, player.x, player.y + 1 + nadx);
- nadx++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#mokshes', function () {
- reqTal = 0;
- reqStr = 40;
- deusCheck();
- if (perfSpell === true) {
- ui.message("mokshemes", 'normal');
- var nadx = -1;
- var nady = -1;
- while (nady <= 1) {
- nadx = -1;
- while (nadx <= 1) {
- if (nady === -1 || nady === 1) {
- changeTile({
- type: "forest"
- }, player.x + nadx, player.y + nady);
- nadx++;
- } else {
- if (nadx === -1 || nadx === 1) {
- changeTile({
- type: "forest"
- }, player.x + nadx, player.y + nady);
- nadx++;
- } else {
- nadx++;
- }
- }
- }
- nady++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#mokshel', function () {
- reqTal = 500;
- reqStr = 80;
- deusCheck();
- if (perfSpell === true) {
- ui.message("mokshemes", 'normal');
- var nadx = -2;
- var nady = -2;
- while (nady <= 2) {
- nadx = -2;
- while (nadx <= 2) {
- if (nady === -2 || nady === 2) {
- changeTile({
- type: "forest"
- }, player.x + nadx, player.y + nady);
- nadx++;
- } else {
- if (nadx === -2 || nadx === 2) {
- changeTile({
- type: "forest"
- }, player.x + nadx, player.y + nady);
- nadx++;
- } else {
- nadx++;
- }
- }
- }
- nady++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#mokgen', function () {
- reqTal = 15000;
- reqStr = 400;
- deusCheck();
- if (perfSpell === true) {
- ui.message("mokgenmes", 'normal');
- var nadx = -1;
- var nady = -1;
- while (nady <= 1) {
- nadx = -1;
- while (nadx <= 1) {
- if (nady === -1 || nady === 1) {
- changeTile({
- type: "coconutpalm"
- }, player.x + nadx, player.y + nady);
- nadx++;
- } else {
- if (nadx === -1 || nadx === 1) {
- changeTile({
- type: "coconutpalm"
- }, player.x + nadx, player.y + nady);
- nadx++;
- } else {
- nadx++;
- }
- }
- }
- nady++;
- }
- var nadx = -2;
- var nady = -2;
- while (nady <= 2) {
- nadx = -2;
- while (nadx <= 2) {
- if (nady === -2 || nady === 2) {
- changeTile({
- type: "palm"
- }, player.x + nadx, player.y + nady);
- nadx++;
- } else {
- if (nadx === -2 || nadx === 2) {
- changeTile({
- type: "palm"
- }, player.x + nadx, player.y + nady);
- nadx++;
- } else {
- nadx++;
- }
- }
- }
- nady++;
- }
- var nadx = -3;
- var nady = -3;
- while (nady <= 3) {
- nadx = -3;
- while (nadx <= 3) {
- if (nady === -3 || nady === 3) {
- changeTile({
- type: "berryforest"
- }, player.x + nadx, player.y + nady);
- nadx++;
- } else {
- if (nadx === -3 || nadx === 3) {
- changeTile({
- type: "berryforest"
- }, player.x + nadx, player.y + nady);
- nadx++;
- } else {
- nadx++;
- }
- }
- }
- nady++;
- }
- var nadx = -4;
- var nady = -4;
- while (nady <= 4) {
- nadx = -4;
- while (nadx <= 4) {
- if (nady === -4 || nady === 4) {
- changeTile({
- type: "vineforest"
- }, player.x + nadx, player.y + nady);
- nadx++;
- } else {
- if (nadx === -4 || nadx === 4) {
- changeTile({
- type: "vineforest"
- }, player.x + nadx, player.y + nady);
- nadx++;
- } else {
- nadx++;
- }
- }
- }
- nady++;
- }
- var nadx = -5;
- var nady = -5;
- while (nady <= 5) {
- nadx = -5;
- while (nadx <= 5) {
- if (nady === -5 || nady === 5) {
- changeTile({
- type: "forest"
- }, player.x + nadx, player.y + nady);
- nadx++;
- } else {
- if (nadx === -5 || nadx === 5) {
- changeTile({
- type: "forest"
- }, player.x + nadx, player.y + nady);
- nadx++;
- } else {
- nadx++;
- }
- }
- }
- nady++;
- }
- nadx = 1;
- while (nadx <= 5) {
- changeTile({
- type: "grass"
- }, player.x, player.y + nadx);
- nadx++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#mokman', function () {
- reqTal = 500;
- reqStr = 120;
- deusCheck();
- if (perfSpell === true) {
- ui.message("mokmanmes", 'normal');
- var nadx = -2;
- var nady = -2;
- while (nady <= 2) {
- nadx = -2;
- while (nadx <= 2) {
- if (nadx !== 0) {
- changeTile({
- type: "berryforest"
- }, player.x + nadx, player.y + nady);
- nadx++;
- } else {
- nadx++;
- }
- }
- nady++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#moktan', function () {
- reqTal = 500;
- reqStr = 75;
- deusCheck();
- if (perfSpell === true) {
- ui.message("moktanmes", 'normal');
- var nadx = -2;
- var nady = -2;
- while (nady <= 2) {
- nadx = -2;
- while (nadx <= 2) {
- if (nadx !== 0) {
- changeTile({
- type: "vineforest"
- }, player.x + nadx, player.y + nady);
- nadx++;
- } else {
- nadx++;
- }
- }
- nady++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#suifisr', function () {
- reqTal = 0;
- reqStr = 50;
- deusCheck();
- if (perfSpell === true) {
- ui.message("suifismes", 'normal');
- nadx = 1;
- while (nadx <= 7) {
- changeTile({
- type: "freshwater"
- }, player.x + 1 + nadx, player.y);
- nadx++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#suifisl', function () {
- reqTal = 0;
- reqStr = 50;
- deusCheck();
- if (perfSpell === true) {
- ui.message("suifismes", 'normal');
- nadx = 1;
- while (nadx <= 7) {
- changeTile({
- type: "freshwater"
- }, player.x - (1 + nadx), player.y);
- nadx++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#suifisu', function () {
- reqTal = 0;
- reqStr = 50;
- deusCheck();
- if (perfSpell === true) {
- ui.message("suifismes", 'normal');
- nadx = 1;
- while (nadx <= 7) {
- changeTile({
- type: "freshwater"
- }, player.x, player.y - (1 + nadx));
- nadx++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#suifisd', function () {
- reqTal = 0;
- reqStr = 50;
- deusCheck();
- if (perfSpell === true) {
- ui.message("suifismes", 'normal');
- nadx = 1;
- while (nadx <= 7) {
- changeTile({
- type: "freshwater"
- }, player.x, player.y + 1 + nadx);
- nadx++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#suiravr', function () {
- reqTal = 0;
- reqStr = 30;
- deusCheck();
- if (perfSpell === true) {
- ui.message("suiravmes", 'normal');
- nadx = 1;
- while (nadx <= 7) {
- changeTile({
- type: "deepwater"
- }, player.x + 1 + nadx, player.y);
- nadx++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#suiravl', function () {
- reqTal = 0;
- reqStr = 30;
- deusCheck();
- if (perfSpell === true) {
- ui.message("suiravmes", 'normal');
- nadx = 1;
- while (nadx <= 7) {
- changeTile({
- type: "deepwater"
- }, player.x - (1 + nadx), player.y);
- nadx++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#suiravu', function () {
- reqTal = 0;
- reqStr = 30;
- deusCheck();
- if (perfSpell === true) {
- ui.message("suiravmes", 'normal');
- nadx = 1;
- while (nadx <= 7) {
- changeTile({
- type: "deepwater"
- }, player.x, player.y - (1 + nadx));
- nadx++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#suiravd', function () {
- reqTal = 0;
- reqStr = 30;
- deusCheck();
- if (perfSpell === true) {
- ui.message("suiravmes", 'normal');
- nadx = 1;
- while (nadx <= 7) {
- changeTile({
- type: "deepwater"
- }, player.x, player.y + 1 + nadx);
- nadx++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#suilak', function () {
- reqTal = 2500;
- reqStr = 200;
- deusCheck();
- if (perfSpell === true) {
- ui.message("suilakmes", 'normal');
- var nadx = -6;
- var nady = -6;
- while (nady <= 6) {
- nadx = -6;
- while (nadx <= 6) {
- changeTile({
- type: "freshwater"
- }, player.x + nadx, player.y + nady);
- nadx++;
- }
- nady++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#suicov', function () {
- reqTal = 2500;
- reqStr = 150;
- deusCheck();
- if (perfSpell === true) {
- ui.message("suicovmes", 'normal');
- var nadx = -6;
- var nady = -6;
- while (nady <= 6) {
- nadx = -6;
- while (nadx <= 6) {
- changeTile({
- type: "deepwater"
- }, player.x + nadx, player.y + nady);
- nadx++;
- }
- nady++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#dotshetal', function () {
- reqTal = 15000;
- reqStr = 200;
- deusCheck();
- if (perfSpell === true) {
- ui.message("dotshetalmes", 'normal');
- var nadx = -2;
- var nady = -2;
- while (nady <= 2) {
- nadx = -2;
- while (nadx <= 2) {
- if (nadx !== 0) {
- changeTile({
- type: "talcrock"
- }, player.x + nadx, player.y + nady);
- nadx++;
- } else {
- nadx++;
- }
- }
- nady++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- $("#optionswindow").on("click", '#dotshelim', function () {
- reqTal = 15000;
- reqStr = 200;
- deusCheck();
- if (perfSpell === true) {
- ui.message("dotshelimmes", 'normal');
- var nadx = -2;
- var nady = -2;
- while (nady <= 2) {
- nadx = -2;
- while (nadx <= 2) {
- if (nadx !== 0) {
- changeTile({
- type: "limestonerock"
- }, player.x + nadx, player.y + nady);
- nadx++;
- } else {
- nadx++;
- }
- }
- nady++;
- }
- } else {
- ui.message("casfaimes", 'normal');
- }
- postSpell();
- });
- // Yeah, I'm aware that I could probably have these shortened into better loops or something, but my brain doesn't function well without coffee, which is something my stomach hates.
- // So no coffee for me unless ABSOLUTELY necessary.
- }) ();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement