Outlined the basics for combat design

This commit is contained in:
Kayne Ruse 2025-04-06 14:29:17 +10:00
parent a7064e3db0
commit 1722681823
2 changed files with 28 additions and 23 deletions

View File

@ -22,35 +22,42 @@ fi
exit $lint_errors
```
heapq is a thing for the speed sorting
#TODO: figure out turn order, potentially with heapq
## Entity Statistics
#TODO: brain no work, calc these later
#NOTE: Combat system is WIP
Level = exp???
Visible Attributes, from 3 to 18:
STR, Melee Weapons (Accuracy & Damage)
DEX, Range Weapons (Accuracy & Damage)
CON, Maximum HP
INT, Draw Spells (Quantity)
WIS, Hold Spells (Capacity)
CHA, NPC Influence (alters shop prices)
Base Stats, from 3 to 18: #TODO: are these needed?
STR, Strength
DEX, Dexterity
CON, Constitution
INT, Intelligence
WIS, Wisdom
CHA, Charisma
Other Attributes:
Levels (derived from XP and a lookup table)
Maximum HP ((Levels * 5) + (CON / 2))
Current HP
Accuracy (from weapon's attribute)
Evasion (from armor)
Damage (from weapon's attribute)
Absorption (from armor)
Derived Stats, will always change based on the base stats:
MaxHP:
CurHP:
Accuracy:
Evasion:
Damage:
Absorb:
Weapons:
damage_roll = base_type ("2d6") + this_instance ("+2")
accuracy = base_type ("+0") + this_instance ("+0")
To-hit, d20:
11 + weapon_accuracy - target_evasion
Armor:
evasion = base_type ("11") + this_instance ("+2")
absorption = base_type ("3") + this_instance ("+0")
damage-dealt:
roll(weapon_damage) - target_absorb
To-hit:
1d20 + accuracy >= evasion
To-wound:
max(damage_roll - absorption, 1)
## Concepts and Ideas

View File

@ -82,8 +82,6 @@ class MeleeAction(BaseAction):
if not target or not target.stats:
return False
#TODO: better combat system
#calculate damage
damage = self.entity.stats.attack - target.stats.defense