Browse Source

feat #1735

tags/v0.10.6^2
Shaun 2 years ago
parent
commit
6fff5a03a5
10 changed files with 119 additions and 9 deletions
  1. BIN
     
  2. BIN
     
  3. +1
    -1
      src/client/js/misc/statTranslations.js
  4. +1
    -1
      src/server/components/extensions/socialCommands.js
  5. +2
    -1
      src/server/components/spellbook.js
  6. +5
    -1
      src/server/components/stats.js
  7. +51
    -0
      src/server/config/spells.js
  8. +41
    -0
      src/server/config/spells/spellSingleTargetHeal.js
  9. +17
    -4
      src/server/config/spellsConfig.js
  10. +1
    -1
      src/server/mods/class-necromancer/index.js

BIN
View File


BIN
View File


+ 1
- 1
src/client/js/misc/statTranslations.js View File

@@ -52,7 +52,7 @@ define([
attackSpeed: 'attack speed',
castSpeed: 'cast speed',

lifeOnHit: 'life gained on hit',
lifeOnHit: 'life gained on dealing physical damage',

auraReserveMultiplier: 'aura mana reservation multiplier',



+ 1
- 1
src/server/components/extensions/socialCommands.js View File

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

die: function () {
this.obj.stats.takeDamage({
amount: 99999
amount: 20000000
}, 1, this.obj);
},



+ 2
- 1
src/server/components/spellbook.js View File

@@ -300,7 +300,7 @@ module.exports = {
}
}

if (spell.spellType === 'buff') {
if (spell.spellType === 'buff' || spell.spellType === 'heal') {
if (this.obj.aggro.faction !== target.aggro.faction)
return;
} else if (target.aggro && !this.obj.aggro.canAttack(target)) {
@@ -350,6 +350,7 @@ module.exports = {
return false;

action.target = this.getTarget(spell, action);

//If a target has become nonSelectable, we need to stop attacks that are queued/auto
if (!action.target || action.target.nonSelectable)
return false;


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

@@ -629,7 +629,8 @@ module.exports = {
source: source.id,
heal: true,
amount: amount,
crit: heal.crit
crit: heal.crit,
element: heal.element
}, recipients);
}

@@ -776,6 +777,9 @@ module.exports = {
},

afterDealDamage: function (damageEvent, target) {
if (damageEvent.element)
return;

const { obj, values: { lifeOnHit } } = this;

if (target === obj || !lifeOnHit)


+ 51
- 0
src/server/config/spells.js View File

@@ -212,6 +212,57 @@ let spells = [{
randomSpeed: true,
chance: 0.02
}
}, {
name: 'Healing Touch',
description: 'Restore health to a friendly target.',
type: 'singleTargetHeal',
spellType: 'heal',
icon: [0, 3],
animation: 'raiseStaff',
particles: {
scale: {
start: {
min: 6,
max: 16
},
end: {
min: 0,
max: 4
}
},
speed: {
start: {
min: 2,
max: 12
},
end: {
min: 0,
max: 4
}
},
lifetime: {
min: 1,
max: 3
},
alpha: {
start: 0.45,
end: 0
},
color: {
start: ['ffeb38', 'fcfcfc'],
end: ['fcfcfc', 'faac45']
},
spawnType: 'circle',
spawnCircle: {
x: 0,
y: 0,
r: 12
},
randomScale: true,
randomColor: true,
randomSpeed: true,
chance: 0.02
}
}, {
name: 'Holy Vengeance',
description: 'Grants holy vengeance to a friendly target. For the duration of the effect, dealing damage will also heal the attacker.',


+ 41
- 0
src/server/config/spells/spellSingleTargetHeal.js View File

@@ -0,0 +1,41 @@
module.exports = {
type: 'singleTargetHeal',

cdMax: 20,
manaCost: 0,
range: 9,

healing: 1,

needLos: true,
targetFriendly: true,

spellType: 'heal',
particleDuration: 10,

cast: function (action) {
const target = action.target;
const { x, y } = target;

const amount = this.getDamage(target, true);
target.stats.getHp(amount, this.obj);

const effect = {
x,
y,
components: [{
type: 'particles',
//This ttl is in frames (each frame is roughly 1000 / 60 ms)
ttl: (1000 / 60) * this.particleDuration,
destroyObject: true,
blueprint: this.particles
}]
};

this.obj.instance.syncer.queue('onGetObject', effect, -1);

this.sendBump(target);

return true;
}
};

+ 17
- 4
src/server/config/spellsConfig.js View File

@@ -76,9 +76,9 @@ let spells = {
statType: 'int',
statMult: 1,
element: 'holy',
cdMax: 5,
cdMax: 15,
castTimeMax: 4,
manaCost: 8,
manaCost: 12,
range: 9,
radius: 3,
random: {
@@ -87,6 +87,19 @@ let spells = {
}
},

'healing touch': {
statType: 'int',
statMult: 1,
element: 'holy',
cdMax: 5,
castTimeMax: 3,
manaCost: 8,
range: 9,
random: {
healing: [1, 3]
}
},

slash: {
statType: 'str',
statMult: 1,
@@ -167,11 +180,11 @@ let spells = {
statMult: 1,
manaCost: 14,
needLos: true,
cdMax: 20,
cdMax: 15,
castTimeMax: 0,
range: 9,
random: {
damage: [3, 16],
damage: [3, 18],
i_delay: [1, 4]
},
negativeStats: [


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

@@ -126,7 +126,7 @@ module.exports = {
range: 1,
random: {
damage: [4, 14],
healPercent: [10, 30]
healPercent: [2, 15]
}
};



Loading…
Cancel
Save