Livestock has a chance to give feathers.
This commit is contained in:
+10
-1
@@ -209,6 +209,7 @@ void attempt_livestock_production() {
|
|||||||
|
|
||||||
int meat_produced = 0;
|
int meat_produced = 0;
|
||||||
int skins_produced = 0;
|
int skins_produced = 0;
|
||||||
|
int feathers_produced = 0;
|
||||||
|
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
if (get_storage_count(ITEM_MEAT) < BASE_STORAGE_MAX) {
|
if (get_storage_count(ITEM_MEAT) < BASE_STORAGE_MAX) {
|
||||||
@@ -224,13 +225,21 @@ void attempt_livestock_production() {
|
|||||||
skins_produced++;
|
skins_produced++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (get_storage_count(ITEM_FEATHERS) < BASE_STORAGE_MAX) {
|
||||||
|
if (random(1, 100) <= LIVESTOCK_FEATHER_CHANCE) {
|
||||||
|
add_storage_count(ITEM_FEATHERS, 1);
|
||||||
|
feathers_produced++;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((meat_produced > 0 || skins_produced > 0) && x <= BASE_END) {
|
if ((meat_produced > 0 || skins_produced > 0 || feathers_produced > 0) && x <= BASE_END) {
|
||||||
string msg = "Livestock produced ";
|
string msg = "Livestock produced ";
|
||||||
string[] outputs;
|
string[] outputs;
|
||||||
if (meat_produced > 0) outputs.insert_last(meat_produced + " meat");
|
if (meat_produced > 0) outputs.insert_last(meat_produced + " meat");
|
||||||
if (skins_produced > 0) outputs.insert_last(skins_produced + " skins");
|
if (skins_produced > 0) outputs.insert_last(skins_produced + " skins");
|
||||||
|
if (feathers_produced > 0) outputs.insert_last(feathers_produced + " feathers");
|
||||||
|
|
||||||
for (uint i = 0; i < outputs.length(); i++) {
|
for (uint i = 0; i < outputs.length(); i++) {
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
|
|||||||
@@ -148,6 +148,7 @@ const int HORSE_SUCCESS_BONUS_PER = 2;
|
|||||||
const int HORSE_DAMAGE_BONUS_STEP = 3;
|
const int HORSE_DAMAGE_BONUS_STEP = 3;
|
||||||
const int LIVESTOCK_MEAT_CHANCE = 6;
|
const int LIVESTOCK_MEAT_CHANCE = 6;
|
||||||
const int LIVESTOCK_SKIN_CHANCE = 3;
|
const int LIVESTOCK_SKIN_CHANCE = 3;
|
||||||
|
const int LIVESTOCK_FEATHER_CHANCE = 2;
|
||||||
|
|
||||||
// Bandit settings
|
// Bandit settings
|
||||||
const int BANDIT_HEALTH = 4;
|
const int BANDIT_HEALTH = 4;
|
||||||
|
|||||||
Reference in New Issue
Block a user