fix faction invitations

This commit is contained in:
Olivier Gagnon 2021-09-11 17:23:56 -04:00
parent aeb0a7d3e3
commit 1a5651ae8b
3 changed files with 16 additions and 7 deletions

File diff suppressed because one or more lines are too long

10
dist/vendor.bundle.js vendored

File diff suppressed because one or more lines are too long

@ -645,6 +645,15 @@ const Engine = {
Engine.Counters.updateDisplays = 3; Engine.Counters.updateDisplays = 3;
} }
if (Engine.Counters.checkFactionInvitations <= 0) {
const invitedFactions = Player.checkForFactionInvitations();
if (invitedFactions.length > 0) {
const randFaction = invitedFactions[Math.floor(Math.random() * invitedFactions.length)];
inviteToFaction(randFaction);
}
Engine.Counters.checkFactionInvitations = 100;
}
if (Engine.Counters.passiveFactionGrowth <= 0) { if (Engine.Counters.passiveFactionGrowth <= 0) {
var adjustedCycles = Math.floor(5 - Engine.Counters.passiveFactionGrowth); var adjustedCycles = Math.floor(5 - Engine.Counters.passiveFactionGrowth);
processPassiveFactionRepGain(adjustedCycles); processPassiveFactionRepGain(adjustedCycles);