Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 

24 righe
552 B

  1. module.exports = {
  2. events: {
  3. onGetText: function (item) {
  4. let rolls = item.effects.find(e => (e.type === 'freezeOnHit')).rolls;
  5. return `${rolls.chance}% chance on hit to freeze target for ${rolls.duration} ticks`;
  6. },
  7. afterDealDamage: function (item, damage, target) {
  8. let rolls = item.effects.find(e => (e.type === 'freezeOnHit')).rolls;
  9. let chanceRoll = Math.random() * 100;
  10. if (chanceRoll >= rolls.chance)
  11. return;
  12. target.effects.addEffect({
  13. type: 'slowed',
  14. chance: 1,
  15. ttl: rolls.duration
  16. });
  17. }
  18. }
  19. };