Added Max Stats all

This commit is contained in:
rakion99 committed 2016-07-17 23:10:15 -05:00
1 parent ee139168e2
commit c0d3fb4f44
2 files changed
+10

No files matched your search

+3
View File
@@ -119,6 +119,9 @@
<div class="row box" ng-show="section == 'dwellers'">
<div class="dwellers list-group col-sm-4">
<div class="row save">
<button type="button" class="btn btn-primary pull-right" ng-click="maxSpecialAll()">Max Stats All</button>
</div>
<a ng-repeat="d in save.dwellers.dwellers" ng-click="editDweller(d);" ng-class="{ 'active': dweller == d }" class="list-group-item">{{ d.name }} {{ d.lastName }}</a>
</div>
+7
View File
@@ -228,6 +228,13 @@ app.controller('dwellerController', function ($scope) {
$scope.editDweller = function (dweller) {
$scope.dweller = dweller;
};
$scope.maxSpecialAll = function () {
var sum2 = Object.keys($scope.save.dwellers.dwellers).length;
for(i=0; i<sum2; i++)
for(i2=0; i2<8; i2++)
$scope.save.dwellers.dwellers[i].stats.stats[i2].value = 10;
};
$scope.maxSpecial = function () {
$scope.dweller.stats.stats[1].value = 10;