Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

Released New Level! (Feedback Please)

I made a new level called Defenders of the Village. The link to the game is CodeCombat - Coding games to learn Python and JavaScript? Don’t click it yet. I haven’t told you the instructions. You are stuck behind a fence. You have a peasant called Builder and he can build bases. An example of this is

hero.command(peasant, "buildXY", "base", 30, 30)

The cost of it is 90 gold.
After that, your base can summon units for you.
It summons soldiers for 20 gold, archers for 25 gold, griffin-riders for 50 gold, paladins for 70 gold, artillery for 100 gold, and assassins for 85 gold.
Assassins can “shadowVortex”, “wallOfDarkness”, “phaseShift”, “scattershot”, and “blink”.
Hope you have fun!
PM me if you beat it.


How? Boss stars are restricted.

1 Like

I suggest that you make it where you can command not with:
but with:
if that is possible because as @thebagel said, boss stars are restricted.

1 Like

fully agreed.The level idea is very nice, but stars are restricted(

1 Like

@Hin_Lee It’s well thought out!

let builder = hero.findByType("peasant")[0];
hero.command(builder , "buildXY", "base", 30, 30)
let base = hero.findByType("red-base")[0];
hero.command(base,"summon","artillery" );

Didn’t check all units but:

1 Like

Oh. I’ll remove the Restricted Properties thing I added to settings.

1 Like

What language is this in?

1 Like

I assume Javascript from the look of it.


Yeah. JavaScript uses let as well as var

1 Like

I usually use python, but I do use some javascript.That certainly helps me determine when it is in javascript.