various: upgrade Zig version

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ia97044bd7d44c776f217f2223e35ae3b6a6a6964
This commit is contained in:
raf 2026-06-11 10:35:06 +03:00
commit bb10fb88f0
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
6 changed files with 45 additions and 35 deletions

View file

@ -101,18 +101,18 @@ fn compact(effects: [*c]c.StatusEffect, count: [*c]c_int) void {
count[0] = @intCast(write);
}
fn tickOne(eff: *c.StatusEffect, hp: *c_int) c_int {
if (eff.duration <= 0) return 0;
fn tickOne(eff: [*c]c.StatusEffect, hp: [*c]c_int) c_int {
if (eff[0].duration <= 0) return 0;
var dmg: c_int = 0;
switch (eff.type) {
switch (eff[0].type) {
c.EFFECT_POISON, c.EFFECT_BLEED, c.EFFECT_BURN => {
dmg = eff.intensity;
hp.* -= dmg;
dmg = eff[0].intensity;
hp[0] -= dmg;
},
else => {},
}
eff.duration -= 1;
eff[0].duration -= 1;
return dmg;
}