[Level Idea] The Liar and the Truth Teller


I had an idea for a short level. Know the riddle of the liar and the truth teller? Two paths, one leading to bad one leading to good. There are two guide you can ask for advice. One always tells lies, the other always tells the truth, but you don’t know which is which.

The idea is a parody of that riddle, this version being convoluted and impossible. So, instead of trying to work it out, you use code to look up the IDs of the guides, to see who the truth teller is.

The reason I posted the idea here instead of just making it, is I’m too new to coding. I don’t know what sort of ID-look-up would be the most useful to learn, nor how to code it.


That actually sounds pretty similar to how Emphasis on Aim was set up: http://codecombat.com/editor/level/emphasis-on-aim

You could fork that and have it look up unit.id instead of unit.team to determine who to trust and who to attack (or follow). It might not be that interesting to program the solution, though, if all you’re doing is one if(unit.id === "Guide1") this.attack(unit); line. Some extra variation on it might be useful. I’m actually working on a level that works like that to introduce if/else and string comparisons here, which is almost ready: http://codecombat.com/editor/level/break-the-prison


Sorry, I had thought there was an IDLookup function of some sort that could be worth teaching.

Thank you for taking the time to look at this.