silphius/public/assets/magic-swords/collision-start.js
2024-07-26 18:05:24 -05:00

5 lines
225 B
JavaScript

const playerEntity = ecs.lookupPlayerEntity(entity.Owned.owner);
if (playerEntity !== other && other.Vulnerable) {
other.Vulnerable.damage({amount: Math.round(60 + Math.random() * 10), position: other.Position.toJSON()})
}