Level: Peasant Protection


#1

This is a definite step up in complexity from previous levels: we’re asking players to not just access object properties but to do a little comparison and logic based on the result of object property queries. Is this too much too fast? Just right? We’d love to know.


#2

Too much, too… out of no where.

I got started, found myself without findNearest, scratched my head and came here. If there are any clues as to what is to be done I certainly missed them.


#3

And one more thing: now that I wanted to give it another try the start button was grayed out and I had to redo “shield rush” before I could start again. Still no clue how to though :frowning:


#4

This one is tough. I admit I’m having trouble here…


#5

I think this one looks ok. The initial code that’s there at the start gives a run in to whats needed hopefully. But would be interesting to hear whats tough - is it the returning to the peasant after an attack?


#6

It is a bit of a jump, but for me it won’t let me equip any glasses for this level. The first glasses you get are restricted and the glasses I got the level just before still say locked. This is not intended, correct?

EDIT:
Already posted in github https://github.com/codecombat/codecombat/issues/1746
I’ll be looking there instead.


#7

It’d be good to highlight the new part in this level. As it is not repeated in the next level and needed.

loop:
    enemy = self.findNearestEnemy()
    distance = self.distanceTo(enemy.pos)

On this level I skimmed over it and just added what was needed but had to come back to it.


#8

In retrospect, I think the level is fine. I was just being stupid and forgot that I didn’t need to attack twice since I had a more powerful sword.

Considering I have virtually zero experience with coding, I think the progressive challenge of the game is great!


#9

hello is my first visit in your foum, I glad stay here.


#10

I seem to have the same bug where I can’t get the new glasses to equip.

Do I have to log out and log back in to reset the level, or can I just reload the page?

[edit] when I try to equip the range glasses I get a warning, where it would usually say, “warrior only” with the cryptic message “only” - hope this helps.


#11

Awesome Level :smiley: I like it :smiley:

Its definitley tough compared to the other levels, but if you compare this to the multiplayer levels its nothing.

It definitely a good level.It teaches you how to think in a very algorithmic way.

Looking forward to more of such levels.


#12

I had no issues with this one. My son struggled with it on a couple of levels, but the biggest one was realizing the the say commands take time and were slowing things down and causing him to fail. Maybe something in the comments about “instead of talking, maybe I should do something!”


#13

I get error “Lin2 : Undefine is not a function” I believe the cause of error is because I cannot equip the glasses causing the code “enemy = self.findNearestEnemy()”. I have both glasses and it say the wooden glasses is restricted. Is there a work around for this? Thanks


#14

Are you sure the wooden glasses are restricted? It should be that the crude glasses are restricted, because you need the wooden ones–so it should be trying to get you to wear the wooden ones. Trying to get to the bottom of the unlocks not working…


#15

Please see the pictures I uploaded.


#16

@Enya Yes the Crude Glasses(Brown one) are restricted for me too.But I remember in one of the previous levels you unlock the Wooden Glasses(Blue One)

To unlcok the Wooden Glasses(the one in the above picture) you need to complete one of the previous levels,not sure which one though


#17

I confirmed I’ve completed all levels , but it’s useless.The Wooden Glasses is still can’t be equiped .


#18

The Wooden Glasses should have been unlocked after the level “Sheild Rush”,but in the Peasant Protection it’s still in the “LOCKED” list.
I looked for the Wooden Galsses in Item Shop and I can’t find it.Will that is the problem.
Picture is uploaded.


Hope this is helpful.


#19

Hi, have you solved this? I have the same problem. and cannot go ahead.


#20

This problem has been sovled !