# Broken Circle: need feedback (and cheats)

**URL:** <https://discourse.codecombat.com/t/broken-circle-need-feedback-and-cheats/8614>\
**Category:** Adventurer\
**Created:** [August 10, 2016, 6:50am UTC](https://discourse.codecombat.com/t/broken-circle-need-feedback-and-cheats/8614 "2016-08-10T06:50:46Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bryukh](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/bryukh/32/19597_2.png) [@Bryukh](https://discourse.codecombat.com/u/Bryukh)\
**Post date:** [August 10, 2016, 6:50am UTC](https://discourse.codecombat.com/t/broken-circle-need-feedback-and-cheats/8614/1 "2016-08-10T06:50:46Z")

</div>

Hi, adventurers!

Here is the new level for the experienced heroes: [Broken Circles](https://codecombat.com/play/level/broken-circles) I made this level a few weeks ago, but I wasn’t sure how to solve it. Now I know how to do it. So the level will be on the Glacier map soon.

I would like to ask your opinion about this level. Also, I’ll be grateful if you share about cheats for this level.

I tried several solutions for this level. As the result, my final solution isn’t so complex as I thought (and much simpler than first ones).

---

<div class="post-metadata">

**Author:** ![RobAnybody](https://avatars.discourse-cdn.com/v4/letter/r/7ba0ec/32.png) [@RobAnybody](https://discourse.codecombat.com/u/RobAnybody)\
**Post date:** [August 10, 2016, 10:31am UTC](https://discourse.codecombat.com/t/broken-circle-need-feedback-and-cheats/8614/2 "2016-08-10T10:31:17Z")

</div>

I found one problem. isPathClear method return true ignoring 3 step radius of mine exsplosion.

```python
trapAttackRange = 3;
radiusStep = 10;
center = {"x": 68, "y": 68};
# Бегоооом, марш!
while True:
    direction = Vector.subtract(Vector(center.x, center.y), hero.pos)
    direction = Vector.multiply(Vector.normalize(direction), (radiusStep-trapAttackRange)/2)
    move = Vector.add(hero.pos, direction)    
    if(hero.isPathClear(hero.pos, move)):        
        hero.move(move)
    else:
        direction = Vector.rotate(direction, Math.PI/2)
        move = Vector.add(hero.pos, direction) 
        hero.move(move)

```

---

<div class="post-metadata">

**Author:** ![Bryukh](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/bryukh/32/19597_2.png) [@Bryukh](https://discourse.codecombat.com/u/Bryukh)\
**Post date:** [August 10, 2016, 10:52am UTC](https://discourse.codecombat.com/t/broken-circle-need-feedback-and-cheats/8614/3 "2016-08-10T10:52:52Z")

</div>

> [@RobAnybody](#):
>
> I found one problem. isPathClear method return true ignoring 3 step radius of mine exsplosion.

Nope. It’s normal behaviour. `isPathClear` checks only obstacles. `attackRange` of an unit (the trap is an unit) is not an obstacle.

---

<div class="post-metadata">

**Author:** ![RobAnybody](https://avatars.discourse-cdn.com/v4/letter/r/7ba0ec/32.png) [@RobAnybody](https://discourse.codecombat.com/u/RobAnybody)\
**Post date:** [August 10, 2016, 10:52am UTC](https://discourse.codecombat.com/t/broken-circle-need-feedback-and-cheats/8614/4 "2016-08-10T10:52:58Z")

</div>

I think better to use wall, not mines.

---

<div class="post-metadata">

**Author:** ![Bryukh](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/bryukh/32/19597_2.png) [@Bryukh](https://discourse.codecombat.com/u/Bryukh)\
**Post date:** [August 10, 2016, 10:54am UTC](https://discourse.codecombat.com/t/broken-circle-need-feedback-and-cheats/8614/5 "2016-08-10T10:54:15Z")

</div>

> [@RobAnybody](#):
>
> I think better to use wall, not mines.

That’s why I used traps 😉

---

<div class="post-metadata">

**Author:** ![RobAnybody](https://avatars.discourse-cdn.com/v4/letter/r/7ba0ec/32.png) [@RobAnybody](https://discourse.codecombat.com/u/RobAnybody)\
**Post date:** [August 10, 2016, 10:55am UTC](https://discourse.codecombat.com/t/broken-circle-need-feedback-and-cheats/8614/6 "2016-08-10T10:55:34Z")

</div>

Ok. For me its meens that I need to write additional function, to check this. I’ll write when finish.

---

<div class="post-metadata">

**Author:** ![RobAnybody](https://avatars.discourse-cdn.com/v4/letter/r/7ba0ec/32.png) [@RobAnybody](https://discourse.codecombat.com/u/RobAnybody)\
**Post date:** [August 10, 2016, 3:35pm UTC](https://discourse.codecombat.com/t/broken-circle-need-feedback-and-cheats/8614/7 "2016-08-10T15:35:25Z")

</div>

Ok. I just try to walk by the circle, but it seems, that circle not perfect.  
[http://clip2net.com/s/3B5bC3M](http://clip2net.com/s/3B5bC3M)

```python
hero.moveXY(122, 66)
way = Vector.subtract(center, hero.pos)
normal = Vector.normalize(way)
direction = Vector.multiply(normal, trapAttackRange+1)
direction = Vector.rotate(direction, Math.PI/2)
move = Vector.add(hero.pos, direction)    
hero.move(move)

```

---

<div class="post-metadata">

**Author:** ![RobAnybody](https://avatars.discourse-cdn.com/v4/letter/r/7ba0ec/32.png) [@RobAnybody](https://discourse.codecombat.com/u/RobAnybody)\
**Post date:** [August 10, 2016, 7:12pm UTC](https://discourse.codecombat.com/t/broken-circle-need-feedback-and-cheats/8614/8 "2016-08-10T19:12:01Z")

</div>

Second try

```python
center = Vector(center.x, center.y)
angle = 0
while True:     
    way = Vector.subtract(hero.pos, center)        
    normal = Vector.normalize(way)   
    normal = Vector.rotate(normal, angle)
    direction = Vector.multiply(normal, radiusStep*5 + trapAttackRange+2) 
    move = Vector.add(center, direction)   
    hero.move(move)
    angle -= 0.002

```

[http://clip2net.com/s/3B5yUni](http://clip2net.com/s/3B5yUni)

---

<div class="post-metadata">

**Author:** ![Tom\_H](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/tom_h/32/3918_2.png) [@Tom\_H](https://discourse.codecombat.com/u/Tom_H)\
**Post date:** [August 10, 2016, 8:44pm UTC](https://discourse.codecombat.com/t/broken-circle-need-feedback-and-cheats/8614/9 "2016-08-10T20:44:21Z")

</div>

i jumped using okar stompfoot to trigger the traps, but he doesn’t launch him enough to cause the fangriders to attack him. Easy win 😀

---

<div class="post-metadata">

**Author:** ![Bryukh](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/bryukh/32/19597_2.png) [@Bryukh](https://discourse.codecombat.com/u/Bryukh)\
**Post date:** [August 10, 2016, 8:49pm UTC](https://discourse.codecombat.com/t/broken-circle-need-feedback-and-cheats/8614/10 "2016-08-10T20:49:50Z")

</div>

It’s because {122,68} is not ‘angle == 0’ . Use 122, 68. I use sin and cos to form circles.

---

<div class="post-metadata">

**Author:** ![Bryukh](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/bryukh/32/19597_2.png) [@Bryukh](https://discourse.codecombat.com/u/Bryukh)\
**Post date:** [August 10, 2016, 9:04pm UTC](https://discourse.codecombat.com/t/broken-circle-need-feedback-and-cheats/8614/11 "2016-08-10T21:04:06Z")

</div>

Thanks, Tom. I’ll fix that cheat.

---

<div class="post-metadata">

**Author:** ![Bryukh](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/bryukh/32/19597_2.png) [@Bryukh](https://discourse.codecombat.com/u/Bryukh)\
**Post date:** [August 11, 2016, 4:22am UTC](https://discourse.codecombat.com/t/broken-circle-need-feedback-and-cheats/8614/12 "2016-08-11T04:22:08Z")

</div>

@Tom_H: Okar’s stomp doesn’t change `pos.z` so it doesn’t count as a jump. But I increased the power of traps, so now they have 20 metres blow radius and `stomp` has 15 metres.

---

<div class="post-metadata">

**Author:** ![Bryukh](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/bryukh/32/19597_2.png) [@Bryukh](https://discourse.codecombat.com/u/Bryukh)\
**Post date:** [August 11, 2016, 4:23am UTC](https://discourse.codecombat.com/t/broken-circle-need-feedback-and-cheats/8614/13 "2016-08-11T04:23:00Z")

</div>

My circles. `Math.sin` and `Math.cos`:

 ![](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/2X/3/38e18d699dd9cfadcf8f81e70c402615ad278ca9.png)

---

<div class="post-metadata">

**Author:** ![UltCombo](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/ultcombo/32/3822_2.png) [@UltCombo](https://discourse.codecombat.com/u/UltCombo)\
**Post date:** [August 11, 2016, 6:13am UTC](https://discourse.codecombat.com/t/broken-circle-need-feedback-and-cheats/8614/14 "2016-08-11T06:13:19Z")

</div>

Hey, here’s one exploit.

Pender equipped with Boots of Leaping, Elemental Codex V and The Precious.

```python
center = {"x": 68, "y": 68};

# Go, Go, GO!
hero.cast("haste", hero)
hero.moveXY(123, 67)
hero.jumpTo({ 'x': 0, 'y': 67 })
hero.cast("invisibility", hero)
hero.moveXY(center.x, center.y)

```

You can watch my game session [here](https://codecombat.com/play/level/broken-circles?session=57ac01914cf9972400724778&observing=true).

* * *

I just found yet another exploit.

This time using Pender with Vine Staff, Elemental Codex V and The Precious.

```python
hero.cast("haste", hero)

# call moveXY twice to disable inertia effect
for i in range(2):
    hero.moveXY(128, 61)

# Summoning burl will lure the fangriders.
# The Burl will step on a trap and explode itself together with all the fangriders.
hero.cast("summon-burl")

# Hide from the explosions and enemy fire
hero.moveXY(154, 64)
hero.cast("invisibility", hero)

# All the traps have exploded by now, collect the treasure :D
hero.moveXY(center.x, center.y)

```

---

<div class="post-metadata">

**Author:** ![Bryukh](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/bryukh/32/19597_2.png) [@Bryukh](https://discourse.codecombat.com/u/Bryukh)\
**Post date:** [August 11, 2016, 1:16pm UTC](https://discourse.codecombat.com/t/broken-circle-need-feedback-and-cheats/8614/15 "2016-08-11T13:16:33Z")

</div>

I solved the cheats. The new rule - No magic.

---

<div class="post-metadata">

**Author:** ![UltCombo](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/ultcombo/32/3822_2.png) [@UltCombo](https://discourse.codecombat.com/u/UltCombo)\
**Post date:** [August 12, 2016, 3:40am UTC](https://discourse.codecombat.com/t/broken-circle-need-feedback-and-cheats/8614/16 "2016-08-12T03:40:18Z")

</div>

Oh noes! Does this mean I should solve the level for real now? Or maybe I could just find another exploit…

Well, turns out it was easy enough to patch the first exploit—a single jump is enough to cheat this level even without any magic.

Here’s my [game session](https://codecombat.com/play/level/broken-circles?session=57ac01914cf9972400724778&observing=true) again.

```python
hero.moveXY(122.2, 67)
hero.jumpTo({ 'x': 0, 'y': 67 })
hero.wait(2.2)
for direction in (1, -1):
    for i in range(5):
        hero.moveXY(hero.pos.x + .4 * direction, hero.pos.y)
        hero.wait(.1)

```

---

<div class="post-metadata">

**Author:** ![Bryukh](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/bryukh/32/19597_2.png) [@Bryukh](https://discourse.codecombat.com/u/Bryukh)\
**Post date:** [August 12, 2016, 3:57am UTC](https://discourse.codecombat.com/t/broken-circle-need-feedback-and-cheats/8614/17 "2016-08-12T03:57:03Z")

</div>

Thanks! I know how to fix it. Will do it today.

---

<div class="post-metadata">

**Author:** ![Bryukh](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/bryukh/32/19597_2.png) [@Bryukh](https://discourse.codecombat.com/u/Bryukh)\
**Post date:** [August 12, 2016, 9:07am UTC](https://discourse.codecombat.com/t/broken-circle-need-feedback-and-cheats/8614/18 "2016-08-12T09:07:58Z")

</div>

I added the power engine for jumps. Now each jump will be really high 😉

Thanks for the exploits. I’m grateful for your help.

---

<div class="post-metadata">

**Author:** ![UltCombo](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/ultcombo/32/3822_2.png) [@UltCombo](https://discourse.codecombat.com/u/UltCombo)\
**Post date:** [August 13, 2016, 3:55am UTC](https://discourse.codecombat.com/t/broken-circle-need-feedback-and-cheats/8614/19 "2016-08-13T03:55:21Z")

</div>

> [@Bryukh](#):
>
> Thanks for the exploits. I’m grateful for your help.

No problem. Nice work fixing these so quickly! 😄

> [@Bryukh](#):
>
> I added the power engine for jumps. Now each jump will be really high 😉

Not sure if I understand. The jumps seem smaller now, but the jump exploit is still doable.

[Game session](https://codecombat.com/play/level/broken-circles?session=57ac01914cf9972400724778&observing=true).

```py
center = Vector(68, 68)

#
# Exploit #1.2
#
hero.moveXY(125, 65)
hero.moveXY(116, 40)
hero.moveXY(100, 22)
hero.moveXY(76, 12)

hero.jumpTo(center.copy().subtract(hero.pos).multiply(.5).add(hero.pos)) # Why didn't I just hardcode the value?
for i in range(2): # Move twice to disable inertia
    hero.moveXY(73.5, 34)

while not hero.isReady("jump"):
    hero.wait(.1)

nextJump = Vector(69, 53)
hero.jumpTo(nextJump.copy().subtract(hero.pos).multiply(1.3).add(hero.pos))
for i in range(2): # Disable inertia
    hero.moveXY(nextJump.x, nextJump.y)

while not hero.isReady("jump"):
    hero.wait(.1)

hero.jumpTo(center)

```

---

<div class="post-metadata">

**Author:** ![Bryukh](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/bryukh/32/19597_2.png) [@Bryukh](https://discourse.codecombat.com/u/Bryukh)\
**Post date:** [August 13, 2016, 4:22am UTC](https://discourse.codecombat.com/t/broken-circle-need-feedback-and-cheats/8614/20 "2016-08-13T04:22:38Z")

</div>

> [@UltCombo](#):
>
> Not sure if I understand. The jumps seem smaller now, but the jump exploit is still doable.

I added the trap exploding when a hero jumps instead the attack of the guards.

Looks like small jumps don’t trigger the alarm. it’s because I use something like this:

```python
# first frame
@startPosZ = @hero.pos.z + diff # about 0.5
...
if @hero.pos.z > @startPosZ
    @blown()

```

Without `diff` can be an occasional exploding.

Thanks. I have one idea how to close that cheat.

You are really good in the cheat/bug search.

[Next page](https://discourse.codecombat.com/t/broken-circle-need-feedback-and-cheats/8614.md?page=2)
