🤺Fight
Base values
The calculation of the fight starts with de base values of the Gainling. These stats are the same for all Gainlings:
Base Attack: 1000
Base Defense: 250
Base Weight: 3600
Randomness (Luck)
For each fight API3's QRNG will provide the contract with randomness. From this random number, the contract calculates two new random numbers between 0 and 1000. The first of the random numbers will be the luck of the attacker [AttackerRandom]. The second random number will be the luck of the defender [DefenderRandom].
Equipment
Additionally the contract gets the following values from the metadata of the warriors:
Sum of all attack modifiers of the attackers equipment [AA-Equip]
Sum of all defense modifiers of the attackers equipment [AD-Equip]
Sum of all attack modifiers of the defenders equipment [DA-Equip]
Sum of all defense modifiers of the defenders equipment [DD-Equip]
Calculation
The total damage done by the attacker gets calculated as follows:
BaseAttack
+ AA-Equip
+ AttackerRandom
- (DD-Equip + BaseDefense)
_______________________________________
= AttackerTotalDamage
The total damage done by the defender gets calculated as follows:
BaseAttack
+ DA-Equip
+ DefenderRandom
- (AD-Equip+ BaseDefense)
_______________________________________
= DefenderTotalDamage
The Gainling with the higher total damage output wins the battle. The defender wins in case of a tie.
If an aura has weakness against another aura, the weak Gainlings defense will be ignored in the calculation of the opponents total damage.
After the fight, the losing token will be removed from the supply. The winning token will go into cooldown. The cooldown is calculated by the weight of the Gainling. Each weight-point adds 10 seconds. The base weight of the Gainling is 3600.
Last updated