# Formula

Each round, the player can throw a dice. After the dice succeeds, they will get the basic attack power of each dice hero in this battle. According to the order of the hero lineup, the monsters on the field will be attacked one by one.



### Calculating Power

* Base Power
  * Base Power = Dice Hero Roll Power \* (1+Crit rate)
* If the dice hero element restrains the monster
  * Base Power= Base Power \* (1+20%)
* If the monster element restrains the dice hero
  * Base Power= Base Power \* (1-20%)
* Hurt HP
  * Hp = Hp – Base Power
* Death verdict
  * HP <= 0



**Eg.**

The player sent 5 dice heroes to play, namely:

* Knight Lautrec\[Fire]. Attack power: 10,17,13,0,0,0
* Fighter Petrus\[Earth]. Attack power: 0,15,17,20,15,0
* Wizard Elli\[Lighting]. Attack power:28,21,0,25,23,26
* Argus Panoptes\[Water]. Attack power:28,33,35,37,40,31
* Troll\[Water]. Attack power: 28,31,33,39,41,31

If the monster’s attack is:70,element is\[Earth]

The player rolls a dice and calls the blockchain contract to return the number:05532

* Knight Lautrec Attack power this round: 10. The damage is 10\*1.2 =12
* Wizard Elli Attack power this round: 26. The damage is 26\*(1-20%)=20.8
* Argus Panoptes Attack power this round: 37. The damage is 37
* Troll Attack power this round: 33. The damage is 33
* Fighter Petrus Attack power this round: 0. The damage is 0

**The total damage taken by monster this round is 12+0+20.8+37+33=102.8**
