Browse Source

fix #1976: Another fix for this task

tags/v0.12.0
Shaun 1 year ago
parent
commit
810d3161dc
12 changed files with 28 additions and 18 deletions
  1. +1
    -1
      src/server/components/stats.js
  2. +1
    -1
      src/server/config/effects/effectHolyVengeance.js
  3. +5
    -1
      src/server/config/itemEffects/castSpellOnHit.js
  4. +2
    -2
      src/server/config/itemEffects/gainStat.js
  5. +2
    -2
      src/server/config/itemEffects/healOnCrit.js
  6. +2
    -2
      src/server/config/spells/spellArcaneBarrier.js
  7. +4
    -1
      src/server/config/spells/spellCharge.js
  8. +4
    -1
      src/server/config/spells/spellFireblast.js
  9. +4
    -4
      src/server/config/spells/spellHealingCircle.js
  10. +1
    -1
      src/server/config/spells/spellSummonConsumableFollower.js
  11. +1
    -1
      src/server/mods/class-necromancer/spells/spellBloodBarrier.js
  12. +1
    -1
      src/server/mods/class-necromancer/spells/spellHarvestLife.js

+ 1
- 1
src/server/components/stats.js View File

@@ -730,7 +730,7 @@ module.exports = {
return; return;


this.getHp({ this.getHp({
event: { amount: lifeOnHit },
heal: { amount: lifeOnHit },
source: obj, source: obj,
target: obj target: obj
}); });


+ 1
- 1
src/server/config/effects/effectHolyVengeance.js View File

@@ -7,7 +7,7 @@ module.exports = {
afterDealDamage: function ({ damage, target }) { afterDealDamage: function ({ damage, target }) {
damage.dealt *= 0.5; damage.dealt *= 0.5;
this.obj.stats.getHp({ this.obj.stats.getHp({
event: damage,
heal: damage,
source: this.obj, source: this.obj,
target: this.obj target: this.obj
}); });


+ 5
- 1
src/server/config/itemEffects/castSpellOnHit.js View File

@@ -10,7 +10,7 @@ const doesEventMatch = (firedEvent, eventCondition) => {
if ( if (
!firedEvent || !firedEvent ||
( (
!eventCondition.targetNotSelf &&
eventCondition.targetNotSelf === false &&
firedEvent.target === firedEvent.source firedEvent.target === firedEvent.source
) )
) )
@@ -90,6 +90,10 @@ module.exports = {


afterDealDamage: function (item, event) { afterDealDamage: function (item, event) {
handler(this, item, event, 'afterDealDamage'); handler(this, item, event, 'afterDealDamage');
},

afterPositionChange: function (item, event) {
handler(this, item, event, 'afterPositionChange');
} }
} }
}; };

+ 2
- 2
src/server/config/itemEffects/gainStat.js View File

@@ -18,8 +18,8 @@ module.exports = {
amount = (cpnStats.values.hpMax / 100) * ~~amount.replace('%', ''); amount = (cpnStats.values.hpMax / 100) * ~~amount.replace('%', '');


cpnStats.getHp({ cpnStats.getHp({
event: {
amount: amount,
heal: {
amount,
threatMult: 0 threatMult: 0
}, },
source: cpnStats.obj, source: cpnStats.obj,


+ 2
- 2
src/server/config/itemEffects/healOnCrit.js View File

@@ -34,8 +34,8 @@ module.exports = {
let amount = rolls.amount || ((damage.dealt / 100) * rolls.percentage); let amount = rolls.amount || ((damage.dealt / 100) * rolls.percentage);


this.stats.getHp({ this.stats.getHp({
event: {
amount: amount
heal: {
amount
}, },
source: this, source: this,
target: this target: this


+ 2
- 2
src/server/config/spells/spellArcaneBarrier.js View File

@@ -38,9 +38,9 @@ let cpnArcanePatch = {
for (let i = 0; i < cLen; i++) { for (let i = 0; i < cLen; i++) {
let c = contents[i]; let c = contents[i];


let amount = this.spell.getDamage(c, true);
let heal = this.spell.getDamage(c, true);
c.stats.getHp({ c.stats.getHp({
event: amount,
heal,
source: this.caster, source: this.caster,
target: c target: c
}); });


+ 4
- 1
src/server/config/spells/spellCharge.js View File

@@ -124,7 +124,10 @@ module.exports = {


const moveEvent = { const moveEvent = {
newPos: targetPos, newPos: targetPos,
source: this
source: this,
target: this,
spellName: 'charge',
spell: this
}; };
this.obj.fireEvent('afterPositionChange', moveEvent); this.obj.fireEvent('afterPositionChange', moveEvent);




+ 4
- 1
src/server/config/spells/spellFireblast.js View File

@@ -183,7 +183,10 @@ module.exports = {
x: xFinal, x: xFinal,
y: yFinal y: yFinal
}, },
source: this
source: this.obj,
target,
spellName: 'fireblast',
spell: this
}; };
target.fireEvent('afterPositionChange', moveEvent); target.fireEvent('afterPositionChange', moveEvent);
} }


+ 4
- 4
src/server/config/spells/spellHealingCircle.js View File

@@ -8,11 +8,11 @@ let cpnHealPatch = {
this[p] = blueprint[p]; this[p] = blueprint[p];
}, },


applyHeal: function (o, amount) {
o.stats.getHp({
event: amount,
applyHeal: function (target, heal) {
target.stats.getHp({
heal,
source: this.caster, source: this.caster,
target: o
target
}); });
}, },




+ 1
- 1
src/server/config/spells/spellSummonConsumableFollower.js View File

@@ -97,7 +97,7 @@ module.exports = {
} else if ((Math.abs(x - m.x) <= 1) && (Math.abs(y - m.y) <= 1)) { } else if ((Math.abs(x - m.x) <= 1) && (Math.abs(y - m.y) <= 1)) {
m.destroyed = true; m.destroyed = true;
obj.stats.getHp({ obj.stats.getHp({
event: {
heal: {
amount: obj.stats.values.hpMax / 10 amount: obj.stats.values.hpMax / 10
}, },
source: obj, source: obj,


+ 1
- 1
src/server/mods/class-necromancer/spells/spellBloodBarrier.js View File

@@ -46,7 +46,7 @@ module.exports = {
amount = amount * this.shieldMultiplier; amount = amount * this.shieldMultiplier;
const heal = { amount }; const heal = { amount };
target.stats.getHp({ target.stats.getHp({
event: heal,
heal,
source: obj, source: obj,
target target
}); });


+ 1
- 1
src/server/mods/class-necromancer/spells/spellHarvestLife.js View File

@@ -54,7 +54,7 @@ module.exports = {


let healAmount = damage.amount * (this.healPercent / 100); let healAmount = damage.amount * (this.healPercent / 100);
obj.stats.getHp({ obj.stats.getHp({
event: {
heal: {
amount: healAmount amount: healAmount
}, },
source: obj, source: obj,


Loading…
Cancel
Save