private void incrementAbilityCap(int type) { if (player.abilityCaps[type] < maxAbilityCap[type]) { player.shards -= GetUpgradeCost(type); player.AddCredits(GetUpgradeCostCredits(type) * -1); player.abilityCaps[type]++; ShardCountScript.UpdateNumber(player.shards); } }