corrected existing translations
- typos
- added missing spaces which were very annoying since the words were then together
- minor changes according design guide lines https://github.com/doublespeakgames/adarkroom/wiki/Design-Guide#narrative
- since nouns are capitalized in German, previous translators must have accidentally left some words capitalized, which was inconsistent with the rest
- light fire -> "feuer entfachen" instead of "feuer machen", which is consistent with the same use of the word "light" in other situations
- sammel holz -> holz sammeln, since the player should not be adressed directly with an imperative, and none of the other buttons (like feuer schüren) had the imperative (which would then be schüre feuer)
Use https:// instead of http:// to load jQuery and Google Analytics. Now
Google Chrome will load jQuery and Google Analytics instead of blocking
the scripts and throwing a mixed-content warning.
World.testMap() sets World.seenAll. The latter is true when the whole map has been explored.
World.testMap() is called:
* on world init
* on return home (when the map is updated)
* on applyMap() (when the map is bought from the scout)
Limited subset of commits:
* unified function for healing (Events.doHeal);
* unified function for attacks (Events.damage);
* check if health is max, and disable healing buttons (Events.setHeal and related calls)
* grouping buttons (attackButtons, healButtons and exitButtons for weapon attacks, meat & meds, continue/leave)
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).
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
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).
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)