Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/game.js b/game.js
- index c40cb33..6e197ec 100644
- --- a/game.js
- +++ b/game.js
- @@ -3426,6 +3426,10 @@ dojo.declare("com.nuclearunicorn.game.ui.GamePage", null, {
- "paragon": paragonPoints
- };
- + if (this.challenges.currentChallenge == "blackSky") {
- + addRes["ship"] = 1
- + }
- +
- var karmaZebras = parseInt(this.karmaZebras); //hack
- //that's all folks
- diff --git a/js/calendar.js b/js/calendar.js
- index eeb003b..bf6fd49 100644
- --- a/js/calendar.js
- +++ b/js/calendar.js
- @@ -446,7 +446,12 @@ dojo.declare("com.nuclearunicorn.game.Calendar", null, {
- //------------------------- astronomical events -------------------------
- if (this.game.bld.get("library").on > 0) {
- var eventChance = (0.0025 + this.game.getEffect("starEventChance")) * chanceRatio;
- - if (this.game.prestige.getPerk("astromancy").researched) {
- +
- + if (this.game.challenges.currentChallenge == "blackSky") {
- + eventChance = 0
- + }
- +
- + if (this.game.prestige.getPerk("astromancy").researched) {
- eventChance *= 2;
- }
- @@ -818,7 +823,13 @@ dojo.declare("com.nuclearunicorn.game.Calendar", null, {
- }
- var pyramidVal = this.game.religion.getZU("blackPyramid").val;
- - var markerVal = this.game.religion.getZU("marker").val;
- + var markerVal = this.game.religion.getZU("marker").val;
- +
- + if (this.game.challenges.getChallenge("blackSky").researched) {
- + pyramidVal += 1
- + markerVal *= 1.1
- + }
- +
- if ( pyramidVal > 0 ){
- if (this.game.rand(1000) < 35 * pyramidVal * (1 + 0.1 * markerVal)){ //3.5% per year per BP, x10% per marker
- this.game.diplomacy.unlockElders();
- diff --git a/js/challenges.js b/js/challenges.js
- index 2c66b92..8670d07 100644
- --- a/js/challenges.js
- +++ b/js/challenges.js
- @@ -51,7 +51,14 @@ dojo.declare("classes.managers.ChallengesManager", com.nuclearunicorn.core.TabMa
- effectDesc: $I("challendge.1000Years.effect.desc"),
- researched: false,
- unlocked: false
- - }],
- + },{
- + name: "blackSky",
- + label: "Black Sky",
- + description: "Restart the game with no astronomical events to observe.<br/><br/>Goal: elders comes early.",
- + effectDesc: "TBD",
- + researched: false,
- + unlocked: false
- + }],
- game: null,
- @@ -106,8 +113,12 @@ dojo.declare("classes.managers.ChallengesManager", com.nuclearunicorn.core.TabMa
- if (this.game.bld.get("aiCore").val > 0){
- this.researchChallenge("anarchy");
- }
- + } else if (this.currentChallenge == "blackSky") {
- + if (this.game.space.getBuilding('spaceBeacon').val > 0){
- + this.researchChallenge("blackSky");
- + }
- + }
- - }
- // winterIsComing
- if (this.currentChallenge == "winterIsComing") {
- if (this.game.space.getPlanet("helios").reached){
- diff --git a/js/diplomacy.js b/js/diplomacy.js
- index bd74954..24278e7 100644
- --- a/js/diplomacy.js
- +++ b/js/diplomacy.js
- @@ -326,6 +326,10 @@ dojo.declare("classes.managers.DiplomacyManager", null, {
- onNewDay: function(){
- var elders = this.get("leviathans");
- + if (elders.unlocked) {
- + this.game.challenges.getChallenge("blackSky").unlocked = true;
- + }
- +
- if (elders.duration <= 0 && elders.unlocked){
- elders.unlocked = false;
- this.game.msg($I("trade.msg.elders.departed"), "notice");
- diff --git a/js/space.js b/js/space.js
- index cee2816..508fe82 100644
- --- a/js/space.js
- +++ b/js/space.js
- @@ -1152,6 +1152,13 @@ dojo.declare("com.nuclearunicorn.game.ui.SpaceProgramBtnController", com.nuclear
- var reductionRatio = this.game.getHyperbolicEffect(this.game.getEffect("oilReductionRatio"), 0.75);
- prices[i].val *= (1 - reductionRatio);
- }
- +
- + if (this.game.challenges.currentChallenge == "blackSky"
- + && model.metadata.name == "orbitalLaunch"
- + && prices[i].name == "starchart") {
- + prices[i].val = 0
- + }
- +
- }
- return prices;
- @@ -1232,6 +1239,13 @@ dojo.declare("classes.ui.space.PlanetBuildingBtnController", com.nuclearunicorn.
- var reductionRatio = this.game.getHyperbolicEffect(this.game.getEffect("oilReductionRatio"), 0.75);
- prices[i].val *= (1 - reductionRatio);
- }
- +
- + if (this.game.challenges.currentChallenge == "blackSky"
- + && meta.name == "sattelite"
- + && meta.val == 0
- + && prices[i].name == "starchart") {
- + prices[i].val = 0
- + }
- }
- return prices;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement