Removing Traits from Orcs with Brutal Life Traits results in incorrect recalculation #13

Open
opened 2 years ago by silverwizard · 0 comments
Owner
  var unspentTraitPoints = $scope.totalTraitPoints;

  var required = hashValues($scope.requiredTraits);
  unspentTraitPoints -= required.length;

  var purchased = hashValues($scope.purchasedTraits);
  for(var i = 0; i < purchased.length; i++){
    var trait = purchased[i];
    if ( trait.name in $scope.lifepathTraits ){
      unspentTraitPoints -= 1;
    } else {
      unspentTraitPoints -= trait.cost;
    }
  }
  $scope.unspentTraitPoints = unspentTraitPoints;

}```

This funciton call needs to not count brutal life traits
```function calculateUnspentTraitPoints($scope){ var unspentTraitPoints = $scope.totalTraitPoints; var required = hashValues($scope.requiredTraits); unspentTraitPoints -= required.length; var purchased = hashValues($scope.purchasedTraits); for(var i = 0; i < purchased.length; i++){ var trait = purchased[i]; if ( trait.name in $scope.lifepathTraits ){ unspentTraitPoints -= 1; } else { unspentTraitPoints -= trait.cost; } } $scope.unspentTraitPoints = unspentTraitPoints; }``` This funciton call needs to not count brutal life traits
silverwizard added the
bug
label 2 years ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: danwizard208/charred-gold#13
Loading…
There is no content yet.