Quellcode durchsuchen

unreserve aura mana on death

tags/v0.1.10^2
Big Bad Waffle vor 6 Jahren
Ursprung
Commit
323d26be3b
3 geänderte Dateien mit 21 neuen und 2 gelöschten Zeilen
  1. +8
    -1
      src/server/components/extensions/socialCommands.js
  2. +8
    -1
      src/server/components/spellbook.js
  3. +5
    -0
      src/server/config/spells/spellAura.js

+ 8
- 1
src/server/components/extensions/socialCommands.js Datei anzeigen

@@ -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);
} }
}; };
}); });

+ 8
- 1
src/server/components/spellbook.js Datei anzeigen

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


+ 5
- 0
src/server/config/spells/spellAura.js Datei anzeigen

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


Laden…
Abbrechen
Speichern