Merge pull request #1227 from danielyxie/dev

fix faction invitations
This commit is contained in:
hydroflame 2021-09-11 17:24:46 -04:00 committed by GitHub
commit 5b4bc0a68f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;
}
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) {
var adjustedCycles = Math.floor(5 - Engine.Counters.passiveFactionGrowth);
processPassiveFactionRepGain(adjustedCycles);