Skip to content

Commit

Permalink
Change firecrackers to require friendly players (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
FreezePhoenix committed Aug 13, 2024
1 parent f9fa391 commit f39039c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion node/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -7881,7 +7881,11 @@ function init_io() {
);
for (var id in instances[player.in].monsters) {
var monster = instances[player.in].monsters[id];
if (monster.target && distance({ map: player.map, in: player.in, x: x, y: y }, monster) < 64) {
if (
monster.target &&
is_same(player, get_player(monster.target), 1) &&
distance({ map: player.map, in: player.in, x: x, y: y }, monster) < 64
) {
stop_pursuit(monster, { force: true, cause: "firecrackers" });
}
}
Expand Down

0 comments on commit f39039c

Please sign in to comment.