Level Vital Powers

Few remarks about this level :
I get a success without changing the code. Bonus were not ok, but level was successful.
Even after changing the code, correctly I think, as requested at least, I was not able to get a better result, to achieve the first bonus.
In the Results, the shorter the time, the better the results. I think it should be the opposite. The rank for gold looks correct.

The level is fun, but maybe the balance needs improvement. The first goal is too easy if you have armor, and even if you summon soldier, they did not help much as the enemies are so powerful after 30s.

1 Like

I attacked after 30 s with my hero …

1 Like

I did the same. After doing what was expected, I use my hero to attack the strongest enemies. It’s better, and I hardly reach the 60s limit (not always), but not the 350 gold limit. But ok, as it’s a bonus, it needs to be hard.
My message was to compare the difficulty of the first target, too easy if you have a good armor because you don’t need to write code, and the result when you write the code : not much improvement. The number and type of enemy increase very fast.
I’ll try again for the bonus.

1 Like

The first 30 seconds is now more difficult than it was at first, so you shouldn’t win with default code unless you have very good armor.

The difficulty ramping up after 30 seconds is intentional.

The idea is: passing the level should be easy. Getting the bonuses should be a challenge. There is no particular “expected” way to get the bonus… be creative :smile:

1 Like

After a refresh, it’s still not good with the default code:

And I still can’t get the bonus. In fact at the begining I was able to get the 60s bonus, but the more I code, the less I last :smile:

1 Like

This bonus now seems unachievable as a warrior. Even with almost max gear and solid code logic, cannot make it past 49 seconds. The soldiers are just to weak to hold off enemy horde. Beaten every level and achieved every bonus up until this point, so please recheck the balance of this level.

1 Like

It’s possible to get all four goals with a warrior…I just used griffin riders instead of soldiers. (And decoys and stuff.)

With the Boss Star IV it should be much easier too (though I was stuck with a Boss Star III and no Ring of Speed).

2 Likes

You’re referring to an extremely late game item, and at the time of receiving this mission players only have Boss Star 1.

1 Like

Well, sometimes you do have to come to a level later to get the bonus, right…?

1 Like

This situation of having to come back to a level to fully beat it has only happened for increasingly difficult repeating levels. That’s the reason this feels so out of place, everyone should be able to fully beat any standard level they run into with the current equipment and correct code they have at that point in the game.

1 Like

Agreed. Glad to know I wasn’t the only one perplexed by this one.

1 Like

Please try not to revive dead threads in the future. :slight_smile:
Have you tried the :heart: button?

1 Like

i need help on vital powers codecombat… what do i do??

1 Like

Please post your code and what error message pops up

1 Like
Hi i need some help,here is my code:
# This level shows how to define your own functions.
# The code inside a function is not executed immediately. It's saved for later.
# This function has your hero collect the nearest coin.
def pickUpNearestCoin():
    items = hero.findItems()
    nearestCoin = hero.findNearest(items)
    if nearestCoin:
        hero.move(nearestCoin.pos)

# This function has your hero summon a soldier.
def summonSoldier():
    # If hero.gold is greater than the cost of the "soldier":
    if  hero.gold < "slodier":
        # Then summon a "soldier":
        hero.summon("soldier")
    pass


# This function commands your soldiers to attack their nearest enemy.
def commandSoldiers():
    for soldier in hero.findFriends():
        enemy = soldier.findNearestEnemy()
        if enemy:
            hero.command(soldier, "attack", enemy)

while True:
    # In your loop, you can "call" the functions defined above.
    # The following line causes the code inside the "pickUpNearestCoin" function to be executed.
    enemy = hero.findNearestEnemy()
    pickUpNearestCoin()
    # Call summonSoldier here
    hero.summon("soldier")
    # Call commandSoldiers here
    

Hi,
you might consider using a for-loop in this function,

items = hero.findItems()
for item in items:
     #do something like collect the coins

Also here, you cannot put this, what you can use is hero.costOf("soldier") because you don’t need the soldier, you need its cost.

Lastly, you should follow the comment because the soldiers won’t do anything if you didn’t command them.

This is commandSoldier function:

1 Like