Solved - Can't beat Signal Corpse


#1

I’m pretty sure that my code is fine so maybe I’m just bad at dropping flags? :frowning:

Here’s my code:

# You can use flags to choose different tactics.
# In this level, the green flag will mean you want to move to the flag.
# The black flag means you want to cleave at the flag.
# The doctor will heal you at the Red X

loop:
    green = self.findFlag("green")
    black = self.findFlag("black")
    nearest = self.findNearestEnemy()
    
if green:
        self.pickUpFlag(green)
    elif black and self.isReady("cleave"):
        self.pickUpFlag(black)
        # Cleave!
        self.cleave(nearest)
    elif nearest and self.distanceTo(nearest) < 10:
        # Attack!
        self.attack(nearest)
        pass
    else:
        self.shield()

#2

Of course I try again and this time I’m able to beat the level. What was happening is that I was getting killed by the ogres so I had to resort to running back to the healer but then I’d run out of time to kill everyone. I finally got lucky with my flag drops!


#3

Here is my code. I have tried numerous times to win and have upgraded armour/speed/health. I could be bad at playing the game, but I don’t think I should be prohibited from learning more coding simply because I am bad at playing the game part.

loop:
green = self.findFlag(“green”)
black = self.findFlag(“black”)
nearest = self.findNearestEnemy()

if green:
    self.pickUpFlag(green)
    
elif black and self.isReady("cleave"):    
    self.pickUpFlag(black)
    # Cleave!    
    self.cleave(nearest)
    self.shield()    

elif self.distanceTo(nearest) < 10:
    # Attack!
    self.attack(nearest)
    self.shield()
    pass

else:
    self.shield()

#4

常常不是超时就是莫名其妙被打死
看来我不会玩游戏

often time be killed or timed out
may be I just bad for playing game


#5

Please do not bring up dead topics