# Dueling Grounds Issue

**URL:** <https://discourse.codecombat.com/t/dueling-grounds-issue/12258>\
**Category:** Uncategorized\
**Created:** [August 23, 2017, 6:57am UTC](https://discourse.codecombat.com/t/dueling-grounds-issue/12258 "2017-08-23T06:57:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Francesca\_Costa](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/francesca_costa/32/6758_2.png) [@Francesca\_Costa](https://discourse.codecombat.com/u/Francesca_Costa)\
**Post date:** [August 23, 2017, 6:57am UTC](https://discourse.codecombat.com/t/dueling-grounds-issue/12258/1 "2017-08-23T06:57:33Z")

</div>

Hey Guys,

I am stuck on the level Dueling Grounds, I have read all other topics and it seems they don’t apply to my level as I am not allowed to attack.

I’m not sure what I am supposed to do, it says to survive the enemy for 90s, and beat the enemy, sheild doesn’t work, moving around doesn’t work, and I am not allowed to attack.

Francesca x

---

<div class="post-metadata">

**Author:** ![Chaboi\_3000](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/chaboi_3000/32/48486_2.png) [@Chaboi\_3000](https://discourse.codecombat.com/u/Chaboi_3000)\
**Post date:** [August 23, 2017, 7:10am UTC](https://discourse.codecombat.com/t/dueling-grounds-issue/12258/2 "2017-08-23T07:10:08Z")

</div>

Can you post your code please?

---

<div class="post-metadata">

**Author:** ![Francesca\_Costa](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/francesca_costa/32/6758_2.png) [@Francesca\_Costa](https://discourse.codecombat.com/u/Francesca_Costa)\
**Post date:** [August 23, 2017, 7:11am UTC](https://discourse.codecombat.com/t/dueling-grounds-issue/12258/3 "2017-08-23T07:11:59Z")

</div>

while(true) {  
var enemy = hero.findNearestEnemy();

```
if (enemy) {
    hero.attack(enemy)
}

```

}

This was the code I was using, but it gives me an error saying “hero has no method attack”

---

<div class="post-metadata">

**Author:** ![byobcello](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/byobcello/32/6684_2.png) [@byobcello](https://discourse.codecombat.com/u/byobcello)\
**Post date:** [August 23, 2017, 7:31am UTC](https://discourse.codecombat.com/t/dueling-grounds-issue/12258/4 "2017-08-23T07:31:58Z")

</div>

Perhaps you have a hammer equipped?  
You can easily check and change equipment while in-game by pressing the “Game Menu” button somewhere at the top, then clicking on the tab that says “Change Hero”, and finally clicking “Next”.

---

<div class="post-metadata">

**Author:** ![Minh](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/minh/32/6856_2.png) [@Minh](https://discourse.codecombat.com/u/Minh)\
**Post date:** [August 23, 2017, 7:32am UTC](https://discourse.codecombat.com/t/dueling-grounds-issue/12258/5 "2017-08-23T07:32:04Z")

</div>

You need a sword to attack.

> [@Francesca\_Costa](#):
>
> moving around doesn’t work

You need boot to move.

> [@Francesca\_Costa](#):
>
> sheild doesn’t work

You need a shield to do that.

---

<div class="post-metadata">

**Author:** ![Francesca\_Costa](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/francesca_costa/32/6758_2.png) [@Francesca\_Costa](https://discourse.codecombat.com/u/Francesca_Costa)\
**Post date:** [August 23, 2017, 7:34am UTC](https://discourse.codecombat.com/t/dueling-grounds-issue/12258/6 "2017-08-23T07:34:29Z")

</div>

Thanks guys, how embarrassing, I thought to look at that but hadn’t used the hammer recently that I could remember. I do have the shield and boots equipped though 🙂

---

<div class="post-metadata">

**Author:** ![Minh](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/minh/32/6856_2.png) [@Minh](https://discourse.codecombat.com/u/Minh)\
**Post date:** [August 23, 2017, 7:40am UTC](https://discourse.codecombat.com/t/dueling-grounds-issue/12258/7 "2017-08-23T07:40:39Z")

</div>

> [@Minh](#):
>
> > [@Francesca\_Costa](#):
> >
> > sheild doesn’t work
> 
> You need a shield to do that.

You don’t have the shielding code in your code. Add this code `hero.shield()` to somewhere to your code and shield should work.
