From cf6929c5703b0955e0e230074dc0158a69c79959 Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Wed, 11 Jun 2014 21:56:46 -0700 Subject: [PATCH] More wandering sprite work --- README.md | 4 --- moonlight/js/moonlight-skulk.js | 54 ++++++++++++++++++++++++++++++++- 2 files changed, 53 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index be13536..fceafa6 100644 --- a/README.md +++ b/README.md @@ -48,10 +48,6 @@ I really liked how Thief would let you sit aroud and voyeuristically listen in o The "Chase", "Run", and "Looking" AI states need to all have different lines of dialog that they spout. -## TODO : Apply dynamic lighting effects to the player and other actors, not just the map - -Nothing to add here - ## TODO : Make player harder to "see" when they are in shadows or far away The dynamic lighting effect will make certain areas of the map "darker" than others. When the player stands in them, they get darker as well. This "darkness" factor, as well as how far away the player is, should be taken into account when determining if an AI can "see" the player diff --git a/moonlight/js/moonlight-skulk.js b/moonlight/js/moonlight-skulk.js index 1b4729b..d0c1b9d 100644 --- a/moonlight/js/moonlight-skulk.js +++ b/moonlight/js/moonlight-skulk.js @@ -1,4 +1,3 @@ - var moonlightSettings = { 'map' : { 'tilesets': [ @@ -141,6 +140,54 @@ var moonlightSettings = { } }; +var moonlightDialog = { + "status": { + "townsfolk-male": { + STATE_UNAWARE : [ + “I’d rather be fishing.”, + “Different day, same old stuff.”, + “Oi! Where’d that trouble run off to now then?”, + “"The missus is off shoppin', and here I am sittin' on me Jack Jones.", + "Oy I'm gonna have a butcher’s at that new tailor's knickers he has for sale.", + “I’m off to the pub to see the lads and chew the fat.”, + “♪ ♫ Whistling ♪ ♫” + ], + STATE_CONCERNED : [], + STATE_ALERTED : [], + STATE_LOSTHIM: [] + }, + "townsfolk-female": { + STATE_UNAWARE : [], + STATE_CONCERNED : [], + STATE_ALERTED : [], + STATE_LOSTHIM: [] + }, + "townsfolk-guard": { + STATE_UNAWARE : [], + STATE_CONCERNED : [], + STATE_ALERTED : [], + STATE_LOSTHIM: [] + } + }, + "conversations": { + "townsfolk-male": { + "townsfolk-female": [], + "townsfolk-male": [], + "townsfolk-guard": [] + }, + "townsfolk-female": { + "townsfolk-male": [], + "townsfolk-female": [], + "townsfolk-guard": [], + }, + "townsfolk-guard": { + "townsfolk-male": [], + "townsfolk-female": [], + "townsfolk-guard": [] + } + } +}; + // Create torch objects // Light constructor var Light = function(game, x, y, radius, fade, color, flicker) { @@ -164,6 +211,11 @@ var Light = function(game, x, y, radius, fade, color, flicker) { Light.prototype = Object.create(Phaser.Sprite.prototype); Light.prototype.constructor = Light; +STATE_UNAWARE = 1 << 1; +STATE_CONCERNED = 1 << 2; +STATE_ALERTED = 1 << 3; +STATE_LOSTHIM = 1 << 4; + SPRITE_TOWNSFOLK_MALE1 = 1; SPRITE_TOWNSFOLK_MALE2 = 2; SPRITE_TOWNSFOLK_MALE3 = 3;