# "Magma Mountain" Tips and Tricks

**URL:** <https://discourse.codecombat.com/t/magma-mountain-tips-and-tricks/33724>\
**Category:** AILeague\
**Created:** [September 3, 2022, 3:07pm UTC](https://discourse.codecombat.com/t/magma-mountain-tips-and-tricks/33724 "2022-09-03T15:07:00Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![riticmaster908](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/riticmaster908/32/43503_2.png) [@riticmaster908](https://discourse.codecombat.com/u/riticmaster908)\
**Post date:** [September 3, 2022, 3:07pm UTC](https://discourse.codecombat.com/t/magma-mountain-tips-and-tricks/33724/1 "2022-09-03T15:07:00Z")

</div>

Hi, ritic here. I am continuing @TheBredMeister 's category of tips and tricks for the AI leagues:

1st of all, (optional) as of writing this, DO NOT use jump or dash, it can mess up your code, jumping and dash may seem good, but overall, it messes your code up, lets say you dash and you go over where you want to go, your bug moves ALL THE WAY to that position, wasting time.

2nd of all, TIME IS KEY losing even 1 second can interfere with your win:loss ratio

If you have more tips, please reply below 😄 And good luck!

(edit: jump and dash can be used if you have good code (thx moon) )

---

<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:** [September 3, 2022, 4:32pm UTC](https://discourse.codecombat.com/t/magma-mountain-tips-and-tricks/33724/2 "2022-09-03T16:32:42Z")

</div>

My piece of advice – ignore at least half of those points 🙂

> 1st of all, if you want to know how many tiles from 1 coordinate to another (lets say x:64 to x:70) the formula is coordinate/4 each tile is 4 coordinates

`step` size is 2. The lava and player size is 2m. The avatar moves for 2 steps.

> 2nd of all, as of writing this, DO NOT use jump or dash, it can mess up your code, jumping and dash may seem good, but overall, it messes your code up, lets say you dash and you go over where you want to go, your bug moves ALL THE WAY to that position, wasting time.

No comments here. Just think.

---

<div class="post-metadata">

**Author:** ![moonwatcher348](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/moonwatcher348/32/24126_2.png) [@moonwatcher348](https://discourse.codecombat.com/u/moonwatcher348)\
**Post date:** [September 4, 2022, 7:03am UTC](https://discourse.codecombat.com/t/magma-mountain-tips-and-tricks/33724/3 "2022-09-04T07:03:30Z")

</div>

> [@riticmaster908](#):
>
> 1st of all, (optional) as of writing this, DO NOT use jump or dash, it can mess up your code, jumping and dash may seem good, but overall, it messes your code up, lets say you dash and you go over where you want to go, your bug moves ALL THE WAY to that position, wasting time.

Seems like a problem you can solve if you just have good enough code…  
Also, if time is key, then it’s better to dash/jump (although jump you should probably only use when there is lava blocking you)

---

<div class="post-metadata">

**Author:** ![RevolutionaryPenguin](https://avatars.discourse-cdn.com/v4/letter/r/e274bd/32.png) [@RevolutionaryPenguin](https://discourse.codecombat.com/u/RevolutionaryPenguin)\
**Post date:** [September 5, 2022, 3:45pm UTC](https://discourse.codecombat.com/t/magma-mountain-tips-and-tricks/33724/4 "2022-09-05T15:45:03Z")

</div>

In my opinion dash is really useful. It makes your hero go about 12 meters, or 3 steps.

---

<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:** [September 5, 2022, 4:02pm UTC](https://discourse.codecombat.com/t/magma-mountain-tips-and-tricks/33724/5 "2022-09-05T16:02:07Z")

</div>

6??? Hmm, should 12m (or 3 times from usual move)

---

<div class="post-metadata">

**Author:** ![RevolutionaryPenguin](https://avatars.discourse-cdn.com/v4/letter/r/e274bd/32.png) [@RevolutionaryPenguin](https://discourse.codecombat.com/u/RevolutionaryPenguin)\
**Post date:** [September 6, 2022, 2:12pm UTC](https://discourse.codecombat.com/t/magma-mountain-tips-and-tricks/33724/6 "2022-09-06T14:12:03Z")

</div>

thanks (20 characters)

---

<div class="post-metadata">

**Author:** ![Learned](https://avatars.discourse-cdn.com/v4/letter/l/dec6dc/32.png) [@Learned](https://discourse.codecombat.com/u/Learned)\
**Post date:** [September 7, 2022, 4:14am UTC](https://discourse.codecombat.com/t/magma-mountain-tips-and-tricks/33724/7 "2022-09-07T04:14:06Z")

</div>

A good trick seems to be seeking out items based on value over distance, like in the “diamond dozen” level.

---

<div class="post-metadata">

**Author:** ![Learned](https://avatars.discourse-cdn.com/v4/letter/l/dec6dc/32.png) [@Learned](https://discourse.codecombat.com/u/Learned)\
**Post date:** [September 9, 2022, 1:29pm UTC](https://discourse.codecombat.com/t/magma-mountain-tips-and-tricks/33724/8 "2022-09-09T13:29:40Z")

</div>

Something to keep in mind is that maintaining your health is usually the key to winning. Your total score that determines whether or not you win or lose is equal to your score plus twice your health. If your health is lower than your maxHealth, each heal item is technically worth two points instead of one.

---

<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:** [September 9, 2022, 6:00pm UTC](https://discourse.codecombat.com/t/magma-mountain-tips-and-tricks/33724/9 "2022-09-09T18:00:59Z")

</div>

As an idea – what I add a way to use abilities in any direction? It can be a non-blocking method like ‘turn’ so you can turn, shoot and move where you want. Another way to add an optional. argument in any ability to choose the. direction for them (this one can make docs more complex for newbies).

---

<div class="post-metadata">

**Author:** ![Aya](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/aya/32/42680_2.png) [@Aya](https://discourse.codecombat.com/u/Aya)\
**Post date:** [September 10, 2022, 6:54am UTC](https://discourse.codecombat.com/t/magma-mountain-tips-and-tricks/33724/10 "2022-09-10T06:54:06Z")

</div>

Yes turn is a wondeful idea, but will that let us move diagonally or no?

---

<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:** [September 10, 2022, 7:40am UTC](https://discourse.codecombat.com/t/magma-mountain-tips-and-tricks/33724/11 "2022-09-10T07:40:34Z")

</div>

Diagonals? No. How? I suggested it just to use abilities in a direction

---

<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:** [September 10, 2022, 9:19am UTC](https://discourse.codecombat.com/t/magma-mountain-tips-and-tricks/33724/12 "2022-09-10T09:19:58Z")

</div>

Why have I’ve put it here? My bad

---

<div class="post-metadata">

**Author:** ![LoopsVerified](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/loopsverified/32/31895_2.png) [@LoopsVerified](https://discourse.codecombat.com/u/LoopsVerified)\
**Post date:** [October 21, 2022, 9:23pm UTC](https://discourse.codecombat.com/t/magma-mountain-tips-and-tricks/33724/13 "2022-10-21T21:23:54Z")

</div>

1: NO JUMP OR DASH It can easily mess up your code even making you jump right into lava. It’s also very hard to measure distance

2: Think smaller, unless you have a really good code keep it simple. It’s easy to get top 100 with a simple code

GOOD LUCK!

---

<div class="post-metadata">

**Author:** ![Learned](https://avatars.discourse-cdn.com/v4/letter/l/dec6dc/32.png) [@Learned](https://discourse.codecombat.com/u/Learned)\
**Post date:** [October 25, 2022, 5:47pm UTC](https://discourse.codecombat.com/t/magma-mountain-tips-and-tricks/33724/14 "2022-10-25T17:47:56Z")

</div>

I have found that a good way to get an advantage of your average opponent is to find a way to detect their fireballs so you can dodge them.

---

<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:** [October 25, 2022, 5:59pm UTC](https://discourse.codecombat.com/t/magma-mountain-tips-and-tricks/33724/15 "2022-10-25T17:59:42Z")

</div>

HA HA! I love this! Honestly, I haven’t thought about it, however, I see how you can do it 🙂

---

<div class="post-metadata">

**Author:** ![pgsystemtester](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/pgsystemtester/32/39719_2.png) [@pgsystemtester](https://discourse.codecombat.com/u/pgsystemtester)\
**Post date:** [October 25, 2022, 11:13pm UTC](https://discourse.codecombat.com/t/magma-mountain-tips-and-tricks/33724/16 "2022-10-25T23:13:55Z")

</div>

Hello, I’m trying to teach my kids how to code within the Magma game. Am I overlooking a repository that documents ALL methods, properties, etc? There’s obviously the middle screen with some methods (shown below), but this appears incomplete as it does not show one of the suggestions of using `hero.isReady('dash')` shown on the initial screen. I’ve also seen other questions, suggestions that do not appear on this list.

Assuming no documentation exists, is there a way to debug/inspect various objects, functions etc? As an example, once an object has been created (i.e. `item = hero.findNearestItem()`), it would be useful to know what properties `item` has. Even just being able to execute a logger function would be useful as I’ve seen other posts using a `pos` property.

Thanks. Overall this is a very fun idea.

![image](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/3X/a/b/ab23a8874f693dfecbd4831fdfcfdc91bb9a2629.png)

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

---

<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:** [October 26, 2022, 11:50am UTC](https://discourse.codecombat.com/t/magma-mountain-tips-and-tricks/33724/17 "2022-10-26T11:50:19Z")

</div>

Thanks. You are right and need to add docs.

There is a list of available methods  
[  
“moveLeft”,  
“moveRight”,  
“moveUp”,  
“moveDown”,  
“jump”,  
“isReady”,  
“dash”,  
“findItems”,  
“findNearestItem”,  
“distanceTo”,  
“getLavaMap”,  
“lavaAtXY”,  
“fire”,  
“turn”,  
“moveForward”  
]

---

<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:** [October 26, 2022, 11:53am UTC](https://discourse.codecombat.com/t/magma-mountain-tips-and-tricks/33724/18 "2022-10-26T11:53:13Z")

</div>

Properties available

[  
“id”,  
“color”,  
“score”,  
“opponent”,  
“time”,  
“health”,  
“maxHealth”,  
“speed”,  
“x”,  
“y”,  
“direction”,  
“angle”  
]
