combat: rewrite in Zig; add basic damage types and weapon archetypes

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ic8055a1cf6bdad1aca13673ea171b4b46a6a6964
This commit is contained in:
raf 2026-04-05 20:11:06 +03:00
commit 22ab6fc6eb
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
15 changed files with 802 additions and 158 deletions

18
libs/combat/event.zig Normal file
View file

@ -0,0 +1,18 @@
const c = @import("c.zig");
pub const CombatEvent = struct {
message: [*c]const u8 = null,
damage: c_int = 0,
is_player_damage: c_int = 0,
is_critical: c_int = 0,
was_dodged: c_int = 0,
was_blocked: c_int = 0,
block_amount: c_int = 0,
applied_effect: c.StatusEffectType = c.EFFECT_NONE,
};
pub var last: CombatEvent = .{};
pub fn reset() void {
last = .{};
}