Skip to content
Snippets Groups Projects
Commit 6e52a38f authored by svornost's avatar svornost
Browse files

clear `rivalSet` if the rival arcology doesn't exist or is the player arcology.

parent 93aafa73
No related branches found
No related tags found
1 merge request!8946Clear `rivalSet` if the rival arcology doesn't exist or is the player arcology.
......@@ -4,11 +4,11 @@ App.EndWeek.nextWeek = function() {
V.upgradeMultiplierMedicine = upgradeMultiplier('medicine');
V.upgradeMultiplierTrade = upgradeMultiplier('trading');
if (V.rivalOwner !== 0) {
const rival = V.arcologies.find(function(s) { return s.rival === 1; });
if (rival) {
V.rivalOwner = rival.prosperity;
}
const rival = V.arcologies.find(function(s) { return s.direction !== 0 && s.rival === 1; });
if (rival && V.rivalOwner !== 0) {
V.rivalOwner = rival.prosperity;
} else if (!rival) {
V.rivalSet = 0;
}
if (V.playerAging !== 0) {
......
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