@@ -27,7 +27,8 @@ define([ | |||||
completeQuests: 10, | completeQuests: 10, | ||||
getReputation: 10, | getReputation: 10, | ||||
loseReputation: 10, | loseReputation: 10, | ||||
setStat: 10 | |||||
setStat: 10, | |||||
die: 10 | |||||
}; | }; | ||||
var localCommands = [ | var localCommands = [ | ||||
@@ -357,6 +358,12 @@ define([ | |||||
setStat: function (config) { | setStat: function (config) { | ||||
this.obj.stats.values[config.stat] = ~~config.value; | this.obj.stats.values[config.stat] = ~~config.value; | ||||
}, | |||||
die: function () { | |||||
this.obj.stats.takeDamage({ | |||||
amount: 99999 | |||||
}, 1, this.obj); | |||||
} | } | ||||
}; | }; | ||||
}); | }); |
@@ -46,9 +46,16 @@ define([ | |||||
die: function () { | die: function () { | ||||
this.auto = []; | this.auto = []; | ||||
var mana = this.obj.stats.values.mana; | |||||
this.spells.forEach(function (s) { | this.spells.forEach(function (s) { | ||||
var reserve = s.manaReserve; | |||||
if ((reserve) && (reserve.percentage) && (s.active)) | |||||
this.obj.stats.addStat('manaReservePercent', -reserve.percentage); | |||||
s.die(); | s.die(); | ||||
}); | |||||
}, this); | |||||
}, | }, | ||||
simplify: function (self) { | simplify: function (self) { | ||||
@@ -39,6 +39,11 @@ define([ | |||||
delete values.effects; | delete values.effects; | ||||
}, | }, | ||||
die: function () { | |||||
if (this.active) | |||||
this.cast(); | |||||
}, | |||||
updateActive: function () { | updateActive: function () { | ||||
var o = this.obj; | var o = this.obj; | ||||
var amount = 0; | var amount = 0; | ||||