My code isn't running in Sorcerer's Blitz

Is this a bug?

Maybe ? When you transform something it duplicates

Their clones, but they aren’t moving.

Not sure because you can’t transform clones “saids the help manual”

No, I meant transforming the collectors into clones.

I have another problem. I somehow can’t heal my runners for some reason. I definitely casted water-refresh but it didn’t work. help please

could you share your code?

Sure

count = 0;

def choose(collector):
    global count
    count += 1
    return ['fire', 'water', 'earth'][count % 3]

def collectHandler(data):
    unit = data.target
    while True:
        
        unit.special()
        if unit.item:
            unit.bring()
        else:
            fruit = unit.findNearestFruit()
            if fruit:
                unit.pick(fruit)

hero.on('spawn-runner', collectHandler)

hero.spawnCollector()
hero.spawnCollector()
hero.spawnCollector()
hero.spawnCollector()

while True:
    if hero.water >= 5:
        hero.cast("water-refresh")
    if hero.fire > 3:
        hero.cast('fire-arrow')
    elif hero.water >= 4 and len(hero.findMyCollectors()):
        hero.transform(hero.findMyCollectors()[0], 'runner')
    elif hero.earth > 3:
        hero.cast('earth-arrow')

The waterrefresh cost is 12 not 5 you can also use canCast(“water-refresh”)

1 Like

error

I am getting this error for the thief. This is the function of transforming:
Line 7 is the one that is getting the error.

def transformCollectors():
    collectors = hero.findMyCollectors()
    hero.spawnCollector()
    for c, collector in enumerate(collectors):
        if collector and c % 2 == 0:
            if hero.fire >= 4:
                hero.transform(collector, "thief")
        elif collector:
            if hero.earth >= 4:
                hero.transform(collector, "merger")

Please help.

I got this error when trying to transform already transformed unit. So the unit you transformed isn’t a collector but a already transformed unit

1 Like

It was 5, now I changed it to 12 but it still didn’t work. The problem for me is not healing my runners. I can clearly see that I casted a water spell and nothing happens to my runners.

In the “Hints” window, it says it heals your collectors, not units, so I’m not 100% sure. You can try casting it before you transform the collectors so that you check if it is working, otherwise the problem would be from the code.

1 Like

Yeah… I guess it’s not a bug. rip units

1 Like

I’m not sure but collectors includes all of them.

Hi. Thanks! It’s a bug. Will fix it soon.

1 Like

So I’ve fixed the bug with fire and water ultra so they should affect on all units now.

1 Like

My name isn’t appearing on the leaderboard, and the line that indicates my score isn’t showing. (I am logged in)

Is it a bug?

Apparently you can’t see what your ranking on the sorcerer’s blitz page but only on the codecombat esport page.

1 Like

I just found myself on the leaderboard but it usually highlights it in green and instantly opens it to my ranking, but it doesn’t seem to work after the update.