[Adventurer] Brown Noise


#1

Hi! Here is the new level Brown Noise.

This level is a demonstration of one more advanced pet – the Brown Rat. That cute pet can be useful for rangers because it can distract enemies. You can use that pause to sneak by enemies, retreat from combat or backstab an enemy.


#2

Nice level but how do you defeat the skeleton? Those skeleton are way stronger than usual.


#3

Good question. I tried sword with “powerUp” ability and strongest swords. I can’t make “one powerful hit”. I’ll try the fire-trap’s. May be they will work.


#4

fire-trap does not work too


#5

Think how you can use the Rat. When an enemy turn with its back to you. As I wrote – that pet is useful for rangers :wink:


#6

Oh. So bad. I don’t have ranger. Whatever I will find the way to beat them.


#7

I have a ranger but I don’t know how to use the backstab dagger weapon.


#8

I found a bug.
this code work for me before but now this happen


few second later

and here is my code

# Collect the treasure and escape.

# Prepare the hero and the pet.
pet.moveXY(32, 28)
hero.moveXY(10, 19)
# Distract the skeleton.
pet.distractionNoise()
# Sneak while the skeleton is distracted.
hero.moveXY(10, 46)
# Repear this maneuver to get the treasure:
pet.moveXY(hero.pos.x, hero.pos.y)
pet.moveXY(64, 28)
hero.moveXY(48, 40)
pet.distractionNoise()
hero.moveXY(49, 8)
hero.moveXY(72, 8)
hero.moveXY(49, 8)
pet.distractionNoise()
# Escape from the dungeon (the red mark):
hero.moveXY(40, 56)


#9

Your code work fine for me.
Problem can be caused by path find algorithm.

Nice level. Pet ability is interesting.

Seems like there is no isReady for pet ability?


#10

Yep, it’s a bug in your code. Your hero is not fast, so use walls to hide from the skeleton “eyes”.

Good point. Sorry, I forgot to add to the Rat. Done.


#11

Thank it work now.:smiley:


#12

@Bryukh can you tell me how to use the dagger weapon please because I don’t know how to use it.


#13

just use hero.backstab(enemy) when you are hidden or when you can hit an enemy from the back. You can use enemy.rotation and hero.rotation to check it. Or just use your eyes :slight_smile:


#14

Ok thank for your help.:slightly_smiling_face:


#15

With Ritic is especially simple - phaseShift + backstab or distractNoise + blink + backstab can be overpowered combos.


#16

Thank a lot for your help. I wish I have Ritic. Is there a better way to save up gems to get Ritic?:slightly_smiling_face:


#17

It seems for me that rat ability “distract” is a little buggy. Sometimes it works, sometimes not. Sometimes it works but I get error message

if I comment code connected to brown rat all is fine.
Even if I don`t use “distanceTo” method I still get an error message if rat code is on.


#18

At some maps it works, rat is saying distracting words, but close enemies never react.


#19

Could you send me some examples of code which cause that error?


#20

оk, this one:

onSpawnRat = () =>
while true
if pet.pos.x != 47
pet.moveXY(47,70)
enemy = pet.findNearestByType(“fangrider”)
if not enemy
enemy = pet.findNearestByType(“brawler”)
if not enemy
enemy = pet.findNearestByType(“ogre”)
if enemy
deltaX = Math.abs(pet.pos.x - enemy.pos.x)
deltaY = Math.abs(pet.pos.y - enemy.pos.y)
distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY)
if distance < 10
if pet.isReady(“distract”)
pet.distractionNoise()

castStrong = () =>
enemy = hero.findNearestEnemy()
if enemy and @canCast “chain-lightning”, enemy
if enemy.type != “scout” and enemy.type != “munchkin” and enemy.type != “sand-yak” and enemy.type != “orge”
@cast “chain-lightning”, enemy

pet.on(“spawn”, onSpawnRat)

while true
#if pet.isReady(“distract”)
#pet.distractionNoise()
#stompWise()
castStrong()
#bash()
enemy = hero.findNearestEnemy()
if enemy and enemy.type != “sand-yak”
#while enemy.health > 0
hero.attack enemy
else
@move {x: 90, y: 70}