SpartaDEX Whitepaper
  • 🔎GENERAL
    • ☑️| Overview
      • What is SpartaDEX?
      • What is SpartaPad?
      • Our objectives
      • Blockchain - To Arbitrum and beyond
    • 📈| The unique idea of gamified DEX
    • 🕹️| Gameplay
      • Overview
      • Polis NFT
      • Spartans NFT Collection
      • Senate
      • Experience
      • Market
      • Functional buildings
      • Time and cost of upgrades
      • Units
      • Barbarians
      • Battle rules
      • Gems
      • Resources
      • Premium Account
      • Wheel of Fortune
  • SPARTADEX MECHANICS
    • ▶️| Get started
      • Token Exchange (Swaps)
      • Liquidity providing
      • LP Staking
      • Single Asset Staking
      • Micropayments - buying gems
      • Governance
    • 🪙| Tokenomics
      • SPARTA token (Overview)
      • Token supply
      • Ecosystem Rewards
      • SpartaDEX Lockdrop
    • 📊| Business model
      • Overview
      • Self-financing
      • Anti-inflation mechanisms
      • Stable liquidity
  • LAUNCHPAD MECHANICS
    • ▶️| Get started
      • Tier system
      • Gamified Launchpad
      • Private sales
      • Refund policy (no-risk-idos)
      • Governance
  • FUTURE
    • 🛣️| Roadmap
  • TECHNICAL DOCUMENTATION
    • ✅| Audits
  • CONTRACTS
    • 📜| AMM V2
      • Factory
      • Router
Powered by GitBook
On this page
  1. GENERAL
  2. | Gameplay

Battle rules

PreviousBarbariansNextGems

Last updated 2 years ago

In SpartaDEX, there are clashes between the player's army and the barbarians. At the moment, this scenario is only possible when a player attacks a Barbarian camp, but in the future it is planned to introduce barbarian raids on player’s Polis.

The outcome of the fight is calculated algorithmically based on several variables:

  • α - numerical superiority factor, i.e. the ratio of the number of attacker's units to the number of defender's units;

  • AOA - Army’s Offensive Ability (calculated on the basis of unit statistics and a random morale coefficient ranging from -30% to +30%);

  • ADF - Army Diversification Factor - depends on the variety of types of units in the army (the greater the variety, the greater the army's power). For barbarians, this coefficient is always 1.25;

Based on these coefficients, the following is calculated:

TPA - the Total Power of Army (for attacker and defender)

TPA = AOA * α * ADF

The formula for the outcome of the battle is:

W = AOAattacker * α * ADFattacker - AOAdefender * ADFdefender

Unit survivability:

The one who lost the battle loses all his units. The winner only loses part of them. The number of surviving units is calculated from the formula:

L[%] = |W| / TPAwinner

L% of the winner's strongest units survive.

🔎
🕹️