diff --git a/resource/blue-fire.animation.json b/resource/blue-fire.animation.json new file mode 100644 index 0000000..dbd8a6f --- /dev/null +++ b/resource/blue-fire.animation.json @@ -0,0 +1,7 @@ +{ + "frameRate": 0.2, + "frameCount": 4, + "frameSize": [32, 32], + "directionCount": 1, + "imageUri": "/blue-fire.png" +} diff --git a/resource/blue-fire.png b/resource/blue-fire.png new file mode 100644 index 0000000..383a88d Binary files /dev/null and b/resource/blue-fire.png differ diff --git a/resource/blue-fire.sound.json b/resource/blue-fire.sound.json new file mode 100644 index 0000000..0f5ccaa --- /dev/null +++ b/resource/blue-fire.sound.json @@ -0,0 +1,7 @@ +{ + "interval": 0.025, + "src": [ + "/heal.wav" + ], + "volume": 0.03 +} \ No newline at end of file diff --git a/resource/heal.wav b/resource/heal.wav new file mode 100755 index 0000000..abae664 Binary files /dev/null and b/resource/heal.wav differ diff --git a/server/create-server-room.js b/server/create-server-room.js index be703ee..4bf577a 100644 --- a/server/create-server-room.js +++ b/server/create-server-room.js @@ -102,6 +102,15 @@ function fireJSON(position) { }, }; } +// Healing fire! +function blueFireJSON(position) { + const json = fireJSON(position); + json.traits.animated.params.animations.idle.uri = '/blue-fire.animation.json'; + json.traits.damaging.params.damageSpecs[0].power = -5; + json.traits.damaging.params.damageSpecs[0].lock = 0.02; + json.traits.audible.params.sounds.fire.uri = '/blue-fire.sound.json'; + return json; +} // A flower barrel. function flowerBarrelJSON(position) { return { @@ -446,6 +455,11 @@ for (let i = 0; i < 30; ++i) { const y = Math.floor(Math.random() * 284) + 50; roomJSON.layers.everything.entities.push(fireJSON([x * 4, y * 4])); } +for (let i = 0; i < 1; ++i) { + const x = Math.floor(Math.random() * 284) + 50; + const y = Math.floor(Math.random() * 284) + 50; + roomJSON.layers.everything.entities.push(blueFireJSON([x * 4, y * 4])); +} export function createRoom() { const room = (new Room()).fromJSON(roomJSON); room.world = new World();