feat: healing
This commit is contained in:
parent
889498b243
commit
1c88b32bad
|
@ -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,
|
||||
},
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user