Code royale updated and better then ever!

Some of you might have tried my game code royale. It has been much better. For those who haven’t played, please read ENTIRE how to play guide.
How to play:
Gems, small pile gems, and chest gems have a value property of 5, 15, 100, indicating how much gold they’re worth.


This arena is brand new, so no one knows the ultimate strategy yet. That said, the best strategies will likely cover several areas:

  • efficiently prioritizing paths through the coin fields
  • summoning a diverse mix of allied units
  • commanding your troops defensively and offensively
  • unleashing your powerful spells (hover over them to see their APIs)
  • targeting your opponent’s weak units
  • responding to your opponent’s strategy
  • Dirty tricks

Remember: cheating is what the losers call technique!

Unit Stats

  • "soldier": The humble foot soldier has 200 health, and 6 damage. A decent mini tank. Held back by low damage. 20 gold cost
  • "archer": Basic ranged unit. 30 health, 13 damage. Don’t use without a tank to soak up damage. Glass cannon. 25 gold cost
  • "paladin" Great for absorbing damage. 600 health, 20 damage. Use along with glass cannons. Tank. 80 gold cost
  • "griffin-rider" Good for high damage output.` 160 health, 20 damage. Mini tank. 50 gold cost
  • "artillery" Has more range then enemy towers. It can snipe towers without being targeted back. 250 damage, 100 health. Sniper. 100 gold cost
  • "peasant" Can collect gold. 6 health, 0 damage. Get extra gold. 50 gold cost
  • "witch" Great support unit. Can cast heal once every second. 120 health, 40 damage, heal 100 health per second. 60 gold. Support
  • "shaman" Weaker support unit. Can grow friends, making the target move 2 times slower, but 2 times more health. 60 health, 25 damage. 30 gold cost.
  • "brawler"Extremely strong tank. 500 health, 75 damage. Great used along with witches. 60 gold cost.
  • "headhunter" Extremely strong support. 100 damage, 180 health, with knockback. 150 gold cost
  • "catapult" Best damage in the game. 80 meters of range, with 800 splash damage. Friendly fire is enabled. Damage 800, health 140. 200 gold cost
  • summon soldiers with hero.summon(“soldier”)
  • summon archers with hero.summon(“archer”)
  • summon griffin-riders with hero.summon(“griffin-rider”)
  • summon paladins with hero.summon(“paladin”)
  • summon peasants with hero.summon(“peasant”)
  • summon witches with hero.summon(“witch”)
  • summon brawlers with hero.summon(“tank”)
  • summon shamans with hero.summon(“buffer”)
  • summon headhunters with hero.summon(“barbarian”)
  • summon catapults with hero.summon(“catapult”)

TIPS: (optional, but helps a lot)
Use different types of troops. If you use only troops with low health, like archers or shamans, you will struggle against splash damage. Use a mixture of tanks, support troops, and glass cannons.
Use different strategies against different towers. The Princess Towers have splash damage, so don’t use swarms. The King’s Tower has massive single target damage, so use swarms.
Keep your troops alive. This may seem obvious, but it is very important. A great combo is a witch + a brawler. The Brawler soaks up damage, and wrecks the tower, while the witch heals it, and does her own ranged damage.
Use witches and shamans, to buff and heal your troops. The Shaman has a grow spell that increases the HP of the target by 2. The Witch can heal a target 100 health per second.

1 Like

Why won’t this piece of code work?

    elif pet.isReady("charm") and enemy.maxHealth<hero.maxHealth/5:
        enemy = hero.findNearestEnemy()

it says Try

You need spaces in between enemy.maxHealth and the less then sign, and another space for the hero.maxHealth and the less the sign

Still doesn’t work. (20 chars)

I mean, you could just do 1284 / 5, which is the max health of the enmy you want to charm.
enemies = hero.findEnemies()
for enemy in enemies:
targets =
if < 258:
target = pet.findNearest(targets)
if target:
You’ll have to do the indenting by yourself so you can learn. :slight_smile:
I also put in some mistakes on purpose so u can learn.

That doesn’t really help, cuz the Charm() ability says that it needs to be if enemy.maxHealth is less than hero.maxhealth/5

Got it. Enemy insnt defined.
Try this.

 enemy = hero.findNearestEnemy()
elif pet.isReady("charm") and enemy.maxHealth<hero.maxHealth / 5 and enemy:

no, i have enemy defined. but i’ll try that