Skip to content

Commit

Permalink
Now cash is divided by upgrades price
Browse files Browse the repository at this point in the history
Instead of subtracting the price of upgrades from the cash, it is
divided by it. This makes cash go down considerably when an upgrade is
bought.
  • Loading branch information
angarg12 committed Jan 11, 2015
1 parent edb0c6a commit 13a5b85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/exponential.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ angular.module('incremental',[])

$scope.buyMultiplierUpgrade = function(number) {
if ($scope.player.currency.comparedTo($scope.player.multiplierUpgradePrice[number]) >= 0) {
$scope.player.currency = $scope.player.currency.minus($scope.player.multiplierUpgradePrice[number]);
$scope.player.currency = $scope.player.currency.div($scope.player.multiplierUpgradePrice[number]);
$scope.player.multiplier = $scope.player.multiplier.plus($scope.multiplierUpgradePower[number]);
$scope.player.multiplierUpgradeLevel[number]++;
// The cost function is of the form 2^1.x^(upgradeLevel), where 1.x depends on the upgrade tier
Expand Down

0 comments on commit 13a5b85

Please sign in to comment.