Commit Graph

800 Commits

Author SHA1 Message Date
Andrea Rendine 131e5c1140 Reverted changes
Revert to previous version (no pause)
2016-02-17 14:06:09 +01:00
Andrea Rendine df63ccb651 Switch cooldown
Easy way to switch cooldown on pause button according to new button option
2016-02-17 10:27:38 +01:00
Andrea Rendine ac34b717d3 Forcing cooldown
Added an option.
Button.cooldown(btn, X) where X is a number, forces a one-time cooldown of X seconds for btn.
2016-02-17 10:19:32 +01:00
Andrea Rendine e4bb616a93 Legends
Text set by data-legend attribute
2016-02-17 01:55:53 +01:00
Andrea Rendine 07998376e7 Several changes
As some of them are related to each other, this commit involves a lot of updates.

* Autopause on blur. This is an idea I took from Gridland (!), if window loses focus the fight pauses (timed check courtesy of the enemy), and it restarts when the window has focus again (if the pause button is clicked, then the player must click again in order to resume).
* Delayed start for fights. This will allow players to read the description without the player attacking them. No way to cheat, buttons are not enabled. I used Events._LEAVE_COOLDOWN as cooldown time, not for laziness, but because I guess the two durations have the same purpose: to allow (force) the player to read stuff.
* Take everything and leave just by name. If the player can just take something, the text is "take all you can", if they can take everything but there are several options it's "take everything", if the option is only one the text is "take everything and X", where X is the verb of the only possible option (note: in the latter case, the button cools down together with the option itself).
* success/failure mechanics no longer relies upon try/catch, but on a simple mechanism: a variable taking a bool value, set to true when one of the end conditions happens. The precedence goes to the enemy (if the player kills and dies the fight is lost).
2016-02-17 01:53:21 +01:00
Andrea Rendine aae770c5a1 Timing for winning and efficiency 2016-02-16 11:02:10 +01:00
Andrea Rendine 24e744a27e Heal when necessary
Events.setHeal() enables/disables eatMeat and useMeds buttons depending on player's HP.
The check is done in 4 cases:

* when a fight starts
* after an attack
* after healing
* in the loot screen
2016-02-16 03:02:45 +01:00
Andrea Rendine aa62b7f9be Buttons positioning 2
The last 2 remainings from original structure
2016-02-16 02:58:51 +01:00
Andrea Rendine bf7472ba37 Buttons positioning
Residual structure fixed.
2016-02-16 02:56:44 +01:00
Andrea Rendine def892953a Cooldown time from graphics
Not a problem of precision, but a width measurement issue. Fixed and restored to previous precision level.
2016-02-16 00:27:44 +01:00
Andrea Rendine 091929cf90 Cleanup
Events.damage method now groups all common lines for Events.animateRanged and Events.animateMelee.
Balance between success and failure is now determined by Events.lost. It is set to "true" when the player is killed and prevents Events.winFight() altogether.
Events.endFight() groups the 2 consistent actions in winFight and loseFight, i.e., pause unsetting and stopping the enemy.
Completely renewed trap method: instead of relying on a separate counter, enemy.data('stunned') now returns the number of remaining seconds of stunning. Enemy's timed attack decreases this value by the attack delay time (the enemy fights for its freedom).
2016-02-16 00:26:23 +01:00
AndySky21 6ace681a91 Pause during fight
This commit adds a pause button during the fight. It relies upon the new
Events.paused property: when set to true, no buttons will work except
the pause button itself, and cooldown on attack/healing buttons is
interrupted.
This commit also groups event buttons in different groups (attack,
healing, scene), so that the position of "eat meat" and "use meds" does
not depend on how many scene buttons are present (sometimes 1, other
times 2)
2016-02-15 21:04:02 +01:00
Andrea Rendine 59e71232d4 Minor fixes
For code consistency: in updateSupplies, num is forced to never be greater than have, so the "greater or equal" comparison is pointless
Increase buttons reactivate when total store quantity is greater than supplies.
Also, removed useless nesting of Math.min.
2016-02-15 10:41:42 +01:00
AndySky21 5a618be261 Po update and IT notifications
PO files updated with current POT version. Italian translation of event
notifications.
2016-02-15 03:07:50 +01:00
Andrea Rendine 4bd00fa328 No check on null stores
Unlike other stuff, stores in the side box never disappear during the game when they reach 0, once they've been "seen" (i.e., once State stores[store] has been set). But on reload they appear only if the quantity is positive.
For the sake of consistency, now null stores are visible on load (see what you're missing, bro).
2016-02-14 21:24:43 +01:00
Andrea Rendine d295ca9aa5 Take all and what?
The change is somehow linguistic, rather than anything else.
"Take everything and leave" changes name and becomes "Take everything and X", where X is the verb of the command it impersonates.
This way after completing mines e.g. it is "Take everything and continue", acting like "continue" button.
It now also cools down if it impersonates a "leave" button (leave buttons cool down. IDK why).
2016-02-14 21:00:04 +01:00
Andrea Rendine 28cdca6003 Update world map on return
World.seenAll must be updated only when committing state changes (i.e., on return home safe), not during exploration.
2016-02-14 16:09:15 +01:00
Andrea Rendine 3b66f5cad5 Buy map when needed
Buy map button availability depends on the fact that there are still unexplored parts of the map.
2016-02-14 15:54:59 +01:00
Andrea Rendine bee221093e Apply useful maps
Maps cost! Let's apply them where necessary.
World.testMap() checks if there's still something to explore.
World.seenAll is true when everything has been seen. It is updated by uncoverMap().
World.applyMap() chooses a random center, with the conditions that 

1. there's still something to explore
1. the center itself is an undiscovered area.

Buy Map is active only when a map is still useful.
2016-02-14 15:47:38 +01:00
Andrea Rendine f1656f9a4f Buy map when needed
Maps cost! And casual gamers could possibly forget whether they've explored everything.
The Buy map button is now disabled if the whole map has been seen (yes, even a single uncovered tile is enough).
2016-02-14 13:46:26 +01:00
Andrea Rendine 3e51471b0b Remove State outfit on death
Supplies are not removed from state when embarking, so they remain in place in case the game is closed during exploration. So it now happens in case of death, along with Path.outfit reset.
2016-02-14 11:53:29 +01:00
Andrea Rendine 2c2490290c Leave outfit in place
It seems counterintuitive for players that, if the game is closed while exploring, everything remains unchanged but supplies are lost. I had to choose between cooling down Embark, thus making it explicit that it's as if the player had died, or leave supplies in place. I chose the latter.
2016-02-14 11:48:27 +01:00
Andrea Rendine 0f8a2ccfb6 Outfit update on Income
A very easy fix indeed. When Path is active, the outfit is updated on Income event. This way the "available" tooltip is reliable, increment/decrement buttons are activated/deactivated correctly and there is no risk of phantom resources.
2016-02-14 02:39:49 +01:00
Andrea Rendine 4032738d57 Code style
Tab in place.
2016-02-14 02:31:41 +01:00
Andrea Rendine e3d5e25b94 Merge pull request #19 from doublespeakgames/master
Update 2016-02-11
2016-02-11 14:23:04 +01:00
pacharan ea38d220d1 Update and rename string.js to strings.js 2016-01-10 21:23:58 -05:00
Blake Grotewold 9a0a764cb5 Merge pull request #453 from pacharan/patch-2
Create main.css
2016-01-10 18:09:30 -05:00
pacharan 201961c12e Create main.css 2016-01-11 05:10:05 +07:00
Blake Grotewold 23796cb36e Merge branch 'pr/447' 2015-12-30 03:29:14 -06:00
Blake Grotewold 49f6cd5255 Merge branch 'master' into pr/447 2015-12-30 03:28:52 -06:00
Blake Grotewold 99c57da055 update adarkroom.pot 2015-12-30 03:28:41 -06:00
Blake Grotewold b28c8583c6 Merge pull request #450 from miratcan/master
Added missing Turkish translations, fixed wrong lines.
2015-12-30 03:25:58 -06:00
Blake Grotewold 0f73054faf Add Thai to README 2015-12-30 03:25:03 -06:00
Blake Grotewold 2ebae56dc5 Merge pull request #451 from pacharan/master
Thai translation.
2015-12-30 03:23:25 -06:00
pacharan e0b1d3800a add Thai translation 2015-12-26 23:38:01 +07:00
Blake Grotewold 9943c4c568 add confirm hyper
lets the user know what hyper mode is, and confirms turning it on.
Updates .pot to match current source.
2015-12-22 16:41:10 -06:00
pacharan 2c2436e63e add Thai translation 2015-12-21 13:46:11 +07:00
pacharan 92e7ef83af add Thai translation 2015-12-21 13:44:17 +07:00
Mirat Can Bayrak 7df8efb380 Added missing Turkish translations. 2015-12-20 14:14:58 +02:00
Sang-gi Lee 0db5bf3dec Update Korean translation 2015-12-11 16:40:24 +09:00
Michael Townsend c66d484627 Added import/export tracking 2015-12-04 10:57:16 -05:00
Michael Townsend 78bf47bfa1 Merge pull request #445 from satakieli/patch-3
Update strings.po / fixed Swedish translation
2015-11-10 10:17:33 -05:00
Continuities fba203cea1 conversion tweaks 2015-11-09 18:36:55 -05:00
Anna Robbins 3ef2b22e99 Update strings.po
Proofed and updated up until line 450
2015-10-28 16:06:10 +01:00
Blake Grotewold 3849f7871f Merge pull request #444 from tom76kimo/patch-1
Update link of Traditional Chinese
2015-10-23 01:05:34 -04:00
Tom Wu d5e317836a Update link of Traditional Chinese
The link should be `zh_tw`
2015-10-23 11:45:02 +08:00
Michael Townsend ecd391ff6a Merge pull request #442 from uasi/ja-fix-typo
Fix typo in Japanese translation
2015-10-10 10:51:31 -04:00
Tomoki Aonuma bad5e58cc9 Fix typo in Japanese translation 2015-10-10 23:44:47 +09:00
Michael Townsend da289ea1d7 Update main.css 2015-10-05 12:41:46 -04:00
Akai Alonkai 55b5c3e1e7 Removed background-color for config lists.
Background colors for unordered list in options were set to match body.
This created a problem during and after the space game when the body and
text were inverted, but the ul was not. See Issue #432.

Tried this via Chrome's dev tools while at the effected screen in dark
theme, and it seemed to work.
2015-09-22 10:47:50 -04:00