Increased price of items in short supply on islands.
This commit is contained in:
parent
f80775702a
commit
434d7e411e
|
@ -56,7 +56,7 @@ pr_island.AdjustPrices = function () {
|
||||||
if (this.inventory[i] > 10) {
|
if (this.inventory[i] > 10) {
|
||||||
this.priceDifferences[i] = -Math.round(this.inventory[i] * Math.randomRange(1, 3));
|
this.priceDifferences[i] = -Math.round(this.inventory[i] * Math.randomRange(1, 3));
|
||||||
} else if (this.inventory[i] < 5) {
|
} else if (this.inventory[i] < 5) {
|
||||||
this.priceDifferences[i] = Math.round(this.inventory[i] * Math.randomRange(1, 3));
|
this.priceDifferences[i] = Math.round((10 - this.inventory[i]) * Math.randomRange(1, 3));
|
||||||
} else {
|
} else {
|
||||||
this.priceDifferences[i] = 0;
|
this.priceDifferences[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue