## Battle

The dragon goes to the arena within certain levels, for example, 1-5, 6-10, etc.

№ | Rarity | Skill | Description |
---|---|---|---|

1 | common | attack | 100% chance to deal damage to the enemy |

2 | uncommon | block % of damage | 35% chance to block 30% of damage |

3 | rare | critical damage chance | 35% chance to deal critical damage (x1.5 damage) +50% damage |

4 | epic | heal chance | 35% chance to heal yourself for 5% of MAX HP this turn |

5 | legendary | stun chance | 20% chance to stun the enemy (skip next turn) |

**New skills are added as rarity increases. Old skills also remain.**

Basic stats | |
---|---|

Damage | 100 |

Health | 1000 |

The battle proceeds according to the following algorithm:

Before the battle, the advantage by sets between dragons is determined according to the set advantage table (dragon characteristics tab).

To calculate the set advantage, each body part is compared with each other, then the arithmetic mean of the bonuses is taken.

After calculating the damage, a random value from -5% to 5% of the damage is added to the value to create a randomness effect even for identical dragons.

Each turn, the dragons apply skills.

The battle ends after 5 turns, or earlier if one of the dragons' health drops below 0.

The winner is determined by the amount of health. The one with more health wins.

There should be no draws.

The damage and health indicators of the dragons are known before the battle and are calculated according to the formula (see dragon characteristics).

In battle, when calculating damage, mathematical rounding to whole numbers is used.

Example:

Dragon1 - level 10, rare | ||||
---|---|---|---|---|

set parts 0 | level 10 | final values | ||

damage | 100 | 0% | 45% | 145 |

health | 1000 | 45% | 1450 | |

skills: | attack | block 30% | critical hit 150% |

Dragon2 - level 8, uncommon | ||||
---|---|---|---|---|

set parts 3 | level 8 | final values | ||

damage | 100 | 30% | 35% | 165 |

health | 1000 | 45% | 1450 | |

skills: | attack | block 30% |

dragon 1 | vs | dragon 2 | ---> | dragon 1 | vs | dragon 2 | |

№ set | № set | bonuses | bonuses | ||||

Head | 1 | 1 | 0 | 0 | |||

Breath | 2 | 1 | -10% | 10% | |||

Element | 3 | 2 | -10% | 10% | |||

Wings | 4 | 2 | -10% | 10% | |||

Paws | 5 | 3 | -10% | 10% | |||

Tail | 6 | 3 | 0 | 0 |

Overall set advantage of dragon 1: -6.67%

Overall set advantage of dragon 2: 6.67%

takes damage 165*(1+0.067-0.03) = 171

Example of a turn | ||
---|---|---|

Dragon 1 | Dragon 2 | |

uses skill1 - attack | uses skill1 - attack | |

with a 20% chance uses skill2 - block | with a 50% chance uses skill2 - block 30% | |

with a 20% chance uses skill3 - critical hit | ||

block - failed | block - successful | |

critical hit - failed | attack deals damage 165 -3% (randomly rolled) | |

attack deals damage 145 +2% (randomly rolled) | ||

receives damage 165*(1+0.067-0.03) = 171 | receives damage 145*(1-0.3-0.067+0.02) = 94 | |

health = 1450 - 171 = 1279 | health = 1350 - 94 = 1256 |

Explanation: 145 - base damage, 0.3 - block (30%), 0.067 - set advantage (6.67%), 0.02 - random attack modifier (2%)