Advertisement
Guest User

Untitled

a guest
Apr 7th, 2020
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 4.61 KB | None | 0 0
  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..bf6fd49 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. @@ -818,7 +823,13 @@ dojo.declare("com.nuclearunicorn.game.Calendar", null, {
  35.         }
  36.  
  37.         var pyramidVal = this.game.religion.getZU("blackPyramid").val;
  38. -       var markerVal = this.game.religion.getZU("marker").val;
  39. +        var markerVal = this.game.religion.getZU("marker").val;
  40. +
  41. +        if (this.game.challenges.getChallenge("blackSky").researched) {
  42. +            pyramidVal += 1
  43. +            markerVal *= 1.1
  44. +        }
  45. +
  46.         if ( pyramidVal > 0 ){
  47.             if (this.game.rand(1000) < 35 * pyramidVal * (1 + 0.1 * markerVal)){   //3.5% per year per BP, x10% per marker
  48.                 this.game.diplomacy.unlockElders();
  49. diff --git a/js/challenges.js b/js/challenges.js
  50. index 2c66b92..8670d07 100644
  51. --- a/js/challenges.js
  52. +++ b/js/challenges.js
  53. @@ -51,7 +51,14 @@ dojo.declare("classes.managers.ChallengesManager", com.nuclearunicorn.core.TabMa
  54.         effectDesc: $I("challendge.1000Years.effect.desc"),
  55.          researched: false,
  56.          unlocked: false
  57. -   }],
  58. +   },{
  59. +       name: "blackSky",
  60. +       label: "Black Sky",
  61. +       description: "Restart the game with no astronomical events to observe.<br/><br/>Goal: elders comes early.",
  62. +       effectDesc: "TBD",
  63. +        researched: false,
  64. +        unlocked: false
  65. +    }],
  66.  
  67.     game: null,
  68.  
  69. @@ -106,8 +113,12 @@ dojo.declare("classes.managers.ChallengesManager", com.nuclearunicorn.core.TabMa
  70.             if (this.game.bld.get("aiCore").val > 0){
  71.                 this.researchChallenge("anarchy");
  72.             }
  73. +       } else if (this.currentChallenge == "blackSky") {
  74. +           if (this.game.space.getBuilding('spaceBeacon').val > 0){
  75. +               this.researchChallenge("blackSky");
  76. +           }
  77. +        }
  78.  
  79. -       }
  80.         // winterIsComing
  81.         if (this.currentChallenge == "winterIsComing") {
  82.             if (this.game.space.getPlanet("helios").reached){
  83. diff --git a/js/diplomacy.js b/js/diplomacy.js
  84. index bd74954..24278e7 100644
  85. --- a/js/diplomacy.js
  86. +++ b/js/diplomacy.js
  87. @@ -326,6 +326,10 @@ dojo.declare("classes.managers.DiplomacyManager", null, {
  88.  
  89.      onNewDay: function(){
  90.          var elders = this.get("leviathans");
  91. +        if (elders.unlocked) {
  92. +            this.game.challenges.getChallenge("blackSky").unlocked = true;
  93. +        }
  94. +
  95.          if (elders.duration <= 0  && elders.unlocked){
  96.             elders.unlocked = false;
  97.             this.game.msg($I("trade.msg.elders.departed"), "notice");
  98. diff --git a/js/space.js b/js/space.js
  99. index cee2816..508fe82 100644
  100. --- a/js/space.js
  101. +++ b/js/space.js
  102. @@ -1152,6 +1152,13 @@ dojo.declare("com.nuclearunicorn.game.ui.SpaceProgramBtnController", com.nuclear
  103.                  var reductionRatio = this.game.getHyperbolicEffect(this.game.getEffect("oilReductionRatio"), 0.75);
  104.                  prices[i].val *= (1 - reductionRatio);
  105.              }
  106. +
  107. +            if (this.game.challenges.currentChallenge == "blackSky"
  108. +                && model.metadata.name == "orbitalLaunch"
  109. +                && prices[i].name == "starchart") {
  110. +                prices[i].val = 0
  111. +            }
  112. +
  113.          }
  114.  
  115.          return prices;
  116. @@ -1232,6 +1239,13 @@ dojo.declare("classes.ui.space.PlanetBuildingBtnController", com.nuclearunicorn.
  117.                  var reductionRatio = this.game.getHyperbolicEffect(this.game.getEffect("oilReductionRatio"), 0.75);
  118.                  prices[i].val *= (1 - reductionRatio);
  119.               }
  120. +
  121. +            if (this.game.challenges.currentChallenge == "blackSky"
  122. +                && meta.name == "sattelite"
  123. +                && meta.val == 0
  124. +                && prices[i].name == "starchart") {
  125. +                prices[i].val = 0
  126. +            }
  127.          }
  128.  
  129.          return prices;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement