Skip to content
Snippets Groups Projects
Commit 712c9e7f authored by Pregmodder's avatar Pregmodder
Browse files

Merge branch 'tweaks' into 'pregmod-master'

Exotic animals now give a boost to income

See merge request pregmodfan/fc-pregmod!11193
parents 605afd8f 2bd624e1
No related branches found
No related tags found
1 merge request!11193Exotic animals now give a boost to income
Pipeline #54040 passed
......@@ -444,32 +444,36 @@ App.EndWeek.farmyardReport = function farmyardReport() {
}
function farmyardMultipliers() {
const total = V.animals.canine.length +
V.animals.hooved.length +
V.animals.feline.length;
const animals = [...V.animals.canine, ...V.animals.feline, ...V.animals.hooved].map(animal => getAnimal(animal));
const total = animals.length;
const exotic = animals.filter(animal => animal.rarity === "exotic");
const text = [];
const animals = [];
const animalText = [];
if (total > 1) {
text.push(`Having a ${total > 6 ? `wide` : ``} variety of`);
if (V.animals.canine.length > 0) {
if (V.animals.canine.every(c => getAnimal(c).species === "dog")) {
animals.push(`dogs`);
animalText.push(`dogs`);
} else {
animals.push(`canines`);
animalText.push(`canines`);
}
}
if (V.animals.hooved.length > 0) {
animals.push(`hooved animals`);
animalText.push(`hooved animals`);
}
if (V.animals.feline.length > 0) {
if (V.animals.feline.every(f => getAnimal(f).species === "cat")) {
animals.push(`cats`);
animalText.push(`cats`);
} else {
animals.push(`felines`);
animalText.push(`felines`);
}
}
text.push(`${toSentence(animals)} keeps the guests of ${V.farmyardName} more entertained than they would have been otherwise, <span class="cash inc">earning you more.</span>`);
text.push(`${toSentence(animalText)} keeps the guests of ${V.farmyardName} more entertained than they would have been otherwise, <span class="cash inc">earning you more.</span>`);
}
if (exotic.length > 0) {
text.push(`The fact that some of the animals are normally only founds in zoos is <span class="reputation inc">not lost on your citizenry,</span> either, and <span class="cash inc">many are willing to pay more</span> to watch shows with them.`);
}
return text.join(' ');
......
......@@ -15,6 +15,10 @@ App.Facilities.Farmyard.farmShowsIncome = function(slave) {
if (!slave) {
return null;
} else {
const animals = [...V.animals.canine, ...V.animals.feline, ...V.animals.hooved].map(animal => getAnimal(animal));
const exotic = animals.filter(animal => animal.rarity === "exotic").length;
const exoticChance = exotic ? (exotic / App.Entity.facilities.farmyard.employees().length) * 100 : 0;
if (S.Farmer) {
cash *= 1.1;
if (S.Farmer.skill.farmer >= Constant.MASTERED_XP) {
......@@ -22,7 +26,13 @@ App.Facilities.Farmyard.farmShowsIncome = function(slave) {
}
}
// FS Effects
// Animal type
if (exoticChance > random(100)) {
cash *= 1.5;
}
// FS effects
if (arcology.FSSupremacist !== "unset") {
if (isSuperiorRace(slave)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment