SOLVED "reading rumble" help


#1

I need some help on reading rumble
here is my code

# Defeat all incoming ogres.

while True:
    # Find the nearest enemy.
    enemy = hero.findNearestEnemy()
    # If there is an enemy, and it is a "brawler":
    if enemy and enemy.id == "brawler":
        # Then say its name (.id) in UPPERCASE.
        name = enemy.id
        enemyId = name.toUpperCase()
        hero.say(enemyId)
    # For other enemies, just fight.
    elif enemy:
        hero.attack(enemy)
    pass

#2

Your hero should attack non-brawler enemies. Try comparing types:

elif enemy and enemy.type != "brawler":
    hero.attack(enemy)

#3

well i don’t attack the brawlers but i still don’t yell the names


#4

I got it
(spoiler allert)

line 7 was

    if enemy and enemy.id == "brawler":

when it should of been

    if enemy and enemy.type == "brawler":