Dueling grounds sacrifice bug

I’ve been trying a funky Nalfar skeleton sacrifice strategy in Dueling Grounds but have come across this error while using very simple code:
Screen Shot 2020-11-02 at 19.29.21
Here’s the code (there’s loads of other bits but it’s all commented out or in functions which I haven’t run):

hero.cast("sacrifice", hero.findNearest(hero.findFriends()), hero)

I tried it with more confusing code, but I boiled it down to the essential problem. This happens with multiple players and when I try to play against anyone I get an infinite loop and can’t access the level.
Anyone else experiencing this?
I’ve tried it on other levels and it has worked fine. I’m on the blue side btw.
I would show you a screenshot, but there’s nothing to see. The level just freezes a few seconds after it starts.
Update: also doesn’t work on multiplayer treasure grove. Maybe it’s a multiplayer only thing.
Update: doesn’t work on Sarven Siege

@Deadpool198 can you screenshot the error logs you’re getting in the JS console?

I had alike bug, I’m editing post with it in another topic at this very moment)

So I think I can narrow it down Code Combat can’t find the cooldown of Sacrifice so it can’t do it. Got it

I do not have Nalfar
but… I used to (reason I lost him is because I reset)
try using a variable likesomeVarableName=hero.findByType("whatever type of unit")

The end of the post

Try again now? I fixed an issue where trying to sacrifice a unit that didn’t have an attack would crash it out.

1 Like

Still doesn’t work with this code on dueling ground:

I saw the bug you mentioned on summit’s gate trying to buff a peasant. Here, though, I’m summoning a soldier, and in fact the soldier never even summons while I have the sacrifice code.
Here’s the console:


@nick, maybe you forgot to return out when the target/recipent doesn’t have an actions.attack.cooldown? Hence it returns an error that the code cannot get the cooldown of “attack”. I’ve just sent a patch to make it return when attack cooldown is invalid. :+1: Hopefully that fixes it.


Hmm, now I can’t access CoCo at all. (This is probably not related, but now I can’t do anything). This screen is shown (notice no buttons).

Then if I press through to the dungeon:

Same for specific levels that I put into the url:

Anyone else?

Definitely unrelated, as the changes haven’t been added to sacrifice. I can still access the game.

Nope, it’s ok to me.
Maybe memory/cash glitches or local proxy caching server troubles?
Have you tried other browsers?

Tried a couple more Sacrifice fixes.

@Deadpool198, if you see that kind of brown screen error, it’s likely some red error message showing in your browser JS console that will give us the clue to what’s happening.

1 Like

Ah, thank you very much. That brown screen thing was only temporary, it’s gone now. I probably should have said that.
The sacrifice also works now, thanks for that. Whether my sacrifice-fence tactic will be able to beat Ursara is another question :grin:.