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:
parent
7af642612b
commit
22ab6fc6eb
15 changed files with 802 additions and 158 deletions
18
libs/combat/event.zig
Normal file
18
libs/combat/event.zig
Normal 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 = .{};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue