Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Commit

Permalink
fix(rogue): monsters now actually fight back and can deal damage when…
Browse files Browse the repository at this point in the history
… they aren't skilled with their weapon
  • Loading branch information
seiyria committed Jan 29, 2016
1 parent b87f2ce commit e2debac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/rogue/definitions/character.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,15 @@ export default class Character extends Entity {
}

getSkillLevel(type) {
if(!this.skills[type]) return 0;
if(!this.skills[type]) return;
const curNum = this.skills[type].cur;
const level = _.reject(SkillThresholds, threshold => threshold.max < curNum)[0];
return level;
}

getSkillLevelValue(type) {
const level = this.getSkillLevel(type);
return Thresholds[level.name];
return level ? Thresholds[level.name] : 0;
}
// endregion

Expand Down

0 comments on commit e2debac

Please sign in to comment.