Skip to content

Conversation

@GregHib
Copy link
Owner

@GregHib GregHib commented Jan 8, 2026

Introduces .combat.toml files for configuring npc combat attacks, animations, sounds etc... separate from .npcs.toml.

  • More explicit and less "naming magic"
  • Easy to configure multiple attack types with random choices
  • Separates npc logic from player combat logic
  • Reduces need for coding scripts
  • Adds npcCondition, npcImpact and npcAttack script methods for extending combat definitions with code.
  • All existing combat scripts migrated

Example config:

[bronze_dragon]
attack_speed = 4
attack_range = 8
retreat_range = 8
defend_anim = "dragon_defend"
defend_sound = "dragon_defend"
death_anim = "dragon_death"
death_sound = "dragon_death"

[bronze_dragon.melee]
chance = 30
range = 1
anim = "dragon_attack"
target_hit = { offense = "slash", max = 120 }
target_sound = "dragon_attack"

[bronze_dragon.dragonfire]
chance = 30
range = 1
anim = "dragon_breath"
gfx = "dragon_breath_shoot"
target_hit = { offense = "dragonfire", special = true, max = 500 }
target_sound = "dragon_breath"

[bronze_dragon.fireball]
chance = 30
range = 8
anim = "dragon_shoot"
gfx = "dragon_breath_shoot"
projectile = "dragon_breath"
projectile_origin = "centre"
target_hit = { offense = "dragonfire", special = true, max = 500 }
target_sound = "metal_dragon_fireball"

GregHib added 30 commits January 3, 2026 17:52
Convert godwars bosses and bandos minions
Optimise hunting

Change elementals catching
@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

Qodana Community for JVM

2 new problems were found

Inspection name Severity Problems
Unused symbol 🔶 Warning 2

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

@codecov
Copy link

codecov bot commented Jan 8, 2026

Codecov Report

❌ Patch coverage is 11.88960% with 415 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.51%. Comparing base (db4f6bb) to head (10027e2).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...voidps/engine/data/definition/CombatDefinitions.kt 0.00% 313 Missing ⚠️
...regs/voidps/engine/data/config/CombatDefinition.kt 0.00% 55 Missing ⚠️
...ps/engine/client/update/player/PlayerUpdateTask.kt 34.78% 14 Missing and 16 partials ⚠️
...s/engine/entity/character/mode/combat/CombatApi.kt 40.90% 12 Missing and 1 partial ⚠️
.../kotlin/world/gregs/voidps/engine/EngineModules.kt 0.00% 1 Missing ⚠️
...world/gregs/voidps/engine/client/update/NPCTask.kt 0.00% 1 Missing ⚠️
...s/voidps/engine/client/update/npc/NPCUpdateTask.kt 75.00% 0 Missing and 1 partial ⚠️
...kotlin/world/gregs/voidps/engine/data/SaveQueue.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
...gs/voidps/engine/data/config/HuntModeDefinition.kt 0.00% <ø> (ø)
...gs/voidps/engine/data/definition/NPCDefinitions.kt 60.00% <ø> (+9.15%) ⬆️
...oidps/engine/entity/character/CharacterIndexMap.kt 100.00% <100.00%> (ø)
.../kotlin/world/gregs/voidps/engine/EngineModules.kt 0.00% <0.00%> (ø)
...world/gregs/voidps/engine/client/update/NPCTask.kt 0.00% <0.00%> (ø)
...s/voidps/engine/client/update/npc/NPCUpdateTask.kt 66.01% <75.00%> (+0.97%) ⬆️
...kotlin/world/gregs/voidps/engine/data/SaveQueue.kt 33.33% <0.00%> (ø)
...s/engine/entity/character/mode/combat/CombatApi.kt 72.22% <40.90%> (-7.44%) ⬇️
...ps/engine/client/update/player/PlayerUpdateTask.kt 59.83% <34.78%> (-4.74%) ⬇️
...regs/voidps/engine/data/config/CombatDefinition.kt 0.00% <0.00%> (ø)
... and 1 more

... and 70 files with indirect coverage changes

@@             Coverage Diff              @@
##               main     #825      +/-   ##
============================================
- Coverage     37.64%   37.51%   -0.13%     
+ Complexity     7387     7386       -1     
============================================
  Files          1486     1480       -6     
  Lines         58440    58694     +254     
  Branches      14597    14681      +84     
============================================
+ Hits          21997    22017      +20     
- Misses        31576    31779     +203     
- Partials       4867     4898      +31     
Components Coverage Δ
Content 34.85% <ø> (+0.02%) ⬆️
Engine 43.11% <11.88%> (-1.48%) ⬇️
Network 60.93% <ø> (+0.60%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@GregHib GregHib merged commit f6346e6 into main Jan 8, 2026
5 checks passed
@GregHib GregHib deleted the combat-definitions branch January 8, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants