feat: no dmg if invulnerable
This commit is contained in:
parent
c1643180df
commit
c9b51d81d9
|
@ -32,7 +32,7 @@ export class Damaging extends Trait {
|
|||
const isCollidingWith = this.entity.isCollidingWith;
|
||||
for (let i = 0; i < isCollidingWith.length; ++i) {
|
||||
const entity = isCollidingWith[i];
|
||||
if (entity.is('vulnerable')) {
|
||||
if (entity.is('vulnerable') && !entity.isInvulnerable) {
|
||||
entity.takeDamageFrom(this.entity);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user