Power points stuck

# You need to find and destroy 3 skeletons.
# Skeletons and items are summoned at points of power.
# Move to a point and say the spell: "VENI".
# To find the required points, use the wizard's map.
# 0s are bad points. Positive numbers are good.

spell = "VENI"
# The map of points is a 2D array of numbers.
wizard = hero.findNearest(hero.findFriends())
powerMap = wizard.powerMap

# This function converts grid into x-y coordinates.
def convert(row, col):
    return {'x': 16 + col * 12, 'y': 16 + row * 12}

# Loop through the powerMap to find positive numbers.
# First, loop through indexes of rows.
for i in range(len(powerMap)):
    # Each row is an array. Iterate through it.
    for j in range(len(powerMap[i])):
        # Get the value of the i row and j column.
        pointValue = powerMap[i][j]
        # If it's a positive number:
        if (pointValue > 0):
            mySpot = convert(i, j)
            hero.moveXY(mySpot.x, mySpot.y)
            # Use convert to get XY coordinates.
            # Move there, say "VENI" and be prepared!
            enemy = hero.findNearestEnemy()
            if enemy:
                hero.moveXY(mySpot.x, mySpot.y)

Hero gets to top right but then gets killed by last skeleton and doesn’t move; any ideas? Thanks

Get better equipment if you can.

First try something simple. After checking if enemy exists beat it to death

                while enemy.health > 0:

The absurdity of “beating up to death” a skeleton :slight_smile:

1 Like

The skeleton did nothing wrong until you woke him up. Why destroy him? We’re the ones doing wrong by intruding him(this is the backstory of us going there.)

1 Like