SplinterForge User Guide
  • SplinterForge
    • What is SplinterForge?
    • Development goals
    • Requirements to start playing
    • Release information
    • Multi accounting and botting/API-calls
    • Partners
    • Roadmap
    • The Splinterlands cards integration
    • Story and lore
  • The Shop
    • CRATEs
      • All different items available
      • What happens with the Forge/Dec you use?
    • BAGs
      • All different items available
      • What happens with the Forge you use?
    • Elixirs
  • Gameplay
    • Heroes
      • Hero stats importance
      • Equipment, runes and gems points towards hero stats.
    • Equipment, gems and runes
      • Upgrade costs, rarity differences and sockets
      • Presale Nartors Ring
      • Nartors Set
      • Gold Foil bonus'
      • Relics
  • The Forge
    • Open CRATEs/BAGs
    • Reforge
      • Legendary reforge
    • Transmute
      • Legendary Transmute
      • Unique limited transmutes
  • Cards and Market
    • The Cards section
      • How to use the filters
      • Card Destruction
    • Cards cooldown
    • Marketplace by Splex.gg
  • How to Battle
    • Boss abilities
      • Fixed and random abilites
      • Rerolling random abilites
      • All abilites in the game
    • Picking the team
    • The different tabs
    • Dmg-numbers meaning.
    • Introduction to Electrum
    • Stamina
    • End of Boss rewards
    • Reaching maximum rewards
    • The Leaderboard
  • Abilities and game mechanics
    • Historical boss information
    • Speed (turn meter) and hit/miss
    • Boss enrage
    • Fatigue
    • The order abilities occour
  • Tokenomics
    • Forgium (FORGE)
      • Global Reward Percentage
  • The Splinterforge Wallet
    • How to use
  • Liquidity pool
    • Progressive increasing APR%
  • The Discord
    • The Bounty System
    • Idea voting
    • Giveaways
  • User guidelines and helpful links/information
    • Understanding Hive
    • Terms of Service
    • Privacy Policy
    • Helpful links
  • Future idea generating...
Powered by GitBook
On this page
  1. Abilities and game mechanics

Speed (turn meter) and hit/miss

In SplinterForge, battles are determined by a turn meter system that uses a cumulative speed score. Each monster, summoner, and boss has a speed attribute that is used to calculate their normalized speed. Normalized speed is calculated using the following formula:

// normalized speed = speed === 1 ? 1 : 1+((speed-1)/8)

This formula ensures that speed is not overpowered and helps to balance the game.

During a battle, a loop is executed 100 times, which is equivalent to one round. Within the loop, the game checks if the boss has any changes to its stats, applies fatigue damage to the team, and allows monsters to take their turns based on their cumulative speed score. The cumulative speed score is calculated by adding the normalized speed of each monster each time the loop runs. Once a monster's cumulative speed reaches 100, the monster takes its turn.

Bosses also have a cumulative speed score that is calculated similarly, and once the score reaches 100, the boss takes its turn. The boss always gets a chance to attack last, and heroes always get a chance to attack after monsters in case of a tie.

The game also calculates hit/miss probabilities using a set of conditions. First, the game checks if the attacker has the True Strike ability, which guarantees a hit. If the damage type is magic and the target does not have the phase ability, the attack also hits. If the target is flying and the attacker has the snare ability, the attack hits. If the target is flying and the attacker is not flying, the target gets an isolated chance to evade (instead of being calculated at 2.5 speed as before). If the attacker has the blind ability, the attacker's speed is decreased by 1.5.

The game also calculates the difference in speed between the attacker and the target. If the difference is less than 0 and the absolute value of the difference is greater than or equal to 10, the attack misses, and there is a 1 in 100 chance to get a critical hit. Otherwise, the chance to hit is calculated using the following formula:

// chance to hit = (10 - Math.abs(difference)) * 10

For example, if the difference in speed is -1, the chance to hit is 90%. If the difference in speed is greater than 0, the attack hits, and there is a 1 in 100 chance to get a critical miss, just as there is a 1 in 100 chance to get a critical hit.

Overall, the SplinterForge battle system utilizes a turn meter and speed attribute to determine which monsters and bosses get to take their turns. The game also uses a set of conditions to determine the probability of hits and misses for each attack.

This does mean that a Hero, monster, or Boss can, with a high enough speed differential, be able to attack more than once at a time.

This is the following code for the battle loop:

// while(boss.health > 0 && monsterAlive.length > 0) { // 100 loops = 1 "round"
    if (loopNum === 1200) +1 to all boss stats;  // after 1200
    else if (loopNum > 1300 && loopNum % 200 === 0) +2 to all boss stats; // every 200 loops after 1200
    if (loopNum > 1800 && loopNum % 100 === 0) fatigue damage to team, increases 1 every time; // increasing fatigue dmg every 100 loops
    monstersAlive.forEach(m => {
        m.cumulativeSpeed += m.normalizedSpeed;
        if (m.cumulativeSpeed >= 100) {
            m.cumulativeSpeed -= 100;
            // monster takes a turn
        }
    });
    boss.cumulativeSpeed += boss.normalizedSpeed;
    if (boss.cumulativeSpeed > 100) {
        boss.cumulativeSpeed -= 100;
        // boss takes a turn
    }
}

To break that code down into more understandable words:

  • The while loop checks if the boss's health is greater than zero and if there are still monsters alive on the team.

  • The loop executes for a total of 100 "rounds" before checking the while condition again.

  • There are three main conditions inside the loop that affect the boss and monsters:

    1. If the loop number is 1200, then all of the boss's stats (presumably its attack, defense, etc.) increase by 1.

    2. If the loop number is greater than 1200 and evenly divisible by 200, then all of the boss's stats increase by 2.

    3. If the loop number is greater than 1200 and divisible by 100, then the monsters on the team take fatigue damage that increases by 1 every time. Fatigue damage likely represents some sort of penalty or debuff that lowers the team's performance over time.

  • There is a forEach loop that goes through each monster still alive on the team. For each monster, the cumulativeSpeed property (representing its speed relative to the boss) is increased by its normalizedSpeed property (representing its base speed). Once a monster's cumulativeSpeed reaches or exceeds 100, the monster takes a turn.

  • The boss's cumulativeSpeed is also increased by its normalizedSpeed, and once it reaches or exceeds 100, the boss takes a turn.

PreviousHistorical boss informationNextBoss enrage

Last updated 2 years ago