From 708e3cf781c701a33f38292cd30245e4476e0b85 Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Fri, 10 May 2013 14:45:13 +0100 Subject: [PATCH] more informative death modal, lose 1 lvl --- src/app/browser.coffee | 2 +- src/app/character.coffee | 1 + views/app/alerts.html | 2 +- views/app/modals.html | 24 +++++++++++++++++++----- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/app/browser.coffee b/src/app/browser.coffee index 16d0536bc2..910b9ab2e1 100644 --- a/src/app/browser.coffee +++ b/src/app/browser.coffee @@ -187,7 +187,7 @@ setupGrowlNotifications = (model) -> user.on 'set', 'items.*', (item, after, before) -> if item in ['armor','weapon','shield','head'] and parseInt(after) < parseInt(before) item = 'helm' if item is 'head' # don't want to day "lost a head" - statsNotification " You died! Lost GP and #{item}.", "death" + statsNotification " Respawn!", "death" user.on 'set', 'stats.lvl', (captures, args) -> if captures > args diff --git a/src/app/character.coffee b/src/app/character.coffee index edecd2d889..9734c916a0 100644 --- a/src/app/character.coffee +++ b/src/app/character.coffee @@ -15,6 +15,7 @@ module.exports.app = (appExports, model) -> user.set 'stats.hp', 50 user.set 'stats.exp', 0 user.set 'stats.gp', 0 + user.incr 'stats.lvl', -1 if user.get('stats.lvl') > 1 ## Lose a random item loseThisItem = false diff --git a/views/app/alerts.html b/views/app/alerts.html index 761d4ef558..d94914f93f 100644 --- a/views/app/alerts.html +++ b/views/app/alerts.html @@ -16,7 +16,7 @@

5/10/2013

diff --git a/views/app/modals.html b/views/app/modals.html index a2428526a9..a82b1bbef5 100644 --- a/views/app/modals.html +++ b/views/app/modals.html @@ -10,11 +10,25 @@
-
- -
-

You died! Game Over.

- Continue +
+
+
+ +
+
+
+

You Died!

+
+
+
+
+

Continue

+
+
+

You've lost your GP, 1 level and 1 random item. Be sure to complete your dailies to prevent this from happening again!

+
+
+