Frozen Fortress/Equinox tips, tricks, and chat

If you have any tips, tricks or something cool to show about frozen fortress, put it here. :smile:

2 Likes

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 :slight_smile: )

2 Likes

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):

  1. the squares function has 2 ways it can be used: squares('a', 'd'), squares(0, 4) (both return 'abcd')

  2. 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)

  3. upgrade ALSO has 2 ways it can be used: upgrade('abcd'), upgrade('a', 'b', 'c', 'd')

  4. 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)

  5. the tower array is accessed using tower[squareLetter].name or tower[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

3 Likes

Now that I look at it, it looks like an essay lol

3 Likes

can you make a python versian

1 Like

Lol I completely forgot about Python, maybe later

3 Likes

ok i don’t need it i was just wondering since i do not use javascript exept when i was on khan acadamy

2 Likes

"shockwave" is useful because it blows back and kills enemies.
Use : hero.ability("shockwave") to make a shockwave.

1 Like

I have a question: Can I regain health that I lost in frozen fortress, and if so- how can I do it?

1 Like

Rip #1 spot I needa update my code lol

2 Likes

You’re lucky bro i’m in like 190th place :rofl:

1 Like

i need help i need code

2 Likes

I neeed python​:pleading_face::pleading_face::pleading_face::pleading_face::pleading_face::pleading_face::pleading_face::pleading_face::pleading_face::pleading_face::pleading_face::pleading_face:

1 Like

Hi, @Terrell_Williams, welcome to the Discourse.
What exactly do you need help with?

2 Likes

I think Terrel_Williams needs the python version of the code that moonwatcher348 posted.

1 Like

Ah, ok, I’ll work on it.
Should be ready by… Wednesday next week at the latest (I won’t be available this weekend.)

2 Likes

I have been using tower.level for so long and now it says it is an error

Screenshot 2023-02-23 3.29.53 PM

1 Like

I figured it out, but when I made my new code and used hero.sell to sell e and f it didn’t sell.

1 Like

@Jacob_Thomas, better hide the code, People might copy it,

And I have a question for you guys

Do you guys know when the Codecombat Frozen Fortress Ends?

2 Likes

this link has all the dates

the final competition for this season is April

2 Likes