feat: healing

This commit is contained in:
cha0s 2024-09-29 06:31:05 -05:00
parent 889498b243
commit 1c88b32bad
2 changed files with 10 additions and 1 deletions

View File

@ -1,5 +1,6 @@
export default async function createPlayer(id) {
const player = {
Alive: {health: 100},
Camera: {},
Collider: {
bodies: [
@ -61,6 +62,7 @@ export default async function createPlayer(id) {
},
Ticking: {},
VisibleAabb: {},
Vulnerable: {},
Wallet: {
gold: 1000,
},

View File

@ -1,2 +1,9 @@
wielder.Health.health += 10
const amount = 50;
wielder.Health.health += amount
wielder.Vulnerable.damage({
amount,
position: wielder.Position.toJSON(),
type: wielder.Vulnerable.Types.HEALING,
})
item.qty -= 1