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!ā€))

1 Like

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.

1 Like

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