Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

Zana is very OP in Dueling grounds

cast invis first and then build fire traps all around Zana and blow her up?

u cant attack while invis but u can build right :stuck_out_tongue:

Wait how do you cast invisibility? Haven’t played CC in a long time

It’s hero.cast(“invisibility”, hero) right?

But i get infinite loop when i do that :thinking:

Pacify makes your hero slow, weak for a few seconds. Zana is a pretty expensive hero so her abilities are supposed to be better than most heroes. Plus, Senick is cheaper than Zana, so you should expect her to be more stronger than Senick right?

Here’s the plan for nerfs:
Make cooldown for Zana Paralyze longer
Make speed factor for Zana Pacify to a higher value.

Not sure how it would be performance wise, however, you could possibly make a check at the beginning on wether or not he enemy hero is zana, and if, then use a new coded tactic, otherwise, keep the old one, no?

stronger is relative, what one would expect more is for her to be more “special” in terms of abilities and stuff. For Player versus Player / Code versus Code you’d still want it to be a competition with code, instead of mostly hero choices and then followed by code.

However, if it’s possible to change tactics in a way that one can win against zana, with a different hero than having zana oneself, then theres not REALLY a need to nerf unless it’s just “too strong”.

But in my opinion overall, it’d be normal to have to make some changes in code and tactics if a new character gets added that has another style for battle. Adaptablity is important for these things afterall!
To just rely on a single tactic against every possible enemy, even new special ones and expecting a win isn’t necessarily the correct way :stuck_out_tongue: but then again, I’m not better either. Just wanted to tell my opinions regarding what i read here. (haven’t seen zana yet, so i myself can’t say if zana is too strong or similar)

I’ve been considering writing multiple codes for different heroes, but the challenge is identifying the hero. If I remember correctly, the id for all hero enemies is either Hero Placeholder or Hero Placeholder 1 which wouldn’t help. You would need to identify their type to run the different codes. I’ve been able to identify a few types of heroes, but not all yet. (I just haven’t taken the time so research them all and I couldn’t find the type in their thang list). Does anyone have a complete list of the heroes and their types?

In case the Thang-Editor name is the type of the hero:
Otherwise, atleast I’ll be able to find the heroes in the thang-editor with this list now.

"Captain"	-	Anya
"Knight"	-	Tharin
"Champion"	-	Ida
"Duelist"	-	Alejandro
"Ninja"		-	Amara
"Librarian"	-	Hushbaum
"Samurai"	-	Hanzo
"Trapper"	-	Senick
"Potion Master"	-	Omarn
"Stalwart"	-	Gordon
"Forest Archer"	-	Naria
"Sorcerer"	-	Pender
"Raider"	-	Arryn
"Necromancer"	-	Nalfar
"Assassin"	-	Ritic
"Goliath"	-	Okar
"Pixie"		-	Zana
2 Likes

Just make sure that you have the ring and check to see if your hero is ready for invisibility so you don’t get stuck waiting on the cool-down period.

Hm i did check for readiness and i do have the ring but when i try to cast it i get infinity loop

Like below. Something else might be interacting with the code. If this doesn’t work, I’ll have to see what else you have.

if hero.isReady("invisibility"):
    hero.cast("invisibility", hero)

Literally all I have right now for my code is:

while True:
    if hero.isReady("invisibility"):
        hero.cast("invisibility", hero)
    else:
        enemy = findEnemyHero()
        if enemy:
            hero.buildXY("fire-trap", enemy.pos.x, enemy.pos.y)

Even with just the cast invisibility line i’m still getting infinite loops

Are you sure the infinite loops are on your end, not your opponents side? (possibly?) Is there an X beneath you, or the enemy hero?

It’s on my end.

When there’s no code the game goes out fine.

But when i put that line in, i get infinity loop and the gameplay just wont load. And i get infinite loop message when i try to play the level.

Who are you playing against? The Red Simple CPU on this level has bad code and will lock you up when you use invisibility. Switch to a different enemy once. Harrowland has the same problem. Thanks.

I was fighting Zana and when i cast invis i get infinite loop

Shouldn’t happen if i dont fight against CPU right

Can you give me the console error message?

@Chaboi_3000 console says:
Non-UserCodeError: TypeError: Cannot read property ‘effects’ of null

Maybe when Zana got released it doesn’t have the effect status coded in or something?

Whose code is it? My guess is that they might have a check for hasEffect but their variable assigned to the enemy hero is in the loop and is null. So when the enemy hero goes invisible the enemy can’t be found and the hasEffect method has nothing to check. Your code is not in an infinite loop, but their code locks up which sometimes stops your code which seems like an infinite loop on your end.

Hm okay.

CodeCombat really needs to fix that then, because the enemy player would be able to stop me from using invisibility against them even though it’s their code that has a fault.

I forgot to add a function for hasEffect for one of the moves. Can you try again and see if it works now?