various: upgrade Zig version
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Ia97044bd7d44c776f217f2223e35ae3b6a6a6964
This commit is contained in:
parent
4bcacb59ac
commit
bb10fb88f0
6 changed files with 45 additions and 35 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue