If you have any tips, tricks or something cool to show about frozen fortress, put it here.
Make all your towers farms, use hero.command("shock wave")
and hero.command("summon", 100)
to attack. ( 100 is an example number, you can summon more )
Use this for easy upgrading & managing towers (I havenāt gotten to summoning yet, so ima just post this for now)
const allsquares = 'abcdefgh';
const tower = {
a: {name: 'none', level: 0},
b: {name: 'none', level: 0},
c: {name: 'none', level: 0},
d: {name: 'none', level: 0},
e: {name: 'none', level: 0},
f: {name: 'none', level: 0},
g: {name: 'none', level: 0},
h: {name: 'none', level: 0}
};
const build = (t, s) => {
if (s.length > 1) {
let letters = s.split('');
for (let letter of letters) build(t, letter);
return;
}
hero.build(t, s);
tower[s].name = t;
tower[s].level = tower[s].level + 1;
};
const towers = (start, end) => {
start = (start + 0 === start + '0') ? allsquares.indexOf(start) : start;
end = (end + 0 === end + '0') ? (allsquares.indexOf(end) + 2) : end;
let returnVar = [];
for (let i = start; i < end; i++) returnVar.push(tower[allsquares.charAt(i)]);
return returnVar;
}
const squares = (start, end) => {
start = (start + 0 === start + '0') ? allsquares.indexOf(start) : start;
end = (end + 0 === end + '0') ? (allsquares.indexOf(end) + 2) : end;
return allsquares.substring(start, end - start);
};
function upgrade (...args) {
args = args.length > 1 ? args : args[0].split('');
for (let s of args) build(tower[s].name, s);
}
information you need to use the code (because most of you probably donāt understand this code xD):
-
the squares function has 2 ways it can be used:
squares('a', 'd')
,squares(0, 4)
(both return'abcd'
) -
the towers function also has 2 ways it can be used:
towers('a', 'd')
,towers(0, 4)
(both, ofc, return the same thing: 4 objects with name and level in order) -
upgrade ALSO has 2 ways it can be used:
upgrade('abcd')
,upgrade('a', 'b', 'c', 'd')
-
build ALSO has 2 ways it can be used (okay, pretty much all of them have 2 ways they can be used):
build('farm', 'a')
,build('farm', 'abcd')
(they donāt do the same thing, but you probably already know what both do so ima just keeps my hands on my arms, thanks lol) -
the
tower
array is accessed usingtower[squareLetter].name
ortower[squareLetter].level
Also btw, donāt use hero.build
with these functions because it canāt read tower level and it needs the normal build
to do that
Lol I wrote a literal essay in the points earlier but decided it would be too long so I shortened it (still pretty long), PM me about any issues or questions pls (oh and also tell me if you use it pls because it makes me happy :>)
No itās not cheating if you use it, itās called āusing functions that should be in-builtā lol
Now that I look at it, it looks like an essay lol
can you make a python versian
Lol I completely forgot about Python, maybe later
ok i donāt need it i was just wondering since i do not use javascript exept when i was on khan acadamy
"shockwave"
is useful because it blows back and kills enemies.
Use : hero.ability("shockwave")
to make a shockwave.
I have a question: Can I regain health that I lost in frozen fortress, and if so- how can I do it?
Youāre lucky bro iām in like 190th place