# Need help on Grim Determination

**URL:** <https://discourse.codecombat.com/t/need-help-on-grim-determination/7856>\
**Category:** Uncategorized\
**Created:** [June 3, 2016, 1:40am UTC](https://discourse.codecombat.com/t/need-help-on-grim-determination/7856 "2016-06-03T01:40:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Imperial\_Soldier](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/imperial_soldier/32/5376_2.png) [@Imperial\_Soldier](https://discourse.codecombat.com/u/Imperial_Soldier)\
**Post date:** [June 3, 2016, 1:40am UTC](https://discourse.codecombat.com/t/need-help-on-grim-determination/7856/1 "2016-06-03T01:40:22Z")

</div>

I still can’t figure out how to complete Grim Determination.  
Please: I ask for someone to please walk me through on how to complete the level!

---

<div class="post-metadata">

**Author:** ![CryogenicMiner](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/cryogenicminer/32/3985_2.png) [@CryogenicMiner](https://discourse.codecombat.com/u/CryogenicMiner)\
**Post date:** [June 3, 2016, 2:04pm UTC](https://discourse.codecombat.com/t/need-help-on-grim-determination/7856/2 "2016-06-03T14:04:28Z")

</div>

I have not worked on the level yet, so I can not help you. However the first step to getting assistance is posting your troubled code encased in tripple barticks ( ` ).  
-Cheers

---

<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:** [June 7, 2016, 9:43am UTC](https://discourse.codecombat.com/t/need-help-on-grim-determination/7856/3 "2016-06-07T09:43:50Z")

</div>

Write functions `commandPeasant` and `commandGriffin` first.  
The peasant should help you to collect coins. Just search the nearest coin to him and command him to move there.  
Griffins should attack enemies, just `findNearestEnemy` and command to attack it.

Inside `while` loop you need check if you have enough gold to summon a griffin and summon it if it is.

And the last - paladins. Check if she can cast “heal”, then command her to heal the `lowestHealthPaladin()`.  
If she can’t cast, then attack the nearest enemies.

Also you can use `shield` for paladins if their have low health.
