Commit Graph

52 Commits

Author SHA1 Message Date
Andrea Rendine da0d39b579 Check for delayed events
This triggers onload for all those events whose (possible) reward is registered with a time delay.
2015-06-27 01:43:09 -04:00
Andrea Rendine cb717b41d0 function for fire hut event and more
Effect of hut fire is associated with new Outside method .destroyHuts().
2015-06-27 00:44:26 -04:00
Andrea Rendine 08bd1c7caf Single letter representations for enemies
R wild animals (beast, birds, lizards, rats)
T mutated creatures (includes giant lizards)
E human enemies (old men, scavengers, thugs and squatters)
D armed human enemies (includes vigilantes, soldiers, snipers, commandos, veterans and chiefs)
2015-06-27 00:26:40 -04:00
SVS 1d2f95b561 Change the enemy labels 2015-06-27 00:26:40 -04:00
Andrea Rendine 8306f155f1 Notifications for outside events
As said in #363, there are almost no notifications for outside events.
I took a little liberty to suggest new sentences. Inspired by the game atmosphere and the double notification for Hut Fire, wrote lines for events and possible outcomes.
they're associated to buttons where there are no outcome scenes.
2015-06-26 21:31:20 -04:00
John Redford ee591ca218 Update outside.js
Changed sickness event to kill up to half of the villagers instead of up to 20.
2015-06-14 00:47:08 -05:00
Andrea Rendine f219b3288f Single letter representations for enemies
R wild animals (beast, birds, lizards, rats)
T mutated creatures (includes giant lizards)
E human enemies (old men, scavengers, thugs and squatters)
D armed human enemies (includes vigilantes, soldiers, snipers, commandos, veterans and chiefs)
2015-05-27 14:28:12 -04:00
SVS 8d3b313e9c Change the enemy labels 2015-05-27 14:25:21 -04:00
Blake Grotewold f998c270da Merge anubisthejackle:issue115
Closes #115
Closes #224
2015-02-14 17:14:22 -05:00
Travis Weston 7333d03dbb Use Outside.killVillagers to kill villagers 2015-02-12 12:45:27 -05:00
Travis Weston 6ee6470972 Merging updates 2015-02-11 18:55:27 -05:00
Blake Grotewold c87541b8b9 Merge pull request #222 from anubisthejackle/issue80 2015-02-09 19:37:10 -05:00
Travis Weston 6e044292ae Add in doubleTime capabilities
Add hyper / classic to menu
2015-02-09 19:31:24 -05:00
Blake Grotewold 5d921d9464 Merge pull request #204 from rgravina/188_fix_jshint_warnings 2015-02-09 19:25:08 -05:00
Robert Gravina 67b3c7fb7e Low-risk fixes suggested by JSHint. 2015-02-09 19:20:29 -05:00
Travis Weston 25b2fbfa5f Limit Fire event to only Outside module 2015-02-08 22:33:18 -05:00
Travis Weston 8010597e44 Add hut fire event.
Closes #35
2015-02-08 11:23:32 -05:00
Blake Grotewold 94fdcc7463 Add buy medicine button to plague event.
Because there is a serious need for medicine, the price
is raised with this button. I felt like it should be even
higher but this will do for now.

Closes #199
2015-01-03 09:40:16 -05:00
ThiloVoigt555 b512153d73 Add TRANSLATORS comments
This will better help the translators as they complete the difficult task
of taking one language and finding commonality in another.

Closes #165
Closes #161
2014-10-28 10:15:09 -04:00
Michael Townsend 20539fdd18 Merge branch 'master' into title-blink 2014-07-29 18:20:10 -04:00
skj3gg 79e765eb08 Blink only happens on specified events
Now event objects must have a blink flag if they want to use the title
blink. For starters, this is only global, outside, and room events.
2014-07-24 12:00:51 -04:00
Blake Grotewold 8ceb9488aa Add cooldown when leaving events
Adding this cooldown prevents users from accidently clicking leave or
continue before they have a chance to eat or collect loot.  This was
originally brought up in and resolves #8. May be of interest to #122 as
well
2014-07-23 02:02:05 -04:00
Travis Weston 216c51b44b Fixing whitespace conformity in setpieces.js 2014-07-13 12:22:16 -04:00
Travis Weston 2d0fccaf1c Fixed whitespace conformity in room.js 2014-07-13 11:52:19 -04:00
Travis Weston 991bf7e764 Fixing whitespace conformity in outside.js 2014-07-13 11:43:19 -04:00
Travis Weston 6e90a79c5f Fixing whitespace conformity in global.js 2014-07-13 11:34:35 -04:00
Travis Weston c91bf1d20a Fixing whitespace conformity in encounters.js 2014-07-13 11:32:07 -04:00
Vanadar c7ad5384f4 suite des trads 2014-02-07 18:26:03 +01:00
Vanadar 7ac28eeb1a suites des trads 2014-02-05 17:06:30 +01:00
vanadar f986e0323e Start trad fr 2014-02-04 22:27:00 +01:00
coolbeans7 e1df9e9e75 Update setpieces.js
Corrected typo - much => must
2013-11-15 15:03:20 -08:00
Michael 994f01c78c Some refactoring and some bug fixes. 2013-11-01 23:00:51 -04:00
Michael b230d0586a Disallow medicine events before medicine has been discovered. 2013-10-29 18:06:40 -04:00
Michael 1ffe8f8aeb A bit of cleanup. 2013-10-16 17:45:41 -04:00
Vermilingua 1be4d5edc5 started backup/loading mechanic 2013-10-16 21:43:12 +11:00
Vermilingua acc04d0780 set down framework, storage/map gen/etc. 2013-10-16 21:41:47 +11:00
LucidCrux 99800f1abd refactor Outside to use $SM + Room bugfix, \' to "
Refactoring of Outside.js to take better advantage of $SM and simplify
the code.

Includes a small bug fix to Room update handler

Also changed instances of escaped single quote (\') to double (") for
readability and simplicity.

====state changes====
//these were changed for the opposite reason the Room states were. These
seem like states that other locations and events may very well want to
interact with and possibly alter themselves
game.outside.buildings >> game.buildings 
game.outside.population >> game.population
game.outside.workders >> game.workers


====functions removed====
Outside.numBuilding // just a $SM.get, no shortcut really needed since
Outside.numBuilding is a pretty long name
Outside.getPopulation // same here
Outside.addBuilding // just an add
Outside.addBuildings // just addM, but wasn't even actually used


====functions refactored====
Outside.killVillagers //moved updates to handler
Outside.updateWorkersView //added local to reduce gets
Outside.increasePopulation //updates moved to handler
Outside.increaseWorker // updates moved to handler
Outside.decreaseWorkder // updates moved to handler
2013-07-26 19:21:12 -06:00
LucidCrux 766d3879c7 Merge remote-tracking branch 'origin/master' into state_manager_2
Conflicts:
	script/events.js
2013-07-24 21:01:59 -06:00
LucidCrux dee7cbb9b3 refactor Engine.js for use with $SM
====functions removed====
//I just removed these because most were simpler or at least equal as
	direct $SM get/set/add calls, I realize the store ones are kind of
	subjective since calls were about equal, but oh well. If someone
	really 	feels we need the shortcut/named functions for manipulating
	stores specifically, it shouldn't be crazy to reimplement in $SM 
Engine.setStore >> $SM.set
Engine.setStores >> $SM.setM
Engine.addStore >> $SM.add
Engine.addStores >> $SM.addM
Engine.getStore >> $SM.get(requestZero = true)
Engine.storeAvailable >> $SM.get;
Engine.removeIncome >> $SM.remove //updates moved to handler


====functions moved====
//Any moved function I felt was more directly related to States or
	didn't belong where it was
Engine.addPerk > $SM.addPerk //kept function for now because of notify
	call inside, 'deep' state
Engine.hasPerk > $SM.hasPerk //kept function because of 'deep' state
	name
Engine.setIncome > $SM.setIncome //kept because it has internal logic
**Engine.getIncome > $SM.getIncome //**easily removable with
	Outside.updateVillageIncome refactor
Engine.openPath > Path.openPath //Since I'm refactoring anyways
Engine.addStolen > $SM.addStolen //internal logic
Engine.startThieves > $SM.startThieves //not sure $SM is a better place,
	but Engine should be nice and clean by the end of this, handling
	only engine mechanics
Engine.num > $SM.num //after Outside refacter, this is basically just a
	fancy $SM.get
Engine.upgradeState > $SM.updateOldState


====functions refactored====
$SM.addPerk; //updates moved to event handler, no check/create new perk
$SM.hasPerk; //don't need to check exist and ==true
$SM.collectIncome //removed changed check, update calls now handled by
	'stateUpdate' event listening
$SM.addStolen //fix to set stolen items in case a partial steal happens
$SM.startThieves //updates in handler
$SM.updateOldState //use $SM calls, add placeholder for updating to post
$SM state when more finalized 


====functions affected (by removed)====
Engine.init (Engine.getStore, Engine.storeAvailable)
Engine.collectIncome (Engine.addStores)
Engine.num (Engine.getStore)
Engine.travelTo (Engine.storeAvailable)

Room.init (Engine.getStore)
Room.unlockForest (Engine.setStore)
Room.lightFire (Engine.setStore, Engine.getStore, Engine.storeAvailable)
Room.stokeFire (Engine.setStore, Engine.getStore, Engine.storeAvailable)
Room.coolFire (Engine.setStore)
Room.buy (Engine.setStores, Engine.addStore, Engine.getStore)
Room.build (Engine.setStores, Engine.getStore)
Room.craftUnlocked (Engine.getStore, Engine.storeAvailable)
Room.buyUnlocked (Engine.storeAvailable)
Room.updateButton (Engine.storeAvailable)

Outside.gatherWood (Engine.addStores)
Outside.checkTraps (Engine.addStores, Engine.getStore)
Outside.updateVillage (Engine.getStore)

Path.embark (Engine.addStore)
Path.getCapacity (Engine.getStore)
Path.updateOutfitting (Engine.getStore)
Path.createOutfittingRow (Engine.getStore)
Path.increaseSupply (Engine.getStore)

World.goHome (Engine.addStore)
World.updateSupplies (Engine.getStore)
World.checkDanger (Engine.getStore)
World.getMaxHealth (Engine.getStore)
World.getMaxWater (Engine.getStore)

Ship.reinforceHull (Engine.addStore, Engine.getStore)
Ship.upgradeEngine (Engine.addStore, Engine.getStore)

Events.loadScene (Engine.addStores)
Events.updateButtons (Engine.getStore)
Events.buttonClick (Engine.getStore)

Events.Global (Engine.addStores, Engine.removeIncome)
Events.Room (Engine.addStore, Engine.addStores, Engine.getStore,
Engine.storeAvailable)
2013-07-24 17:41:36 -06:00
Steve Hayes 253f946dbd IE<8 Fixes: Removed trailing commas in string literals and renamed variable char to chara 2013-07-23 23:54:06 -04:00
LucidCrux db4a346d21 create StateManager, change all State calls to managed calls
Introduced state_manager.js almost all State gets/sets are now run
through the manager (alias $SM). For now it was a simple, mostly
straightforward replacement of calls. This means that there are
redundancies and a lot of now unneeded code for things the SM will
handle. However, since I had trouble with making those changes as well
as introducing the manager all at once my first attempt, I am taking the
wiser approach and making "one change" at a time like I should have
instead of being too sure of myself.

At this point, it seems to work, but there may be bugs I didn't catch.
There was also no attempt made to update old saves to work with this. In
theory, it shouldn't be too hard. (included is a list of all state
changes)

TODO:
Save Update.
Refactor: a lot, many many redundancies now.
Refactor: "location centric" to "global centric".
Relocate all calls to different update functions to event listeners
where possible.

======================================================

The changes to State are as follows:

.room (exists) > features.location.room
.room > game.room
.room.builder > game.room.builder
.room.temperature > game.room.temperature
.room.fire > game.room.fire
.room.buttons > game.room.buttons

.outside (exists) > features.location.outside
.outside > game.outside
.outside.population > game.outside.population
.outside.buildings > game.outside.buildings
.outside.workers > game.outside.workers
.outside.seenForest > game.outside.seenForest

.world (exists) > features.location.world
.world > game.world
.world.map > game.world.map
.world.mask > game.world.mask
.starved > character.starved
.dehydrated > character.dehydrated

.ship (exists) > featuers.location.spaceShip
.ship > game.spaceShip
.ship.hull > game.spaceShip.hull
.ship.thrusters > game.spaceShip.thrusters
.ship.seenWarning > game.spaceShip.seenWarning
.ship.seenShip > game.spaceShip.seenShip

.punches > character.punches
.perks > character.perks

.thieves > game.thieves
.stolen > game.stolen
.cityCleared > game.cityCleared

.stores > stores
.income > income
2013-07-23 01:24:47 -06:00
Zarkonnen 7bf744e386 Fixed issue #42 by fixing wrong city exploration setpiece data. 2013-07-17 09:56:31 +02:00
Zarkonnen 3515cbf75f Removed mentions of "you". 2013-07-10 20:50:42 +02:00
Zarkonnen d4034fe244 Fixed hospital never occurring in city. 2013-07-10 15:10:43 +02:00
Zarkonnen bb953de92b Finished first version of medicine feature. 2013-07-10 12:53:28 +02:00
Zarkonnen 4334f36e57 Bugfixes. 2013-07-08 21:39:28 +02:00
Zarkonnen 4641b0b145 Initial medicine implementation. Needs more events. 2013-07-08 19:16:16 +02:00
Michael Townsend 54cea31db9 Merge pull request #26 from dhutty/patch-1
spelling
2013-07-07 09:09:42 -07:00
dhutty aeedc5d10c spelling 2013-07-07 10:18:59 -04:00
Jayson Vantuyl 536f09dce3 a grammar fix
"bundle of sticks", not "bundle of stick"
2013-07-06 13:53:33 -07:00