Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var O2 = require('o2');
var Damage = require('./Damage.js');
// Effet de dégât
var ADV_Effect_PhysicalDamage = O2.extendClass(Damage, {
__construct: function(n) {
O2.parent(this, n);
this.removeTag('curse');
},
});
module.exports = ADV_Effect_PhysicalDamage;
var O2 = require('o2');
var Effect = require('./Abstract/Effect.js');
// Effet de cécité
var ADV_Effect_Immortal = O2.extendClass(Effect, {
__construct: function() {
O2.parent(this, 'Immortal', 'bless');
},
cast: function(ep) {
this.getTarget().getSoul().setBonus('immortal', 1);
},
expire: function(ep) {
this.getTarget().getSoul().setBonus('immortal', -1);
}
});
module.exports = ADV_Effect_Immortal;
var O2 = require('o2');
var MissileThinker = require('./MissileThinker.js');
var SpellMissileThinker = O2.extendClass(MissileThinker, {
});
module.exports = SpellMissileThinker;
var O2 = require('o2');
var CONST = require('../data/consts.js');
var Effect = require('../Effects.js');
var Potion = require('./Abstract/Potion.js');
/**
* Potion de lenteur :
* reduit la vitesse de déplacement de 33%.
* et la cadence de tir de 40%
* c'est tres stupide de boire cette potion
*/
var PotionSlowness = O2.extendClass(Potion, {
drink: function(ctx) {
var eSlow = new Effect.Speed(-33);
eSlow.setDuration(CONST.EFFECT_DURATION_MEDIUM);
var eCD = new Effect.Cooldown(40);
eCD.setDuration(CONST.EFFECT_DURATION_MEDIUM);
ctx.effects = [eSlow, eCD];
}
});
module.exports = PotionSlowness;
var O2 = require('o2');
var CONST = require('../data/consts.js');
var Effect = require('../Effects.js');
var Scroll = require('./Abstract/Scroll.js');
/**
* Scroll of Magnet :
*/
var ScrollMagnet = O2.extendClass(Scroll, {
read: function(ctx) {
var eMagnet = new Effect.Magnet(2);
eMagnet.setDuration(CONST.EFFECT_DURATION_SHORT);
this.curse(eMagnet);
}
});
module.exports = ScrollMagnet;
__construct: function(nLevel) {
O2.parent(this, 'Luck', nLevel > 0 ? 'bless' : 'curse');
this.setLevel(nLevel);
},
__construct: function(nPower) {
O2.parent(this, 'Magnet', nPower <= 0 ? 'bless' : 'curse');
this.setLevel(nPower);
},
__construct: function(nPower) {
O2.parent(this, 'Power', nPower > 0 ? 'bless' : 'curse');
this.setLevel(nPower);
},
__construct: function(nLevel) {
O2.parent(this, 'Defense', nLevel > 0 ? 'bless' : 'curse');
this.setLevel(nLevel);
},
__construct: function(value) {
O2.parent(this, 'Cooldown', value > 0 ? 'curse' : 'bless');
this.setLevel(value);
},