Advertisement
Guest User

Untitled

a guest
Apr 7th, 2020
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/game.js b/game.js
  2. index c40cb33..6e197ec 100644
  3. --- a/game.js
  4. +++ b/game.js
  5. @@ -3426,6 +3426,10 @@ dojo.declare("com.nuclearunicorn.game.ui.GamePage", null, {
  6.             "paragon": paragonPoints
  7.         };
  8.  
  9. +        if (this.challenges.currentChallenge == "blackSky") {
  10. +            addRes["ship"] = 1
  11. +        }
  12. +
  13.         var karmaZebras = parseInt(this.karmaZebras);   //hack
  14.         //that's all folks
  15.  
  16. diff --git a/js/calendar.js b/js/calendar.js
  17. index eeb003b..4eccbe5 100644
  18. --- a/js/calendar.js
  19. +++ b/js/calendar.js
  20. @@ -446,7 +446,12 @@ dojo.declare("com.nuclearunicorn.game.Calendar", null, {
  21.         //------------------------- astronomical events -------------------------
  22.         if (this.game.bld.get("library").on > 0) {
  23.             var eventChance = (0.0025 + this.game.getEffect("starEventChance")) * chanceRatio;
  24. -           if (this.game.prestige.getPerk("astromancy").researched) {
  25. +
  26. +            if (this.game.challenges.currentChallenge == "blackSky") {
  27. +                eventChance = 0
  28. +            }
  29. +
  30. +            if (this.game.prestige.getPerk("astromancy").researched) {
  31.                 eventChance *= 2;
  32.             }
  33.  
  34. diff --git a/js/challenges.js b/js/challenges.js
  35. index 2c66b92..22af14b 100644
  36. --- a/js/challenges.js
  37. +++ b/js/challenges.js
  38. @@ -31,6 +31,13 @@ dojo.declare("classes.managers.ChallengesManager", com.nuclearunicorn.core.TabMa
  39.         researched: false,
  40.         unlocked: true
  41.     },{
  42. +       name: "blackSky",
  43. +       label: "Black Sky",
  44. +       description: "Restart the game with no astronomical events to observe.<br/><br/>Goal: TBD",
  45. +       effectDesc: "TBD",
  46. +        researched: false,
  47. +        unlocked: true
  48. +    },{
  49.         name: "energy",
  50.         label: $I("challendge.energy.label"),
  51.         description: $I("challendge.energy.desc"),
  52. @@ -106,8 +113,12 @@ dojo.declare("classes.managers.ChallengesManager", com.nuclearunicorn.core.TabMa
  53.             if (this.game.bld.get("aiCore").val > 0){
  54.                 this.researchChallenge("anarchy");
  55.             }
  56. +       } else if (this.currentChallenge == "blackSky") {
  57. +           if (this.game.space.getBuilding('spaceBeacon').val > 0){
  58. +               this.researchChallenge("blackSky");
  59. +           }
  60. +        }
  61.  
  62. -       }
  63.         // winterIsComing
  64.         if (this.currentChallenge == "winterIsComing") {
  65.             if (this.game.space.getPlanet("helios").reached){
  66. diff --git a/js/space.js b/js/space.js
  67. index cee2816..508fe82 100644
  68. --- a/js/space.js
  69. +++ b/js/space.js
  70. @@ -1152,6 +1152,13 @@ dojo.declare("com.nuclearunicorn.game.ui.SpaceProgramBtnController", com.nuclear
  71.                  var reductionRatio = this.game.getHyperbolicEffect(this.game.getEffect("oilReductionRatio"), 0.75);
  72.                  prices[i].val *= (1 - reductionRatio);
  73.              }
  74. +
  75. +            if (this.game.challenges.currentChallenge == "blackSky"
  76. +                && model.metadata.name == "orbitalLaunch"
  77. +                && prices[i].name == "starchart") {
  78. +                prices[i].val = 0
  79. +            }
  80. +
  81.          }
  82.  
  83.          return prices;
  84. @@ -1232,6 +1239,13 @@ dojo.declare("classes.ui.space.PlanetBuildingBtnController", com.nuclearunicorn.
  85.                  var reductionRatio = this.game.getHyperbolicEffect(this.game.getEffect("oilReductionRatio"), 0.75);
  86.                  prices[i].val *= (1 - reductionRatio);
  87.               }
  88. +
  89. +            if (this.game.challenges.currentChallenge == "blackSky"
  90. +                && meta.name == "sattelite"
  91. +                && meta.val == 0
  92. +                && prices[i].name == "starchart") {
  93. +                prices[i].val = 0
  94. +            }
  95.          }
  96.  
  97.          return prices;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement