Use stride data from stock objects

pull/8/head
Daniel Asher Resnick 2 years ago
parent c7a3335bec
commit 19e2ba9657
  1. 1
      src/public/js/burning-service.js
  2. 14
      src/public/js/burning.js

@ -295,6 +295,7 @@ function BurningDataService($http) {
$http.get("/stock_objs", {'timeout': 3000}). $http.get("/stock_objs", {'timeout': 3000}).
success(function(data,status,headers,config){ success(function(data,status,headers,config){
console.log(data); console.log(data);
myself.stock_objs = data;
stocks = Object.keys(data); stocks = Object.keys(data);
for (var i = 0; i < stocks.length; i++) { for (var i = 0; i < stocks.length; i++) {
loadLifepathsForStock(stocks[i]); loadLifepathsForStock(stocks[i]);

@ -1024,20 +1024,8 @@ function BurningCtrl($scope, $http, $modal, $timeout, settings, appropriateWeapo
return {"shade" : "", "exp" : 10 - $scope.statsByName["Will"].exp() + bonus}; return {"shade" : "", "exp" : 10 - $scope.statsByName["Will"].exp() + bonus};
} }
else if ( "Stride" == name ){ else if ( "Stride" == name ){
var stride = 0; var stride = burningData.stock_objs[$scope.stock].stride;
if( $scope.stock == 'dwarf' )
stride = 6;
else if( $scope.stock == 'elf' )
stride = 8;
else if( $scope.stock == 'roden' )
stride = 8;
else if( $scope.stock == 'wolf' )
stride = 11;
else
stride = 7;
stride += bonus; stride += bonus;
return {"shade" : "", "exp" : stride}; return {"shade" : "", "exp" : stride};
} }
else if ( "Circles" == name ){ else if ( "Circles" == name ){

Loading…
Cancel
Save