feat: healing
This commit is contained in:
parent
889498b243
commit
1c88b32bad
|
@ -1,5 +1,6 @@
|
||||||
export default async function createPlayer(id) {
|
export default async function createPlayer(id) {
|
||||||
const player = {
|
const player = {
|
||||||
|
Alive: {health: 100},
|
||||||
Camera: {},
|
Camera: {},
|
||||||
Collider: {
|
Collider: {
|
||||||
bodies: [
|
bodies: [
|
||||||
|
@ -61,6 +62,7 @@ export default async function createPlayer(id) {
|
||||||
},
|
},
|
||||||
Ticking: {},
|
Ticking: {},
|
||||||
VisibleAabb: {},
|
VisibleAabb: {},
|
||||||
|
Vulnerable: {},
|
||||||
Wallet: {
|
Wallet: {
|
||||||
gold: 1000,
|
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
|
item.qty -= 1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user