---
id: 5dbabb746ef5fe3a704f848d
title: Part 119
challengeType: 0
---
## Description
The game could be complete now, but let's make it more interesting.
Inside the `attack` function, change the line `health -= monsters[fighting].level;` to `health -= getMonsterAttackValue(monsters[fighting].level);` This sets `health` to equal `health` minus the return value of the `getMonsterAttackValue` function. Also, pass the level of the monster to `getMonsterAttackValue` as an argument.
## Instructions
## Tests
```yml
tests:
- text: See description above for instructions.
testString: assert(attack.toString().replace(/\s/g, '').includes('health-=getMonsterAttackValue(monsters[fighting].level'));
```
## Challenge Seed
```html
```
### Before Test
```html
RPG - Dragon Repeller
XP: 0Health: 100Gold: 50
Monster Name: Health:
Welcome to Dragon Repeller. You must defeat the dragon that is preventing people from leaving the town. You are in the town square. Where do you want to go? Use the buttons above.