Treasure Cave General

Treasure Cave using Python

The only thing I noticed is that the level doesn’t end immediately when you get back to base and stand on the X. Most levels do, so I wasn’t sure if you wanted it to behave that way or not.

@nick, this level runs to a fixed time and not to some seconds after the player has finished its goals.
Currently, score items are time and damage dealt . . . well time is fixed, so everybody will (and does) have the same, damage well I guess I’ll go back actually kill the yeti… :smile: (of course that is almost fixed, the yeti only has so many hp so there is only so much over flow on the last hit…)

(heh, I thought several times now that I figured out how it works…but each time I was wrong.)

I did figure some things out though . . . you have the “third” goal by virtue of existing (time “zero” = Escape!) you have the second goal, the instant the Yeti kills the ogre (ogre dead = Steal Coins) and as soon as the fire-trap explodes by itself BAM (=Lure Yeti) all three. @J_F_B_M

Apparently someone played with the levels lifespan… 30 seconds is shorter than intended, as I can barely reach the camp myself.
I fixed it so the world ends after you reach the camp. That is something I overlooked somehow (maybe because I’m not the fastest?).

It never occurred to me that you can distract the yeti with a mighty blow to the head, I might include this.

The goals are:

  1. Build a fire-trap at the first X
  2. Get 20 gold
  3. Get to the camp

EDIT: Making the Yeti unconsciousness (who would dare to kill one of these rare lifeforms?) now also counts as distracting him (into the realms of dreams).
Though I expect most people not to be able to survive this.

If you create a friend with summon() your friend can’t attack yeti, and yeti don’t see him.
You can’t use friends for coins too.

That you can’t use the soldiers to collect coins is known (and I assume intentional). The soldiers already existent are designed as Level-decoration, and virtually immortal. They also can not attack.

Try to build a new soldier and command especially her. She should be able to attack the Yeti.

I really need help on the level. Here is my code:

loop:
    if y != self.pos.y:    
        if y > self.pos.y:
            if self.isPathClear(self.pos, {"x": self.pos.x, "y": y}):
                self.move({"x": self.pos.x, "y": self.pos.y +1})
        elif y < self.pos.y:    
            if self.isPathClear(self.pos, {"x": self.pos.x, "y": y}):
                self.move({"x": self.pos.x, "y": self.pos.y -1})
        else:
            pass
    if x != self.pos.x:    
        if x > self.pos.x:
            if self.isPathClear(self.pos.x, {"x": x, "y": self.pos.y }):
                self.move({"x": self.pos.x+1, "y": self.pos.y })
        elif x < self.pos.x:    
            if self.isPathClear(self.pos, {"x": x, "y": self.pos.y }):
                self.move({"x": self.pos.x-1, "y": self.pos.y })

@Awsomedude1 please format your code by putting two or three of these:` around them like this:

``
code goes here
``
1 Like

[quote=“Awsomedude1, post:6, topic:3052”]

loop:
    if y != self.pos.y:    
        if y &gt; self.pos.y:
            if self.isPathClear(self.pos, {"x": self.pos.x, "y": y}):
                self.move({"x": self.pos.x, "y": self.pos.y +1})
        elif y &lt; self.pos.y:    
            if self.isPathClear(self.pos, {"x": self.pos.x, "y": y}):
                self.move({"x": self.pos.x, "y": self.pos.y -1})
        else:
            pass
    if x != self.pos.x:    
        if x &gt; self.pos.x:
            if self.isPathClear(self.pos.x, {"x": x, "y": self.pos.y }):
                self.move({"x": self.pos.x+1, "y": self.pos.y })
        elif x &lt; self.pos.x:    
            if self.isPathClear(self.pos, {"x": x, "y": self.pos.y }):
                self.move({"x": self.pos.x-1, "y": self.pos.y })