HI, sorry to interrupt. I need some help with this level. I have looked for advice in lots of other posts but I don’t really understand them. Any help or advice would be greatly appreciated.
#Fight your way into the Inner Sanctum of the ogre chieftain, and defeat her.
#KILL THE OGRES!!!THEY SHOULD BE BOILED IN FONDUE!!!!!!
def summonGriffin():
if hero.gold > hero.costOf("griffin-rider") :
hero.summon("griffin-rider")
def commandGriffin(friend):
enemy = friend.findNearestEnemy()
if enemy and enemy.type == "fangrider":
hero.command(friend, "attack", enemy)
def commandPaladin(friend):
target = friend.findNearestEnemy()
if target and target.type == "ogre":
hero.command(friend, "attack", target)
elif friend.health > 300:
hero.command(friend, "heal", friend)
def commandArcher(friend):
enemy = friend.findNearestEnemy()
if enemy and enemy.type == "thrower" or enemy.type == "scout":
hero.command(friend, "attack", enemy)
def commandSoldier(friend):
target = friend.findNearestEnemy()
if target and target.type == "munchkin":
hero.command(friend, "attack", target)
def commandFriends():
friends = hero.findFriends()
summonGriffin()
for friend in friends:
if friend.type == "griffin-rider":
commandGriffin()
elif friend.type == "paladin":
commandPaladin()
elif friend.type == "archer":
commandArcher()
else:
commandSoldier()
def heroAttack(enemy):
enemy = hero.findNearestEnemy()
if enemy:
hero.attack(enemy)
else:
flag = hero.findFlag("black")
if flag:
hero.pickUpFlag(flag)
while True:
commandFriends()
heroAttack()