Bläddra i källkod

unreserve aura mana on death

tags/v0.1.10^2
Big Bad Waffle 6 år sedan
förälder
incheckning
323d26be3b
3 ändrade filer med 21 tillägg och 2 borttagningar
  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 Visa fil

@@ -27,7 +27,8 @@ define([
completeQuests: 10,
getReputation: 10,
loseReputation: 10,
setStat: 10
setStat: 10,
die: 10
};

var localCommands = [
@@ -357,6 +358,12 @@ define([

setStat: function (config) {
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 Visa fil

@@ -46,9 +46,16 @@ define([
die: function () {
this.auto = [];

var mana = this.obj.stats.values.mana;

this.spells.forEach(function (s) {
var reserve = s.manaReserve;

if ((reserve) && (reserve.percentage) && (s.active))
this.obj.stats.addStat('manaReservePercent', -reserve.percentage);

s.die();
});
}, this);
},

simplify: function (self) {


+ 5
- 0
src/server/config/spells/spellAura.js Visa fil

@@ -39,6 +39,11 @@ define([
delete values.effects;
},

die: function () {
if (this.active)
this.cast();
},

updateActive: function () {
var o = this.obj;
var amount = 0;


Laddar…
Avbryt
Spara