Skip to content

Commit

Permalink
refactor: spells
Browse files Browse the repository at this point in the history
Refactor away more custom effects
  • Loading branch information
kiedtl committed Jun 20, 2024
1 parent 682ba65 commit dec40c8
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 163 deletions.
2 changes: 1 addition & 1 deletion src/player.zig
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ pub fn movementTriggersB(direction: Direction) void {
const target = utils.getFarthestWalkableCoord(direction, mob.coord, .{ .only_if_breaks_lof = true, .ignore_mobs = true });
const weapon = state.player.inventory.equipmentConst(.Weapon).*;
const damage = if (weapon) |w| combat.damageOfWeapon(state.player, w.Weapon, null).total * 3 else 1;
spells.BOLT_SPINNING_SWORD.use(mob, mob.coord, target, .{ .MP_cost = 0, .free = true, .power = damage });
spells.BOLT_SPINNING_SWORD.use(mob, mob.coord, target, .{ .MP_cost = 0, .free = true, .power = damage, .duration = damage });
};
}
if (state.player.hasStatus(.RingConjuration)) {
Expand Down
Loading

0 comments on commit dec40c8

Please sign in to comment.