Kelvintaph Defiler Feedback

I start to need a picture for this… Can you give us a screenshot showing the problem?

2 Likes

@ant your friends can kill one of the shamans while they’re flying past–you don’t want to kill the first one…

2 Likes

<deleted by sinogermany, wrong strategy>

2 Likes

I think we need some more of your code. There’s too little here to find out exactly what’s going on. If you like, you can private message me your code.

2 Likes

Forget the above. Completely wrong strategy.
I’ll re-write the logic after work.

2 Likes

Yes I made it! Thanks @ChronistGilver for the hint, it’s very useful.
I’ll add a few notes here, hopefully it’s not too much spoiler :slight_smile:

  • as @trotod said you can attack when you are flying (in the first few seconds)
  • as @nick said you don’t want to kill the first shaman
  • to rescue your paladin, you need at least 2 minions under control (except hard-core @nick)
  • when you attack something while flying, your position after landing might change dramatically, so consider carefully whom to attack, and by using which minion. you need to experiment a bit if you are not super lucky.
  • archers run faster than soldiers and paladins
  • to those who want to keep all minions alive: archer is not as strong as a bear, but you are stronger than a bear :smile:

Awesome game! Thanks again to @ChronistGilver who helped me out, whoever made this level and the ones who left note. Really enjoyed that challenge~

4 Likes

[quote=“trotod, post:1, topic:4496”]
Very challenging![/quote]
Indeed.

What I did not like about this level (and also about Crusader and Burgler) that there is a lot of hassle with timing and finding the little “tricks”, but very little real coding. I know that CodeCombat is a game, but I this kind of grinding should belong to “real” games.

I prefer the levels where you have to think to find a solution and/or make an algorithm, like Binary Deployment, Polygonception, Precision Kicking, etc. That’s so much more like real coding, right?

Oh, but thanks for the Boss Star IV :wink:

8 Likes

Even with the best example with gamification of programming (a.k.a. “Codecombat”), there is bound to be levels which are more game like and repetitive. But I to feel so (as @ant) … maybe it is to teach us patience, etc. Maybe programs with such timings are do have a niche of application (leader/prefesionals… examples if any?). And lastly, the game is for kids… they won’t mind timings. Most mainstream games have only timings…

3 Likes

I need help. I try to make my troops attack the shamans but they don’t. I did that before they were in fear. Can somebody help me please? Thanks!

2 Likes

Your archers can attack the shamans while being flung and flying past them.
Figure out which of your archers can shot at the second shaman. Do not try to kill the first one.

Do not try to attack first shaman or move. The starting area has slippery ice, you’ll get stuck / go out of control if you try to move there.

Also, the last archer can be made to stop before he is feared by the first shaman. You might find a use for that archer later.

2 Likes

Ok. I made them attack the second shaman but they only brought her down to four health. Any other suggestions? Thanks!

2 Likes

Try attacking the shaman by name The idea is that that by the time the soldiers see the second shaman, it is too late to attack her. Don’t use friend.findEnemies() or findNearest() - it is not fast enough.

2 Likes

Ok. I did that and killed the first shaman. But now when I command my soldiers to attack another shaman, they wait till my paladin is dead before they attack. Could you help with this?

Btw, thanks for all of you help so far.

2 Likes

Make sure to command all you soldiers each loop

loop{
   this.commandJack();
   this.commandGill();
   this.commandPaladin();
}

and make sure to keep a tab of where you are into the scenario:

var jackPhase=0;
this.commandJack = function(enemies){
     switch(jackPhase){
     case 0:  //kill second shaman
                 if (second_Shaman_killed)
                     { jackPhase++; break; }
                 command_jack_to_kill_second_shaman;
                 break;
     case 1: //help other soldiers
                 if(other_soldier_helped)
                       {jackPhase++;break; }
                 command_to_help_other_soliders;
                 break;
    // and so on
    } // end switch
}

The by using switch and phaseCounts you can describe very long stories, which me 'chapters’
At the same time your code will be clear and very easy to modify, debug

3 Likes

I get what you think I should do, but I can’t figure out how to specify if the second shaman is killed. I tried getting my soldiers to find nearest shamans but they couldn’t find the second shaman. Can you help me some more?

2 Likes

If you click on the shaman you can see its name. This is actually enemy.id

try to scan the enemies list until you find it

secondShaman=null;
loop{
    if (!secondShaman)
       for(enemy of enemies)
           if(enemy.id=="George") secondShaman=enemy;

and the use secondShaman.health

2 Likes

Oh, thanks! I tried enemy.name instead.

2 Likes

I beat it!! Thank you!!

2 Likes

Hi All

Some help here. I have read all the posts here but still can’t beat the second shaman (name: gror). Troops just not attacking it. @AdrianCgw said not to use findEnemies. I can’t see any other option as my hero can’t see past the walls. Dependent on the line of sight of friends.

My code
self.moveXY(33, 17)
loop:
    friends = self.findFriends()
    for friend in friends:
        if friend.type == "paladin":    #getting paladin to shield and heal mode
            if friend.canCast("heal") and friend.health < friend.maxHealth-150:
                self.command(friend, "cast", "heal", friend)
            else:
                self.command(friend, "shield")
        else:
            enemiesforfriend = friend.findEnemies()
            for enemy in enemiesforfriend:  #trying to attack a shaman by name gror
                if enemy and enemy.type == "shaman" and enemy == "gror":
                    self.command(friend, "attack", enemy)

Avoiding killing first shaman is not a problem. Or the Yeti… by archer in time.

Thanking in anticipation. Cheers.

2 Likes

Instead of finding all the enemies, just say self.command(friend, "attack", "gror")

3 Likes