Skip to content

Commit

Permalink
Updates for new Damage/Heal API
Browse files Browse the repository at this point in the history
  • Loading branch information
shawncplus committed Jan 10, 2019
1 parent 4da233b commit ad559b6
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions effects/regen.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@ module.exports = {
}

const poolMax = this.target.getMaxAttribute(regen.pool);
const heal = new Heal({
attribute: regen.pool,
amount: Math.round((poolMax / 10) * regen.modifier),
source: this,
const amount = Math.round((poolMax / 10) * regen.modifier);
const heal = new Heal(regen.pool, amount, this.target, this, {
hidden: true,
});
heal.commit(this.target);
Expand All @@ -44,10 +42,8 @@ module.exports = {
return;
}

const drain = new Damage({
attribute: 'favor',
amount: Math.ceil(this.target.getMaxAttribute('favor') / 10),
source: this,
const amount = Math.ceil(this.target.getMaxAttribute('favor') / 10);
const drain = new Damage('favor', amount, this.target, this, {
hidden: true
});
drain.commit(this.target);
Expand Down

0 comments on commit ad559b6

Please sign in to comment.