From a02238ee31f0cb5ef7b1122f6cb3dac130932c32 Mon Sep 17 00:00:00 2001 From: Alex Arze Date: Wed, 6 Apr 2016 01:25:57 -0500 Subject: [PATCH 01/15] Dismiss Angel/Suit Exclamation Added dismissal of angel/suit exclamation on header for accordion when the accordion is opened --- js/main.js | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/js/main.js b/js/main.js index 1278816..c09ccd1 100644 --- a/js/main.js +++ b/js/main.js @@ -347,12 +347,24 @@ advApp.controller('advController', ['$document', '$filter', '$scope', function($ if (delta > 0) { loc.angelUpgrades[i][loc.angelUpgrades[i].length - 2] = percent; loc.angelExclamation = true; + loc.hasSeenAngelExclamation = false; } else { loc.angelUpgrades[i][loc.angelUpgrades[i].length - 2] = false; } } } }; + + $scope.$watch('accOpen[2]', function(newVal, oldVal, $scope){ + if (newVal) { + console.log("Angel Accordian Opened"); + } + + if (newVal && $scope.ref.angelExclamation && !$scope.ref.hasSeenAngelExclamation) { + $scope.ref.hasSeenAngelExclamation = true; + $scope.ref.angelExclamation = false; + } + }); function calcRecommendations(loc) { var i = 0, j = 0, k = 0, @@ -562,7 +574,9 @@ advApp.controller('advController', ['$document', '$filter', '$scope', function($ var percent = delta / loc.totalMoneyPerSecond; if (delta > 0) { loc.suits[i][1] = percent; - loc.suitExclamation = true; + if (!loc.hasSeenSuitExclamation) { + loc.suitExclamation = true; + } if (percent > max[1]) { max[0] = i; max[1] = percent; @@ -578,6 +592,18 @@ advApp.controller('advController', ['$document', '$filter', '$scope', function($ loc.bestSuit = null; } }; + + $scope.$watch('accOpen[4]', function(newVal, oldVal, $scope){ + if (newVal) { + console.log("Suit Accordian Opened"); + } + + if (newVal && $scope.ref.suitExclamation && !$scope.ref.hasSeenSuitExclamation) { + $scope.ref.hasSeenSuitExclamation = true; + $scope.ref.suitExclamation = false; + console.log("Suit Accordion Opened"); + } + }); function calcUpgradeScore(planet, loc, unlockCost) { var overflowPotential = planet.totalMoneyPerSecond * unlockCost, @@ -808,6 +834,7 @@ advApp.controller('advController', ['$document', '$filter', '$scope', function($ } loc.angelEffectiveness = 2; loc.angelExclamation = false; + loc.hasSeenAngelExclamation loc.bonusAngelEffectiveness = 0; loc.bonusMultiplier = 0; loc.flux = 0; @@ -825,6 +852,7 @@ advApp.controller('advController', ['$document', '$filter', '$scope', function($ loc.recTable = []; loc.recommendation = ''; loc.suitExclamation = false; + loc.hasSeenSuitExclamation = false; loc.totalMoneyPerSecond = 0; loc.triples = 0; loc.upgradeCosts = []; @@ -1036,6 +1064,7 @@ advApp.controller('advController', ['$document', '$filter', '$scope', function($ } loc.angelEffectiveness = 2; loc.angelExclamation = false; + loc.hasSeenAngelExclamation = false; loc.bonusAngelEffectiveness = 0; loc.bonusMultiplier = 0; for (i = 0; i < loc.investments.length; i++) { @@ -1183,6 +1212,8 @@ advApp.controller('advController', ['$document', '$filter', '$scope', function($ $scope.earth.baseProfit = [1, 60, 540, 4320, 51840, 622080, 7464960, 89579520, 1074954240, 29668737024]; $scope.earth.baseSpeed = [0.6, 3, 6, 12, 24, 96, 384, 1536, 6144, 36864]; $scope.earth.hasMegaTickets = true; + $scope.earth.hasSeenAngelExclamation = false; + $scope.earth.hasSeenSuitExclamation = false; $scope.earth.investments = [ ['Lemon', 1, false, 0, 0, 0, 0], ['Newspaper', 0, false, 0, 0, 0, 0], @@ -1201,6 +1232,8 @@ advApp.controller('advController', ['$document', '$filter', '$scope', function($ $scope.moon.baseProfit = [1, 21, 2001, 376, 98820, 1976400, 32940000, 1152900000, 11067840000, 332035000000]; $scope.moon.baseSpeed = [2, 7, 28, 2, 45, 180, 600, 3000, 14400, 86400]; $scope.moon.hasMegaTickets = true; + $scope.moon.hasSeenAngelExclamation = false; + $scope.moon.hasSeenSuitExclamation = false; $scope.moon.investments = [ ['Moon Shoe', 1, false, 0, 0, 0, 0], ['Gravity Booth', 0, false, 0, 0, 0, 0], @@ -1219,6 +1252,8 @@ advApp.controller('advController', ['$document', '$filter', '$scope', function($ $scope.mars.baseProfit = [0.011, 1, 4321, 4007310, 518783295, 500634321, 7543177325, 69263532485, 99760273916482500]; $scope.mars.baseSpeed = [0.5, 3, 9, 32, 64, 4, 18, 42, 43200]; $scope.mars.hasMegaTickets = true; + $scope.mars.hasSeenAngelExclamation = false; + $scope.mars.hasSeenSuitExclamation = false; $scope.mars.investments = [ ['Red Dirt', 1, false, 0, 0, 0, 0], ['Marsies', 0, false, 0, 0, 0, 0], From 22ba6db71405d253a3916b5bc278e61f0bf43e07 Mon Sep 17 00:00:00 2001 From: jaysoncopes Date: Wed, 6 Apr 2016 12:34:19 -0500 Subject: [PATCH 02/15] Removed debug info --- js/main.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/js/main.js b/js/main.js index 3ebd24f..1d58c4a 100644 --- a/js/main.js +++ b/js/main.js @@ -356,10 +356,6 @@ advApp.controller('advController', ['$document', '$filter', '$scope', function($ }; $scope.$watch('accOpen[2]', function(newVal, oldVal, $scope){ - if (newVal) { - console.log("Angel Accordian Opened"); - } - if (newVal && $scope.ref.angelExclamation && !$scope.ref.hasSeenAngelExclamation) { $scope.ref.hasSeenAngelExclamation = true; $scope.ref.angelExclamation = false; @@ -594,10 +590,6 @@ advApp.controller('advController', ['$document', '$filter', '$scope', function($ }; $scope.$watch('accOpen[4]', function(newVal, oldVal, $scope){ - if (newVal) { - console.log("Suit Accordian Opened"); - } - if (newVal && $scope.ref.suitExclamation && !$scope.ref.hasSeenSuitExclamation) { $scope.ref.hasSeenSuitExclamation = true; $scope.ref.suitExclamation = false; From 86024d8df85b98b50325fa64c3c138b5b58a8aa1 Mon Sep 17 00:00:00 2001 From: jaysoncopes Date: Wed, 13 Apr 2016 22:34:07 -0500 Subject: [PATCH 03/15] Replace master branch with page content via GitHub --- index.html | 379 +++++------------------------------ javascripts/scale.fix.js | 17 ++ params.json | 6 + stylesheets/github-light.css | 124 ++++++++++++ stylesheets/styles.css | 324 ++++++++++++++++++++++++++++++ 5 files changed, 524 insertions(+), 326 deletions(-) create mode 100644 javascripts/scale.fix.js create mode 100644 params.json create mode 100644 stylesheets/github-light.css create mode 100644 stylesheets/styles.css diff --git a/index.html b/index.html index f2a5d19..3360e4a 100644 --- a/index.html +++ b/index.html @@ -1,331 +1,58 @@ - - + + - - - - - - - - - - AdVenture Capitalist Calculator - + + + Jaysoncopes.GitHub.io by jaysoncopes + + + + + - -
- -
- Load a saved state: -
-
- - Update! The Root of All Evil event Calculations are here! - - -
-
- # Angels - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - -
TypeNumber$ / CycleCycle Time$ / Second% of total $ / Second
{{inv[0]}}${{inv[3] | num:raw}}{{inv[4] | time:raw}}${{inv[5] | num:raw}}{{inv[6] | num:raw}}%
-
-
- - - - Cost of Upgrades - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Type$ Cost +1Time Cost +1$ Cost +10Time Cost +10$ Cost +bonusTime Cost +bonus$ Cost +all bonusTime Cost +all bonus
{{ref.investments[$index][0]}}${{rUC[0] | num:raw}}{{rUC[1] | time:raw}}${{rUC[2] | num:raw}}{{rUC[3] | time:raw}}${{rUC[4] | num:raw}}{{rUC[5] | time:raw}}${{rUC[6] | num:raw}}{{rUC[7] | time:raw}}
-
- - - Cash Upgrades - -
- - -
-
-
-
-
- - - Angel Upgrades - -
- - -
-
-
-
-
- - - Managers - - - - - - - - - - - - - - - - -
Business
{{ref.investments[$index][0]}} - -
-
- - - Gold Upgrades + Suits - -
- - -
-
-
- -
-
-
- - - Other Bonuses - -

Please only input the bonus you have.
- For example, if you have a 30% Angel Investor increase from a Christmas event, so now your base Angel Investor bonus is 32%, but with upgrades it could easily be above 40%, please only input 30 or the calculations will be off. -

- - - -
-
-
-

Total $ / second : {{ref.totalMoneyPerSecond | number}} ({{ref.totalMoneyPerSecond | num}})

-

Total $ / minute : {{ref.totalMoneyPerSecond * 60 | number}} ({{ref.totalMoneyPerSecond * 60 | num}})

-

Total $ / hour : {{ref.totalMoneyPerSecond * 3600 | number}} ({{ref.totalMoneyPerSecond * 3600 | num}})

- - - - Angel Calculations - - All of values in the tables will include sacrificed angels in calculating the number required to increase by x%. The only exception is Doubled w/o Sacrificed which should match your in game numbers exactly and does not include sacrificed angels. -

- Lifetime Earnings -
- # Angels Sacrificed -
- - - - - - - - - - - - - - - - - - - - - -
Number of AngelsLifetime CostLifetime DifferenceDifference Time Cost
{{aUC[0]}} x{{aUC[1] | num:raw}} AI${{aUC[2] | num:raw}}${{aUC[3] | num:raw}}{{aUC[4] | time:raw}}
-
- - - Filter recommendations - - - -
-
-
- Don't show upgrades that take longer than (Days : Hours : Minutes) -
- - - - - - - - - - - - - - - - - - - - - - -
  
- - : - - : - -
  
-
- Don't show upgrades that have % Increase in $ / Second less than X -
- - - - - - - - - - -
- -
-
-
- -
-

Recommendation: {{ref.recommendation}}

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
UpgradeToUpgrade Score (higher = better)* - - - Cost of Upgrade - - - Cost of Upgrade in Time - - - Increase in $ / Second - - - % Increase in $ / Second - - - Apply
{{rec[0] | rec:ref}}{{rec[1] | num:raw}}{{rec[2] | num:raw}}${{rec[3] | num:raw}}{{rec[4] | time:raw}}${{rec[5] | num:raw}}{{rec[6] | num:raw}}%
-
-

* Upgrade Score is calculated by minimizing time to buy any pair of upgrades. If your goal is to buy two upgrades, then the upgrade with a higher score should be bought first.

-
-
-

Found an error? Want to request a feature? You can do so on Reddit or Github.

+ +
+
+

Jaysoncopes.GitHub.io

+

AdVenture Capitalist calculator

+ + +

View My GitHub Profile

+ +
+
+

+Welcome to GitHub Pages.

+ +

This automatic page generator is the easiest way to create beautiful pages for all of your projects. Author your page content here using GitHub Flavored Markdown, select a template crafted by a designer, and publish. After your page is generated, you can check out the new gh-pages branch locally. If you’re using GitHub Desktop, simply sync your repository and you’ll see the new branch.

+ +

+Designer Templates

+ +

We’ve crafted some handsome templates for you to use. Go ahead and click 'Continue to layouts' to browse through them. You can easily go back to edit your page before publishing. After publishing your page, you can revisit the page generator and switch to another theme. Your Page content will be preserved.

+ +

+Creating pages manually

+ +

If you prefer to not use the automatic generator, push a branch named gh-pages to your repository to create a page manually. In addition to supporting regular HTML content, GitHub Pages support Jekyll, a simple, blog aware static site generator. Jekyll makes it easy to create site-wide headers and footers without having to copy them across every page. It also offers intelligent blog support and other advanced templating features.

+ +

+Authors and Contributors

+ +

You can @mention a GitHub username to generate a link to their profile. The resulting <a> element will link to the contributor’s GitHub Profile. For example: In 2007, Chris Wanstrath (@defunkt), PJ Hyett (@pjhyett), and Tom Preston-Werner (@mojombo) founded GitHub.

+ +

+Support or Contact

+ +

Having trouble with Pages? Check out our documentation or contact support and we’ll help you sort it out.

+
+
+ + diff --git a/javascripts/scale.fix.js b/javascripts/scale.fix.js new file mode 100644 index 0000000..87a40ca --- /dev/null +++ b/javascripts/scale.fix.js @@ -0,0 +1,17 @@ +var metas = document.getElementsByTagName('meta'); +var i; +if (navigator.userAgent.match(/iPhone/i)) { + for (i=0; i` element will link to the contributor’s GitHub Profile. For example: In 2007, Chris Wanstrath (@defunkt), PJ Hyett (@pjhyett), and Tom Preston-Werner (@mojombo) founded GitHub.\r\n\r\n### Support or Contact\r\nHaving trouble with Pages? Check out our [documentation](https://help.github.com/pages) or [contact support](https://github.com/contact) and we’ll help you sort it out.\r\n", + "note": "Don't delete this file! It's used internally to help with page regeneration." +} \ No newline at end of file diff --git a/stylesheets/github-light.css b/stylesheets/github-light.css new file mode 100644 index 0000000..d64ba5d --- /dev/null +++ b/stylesheets/github-light.css @@ -0,0 +1,124 @@ +/* +The MIT License (MIT) + +Copyright (c) 2015 GitHub, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +*/ + +.pl-c /* comment */ { + color: #969896; +} + +.pl-c1 /* constant, markup.raw, meta.diff.header, meta.module-reference, meta.property-name, support, support.constant, support.variable, variable.other.constant */, +.pl-s .pl-v /* string variable */ { + color: #0086b3; +} + +.pl-e /* entity */, +.pl-en /* entity.name */ { + color: #795da3; +} + +.pl-s .pl-s1 /* string source */, +.pl-smi /* storage.modifier.import, storage.modifier.package, storage.type.java, variable.other, variable.parameter.function */ { + color: #333; +} + +.pl-ent /* entity.name.tag */ { + color: #63a35c; +} + +.pl-k /* keyword, storage, storage.type */ { + color: #a71d5d; +} + +.pl-pds /* punctuation.definition.string, string.regexp.character-class */, +.pl-s /* string */, +.pl-s .pl-pse .pl-s1 /* string punctuation.section.embedded source */, +.pl-sr /* string.regexp */, +.pl-sr .pl-cce /* string.regexp constant.character.escape */, +.pl-sr .pl-sra /* string.regexp string.regexp.arbitrary-repitition */, +.pl-sr .pl-sre /* string.regexp source.ruby.embedded */ { + color: #183691; +} + +.pl-v /* variable */ { + color: #ed6a43; +} + +.pl-id /* invalid.deprecated */ { + color: #b52a1d; +} + +.pl-ii /* invalid.illegal */ { + background-color: #b52a1d; + color: #f8f8f8; +} + +.pl-sr .pl-cce /* string.regexp constant.character.escape */ { + color: #63a35c; + font-weight: bold; +} + +.pl-ml /* markup.list */ { + color: #693a17; +} + +.pl-mh /* markup.heading */, +.pl-mh .pl-en /* markup.heading entity.name */, +.pl-ms /* meta.separator */ { + color: #1d3e81; + font-weight: bold; +} + +.pl-mq /* markup.quote */ { + color: #008080; +} + +.pl-mi /* markup.italic */ { + color: #333; + font-style: italic; +} + +.pl-mb /* markup.bold */ { + color: #333; + font-weight: bold; +} + +.pl-md /* markup.deleted, meta.diff.header.from-file */ { + background-color: #ffecec; + color: #bd2c00; +} + +.pl-mi1 /* markup.inserted, meta.diff.header.to-file */ { + background-color: #eaffea; + color: #55a532; +} + +.pl-mdr /* meta.diff.range */ { + color: #795da3; + font-weight: bold; +} + +.pl-mo /* meta.output */ { + color: #1d3e81; +} + diff --git a/stylesheets/styles.css b/stylesheets/styles.css new file mode 100644 index 0000000..2e1768e --- /dev/null +++ b/stylesheets/styles.css @@ -0,0 +1,324 @@ +@font-face { + font-family: 'Noto Sans'; + font-weight: 400; + font-style: normal; + src: url('../fonts/Noto-Sans-regular/Noto-Sans-regular.eot'); + src: url('../fonts/Noto-Sans-regular/Noto-Sans-regular.eot?#iefix') format('embedded-opentype'), + local('Noto Sans'), + local('Noto-Sans-regular'), + url('../fonts/Noto-Sans-regular/Noto-Sans-regular.woff2') format('woff2'), + url('../fonts/Noto-Sans-regular/Noto-Sans-regular.woff') format('woff'), + url('../fonts/Noto-Sans-regular/Noto-Sans-regular.ttf') format('truetype'), + url('../fonts/Noto-Sans-regular/Noto-Sans-regular.svg#NotoSans') format('svg'); +} + +@font-face { + font-family: 'Noto Sans'; + font-weight: 700; + font-style: normal; + src: url('../fonts/Noto-Sans-700/Noto-Sans-700.eot'); + src: url('../fonts/Noto-Sans-700/Noto-Sans-700.eot?#iefix') format('embedded-opentype'), + local('Noto Sans Bold'), + local('Noto-Sans-700'), + url('../fonts/Noto-Sans-700/Noto-Sans-700.woff2') format('woff2'), + url('../fonts/Noto-Sans-700/Noto-Sans-700.woff') format('woff'), + url('../fonts/Noto-Sans-700/Noto-Sans-700.ttf') format('truetype'), + url('../fonts/Noto-Sans-700/Noto-Sans-700.svg#NotoSans') format('svg'); +} + +@font-face { + font-family: 'Noto Sans'; + font-weight: 400; + font-style: italic; + src: url('../fonts/Noto-Sans-italic/Noto-Sans-italic.eot'); + src: url('../fonts/Noto-Sans-italic/Noto-Sans-italic.eot?#iefix') format('embedded-opentype'), + local('Noto Sans Italic'), + local('Noto-Sans-italic'), + url('../fonts/Noto-Sans-italic/Noto-Sans-italic.woff2') format('woff2'), + url('../fonts/Noto-Sans-italic/Noto-Sans-italic.woff') format('woff'), + url('../fonts/Noto-Sans-italic/Noto-Sans-italic.ttf') format('truetype'), + url('../fonts/Noto-Sans-italic/Noto-Sans-italic.svg#NotoSans') format('svg'); +} + +@font-face { + font-family: 'Noto Sans'; + font-weight: 700; + font-style: italic; + src: url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.eot'); + src: url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.eot?#iefix') format('embedded-opentype'), + local('Noto Sans Bold Italic'), + local('Noto-Sans-700italic'), + url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.woff2') format('woff2'), + url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.woff') format('woff'), + url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.ttf') format('truetype'), + url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.svg#NotoSans') format('svg'); +} + +body { + background-color: #fff; + padding:50px; + font: 14px/1.5 "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; + color:#727272; + font-weight:400; +} + +h1, h2, h3, h4, h5, h6 { + color:#222; + margin:0 0 20px; +} + +p, ul, ol, table, pre, dl { + margin:0 0 20px; +} + +h1, h2, h3 { + line-height:1.1; +} + +h1 { + font-size:28px; +} + +h2 { + color:#393939; +} + +h3, h4, h5, h6 { + color:#494949; +} + +a { + color:#39c; + text-decoration:none; +} + +a:hover { + color:#069; +} + +a small { + font-size:11px; + color:#777; + margin-top:-0.3em; + display:block; +} + +a:hover small { + color:#777; +} + +.wrapper { + width:860px; + margin:0 auto; +} + +blockquote { + border-left:1px solid #e5e5e5; + margin:0; + padding:0 0 0 20px; + font-style:italic; +} + +code, pre { + font-family:Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal, Consolas, Liberation Mono, DejaVu Sans Mono, Courier New, monospace; + color:#333; + font-size:12px; +} + +pre { + padding:8px 15px; + background: #f8f8f8; + border-radius:5px; + border:1px solid #e5e5e5; + overflow-x: auto; +} + +table { + width:100%; + border-collapse:collapse; +} + +th, td { + text-align:left; + padding:5px 10px; + border-bottom:1px solid #e5e5e5; +} + +dt { + color:#444; + font-weight:700; +} + +th { + color:#444; +} + +img { + max-width:100%; +} + +header { + width:270px; + float:left; + position:fixed; + -webkit-font-smoothing:subpixel-antialiased; +} + +header ul { + list-style:none; + height:40px; + padding:0; + background: #f4f4f4; + border-radius:5px; + border:1px solid #e0e0e0; + width:270px; +} + +header li { + width:89px; + float:left; + border-right:1px solid #e0e0e0; + height:40px; +} + +header li:first-child a { + border-radius:5px 0 0 5px; +} + +header li:last-child a { + border-radius:0 5px 5px 0; +} + +header ul a { + line-height:1; + font-size:11px; + color:#999; + display:block; + text-align:center; + padding-top:6px; + height:34px; +} + +header ul a:hover { + color:#999; +} + +header ul a:active { + background-color:#f0f0f0; +} + +strong { + color:#222; + font-weight:700; +} + +header ul li + li + li { + border-right:none; + width:89px; +} + +header ul a strong { + font-size:14px; + display:block; + color:#222; +} + +section { + width:500px; + float:right; + padding-bottom:50px; +} + +small { + font-size:11px; +} + +hr { + border:0; + background:#e5e5e5; + height:1px; + margin:0 0 20px; +} + +footer { + width:270px; + float:left; + position:fixed; + bottom:50px; + -webkit-font-smoothing:subpixel-antialiased; +} + +@media print, screen and (max-width: 960px) { + + div.wrapper { + width:auto; + margin:0; + } + + header, section, footer { + float:none; + position:static; + width:auto; + } + + header { + padding-right:320px; + } + + section { + border:1px solid #e5e5e5; + border-width:1px 0; + padding:20px 0; + margin:0 0 20px; + } + + header a small { + display:inline; + } + + header ul { + position:absolute; + right:50px; + top:52px; + } +} + +@media print, screen and (max-width: 720px) { + body { + word-wrap:break-word; + } + + header { + padding:0; + } + + header ul, header p.view { + position:static; + } + + pre, code { + word-wrap:normal; + } +} + +@media print, screen and (max-width: 480px) { + body { + padding:15px; + } + + header ul { + width:99%; + } + + header li, header ul li + li + li { + width:33%; + } +} + +@media print { + body { + padding:0.4in; + font-size:12pt; + color:#444; + } +} From edd8717a66504b1ac316d5cbadd1579c85eb9c76 Mon Sep 17 00:00:00 2001 From: jaysoncopes Date: Wed, 13 Apr 2016 22:40:34 -0500 Subject: [PATCH 04/15] Time Machine Reverting unwanted push --- index.html | 379 +++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 326 insertions(+), 53 deletions(-) diff --git a/index.html b/index.html index 3360e4a..f2a5d19 100644 --- a/index.html +++ b/index.html @@ -1,58 +1,331 @@ - - + + - - - Jaysoncopes.GitHub.io by jaysoncopes - - - - - + + + + + + + + + + AdVenture Capitalist Calculator + - -
-
-

Jaysoncopes.GitHub.io

-

AdVenture Capitalist calculator

- - -

View My GitHub Profile

- -
-
-

-Welcome to GitHub Pages.

- -

This automatic page generator is the easiest way to create beautiful pages for all of your projects. Author your page content here using GitHub Flavored Markdown, select a template crafted by a designer, and publish. After your page is generated, you can check out the new gh-pages branch locally. If you’re using GitHub Desktop, simply sync your repository and you’ll see the new branch.

- -

-Designer Templates

- -

We’ve crafted some handsome templates for you to use. Go ahead and click 'Continue to layouts' to browse through them. You can easily go back to edit your page before publishing. After publishing your page, you can revisit the page generator and switch to another theme. Your Page content will be preserved.

- -

-Creating pages manually

- -

If you prefer to not use the automatic generator, push a branch named gh-pages to your repository to create a page manually. In addition to supporting regular HTML content, GitHub Pages support Jekyll, a simple, blog aware static site generator. Jekyll makes it easy to create site-wide headers and footers without having to copy them across every page. It also offers intelligent blog support and other advanced templating features.

- -

-Authors and Contributors

- -

You can @mention a GitHub username to generate a link to their profile. The resulting <a> element will link to the contributor’s GitHub Profile. For example: In 2007, Chris Wanstrath (@defunkt), PJ Hyett (@pjhyett), and Tom Preston-Werner (@mojombo) founded GitHub.

- -

-Support or Contact

- -

Having trouble with Pages? Check out our documentation or contact support and we’ll help you sort it out.

-
- + +
+ +
+ Load a saved state: +
+
+ + Update! The Root of All Evil event Calculations are here! + + +
+
+ # Angels + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + +
TypeNumber$ / CycleCycle Time$ / Second% of total $ / Second
{{inv[0]}}${{inv[3] | num:raw}}{{inv[4] | time:raw}}${{inv[5] | num:raw}}{{inv[6] | num:raw}}%
+
+
+ + + + Cost of Upgrades + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Type$ Cost +1Time Cost +1$ Cost +10Time Cost +10$ Cost +bonusTime Cost +bonus$ Cost +all bonusTime Cost +all bonus
{{ref.investments[$index][0]}}${{rUC[0] | num:raw}}{{rUC[1] | time:raw}}${{rUC[2] | num:raw}}{{rUC[3] | time:raw}}${{rUC[4] | num:raw}}{{rUC[5] | time:raw}}${{rUC[6] | num:raw}}{{rUC[7] | time:raw}}
+
+ + + Cash Upgrades + +
+ + +
+
+
+
+
+ + + Angel Upgrades + +
+ + +
+
+
+
+
+ + + Managers + + + + + + + + + + + + + + + + +
Business
{{ref.investments[$index][0]}} + +
+
+ + + Gold Upgrades + Suits + +
+ + +
+
+
+ +
+
+
+ + + Other Bonuses + +

Please only input the bonus you have.
+ For example, if you have a 30% Angel Investor increase from a Christmas event, so now your base Angel Investor bonus is 32%, but with upgrades it could easily be above 40%, please only input 30 or the calculations will be off. +

+ + + +
+
+
+

Total $ / second : {{ref.totalMoneyPerSecond | number}} ({{ref.totalMoneyPerSecond | num}})

+

Total $ / minute : {{ref.totalMoneyPerSecond * 60 | number}} ({{ref.totalMoneyPerSecond * 60 | num}})

+

Total $ / hour : {{ref.totalMoneyPerSecond * 3600 | number}} ({{ref.totalMoneyPerSecond * 3600 | num}})

+ + + + Angel Calculations + + All of values in the tables will include sacrificed angels in calculating the number required to increase by x%. The only exception is Doubled w/o Sacrificed which should match your in game numbers exactly and does not include sacrificed angels. +

+ Lifetime Earnings +
+ # Angels Sacrificed +
+ + + + + + + + + + + + + + + + + + + + + +
Number of AngelsLifetime CostLifetime DifferenceDifference Time Cost
{{aUC[0]}} x{{aUC[1] | num:raw}} AI${{aUC[2] | num:raw}}${{aUC[3] | num:raw}}{{aUC[4] | time:raw}}
+
+ + + Filter recommendations + + + +
+
+
+ Don't show upgrades that take longer than (Days : Hours : Minutes) +
+ + + + + + + + + + + + + + + + + + + + + + +
  
+ + : + + : + +
  
+
+ Don't show upgrades that have % Increase in $ / Second less than X +
+ + + + + + + + + + +
+ +
+
+
+ +
+

Recommendation: {{ref.recommendation}}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
UpgradeToUpgrade Score (higher = better)* + + + Cost of Upgrade + + + Cost of Upgrade in Time + + + Increase in $ / Second + + + % Increase in $ / Second + + + Apply
{{rec[0] | rec:ref}}{{rec[1] | num:raw}}{{rec[2] | num:raw}}${{rec[3] | num:raw}}{{rec[4] | time:raw}}${{rec[5] | num:raw}}{{rec[6] | num:raw}}%
+
+

* Upgrade Score is calculated by minimizing time to buy any pair of upgrades. If your goal is to buy two upgrades, then the upgrade with a higher score should be bought first.

+
+
+

Found an error? Want to request a feature? You can do so on Reddit or Github.

- - From 3b54e92b5bf50eec4f5e204c932c855caa5211ec Mon Sep 17 00:00:00 2001 From: jaysoncopes Date: Wed, 13 Apr 2016 22:41:01 -0500 Subject: [PATCH 05/15] Delete params.json --- params.json | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 params.json diff --git a/params.json b/params.json deleted file mode 100644 index 72ccedd..0000000 --- a/params.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Jaysoncopes.GitHub.io", - "tagline": "AdVenture Capitalist calculator", - "body": "### Welcome to GitHub Pages.\r\nThis automatic page generator is the easiest way to create beautiful pages for all of your projects. Author your page content here [using GitHub Flavored Markdown](https://guides.github.com/features/mastering-markdown/), select a template crafted by a designer, and publish. After your page is generated, you can check out the new `gh-pages` branch locally. If you’re using GitHub Desktop, simply sync your repository and you’ll see the new branch.\r\n\r\n### Designer Templates\r\nWe’ve crafted some handsome templates for you to use. Go ahead and click 'Continue to layouts' to browse through them. You can easily go back to edit your page before publishing. After publishing your page, you can revisit the page generator and switch to another theme. Your Page content will be preserved.\r\n\r\n### Creating pages manually\r\nIf you prefer to not use the automatic generator, push a branch named `gh-pages` to your repository to create a page manually. In addition to supporting regular HTML content, GitHub Pages support Jekyll, a simple, blog aware static site generator. Jekyll makes it easy to create site-wide headers and footers without having to copy them across every page. It also offers intelligent blog support and other advanced templating features.\r\n\r\n### Authors and Contributors\r\nYou can @mention a GitHub username to generate a link to their profile. The resulting `` element will link to the contributor’s GitHub Profile. For example: In 2007, Chris Wanstrath (@defunkt), PJ Hyett (@pjhyett), and Tom Preston-Werner (@mojombo) founded GitHub.\r\n\r\n### Support or Contact\r\nHaving trouble with Pages? Check out our [documentation](https://help.github.com/pages) or [contact support](https://github.com/contact) and we’ll help you sort it out.\r\n", - "note": "Don't delete this file! It's used internally to help with page regeneration." -} \ No newline at end of file From c67bd5895eba06ae367ba27892f06a4679935dfb Mon Sep 17 00:00:00 2001 From: jaysoncopes Date: Wed, 13 Apr 2016 22:41:36 -0500 Subject: [PATCH 06/15] Delete styles.css --- stylesheets/styles.css | 324 ----------------------------------------- 1 file changed, 324 deletions(-) delete mode 100644 stylesheets/styles.css diff --git a/stylesheets/styles.css b/stylesheets/styles.css deleted file mode 100644 index 2e1768e..0000000 --- a/stylesheets/styles.css +++ /dev/null @@ -1,324 +0,0 @@ -@font-face { - font-family: 'Noto Sans'; - font-weight: 400; - font-style: normal; - src: url('../fonts/Noto-Sans-regular/Noto-Sans-regular.eot'); - src: url('../fonts/Noto-Sans-regular/Noto-Sans-regular.eot?#iefix') format('embedded-opentype'), - local('Noto Sans'), - local('Noto-Sans-regular'), - url('../fonts/Noto-Sans-regular/Noto-Sans-regular.woff2') format('woff2'), - url('../fonts/Noto-Sans-regular/Noto-Sans-regular.woff') format('woff'), - url('../fonts/Noto-Sans-regular/Noto-Sans-regular.ttf') format('truetype'), - url('../fonts/Noto-Sans-regular/Noto-Sans-regular.svg#NotoSans') format('svg'); -} - -@font-face { - font-family: 'Noto Sans'; - font-weight: 700; - font-style: normal; - src: url('../fonts/Noto-Sans-700/Noto-Sans-700.eot'); - src: url('../fonts/Noto-Sans-700/Noto-Sans-700.eot?#iefix') format('embedded-opentype'), - local('Noto Sans Bold'), - local('Noto-Sans-700'), - url('../fonts/Noto-Sans-700/Noto-Sans-700.woff2') format('woff2'), - url('../fonts/Noto-Sans-700/Noto-Sans-700.woff') format('woff'), - url('../fonts/Noto-Sans-700/Noto-Sans-700.ttf') format('truetype'), - url('../fonts/Noto-Sans-700/Noto-Sans-700.svg#NotoSans') format('svg'); -} - -@font-face { - font-family: 'Noto Sans'; - font-weight: 400; - font-style: italic; - src: url('../fonts/Noto-Sans-italic/Noto-Sans-italic.eot'); - src: url('../fonts/Noto-Sans-italic/Noto-Sans-italic.eot?#iefix') format('embedded-opentype'), - local('Noto Sans Italic'), - local('Noto-Sans-italic'), - url('../fonts/Noto-Sans-italic/Noto-Sans-italic.woff2') format('woff2'), - url('../fonts/Noto-Sans-italic/Noto-Sans-italic.woff') format('woff'), - url('../fonts/Noto-Sans-italic/Noto-Sans-italic.ttf') format('truetype'), - url('../fonts/Noto-Sans-italic/Noto-Sans-italic.svg#NotoSans') format('svg'); -} - -@font-face { - font-family: 'Noto Sans'; - font-weight: 700; - font-style: italic; - src: url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.eot'); - src: url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.eot?#iefix') format('embedded-opentype'), - local('Noto Sans Bold Italic'), - local('Noto-Sans-700italic'), - url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.woff2') format('woff2'), - url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.woff') format('woff'), - url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.ttf') format('truetype'), - url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.svg#NotoSans') format('svg'); -} - -body { - background-color: #fff; - padding:50px; - font: 14px/1.5 "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; - color:#727272; - font-weight:400; -} - -h1, h2, h3, h4, h5, h6 { - color:#222; - margin:0 0 20px; -} - -p, ul, ol, table, pre, dl { - margin:0 0 20px; -} - -h1, h2, h3 { - line-height:1.1; -} - -h1 { - font-size:28px; -} - -h2 { - color:#393939; -} - -h3, h4, h5, h6 { - color:#494949; -} - -a { - color:#39c; - text-decoration:none; -} - -a:hover { - color:#069; -} - -a small { - font-size:11px; - color:#777; - margin-top:-0.3em; - display:block; -} - -a:hover small { - color:#777; -} - -.wrapper { - width:860px; - margin:0 auto; -} - -blockquote { - border-left:1px solid #e5e5e5; - margin:0; - padding:0 0 0 20px; - font-style:italic; -} - -code, pre { - font-family:Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal, Consolas, Liberation Mono, DejaVu Sans Mono, Courier New, monospace; - color:#333; - font-size:12px; -} - -pre { - padding:8px 15px; - background: #f8f8f8; - border-radius:5px; - border:1px solid #e5e5e5; - overflow-x: auto; -} - -table { - width:100%; - border-collapse:collapse; -} - -th, td { - text-align:left; - padding:5px 10px; - border-bottom:1px solid #e5e5e5; -} - -dt { - color:#444; - font-weight:700; -} - -th { - color:#444; -} - -img { - max-width:100%; -} - -header { - width:270px; - float:left; - position:fixed; - -webkit-font-smoothing:subpixel-antialiased; -} - -header ul { - list-style:none; - height:40px; - padding:0; - background: #f4f4f4; - border-radius:5px; - border:1px solid #e0e0e0; - width:270px; -} - -header li { - width:89px; - float:left; - border-right:1px solid #e0e0e0; - height:40px; -} - -header li:first-child a { - border-radius:5px 0 0 5px; -} - -header li:last-child a { - border-radius:0 5px 5px 0; -} - -header ul a { - line-height:1; - font-size:11px; - color:#999; - display:block; - text-align:center; - padding-top:6px; - height:34px; -} - -header ul a:hover { - color:#999; -} - -header ul a:active { - background-color:#f0f0f0; -} - -strong { - color:#222; - font-weight:700; -} - -header ul li + li + li { - border-right:none; - width:89px; -} - -header ul a strong { - font-size:14px; - display:block; - color:#222; -} - -section { - width:500px; - float:right; - padding-bottom:50px; -} - -small { - font-size:11px; -} - -hr { - border:0; - background:#e5e5e5; - height:1px; - margin:0 0 20px; -} - -footer { - width:270px; - float:left; - position:fixed; - bottom:50px; - -webkit-font-smoothing:subpixel-antialiased; -} - -@media print, screen and (max-width: 960px) { - - div.wrapper { - width:auto; - margin:0; - } - - header, section, footer { - float:none; - position:static; - width:auto; - } - - header { - padding-right:320px; - } - - section { - border:1px solid #e5e5e5; - border-width:1px 0; - padding:20px 0; - margin:0 0 20px; - } - - header a small { - display:inline; - } - - header ul { - position:absolute; - right:50px; - top:52px; - } -} - -@media print, screen and (max-width: 720px) { - body { - word-wrap:break-word; - } - - header { - padding:0; - } - - header ul, header p.view { - position:static; - } - - pre, code { - word-wrap:normal; - } -} - -@media print, screen and (max-width: 480px) { - body { - padding:15px; - } - - header ul { - width:99%; - } - - header li, header ul li + li + li { - width:33%; - } -} - -@media print { - body { - padding:0.4in; - font-size:12pt; - color:#444; - } -} From 542b6408440aeffd8cccb4342646f5d516e54708 Mon Sep 17 00:00:00 2001 From: jaysoncopes Date: Wed, 13 Apr 2016 22:41:51 -0500 Subject: [PATCH 07/15] Delete github-light.css --- stylesheets/github-light.css | 124 ----------------------------------- 1 file changed, 124 deletions(-) delete mode 100644 stylesheets/github-light.css diff --git a/stylesheets/github-light.css b/stylesheets/github-light.css deleted file mode 100644 index d64ba5d..0000000 --- a/stylesheets/github-light.css +++ /dev/null @@ -1,124 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2015 GitHub, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -*/ - -.pl-c /* comment */ { - color: #969896; -} - -.pl-c1 /* constant, markup.raw, meta.diff.header, meta.module-reference, meta.property-name, support, support.constant, support.variable, variable.other.constant */, -.pl-s .pl-v /* string variable */ { - color: #0086b3; -} - -.pl-e /* entity */, -.pl-en /* entity.name */ { - color: #795da3; -} - -.pl-s .pl-s1 /* string source */, -.pl-smi /* storage.modifier.import, storage.modifier.package, storage.type.java, variable.other, variable.parameter.function */ { - color: #333; -} - -.pl-ent /* entity.name.tag */ { - color: #63a35c; -} - -.pl-k /* keyword, storage, storage.type */ { - color: #a71d5d; -} - -.pl-pds /* punctuation.definition.string, string.regexp.character-class */, -.pl-s /* string */, -.pl-s .pl-pse .pl-s1 /* string punctuation.section.embedded source */, -.pl-sr /* string.regexp */, -.pl-sr .pl-cce /* string.regexp constant.character.escape */, -.pl-sr .pl-sra /* string.regexp string.regexp.arbitrary-repitition */, -.pl-sr .pl-sre /* string.regexp source.ruby.embedded */ { - color: #183691; -} - -.pl-v /* variable */ { - color: #ed6a43; -} - -.pl-id /* invalid.deprecated */ { - color: #b52a1d; -} - -.pl-ii /* invalid.illegal */ { - background-color: #b52a1d; - color: #f8f8f8; -} - -.pl-sr .pl-cce /* string.regexp constant.character.escape */ { - color: #63a35c; - font-weight: bold; -} - -.pl-ml /* markup.list */ { - color: #693a17; -} - -.pl-mh /* markup.heading */, -.pl-mh .pl-en /* markup.heading entity.name */, -.pl-ms /* meta.separator */ { - color: #1d3e81; - font-weight: bold; -} - -.pl-mq /* markup.quote */ { - color: #008080; -} - -.pl-mi /* markup.italic */ { - color: #333; - font-style: italic; -} - -.pl-mb /* markup.bold */ { - color: #333; - font-weight: bold; -} - -.pl-md /* markup.deleted, meta.diff.header.from-file */ { - background-color: #ffecec; - color: #bd2c00; -} - -.pl-mi1 /* markup.inserted, meta.diff.header.to-file */ { - background-color: #eaffea; - color: #55a532; -} - -.pl-mdr /* meta.diff.range */ { - color: #795da3; - font-weight: bold; -} - -.pl-mo /* meta.output */ { - color: #1d3e81; -} - From 69275288834d9129bd8ba7e88e22b1a740ae4e9b Mon Sep 17 00:00:00 2001 From: jaysoncopes Date: Wed, 13 Apr 2016 22:42:08 -0500 Subject: [PATCH 08/15] Delete scale.fix.js --- javascripts/scale.fix.js | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 javascripts/scale.fix.js diff --git a/javascripts/scale.fix.js b/javascripts/scale.fix.js deleted file mode 100644 index 87a40ca..0000000 --- a/javascripts/scale.fix.js +++ /dev/null @@ -1,17 +0,0 @@ -var metas = document.getElementsByTagName('meta'); -var i; -if (navigator.userAgent.match(/iPhone/i)) { - for (i=0; i Date: Wed, 13 Apr 2016 23:59:52 -0500 Subject: [PATCH 09/15] Fixed Angels Resetting Every Calculations The angel alert no longer appears after every calculation. The alert will ONLY show if the alert is new to the game, not to the calculation. --- js/main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/main.js b/js/main.js index 1d58c4a..4956252 100644 --- a/js/main.js +++ b/js/main.js @@ -335,7 +335,7 @@ advApp.controller('advController', ['$document', '$filter', '$scope', function($ function calcAngels(loc) { var i = 0, tempPlanet = null; - loc.angelExclamation = false; + //loc.angelExclamation = false; for (; i < loc.angelUpgrades.length; i++) { if (!tupleIsActive(loc.angelUpgrades[i]) && loc.angelUpgrades[i][0] < loc.numAngels) { tempPlanet = JSON.parse(JSON.stringify(loc)); @@ -344,11 +344,11 @@ advApp.controller('advController', ['$document', '$filter', '$scope', function($ calcState(tempPlanet); var delta = tempPlanet.totalMoneyPerSecond - loc.totalMoneyPerSecond; var percent = delta / loc.totalMoneyPerSecond; - if (delta > 0) { + if (delta > 0 && typeof loc.angelUpgrades[i][loc.angelUpgrades[i].length - 2] === 'boolean') { loc.angelUpgrades[i][loc.angelUpgrades[i].length - 2] = percent; loc.angelExclamation = true; loc.hasSeenAngelExclamation = false; - } else { + } else if (delta <= 0) { loc.angelUpgrades[i][loc.angelUpgrades[i].length - 2] = false; } } From af62f609e8c832012077556d3559e18e1d99fa28 Mon Sep 17 00:00:00 2001 From: Alex Arze Date: Thu, 14 Apr 2016 00:10:27 -0500 Subject: [PATCH 10/15] Fixed Angels Upgrade Suggestions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: if the user typed an angel count far above the lowest angel upgrade (say from 1 tretrigintillion to 1 duoquadragintlillion) and then changed it back to a lower value, the angel upgrades above the new angel count were not dismissed as “exclamation” upgrades. This fix removes the alert from any that are above the angel count. --- js/main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/main.js b/js/main.js index 4956252..cbe2098 100644 --- a/js/main.js +++ b/js/main.js @@ -351,6 +351,8 @@ advApp.controller('advController', ['$document', '$filter', '$scope', function($ } else if (delta <= 0) { loc.angelUpgrades[i][loc.angelUpgrades[i].length - 2] = false; } + } else if (loc.angelUpgrades[i][0] >= loc.numAngels && typeof loc.angelUpgrades[i][loc.angelUpgrades[i].length - 2] !== 'boolean') { + loc.angelUpgrades[i][loc.angelUpgrades[i].length - 2] = false; } } }; From 65f45ab81393dfc77f34562df55047e18c9c4c4d Mon Sep 17 00:00:00 2001 From: Alex Arze Date: Thu, 14 Apr 2016 00:42:02 -0500 Subject: [PATCH 11/15] Fixed Minor definition fix --- js/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/main.js b/js/main.js index b738287..4993aac 100644 --- a/js/main.js +++ b/js/main.js @@ -834,7 +834,7 @@ advApp.controller('advController', ['$document', '$filter', '$scope', function($ } loc.angelEffectiveness = 2; loc.angelExclamation = false; - loc.hasSeenAngelExclamation + loc.hasSeenAngelExclamation = false; loc.bonusAngelEffectiveness = 0; loc.bonusMultiplier = 0; loc.flux = 0; @@ -1125,6 +1125,7 @@ advApp.controller('advController', ['$document', '$filter', '$scope', function($ function suitFromName(name) { var i = 0; + for (; i < $scope.suitList.length; i++) { if ($scope.suitList[i][0].toLowerCase() === name) { return i; From 5f5ced27fc403e8c1941389f1220a13381129648 Mon Sep 17 00:00:00 2001 From: Alex Arze Date: Tue, 26 Apr 2016 00:10:53 -0500 Subject: [PATCH 12/15] Added Notification to Save Added notification state to JSON and importing as well as to the liverich world --- js/main.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/js/main.js b/js/main.js index 4f78c83..a618443 100644 --- a/js/main.js +++ b/js/main.js @@ -180,6 +180,8 @@ advApp.controller('advController', ['$document', '$filter', '$scope', function($ $scope[planets[k]].investments[obj[planets[k]].megaTicket[i]][2] = true; } } + $scope[planets[k]].hasSeenSuitExclamation = obj[planets[k]].seenSuit; + $scope[planets[k]].hasSeenAngelExclamation = obj[planets[k]].seenAngel; } $scope.calc($scope[planets[k]]); } @@ -814,7 +816,9 @@ advApp.controller('advController', ['$document', '$filter', '$scope', function($ string += ' ' + i; } } - string += '\r\n ]\r\n}'; + string += '\r\n ], \r\n "seenSuit": ' + (typeof loc.hasSeenSuitExclamation === 'undefined' ? 'false' : loc.hasSeenSuitExclamation); + string += ',\r\n "seenAngel": ' + (typeof loc.hasSeenAngelExclamation === 'undefined' ? false : loc.hasSeenAngelExclamation); + string += '\r\n}'; return string; }; @@ -1050,6 +1054,8 @@ advApp.controller('advController', ['$document', '$filter', '$scope', function($ loc.lifetimeEarnings = obj.totalCash || obj.sessionCash + obj.totalPreviousCash; loc.numAngels = obj.angelInvestors; loc.sacAngels = obj.angelInvestorsSpent; + loc.hasSeenSuitExclamation = obj.seenSuit; + loc.hasSeenAngelExclamation = obj.seenAngel; // how to find gold multipliers, flux, bonus angel effectiveness (kong login etc), suits }; @@ -1222,6 +1228,8 @@ advApp.controller('advController', ['$document', '$filter', '$scope', function($ $scope.liverich.baseProfit = [2, 25, 77, 189, 3333, 13, 110, 412, 2900, 666666]; // Figure out when event starts $scope.liverich.baseSpeed = [1, 3, 5, 7, 9, 10, 19, 25, 42, 96]; // Figure out when event starts $scope.liverich.hasMegaTickets = false; + $scope.liverich.hasSeenAngelExclamation = false; + $scope.liverich.hasSeenSuitExclamation = false; $scope.liverich.investments = [ ['Investment 1', 1, false, 0, 0, 0, 0], ['Investment 2', 0, false, 0, 0, 0, 0], From 46de081f839bcc27f99700793bf9746bbf3c28c6 Mon Sep 17 00:00:00 2001 From: Alex Arze Date: Tue, 26 Apr 2016 02:39:01 -0500 Subject: [PATCH 13/15] Allow Notification on Angel Change Allows for the notification to be recalculated upon changing of angels. Also adds the suit and angel notification variable to planet requirements. --- New planet requirements | 3 +++ js/main.js | 31 ++++++++++++++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/New planet requirements b/New planet requirements index c043f2b..cf760df 100644 --- a/New planet requirements +++ b/New planet requirements @@ -40,3 +40,6 @@ Events are loaded from a Google Sheet url so if I can get the URL or the file it 1. The cost. 2. Which business the manager effects. 3. The amount of the manager discount. + +12. The angel/suit exclamation state + Allows for us to track whether the user has seen the angel and suit exclamation notification for dismissal \ No newline at end of file diff --git a/js/main.js b/js/main.js index a618443..58aeeaa 100644 --- a/js/main.js +++ b/js/main.js @@ -182,6 +182,8 @@ advApp.controller('advController', ['$document', '$filter', '$scope', function($ } $scope[planets[k]].hasSeenSuitExclamation = obj[planets[k]].seenSuit; $scope[planets[k]].hasSeenAngelExclamation = obj[planets[k]].seenAngel; + $scope[planets[k]].suitExclamation = obj[planets[k]].suitExclamation; + $scope[planets[k]].angelExclamation = obj[planets[k]].angelExclamation; } $scope.calc($scope[planets[k]]); } @@ -816,7 +818,9 @@ advApp.controller('advController', ['$document', '$filter', '$scope', function($ string += ' ' + i; } } - string += '\r\n ], \r\n "seenSuit": ' + (typeof loc.hasSeenSuitExclamation === 'undefined' ? 'false' : loc.hasSeenSuitExclamation); + string += '\r\n ],\r\n "suitExclamation": ' + (typeof loc.suitExclamation === 'undefined' ? false : loc.suitExclamation); + string += ',\r\n "seenSuit": ' + (typeof loc.hasSeenSuitExclamation === 'undefined' ? false : loc.hasSeenSuitExclamation); + string += ',\r\n "angelExclamation": ' + (typeof loc.angelExclamation === 'undefined' ? false : loc.angelExclamation); string += ',\r\n "seenAngel": ' + (typeof loc.hasSeenAngelExclamation === 'undefined' ? false : loc.hasSeenAngelExclamation); string += '\r\n}'; return string; @@ -1066,6 +1070,7 @@ advApp.controller('advController', ['$document', '$filter', '$scope', function($ } for (i = 0; i < loc.angelUpgrades.length; i++) { loc.angelUpgrades[i][loc.angelUpgrades[i].length - 1] = false; + loc.angelUpgrades[i][loc.angelUpgrades[i].length] = false; } for (i = 0; i < loc.managerUpgrades.length; i++) { loc.managerUpgrades[i][0][loc.managerUpgrades[i][0].length - 1] = false; @@ -1156,8 +1161,32 @@ advApp.controller('advController', ['$document', '$filter', '$scope', function($ }; $scope.updateAngels = function() { + var prevAngels = $scope.ref.numAngels; + var i = 0; + updateIllionize('numAngels', 'viewNumAngels', 'illions'); + + // re-enables the notification + if ($scope.ref.numAngels != prevAngels) { + if ($scope.ref.hasSeenAngelExclamation) { + for (i = 0; i < $scope.ref.angelUpgrades.length; i++) { + $scope.ref.angelUpgrades[i][$scope.ref.angelUpgrades[i].length] = false; + } + } + $scope.ref.hasSeenAngelExclamation = false; + calcAngels($scope.ref); + } }; + + $scope.changeAngels = function() { + // re-enables the notification + if ($scope.ref.hasSeenAngelExclamation) { + for (i = 0; i < loc.angelUpgrades.length; i++) { + loc.angelUpgrades[i][loc.angelUpgrades[i].length] = false; + } + } + $scope.ref.hasSeenAngelExclamation = false; + } $scope.updateEarnings = function() { updateIllionize('lifetimeEarnings', 'viewLifetimeEarnings', 'angelIllions'); From 6ba2aa031787b11e934849fbe3b8e261f5936bce Mon Sep 17 00:00:00 2001 From: Alex Arze Date: Tue, 26 Apr 2016 08:45:27 -0500 Subject: [PATCH 14/15] Fixed Load Issue Notification status is no longer overriden by calculations on load --- js/main.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/main.js b/js/main.js index 58aeeaa..47145a4 100644 --- a/js/main.js +++ b/js/main.js @@ -180,12 +180,17 @@ advApp.controller('advController', ['$document', '$filter', '$scope', function($ $scope[planets[k]].investments[obj[planets[k]].megaTicket[i]][2] = true; } } + } + + $scope.calc($scope[planets[k]]); + + // set notification properties after calculating to prevent calculation from overriding + if (obj.hasOwnProperty(planets[k])) { $scope[planets[k]].hasSeenSuitExclamation = obj[planets[k]].seenSuit; $scope[planets[k]].hasSeenAngelExclamation = obj[planets[k]].seenAngel; $scope[planets[k]].suitExclamation = obj[planets[k]].suitExclamation; $scope[planets[k]].angelExclamation = obj[planets[k]].angelExclamation; } - $scope.calc($scope[planets[k]]); } $scope.$digest(); } From a4c14695ec63d5def57a1077bdb43bde58761fc6 Mon Sep 17 00:00:00 2001 From: Alex Arze Date: Tue, 26 Apr 2016 09:13:57 -0500 Subject: [PATCH 15/15] Fixed Suits and Notification Fixed issue with Suits that caused the notification not to reappear when a better suit was available Fixed issue where updating your angel count removed all the angel upgrades Updating angel count now recalculates all instead of just the angels (forces push to local storage so as to keep changes on refresh) --- js/main.js | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/js/main.js b/js/main.js index 47145a4..82c7f61 100644 --- a/js/main.js +++ b/js/main.js @@ -589,6 +589,7 @@ advApp.controller('advController', ['$document', '$filter', '$scope', function($ loc.suits[i][1] = percent; if (!loc.hasSeenSuitExclamation) { loc.suitExclamation = true; + loc.hasSeenSuitExclamation = false; } if (percent > max[1]) { max[0] = i; @@ -1175,23 +1176,13 @@ advApp.controller('advController', ['$document', '$filter', '$scope', function($ if ($scope.ref.numAngels != prevAngels) { if ($scope.ref.hasSeenAngelExclamation) { for (i = 0; i < $scope.ref.angelUpgrades.length; i++) { - $scope.ref.angelUpgrades[i][$scope.ref.angelUpgrades[i].length] = false; + $scope.ref.angelUpgrades[i][$scope.ref.angelUpgrades[i].length - 2] = false; } } $scope.ref.hasSeenAngelExclamation = false; - calcAngels($scope.ref); + $scope.calc($scope.ref); } }; - - $scope.changeAngels = function() { - // re-enables the notification - if ($scope.ref.hasSeenAngelExclamation) { - for (i = 0; i < loc.angelUpgrades.length; i++) { - loc.angelUpgrades[i][loc.angelUpgrades[i].length] = false; - } - } - $scope.ref.hasSeenAngelExclamation = false; - } $scope.updateEarnings = function() { updateIllionize('lifetimeEarnings', 'viewLifetimeEarnings', 'angelIllions');