The Mercenary Camp — Where summoners gather to raid Dragons

5 min readSep 16, 2021


A few days ago, Dragons have invaded the Fantom realm. They are multiplying quickly and endangering the local villages. If only there were some real adventurers around to step up to the challenge…

The Order of the Burning Dawn has set up a mercenary camp where honorable Rarity adventurers gather to face the dragon threat.

Mercenary Camp: 0xa8125f9de317093F3404c2899a6e27B0FaEFeAF0

“The Mercenary Camp” is a full extension for the Rarity game on Fantom. Before diving into the details, here is how it works:

  • Form raid parties with five adventurers
  • Equip your crafted weapons and armor
  • Select a Dragon from the Lair contract to challenge
  • Fight in a tough round-based combat against the Dragon
  • Emerge victorious or die trying
Round-based, D&D-Style combat with a full combat log! This image is a created from logs of a raid.

The Dragons are real; and they grow stronger

When you embark on a raid against a Dragon, you choose an existing Dragon from Nour Haridy’s Lair of Wisdom contract. These Dragons have stats and grow stronger while trainers care for them. Will you challenge the mighty Leshner or Pleasr? Go for a young Dragon? Or wait until two Dragons fight and surprise the wounded Monster for an easier fight? All the stats (including the pesky health regeneration) carry over to the the raid and are scaled to provide a very tough challenge.

Starting a raid will spawn a new contract (for less than 150k gas) that you can share with your friends or at another place where one gathers adventurer companions. A tavern maybe?

Get your adventurers ready

To join a raid, you need a Rarity adventurer. You can mint one for free here if you haven’t already. You can join a raid with a naked level 1 summoner, but we both know how that will end. To be best prepared, equip yourself with a crafted weapon and some armor.

On the FTMScan page for the raid contract (you can retrieve it via mercenary camp if you lose it), you will see the function join_raid() with three empty input boxes. Put your summoner id in the first one. Put the ID of your weapon in the second slot. If you don’t want (or need) one, enter a 0 . The third field takes your armor ID. To find your gear, navigate to the ERC721 sub-page of your account on FTMScan. Only items crafted with the base crafting-I contract are allowed, and each item can only be used by one summoner.

Once five adventurers have joined your party, you are ready to…

Fight the Dragon in round based combat

Simply call the attack() function on the raid contract and enter the number of rounds you would like to fight. You can take it one round at a time and evaluate the combatants in between or you can fight up to 10 rounds in one transaction. A fight typically takes no more than 10 rounds, but depending on your luck, it can happen.

Speaking of luck… Combat works very similar to how you are used to from D&D. You roll a 20-sided die (a d20), and add your hit modifier: 3 + your highest attribute modifier from strength, dexterity or intelligence; intelligence is included because we don’t have spells yet and casters are tough combatants too! If your to-hit roll is equal or higher than the Dragon’s armor class (AC), you land a hit.

Damage is calculated based on your weapon and again your highest ability modifier. The weapon gives you the dice you roll — a d8 for a longsword for example — and you add the attribute modifier to that for the total damage dealt. If you roll a natural 20 with your to-hit roll, you score a critical hit, and double the damage from your weapon dice to roll!

The Dragon fights back

Once every adventurer attacked, its the Dragons turn. To start, the Dragon rolls a d6: On a 5 or higher, he re-charges and uses his powerful Dragon Breath ability. A devastating attack that covers the Lair in flames and deals 3d6 damage to every adventurer. However, also based on D&D rules, each adventurer gets a saving throw to avoid half the damage.

But even without their Dragon’s Breath, your adversary will fight with tooth and claw. They will perform two attacks for 1d10 base damage each, plus an amount of damage depending on the stats of the Dragon (it will be at least +5). The Dragon chooses his targets randomly among all living summoners. Be sure to equip some armor (mages and sorcerers get a +2 bonus to their AC from mage armor if they don’t), to make it harder for these attacks to land.

The Dragon and the raiders take turns attacking until either all adventurers are dead, or the Dragon is forced into submission. The full combat log, with the stats of each participant and the results of each attack are available as logs and can be parsed to give a complete run-down of the combat.

The Dragon is dead; Long live the treasure

At the completion of your valiant battle, you will be rewarded with an on-chain image to immortalize your heroic deeds (or your pathetic failures).

The json/image can be queried from the contract as is usual in the Rarity metaverse with raid_contract.tokenURI() . There are five different images for victories and defeats… will you be the first to claim a dominating victory?

This contract is launched in an “alpha” state. You can try it out and you can run as many raids as you like. And you are most welcome to provide feedback!

Your practice will pay off. Once we are happy with the balance and the state of the contract, we will set up gold rewards for raids; funded by the gold treasury! So make sure you find the best combination of adventurers and gear to successfully repel the Dragon invasion.

Good luck and… “gm, LFG Leshner”.

Notes on randomness, upgradeability

The Mercenary Camp contract can be pointed to new raids. This allows us to tune the difficulty of the encounter and account for newly emerging dragon lairs. We will be monitoring your adventures and want to make sure you get a rewarding experience!

Randomness on the contract is initially seeded by block statistics, sender address, round progress and either the summoner ID or the dragon address. If more than one roll is required in a call, the random seed will be propagated by a simple linear congruential generator (C++11’s minstd_rand ). We believe this is a good balance of randomness and gas requirement.


  • We will monitor the adventures and make balance changes as necessary
  • A graphical interface is in development, but will need some time
  • Once we are happy with the contract, gold rewards will be added!
  • The Order of the Burning Dawn is not just looking for Dragons…