Enemy NPC Statistics - UQcsse3200/2024-studio-2 GitHub Wiki

Overview

Enemy NPC strength varies within and between the different map settings. This page is dedicated to giving an overview of the strength of each of these enemies, as well as some other miscellaneous attributes.

Stat Calculations

The enemy statistics have been implemented so that there is a gradient of strengths within each kingdom, with at least a weak enemy, and mediocre enemy and a strong enemy. To represent the overall strength of an enemy, the 'Base Stats' is calculated for each enemy with the following formula:

$BaseStats = Health + Attack + Defense + 0.5 * Speed$

Speed is deemed to have less importance as it only acts as a binary in combat, for which party moves first.

The statistics were calculated by comparison to the player character. Statistics for how much each attack does to the player and vice versa were calculated to give an approximate in-game strength value, and then tinkered with until reasonable.

See the 'Total Turns' in Column D in the Excel file: Combat System & Enemy Stats Simulator.xlsx.

The file also contains all the other calculation relevant to the stat choices. For information on how the attack move was calculated refer to the Combat System.

Base Statistics

Forest Biome

Chicken

  • Total Base Stats: 75
  • Health: 5
  • Attack: 10
  • Defense: 10
  • Speed: 100
  • Experience: 40

Monkey

  • Total Base Stats: 102.5
  • Health: 15
  • Attack: 30
  • Defense: 20
  • Speed: 75
  • Experience: 80

Bear

  • Total Base Stats: 147.5
  • Health: 25
  • Attack: 55
  • Defense: 30
  • Speed: 37
  • Experience: 200

Underwater Biome

Frog

  • Total Base Stats: 92.5
  • Health: 10
  • Attack: 60
  • Defense: 10
  • Speed: 25
  • Experience: 60

Octopus

  • Total Base Stats: 100.5
  • Health: 25
  • Attack: 3
  • Defense: 30
  • Speed: 85
  • Experience: 120

Electric Eel

  • Total Base Stats: 105
  • Health: 20
  • Attack: 20
  • Defense: 15
  • Speed: 100
  • Experience: 100

Big Sawfish

  • Total Base Stats: 123.5
  • Health: 30
  • Attack: 45
  • Defense: 30
  • Speed: 37
  • Experience: 140

Sky Biome

Bee

  • Total Base Stats: 102.5
  • Health: 5
  • Attack: 25
  • Defense: 5
  • Speed: 135
  • Experience: 60

Pigeon

  • Total Base Stats: 120
  • Health: 20
  • Attack: 25
  • Defense: 25
  • Speed: 100
  • Experience: 100

Macaw

  • Total Base Stats: 124
  • Health: 30
  • Attack: 40
  • Defense: 29
  • Speed: 50
  • Experience: 160

Implementation

All enemy npc statistics are defined in the enemyNPCs.json file. The following is an example of how the chicken and frog are implemented:

  "chicken": {
    "spritePath": "images/enemy-chicken.atlas",
    "health": 5,
    "baseAttack": 10,
    "defense": 10,
    "speed": 200,
    "experience": 40,
    "isEnemy": 1
  },
  "frog": {
    "spritePath": "images/enemy-frog.atlas",
    "health": 10,
    "baseAttack": 60,
    "defense": 10,
    "speed": 50,
    "experience": 60,
    "isEnemy": 1
  },

In combat, certain stats are slightly randomized for unpredictability. Health and Defense are randomized by +- 1, and Attack by +- 2. This is done in the createBaseEnemy function in EnemyFactory.java:

.addComponent(new CombatStatsComponent(config.getHealth() + (int)(MathUtils.random() * 2) - 1,
    config.getHunger(), Math.max(0,
    config.getBaseAttack() + (int)(MathUtils.random() * 5) - 2),
    config.getDefense() + (int)(MathUtils.random() * 2), config.getSpeed()/2,
    config.getExperience(), false, false, 1))

It is also worth mentioning that the combat speed is half of what is defined in the config, this is because the overworld speed matches what is in the config, but combat speed for the player is roughly half.