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

Control Enemy PVP bug (Dueling Grounds)

You are able to control the opponent player by first defining them as a variable and then you can write things like enemy.say(null); which causes the enemy code to error out and not function, or you could make opponents attack themselves using enemy.attack(enemy); I feel this is most likely a bug as it is very exploitable.

This is using javascript by the way.

1 Like

That’s weird and funny) I can only say “Whoa!”))

You can also walk them in to the bear traps, one after the other…

:wink:

Is it a bug though?
:thinking:

Well, I would say that it is not one that is a game crasher or an ultimate exploit. Have you tried using it against any other than the simpleCPU? It should produce an error with the more advanced challengers.

I think yes)
I totally disagree with idea that my opponents can capture control over my hero in multyplayer levels)

but, your player is not ‘simple cpu’ is it? Try it…from here https://codecombat.com/play/ladder/dueling-grounds, choose either play as red or blue (up to you) and select the medium level, just for example.

It errors immediately.

it actually does work against non cpus
I will send a video

better yet, pm me the code you are using to affect the enemy. I just realized, the code I’m using fails…it is plausible your is working.

edit: i just sent a new pm don’t know how but i responded to your pm

older post: i cant pm because I ran the daily limit
would you like the video and code as a public message?
because I can edit the post

Let’s wait on the code then…best not to share, especially if I am incorrect and it truly is a bug.

After further testing, the exploit does work fairly well against the Simple CPU. However, as you move up in difficulty levels, it becomes less and less effective and ends up throwing a critical error at the Hard level, completely stopping the code.

I had mixed results with PvP, but I think it did have some effect.

@Chaboi_3000 and @Deadpool198, think this should be passed on?

i can get the code to break someone on hard mode, you just have to edit what the enemy says.

This isn’t the first time I’ve seen this, it’s come up a few times but I thought the team had fixed it. This topic mentions enemy.defeat():
[BUG] multiplayer hack? Starting with zero health
Where bryukh said:
“Thanks, guys! I’ve fixed it (maybe need some time for caching refreshing). We know where from this cheat appeared but not sure how long it has been working.”
That was a long time ago though…
Danny

I think this is another brand new one bug that can be used to cheat) Not defeat method.
P.S. I remember this case. Not so long ago, two years only)

hey what would happen if the enemy attacked itself

It hapen when one of your code like hero.attack(enemy) then the enemy is insvisibillty so the code can’t work so the hero are ruining for attack the enemy

ok cool @Nam_Khanh_Trang_trai

He would die of course. If he would attack himself long\hard enough (like catapults f.e.)
You can try by yourself:
load https://codecombat.com/play/level/forest-flower-grove?
and put:

while True:
    self.attack(self)

I don’t know is it possible to command one’s allies to attack themselves. Think yes, but I didn’t try that.

No I mean the animation