Skip to content

Commit

Permalink
Halloween
Browse files Browse the repository at this point in the history
  • Loading branch information
pmotschmann committed Oct 30, 2019
1 parent f47df42 commit b7eca82
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 25 deletions.
2 changes: 1 addition & 1 deletion dist/main.js

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions src/achieve.js
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,11 @@ const feats = {
desc: loc("feat_supermassive_desc"),
flair: loc("feat_supermassive_flair")
},
halloween: {
name: loc("feat_boo_name"),
desc: loc("feat_boo_desc"),
flair: loc("feat_boo_flair")
},
heavy_genus_humanoid: {
name: loc("feat_heavy_genus_humanoid_name"),
desc: loc("feat_heavy_genus_humanoid_desc"),
Expand Down Expand Up @@ -845,6 +850,10 @@ export function checkAchievements(){
if (global.interstellar['stellar_engine'] && (global.interstellar['stellar_engine'].mass + global.interstellar['stellar_engine'].exotic) >= 100){
unlockFeat('supermassive');
}
const date = new Date();
if (date.getMonth() === 9 && date.getDate() === 31){
unlockFeat('halloween');
}
}

export function drawPerks(){
Expand Down
2 changes: 1 addition & 1 deletion src/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -9827,7 +9827,7 @@ export const actions = {
Knowledge(){ return 1500000; },
Soul_Gem(){ return 10; }
},
effect(){ return `<div>${loc('tech_exotic_infusion_effect')}</div><div class="has-text-danger">${loc('tech_exotic_infusion_effect2')}</div>`; },
effect(){ return `<div>${loc('tech_exotic_infusion_effect',[global.resource.Soul_Gem.name])}</div><div class="has-text-danger">${loc('tech_exotic_infusion_effect2')}</div>`; },
action(){
if (payCosts($(this)[0].cost)){
global.resource.Soul_Gem.amount += 10;
Expand Down
10 changes: 5 additions & 5 deletions src/civics.js
Original file line number Diff line number Diff line change
Expand Up @@ -737,19 +737,19 @@ export function buildGarrison(garrison){
if (global.race['evil']){
if (global.race['soul_eater']){
let bones = +(armyRating(garrisonSize(),'hunting') / 3).toFixed(2);
return loc('civics_garrison_evil_soldier_desc',[food,fur,bones]);
return loc('civics_garrison_evil_soldier_desc',[food,fur,bones,global.resource.Food.name,global.resource.Furs.name,global.resource.Lumber.name]);
}
else {
let bones = +(armyRating(garrisonSize(),'hunting') / 5).toFixed(2);
return global.race['herbivore']
? loc('civics_garrison_evil_alt_soldier_desc_herb',[fur,bones])
: loc('civics_garrison_evil_alt_soldier_desc',[food,fur,bones]);
? loc('civics_garrison_evil_alt_soldier_desc_herb',[fur,bones,global.resource.Furs.name,global.resource.Lumber.name])
: loc('civics_garrison_evil_alt_soldier_desc',[food,fur,bones,global.resource.Food.name,global.resource.Furs.name,global.resource.Lumber.name]);
}
}
else {
return global.race['herbivore']
? loc('civics_garrison_soldier_desc_herb',[fur])
: loc('civics_garrison_soldier_desc',[food,fur]);
? loc('civics_garrison_soldier_desc_herb',[fur,global.resource.Furs.name])
: loc('civics_garrison_soldier_desc',[food,fur,global.resource.Food.name,global.resource.Furs.name]);
}
},
woundedDesc(){
Expand Down
6 changes: 3 additions & 3 deletions src/jobs.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const job_desc = {
impact *= global.city.biome === 'hellscape' ? 0.25 : 1;
impact *= global.city.ptrait === 'trashed' ? 0.75 : 1;
let gain = +(impact * multiplier).toFixed(2);
return loc('job_farmer_desc',[gain]);
return loc('job_farmer_desc',[gain,global.resource.Food.name]);
},
lumberjack: function(){
if (global.race['evil'] && !global.race['soul_eater']){
Expand All @@ -30,7 +30,7 @@ export const job_desc = {
multiplier *= racialTrait(global.civic.lumberjack.workers,'lumberjack');
let impact = global.city.biome === 'forest' ? (global.civic.lumberjack.impact * 1.1) : global.civic.lumberjack.impact;
let gain = +(impact * multiplier).toFixed(1);
return loc('job_lumberjack_desc',[gain]);
return loc('job_lumberjack_desc',[gain,global.resource.Lumber.name]);
}
},
quarry_worker: function(){
Expand All @@ -40,7 +40,7 @@ export const job_desc = {
multiplier *= global.tech['explosives'] >= 3 ? 1.75 : 1.5;
}
let gain = +(global.civic.quarry_worker.impact * multiplier).toFixed(1);
return loc('job_quarry_worker_desc',[gain]);
return loc('job_quarry_worker_desc',[gain,global.resource.Stone.name]);
},
scavenger: function(){
return loc('job_scavenger_desc',[races[global.race.species].home,global.civic.scavenger.impact]);
Expand Down
2 changes: 1 addition & 1 deletion src/portal.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ const fortressModules = {
Stanene(){ return costMultiplier('attractor', 90000, 1.25, 'portal'); },
},
effect(){
return `<div>${loc('portal_attractor_effect1')}</div><div>${loc('portal_attractor_effect2')}</div><div>${loc('minus_power',[$(this)[0].powered()])}</div>`;
return `<div>${loc('portal_attractor_effect1')}</div><div>${loc('portal_attractor_effect2',[global.resource.Soul_Gem.name])}</div><div>${loc('minus_power',[$(this)[0].powered()])}</div>`;
},
action(){
if (payCosts($(this)[0].cost)){
Expand Down
32 changes: 28 additions & 4 deletions src/resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,21 +242,45 @@ function loadResource(name,max,rate,tradable,stackable,color){
if (global.race['soul_eater']){
switch(name){
case 'Food':
global['resource'][name].name = 'Souls';
global['resource'][name].name = loc('resource_Souls_name');
break;
}
}

if (global.race['evil']){
switch(name){
case 'Lumber':
global['resource'][name].name = 'Bones';
global['resource'][name].name = loc('resource_Bones_name');
break;
case 'Furs':
global['resource'][name].name = 'Flesh';
global['resource'][name].name = loc('resource_Flesh_name');
break;
case 'Plywood':
global['resource'][name].name = 'Boneweave';
global['resource'][name].name = loc('resource_Boneweave_name');
break;
}
}

const date = new Date();
if (date.getMonth() === 9 && date.getDate() === 31){
switch(name){
case 'Food':
global['resource'][name].name = loc('resource_Candy_name');
break;
case 'Lumber':
global['resource'][name].name = loc('resource_Bones_name');
break;
case 'Stone':
global['resource'][name].name = loc('resource_RockCandy_name');
break;
case 'Furs':
global['resource'][name].name = loc('resource_Webs_name');
break;
case 'Plywood':
global['resource'][name].name = loc('resource_Boneweave_name');
break;
case 'Soul_Gem':
global['resource'][name].name = loc('resource_CandyCorn_name');
break;
}
}
Expand Down
28 changes: 18 additions & 10 deletions strings/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,13 @@
"action_ready": "Affordable in [%0]",
"cancel_routes": "Cancel Routes",
"job_farmer": "Farmer",
"job_farmer_desc": "Farmers create food to feed your population. Each farmer generates %0 food per second.",
"job_farmer_desc": "Farmers create %1 to feed your population. Each farmer generates %0 %1 per second.",
"job_lumberjack": "Lumberjack",
"job_lumberjack_desc": "Lumberjacks harvest lumber from the forests. Each lumberjack generates %0 lumber per second.",
"job_lumberjack_desc": "Lumberjacks harvest %1 from the forests. Each lumberjack generates %0 %1 per second.",
"job_reclaimer": "Reclaimer",
"job_reclaimer_desc": "Reclaimers scavenge for dead things. Each reclaimer generates %0 bones and %1 flesh per second.",
"job_quarry_worker": "Quarry Worker",
"job_quarry_worker_desc": "Quarry Workers mine stone from rock quarries. Each quarry worker generates %0 stone per second.",
"job_quarry_worker_desc": "Quarry Workers mine %1 from rock quarries. Each quarry worker generates %0 %1 per second.",
"job_scavenger": "Scavenger",
"job_scavenger_desc": "Scavengers search the trash heaps of %0 looking for anything useful. Boosts production by %1%.",
"job_miner": "Miner",
Expand Down Expand Up @@ -1290,7 +1290,7 @@
"tech_mass_ejector": "Mass Ejector",
"tech_mass_ejector_effect": "The Stellar Engine turned out to be underwhelming. Your top minds think the problem is that the blackhole isn't massive enough. Turn the blackhole into your own personal interstellar garbage disposal by designing a method to eject extra mass into the blackhole in an attempt to beef it up.",
"tech_exotic_infusion": "Exotic Infusion",
"tech_exotic_infusion_effect": "The exotic material in the blackhole is having a positive effect on the stellar engine, beef it up by ejecting into it the most exotic material you possess... soul gems.",
"tech_exotic_infusion_effect": "The exotic material in the blackhole is having a positive effect on the stellar engine, beef it up by ejecting into it the most exotic material you possess... %0.",
"tech_exotic_infusion_effect2": "Note: your scientists think this is a bad idea, yadda yadda; could catastrophically explode; whatever.",
"tech_exotic_infusion_flair": "You have a good feeling about this",
"tech_infusion_check": "Exotic Infusion",
Expand Down Expand Up @@ -1701,6 +1701,9 @@
"feat_supermassive_name": "Supermassive",
"feat_supermassive_desc": "Increase a blackhole to 100 solar masses",
"feat_supermassive_flair": "More like regular massive really",
"feat_boo_name": "Trick or Treat!",
"feat_boo_desc": "Idled a civilization during Halloween",
"feat_boo_flair": "Boo!",
"feat_heavy_genus_humanoid_name": "Heavy Victus",
"feat_heavy_genus_humanoid_desc": "Led a heavy gravity humanoid civilization to greatness",
"feat_heavy_genus_humanoid_flair": "That's one lead boot for a...",
Expand Down Expand Up @@ -2126,11 +2129,11 @@
"civics_garrison_advantage": "%0% advantage",
"civics_garrison_disadvantage": "%0% disadvantage",
"civics_garrison_army_label": "Number of soldiers to commit to military campaigns.",
"civics_garrison_soldier_desc_herb": "Idle soldiers spend their time hunting. They are currently bringing in %0 furs per trip.",
"civics_garrison_soldier_desc": "Idle soldiers spend their time hunting. They are currently bringing in %0 food worth of meat per trip and %1 furs.",
"civics_garrison_evil_soldier_desc": "Idle soldiers spend their time trapping mortals, they are currently bringing in %0 souls, %1 flesh, and %2 bones per second.",
"civics_garrison_evil_alt_soldier_desc": "Idle soldiers spend their time hunting. They are currently bringing in %0 food worth of meat, %1 flesh, and %2 bones per second.",
"civics_garrison_evil_alt_soldier_desc_herb": "Idle soldiers spend their time hunting. They are currently bringing in %0 flesh and %1 bones per second.",
"civics_garrison_soldier_desc_herb": "Idle soldiers spend their time hunting. They are currently bringing in %0 %1 per trip.",
"civics_garrison_soldier_desc": "Idle soldiers spend their time hunting. They are currently bringing in %0 %2 per trip and %1 %3.",
"civics_garrison_evil_soldier_desc": "Idle soldiers spend their time trapping mortals, they are currently bringing in %0 %3, %1 %4, and %2 %5 per second.",
"civics_garrison_evil_alt_soldier_desc": "Idle soldiers spend their time hunting. They are currently bringing in %0 %3, %1 %4, and %2 %5 per second.",
"civics_garrison_evil_alt_soldier_desc_herb": "Idle soldiers spend their time hunting. They are currently bringing in %0 %2 and %1 %3 per second.",
"civics_garrison_wounded_desc": "Wounded soldiers are both less effective in combat and more likely to die. Wounded soldiers will heal over time.",
"civics_garrison_defensive_rate": "Defensive Rating",
"civics_garrison_offensive_rate": "Offensive Rating",
Expand Down Expand Up @@ -2183,7 +2186,12 @@
"resource_Aerogel_name": "Aerogel",
"resource_Souls_name": "Souls",
"resource_Bones_name": "Bones",
"resource_Boneweave_name": "Boneweave",
"resource_Flesh_name": "Flesh",
"resource_Candy_name": "Candy",
"resource_RockCandy_name": "Rock Candy",
"resource_CandyCorn_name": "Candy Corn",
"resource_Webs_name": "Webs",
"resource_Genes_name": "Genes",
"resource_Soul_Gem_name": "Soul Gem",
"resource_Plasmid_name": "Plasmid",
Expand Down Expand Up @@ -2510,7 +2518,7 @@
"portal_attractor_title": "Attractor Beacon",
"portal_attractor_desc": "These arcane beacons attract demons, increasing demonic activity in the area",
"portal_attractor_effect1": "Increases demonic activity",
"portal_attractor_effect2": "Increases Soul Gem drop rate",
"portal_attractor_effect2": "Increases %0 drop rate",
"portal_sensor_drone_title": "Sensor Drone",
"portal_sensor_drone_effect": "+%0% Surveyor Infernite",
"portal_sensor_drone_effect2": "+%0% Bio Lab Max Knowledge",
Expand Down

0 comments on commit b7eca82

Please sign in to comment.