Selaa lähdekoodia

Add a few news items. Make seconds-of-food-per-click configurable. Rescale upgrade colors

Upgrade colors now start from gray, not black.
tags/v0.1.0
Fen Dweller 5 vuotta sitten
vanhempi
commit
f822195be5
No known key found for this signature in database GPG Key ID: E80B35A6F11C3656
2 muutettua tiedostoa jossa 11 lisäystä ja 4 poistoa
  1. +7
    -1
      constants.js
  2. +4
    -3
      gorge.js

+ 7
- 1
constants.js Näytä tiedosto

@@ -4,7 +4,7 @@ const start_color = "#882222";
const end_color = "#228888";

//const range = chroma.scale([start_color, end_color]).mode("lab");
const range = chroma.cubehelix().scale();
const range = chroma.cubehelix().scale().domain([-0.2, 1]).mode("lab");

const resourceTypes = {
"food": {
@@ -1379,6 +1379,12 @@ const newsBuildingCountText = {
],
[
state => "\"average person eats 3 people a year\" factoid actualy just statistical error. average person eats 0 people per year. Peoples " + macroDesc.name + ", who lives on planet & eats over " + 8640 * belongings.anthro.count + " each day, is an outlier adn should not have been counted"
],
[
state => "A new study finds that " + macroDesc.name + " has, indeed, eaten everyone."
],
[
state => "A newer study finds that " + macroDesc.name + " has, actually eaten everyone <i>TWICE</i>."
]
],
car: [


+ 4
- 3
gorge.js Näytä tiedosto

@@ -25,7 +25,8 @@ const contributions = {};
const clickPowers = {
clickBonus: 0,
clickMultiplier: 1,
clickVictim: "micro"
clickVictim: "micro",
clickSeconds: 5
}


@@ -497,7 +498,7 @@ function buyUpgrade(id, e) {
}

function eatPrey() {
const add = clickPowers.clickMultiplier * (buildings[clickPowers.clickVictim]["prod"].food * 10 + clickPowers.clickBonus);
const add = clickPowers.clickMultiplier * (buildings[clickPowers.clickVictim]["prod"].food * clickPowers.clickSeconds + clickPowers.clickBonus);
resources.food += add;
stats.foodClicked += add;
return add;
@@ -1105,7 +1106,7 @@ function doNews() {

function showNews(text) {
const div = document.createElement("div");
div.textContent = text;
div.innerHTML = text;

div.classList.add("news-text");



Loading…
Peruuta
Tallenna