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;

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


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

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


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

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

afterDealDamage: function (item, event) {
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('%', '');

cpnStats.getHp({
event: {
amount: amount,
heal: {
amount,
threatMult: 0
},
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);

this.stats.getHp({
event: {
amount: amount
heal: {
amount
},
source: 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++) {
let c = contents[i];

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


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

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

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



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

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


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

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

applyHeal: function (o, amount) {
o.stats.getHp({
event: amount,
applyHeal: function (target, heal) {
target.stats.getHp({
heal,
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)) {
m.destroyed = true;
obj.stats.getHp({
event: {
heal: {
amount: obj.stats.values.hpMax / 10
},
source: obj,


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

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


Loading…
Cancel
Save