more informative death modal, lose 1 lvl

This commit is contained in:
Tyler Renelle 2013-05-10 14:45:13 +01:00
parent be3b71be39
commit 708e3cf781
4 changed files with 22 additions and 7 deletions

View file

@ -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 "<i class='icon-death'></i> You died! Lost GP and #{item}.", "death"
statsNotification "<i class='icon-death'></i> Respawn!", "death"
user.on 'set', 'stats.lvl', (captures, args) ->
if captures > args

View file

@ -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

View file

@ -16,7 +16,7 @@
<h4>5/10/2013</h4>
<ul>
<li>Less harsh death: Used to be you lose everything, now you lose all GP & one random gear piece. We're working on a <a _target='blank' href="https://trello.com/card/death-mechanic/50e5d3684fe3a7266b0036d6/204">really cool death mechanic here.</a>, but this is a stop-gap so people don't lose heart presently.</li>
<li>Less harsh death: Used to be you lose everything, now you lose GP & one random gear piece, 1 level. We're working on a <a _target='blank' href="https://trello.com/card/death-mechanic/50e5d3684fe3a7266b0036d6/204">really cool death mechanic here.</a>, but this is a stop-gap so people don't lose heart presently.</li>
<li>Chat messages: can delete your own message, fix the duplicate messages issue.</li>
</ul>

View file

@ -10,11 +10,25 @@
<!-- Game Over Modal -->
<div style="{#unless lt(_user.stats.hp,1)}display:none;{/}">
<app:modals:modal noDismiss=true modalId='dead-modal'>
<figure class="notification-character">
<img src="/img/sprites/dead.png">
</figure>
<h3 class="notification-message">You died! Game Over.</h3>
<a x-bind=click:revive class="btn btn-danger btn-large notification-action">Continue</a>
<div class='row-fluid'>
<div class='span4'>
<figure class="notification-character">
<img src="/img/sprites/dead.png">
</figure>
</div>
<div class='span8'>
<h2>You Died!</h2>
</div>
</div>
<div class='row-fluid'>
<div class='span4'>
<p><a x-bind=click:revive class="btn btn-danger btn-large notification-action">Continue</a></p>
</div>
<div class='span8'>
<p>You've lost your GP, 1 level and 1 random item. Be sure to complete your dailies to prevent this from happening again!</p>
</div>
</div>
</app:modals:modal>
</div>