Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Attribute(name, index){
- this.name = name;
- this.basevalue = 10;
- this.bonus = 0;
- this.index = index;
- };
- Attribute.prototype = {
- getValue: function () { return this.basevalue + this.bonus; }
- getMod: function () { return parseInt((this.getValue() - 10)/2); }
- }
- <tr ng-repeat="attribute in character.attributes">
- <td>{{attribute.name | uppercase}}
- <td>{{attribute.getValue()}}
- <td>{{attribute.getMod()}}
- <td>{{attribute.basevalue}}
- <td><input type="number" ng-model="attribute.bonus">
- </tr>
Advertisement
Add Comment
Please, Sign In to add comment