Understanding the battle system in CryptoWars

Experimental
Experimental Blog
Published in
4 min readApr 29, 2020

--

CryptoWars is a strategy game, it’s skill-based. Your strategy makes the difference, you win or you lose depending on the decisions you make. That’s why we’ve been asked by our players to explain how battle works to the detail.

The following is going to be a tough read, meant just for those users that want to excel in CryptoWars, for those who want to tweak their strategies until they’re perfect (or almost).

Let’s go!

Let’s define the vocabulary first:

Health = HP

Attack = ATK

Defense = DEF

Terrains

See the small icon above your enemy’s face? Those show the terrains. In this case, desert and snow.

Most enemies are located in a certain terrain, these can be a swamp, desert, snow, windy, mountain, among others. The terrain will impact your army’s stats with buffs (beneficial effects) or debuffs (hindering effects).

  • Terrain bonuses do not apply to the enemy.
  • Terrain bonuses are applied to the unit base-stats.

E.g.

  • A tiny warrior has 105 ATK
  • They have a 50% BONUS
  • You have 10 of them
  1. First we multiply the base-stats by the bonus (105 * 1.50) = 157,5
  2. Then we floor that value (we remove the decimals) 157,5 = 157
  3. Then we multiply that value by the amount of warriors you have: 157 * 10 = 1570 Total ATK
  • This works the same way for HP, ATK and DEF. (Cargo is not affected)
  • If you have bonus researches (such as +15% attack) you add that to the total BONUS (in this case 50% from terrain + 15% from researches).

Battle calculations

  • First we calculate all bonuses (Terrain and Researches) as explained above.
  • With those total stats (with bonuses applied) we start our calculations as follows:

    Let’s assume you (attacker) are attacking an enemy (defender).
    — Attacker has a total of (100 HP, 200 ATK, 100 DEF) (BONUS included)
    — Defender has a total of (100 HP, 80 ATK, 100 DEF)

First we need to know who’s stronger (and for how much).
For this we need, what we call, True ATK. (for both the Attacker and the Defender). We check If the Attacker has a positive or negative bonus on ATK depending on if it has more or less ATK than the Defender’s DEF.

  • The equation is as follows: (A = Attacker, D = Defender)
  • DIFF = the difference between A.ATK and D.DEF [200–100 = 100]
  • TOTAL = the sum of both stats A.ATK + D.DEF [200 + 100 = 300]
  • BONUS = floored value of: (A.ATK * DIFF * 100 / TOTAL) / 100; [200 * 100 * 100 / 300 = 6666 / 100 = 66]
  • True ATK = A.ATK + BONUS [200 + 66 = 266] (Since A.ATK > D.DEF, we add the bonus)

Now that we have the True Attack of the Attacker we do the same for the defender:

  • DIFF = the difference between D.ATK and A.DEF [80–100 = -20]
  • TOTAL = the sum of both stats D.ATK + A.DEF [80 + 100 = 180]
  • BONUS = floored value of: (D.ATK * DIFF * 100 / TOTAL) / 100; [80 * 20 * 100 / 180 = 888 / 100 = 8]
  • True ATK = D.ATK - BONUS [80–8 = 72] (Since D.ATK < A.DEF we subtract the BONUS)

Now that we have True ATK values of the Attacker and Defender we can continue to calculate unit losses:

  • To know which and how many units die, we first order them by highest to lowest Defense. (Guardian, Soldier, Tiny warrior, and so on)
  • Then we grab the Defender Units HP and subtract the A.TrueATK
  • In this case: 100 HP — 266 TrueATK = All Defender units die

Now for the A.HP against the D.TrueATK

  • For this we get: 100 HP — 72 TrueATK = 28 Remaining HP
  • Since we had only 1 unit, and it has remaining HP, it doesn’t die — your losses = 0, congrats!

Cargo capacity, or how much loot you’re bringing back home

Let’s assume you also had 1000 Cargo capacity, and the opponent had 2000 gold. To know how much you steal from the opponent we calculate the % of damage dealt.

  • In this case: 266 A.TrueATK * 100 / 100 D.HP = 266% (where 100% is the maximum, so 266% = 100%) — congrats, you can steal the whole loot!
  • Remember to always check if you are dealing enough damage to the enemy to be able to steal all of their resources.
  • Although you can steal the whole loot, since you can only carry 1000 cargo, you would only get 1000 gold. (you should have sent more cargo units!)
  • Have in mind that if your cargo units die they won’t be able to come back with the loot.

Questions?

And friends, that’s all. Feel free to join our Discord to ask specific questions or give your suggestions, there’s a great community of players eager to meet you! You can also send us an email at help@e11.io

--

--