Hello, I like making ripoffs so I made Sky Wars. Hope you enjoy!
BUG: Everyone who uses some long code get’s this image below.
Hello, I like making ripoffs so I made Sky Wars. Hope you enjoy!
BUG: Everyone who uses some long code get’s this image below.
# Be sure to click the Hints and read the Quickstart Guide!
summonOrder = ["librarian", "necromancer", "goliath", "trapper", "knight", "ninja"]
summonIndex = 0
enemyBoss = hero.findByType("wizard-ninja", hero.findEnemies())[0]
if hero.team == "humans":
targetPos = {"x": 72, "y": 32}
else:
targetPos = {"x": 10, "y": 32}
def necromancerLogic(necromancer):
enemy = necromancer.findNearestEnemy()
if enemy:
if necromancer.isReady("summon-undead"):
hero.command(necromancer, "cast", "summon-undead")
else:
hero.command(necromancer, "attack", enemy)
def librarianLogic(librarian):
friends = librarian.findFriends()
enemy = librarian.findNearestEnemy()
for friend in friends:
if friend:
if librarian.isReady("haste"):
hero.command(librarian, "cast", "haste", friend)
elif librarian.isReady("grow"):
hero.command(librarian, "cast", "grow", friend)
elif librarian.isReady("force-bolt"):
hero.command(librarian, "cast", "force-bolt", enemy)
else:
hero.command(librarian, "attack", enemy)
def goliathLogic(goliath):
enemy = goliath.findNearestEnemy()
if enemy:
if goliath.isReady("hurl"):
hero.command(goliath, "hurl", enemy)
# The hero has access to "stomp" and "warcry" as well:
elif goliath.isReady("stomp"):
hero.command(goliath, "stomp", enemy)
elif goliath.isReady("warcry"):
hero.command(goliath, "warcry", enemy)
else:
hero.command(goliath, "attack", enemy)
while True:
nextUnit = summonOrder[summonIndex % summonOrder.length]
if hero.costOf(nextUnit) <= hero.gold:
hero.summon(nextUnit)
summonIndex += 1
friends = hero.findFriends()
for friend in friends:
if friend.type == "goliath":
goliathLogic(friend)
elif friend.type == "librarian":
librarianLogic(friend)
elif friend.type == "necromancer":
necromancerLogic(friend)
else:
hero.command(friend, "attack", friend.findNearestEnemy())
That same error happened to me.
It’s codecombat’s bug.
I’ll ping staff @staff
@staff we have a problem with this level
This is a problem that hasn’t been solved for quite a while, and it only happens when you use Vector methods.
You can’t see your assassins if they phase shift… and therefore can’t command them… please fix this.