diff --git a/TODO.txt b/TODO.txt index 2ef803337..1268b3683 100644 --- a/TODO.txt +++ b/TODO.txt @@ -145,8 +145,8 @@ * better color scheme radial menu DONE 9/28/2024 * Make buttons icons DONE 9/28/2024 * BUG: change username after selecting map DONE 9/29/2024 +* BUG: fake humans break alliance too often * make fake humans more difficult -* test on mobile * make event box work on mobile * BUG: alliance cooldown request * add request attack diff --git a/resources/Usernames.txt b/resources/Usernames.txt index ddaa2a520..740b5f8c4 100644 --- a/resources/Usernames.txt +++ b/resources/Usernames.txt @@ -1,203 +1,114 @@ -CosmicNinja -PixelPirate -NeonDragon -QuantumQuest -MidnightMaverick -CyberPhoenix -StellarSpectre -EchoElf -VortexVoyager -LunarLynx -TechnoTitan -AuroraAlpha -ZenithZephyr -NovaNomad -CrimsonCorsair -ElectricEagle -FrostFury -ShadowSavant -RadiantRaven -AstralAce -IronIris -EmberEnigma -QuantumQuasar -CelestialCyborg -PhantomPulse -SolarSentinel -NebulaNinja -VelvetViper -CrystalCrafter -OnyxOracle -PlasmaPhoenix -EmeraldEcho -TwilightTempest -AtomicAether -CoralCrusader -GalacticGhost -ObsidianOwl -PrismPioneer -RubyRenegade -SapphireScout -TopazTornado -UmbralUnicorn -VolcanicVortex -WhisperWolf -XenonXiphias -YggdrasilYeti -ZirconZephyr -AzureAvalanche -BorealisBard -CrimsonComet -DeltaDragon -EchoEagle -FrostFalcon -GammaGriffin -HyperHawk -IndigoImp -JadeJaguar -KryptonKnight -LunarLeopard -MagmaMantis -NebulaNewt -OpalOctopus -PulsarPanther -QuasarQuetzal -RadiumRaven -SolarSalamander -TitaniumTiger -UraniumUnicorn -VortexVulture -WarpWeasel -XenonXenops -YttriumYak -ZirconZebra -AetherAardvark -ByteBadger -CosmosCheetah -DwarfDolphin -EonElk -FlareFirefly -GlitchGazelle -HaloHedgehog -IoIguana -JovianJackal -KelvinKoala -LumenLemur -MesonMeerkat -NexusNarwhal -OrionOcelot -PhotonPlatypus -QuantumQuokka -RadiantRhino -SonicSloth -TelluriumToucan -UmbraUrchin -VoidVole -WarpWalrus -XenoXerus -YtterbiumYak -ZenithZorilla -AstralAxolotl -BinaryBison -CosmicCapybara -DeuteriumDingo -EtherEchidna -FusionFerret -GravityGerbil -HeliumHyrax -IridiumIbex -JetJerboa -KineticKiwi -LithiumLynx -MagnetManatee -NeutronNumbat -OxygenOryx -ProtonPangolin -QuarkQuoll -RadiantRaccoon -StardustServal -TemporalTapir -UltravioletUakari -VacuumVicuƱa -WavelengthWombat -XenonXerus -YttriumYapok -ZephyrZebu -AuroraAntelope -BionicBandicoot -CelestialCaribou -DazzleDhole -EnigmaErmine -FusionFossa -GalacticGibbon -HorizonHeron -InfinityImpala -JadeJabiru -KineticKudu -LunarLoris -MysticMole -NebulaNyala -ObsidianOkapi -PlasmaPaca -QuantumQuagga -RadiantRatel -StellarSable -TidalTenrec -UmbraUrial -VoidVaquita -WarpWallaby -XenoXenops -YttriumYeti -ZenithZorilla -AetherAddax -BlazeBinturong -CosmoCaiman -DeltaDugong -EchoEland -FluxFennec -GigaGalago -HelixHartebeest -IonIbis -JoltJabiru -KineticKookaburra -LunarLemming -MysticMangabey -NebulaNewt -OrbitalOcelot -PulsarPuffin -QuantumQuail -RadiantRookery -SolarSkink -TitaniumTarsier -UraniumUakari -VortexVole -WarpWallaroo -XenonXerus -YttriumYak -ZephyrZebra -AstralAntelope -BinaryBadger -CosmicCheetah -DwarfDingo -EonEchidna -FusionFerret -GravityGazelle -HaloHedgehog -InfinityIguana -JadeJackal -KryptonKoala -LumenLemur -MagnetMeerkat -NexusNarwhal -OnyxOcelot -PhotonPlatypus -QuantumQuokka -RadiantRhino -StellarSloth -TempestToucan -UmbraUrchin -VoidVole -WaveWalrus -XenoXenops -YttriumYeti -ZenithZorilla \ No newline at end of file +USA +UK +Rome +Greece +Persia +Ottoman +Mongol +Inca +Aztec +Maya +Egypt +Carthage +Babylon +Assyria +Hittite +Phoenicia +Sumer +Akkad +China +Japan +Korea +Vietnam +India +Pakistan +Russia +USSR +Germany +France +Spain +Portugal +Netherlands +Belgium +Italy +Austria +Hungary +Poland +Sweden +Norway +Denmark +Finland +Iceland +Ireland +Scotland +Wales +Mexico +Brazil +Argentina +Chile +Peru +Colombia +Venezuela +Canada +Australia +New Zealand +South Africa +Nigeria +Ethiopia +Kenya +Ghana +Mali Empire +Songhai +Zimbabwe +Morocco +Algeria +Tunisia +Libya +Sudan +Turkey +Iran +Iraq +Saudi Arabia +Israel +Lebanon +Jordan +Syria +Yemen +Oman +Qatar +Kuwait +UAE +Afghanistan +Kazakhstan +Uzbekistan +Myanmar +Thailand +Cambodia +Malaysia +Indonesia +Philippines +Taiwan +Tibet +Mongolia +Burgundy +Prussia +Bohemia +Bavaria +Saxony +Hanover +Venice +Genoa +Florence +Naples +Sicily +Aragon +Castile +Leon +Navarre +Muscovy +Kievan Rus +Serbia +Croatia +Bosnia +Bulgaria +Romania diff --git a/src/client/ClientGame.ts b/src/client/ClientGame.ts index 401fa8f94..82de4cf8a 100644 --- a/src/client/ClientGame.ts +++ b/src/client/ClientGame.ts @@ -92,7 +92,6 @@ export class ClientGame { public start() { this.isActive = true - this.eventBus.on(PlayerEvent, (e) => this.playerEvent(e)) this.eventBus.on(MouseUpEvent, (e) => this.inputEvent(e)) diff --git a/src/core/configuration/DefaultConfig.ts b/src/core/configuration/DefaultConfig.ts index 2c35e9153..af17fb24b 100644 --- a/src/core/configuration/DefaultConfig.ts +++ b/src/core/configuration/DefaultConfig.ts @@ -114,6 +114,9 @@ export class DefaultConfig implements Config { if (playerInfo.playerType == PlayerType.Bot) { return 10000 } + if (playerInfo.playerType == PlayerType.FakeHuman) { + return 50000 + } return 10000 } diff --git a/src/core/configuration/DevConfig.ts b/src/core/configuration/DevConfig.ts index c12f8a1a4..fd9f08618 100644 --- a/src/core/configuration/DevConfig.ts +++ b/src/core/configuration/DevConfig.ts @@ -19,16 +19,16 @@ export const devConfig = new class extends DefaultConfig { return 100 } - numBots(): number { - return 400 - } + // numBots(): number { + // return 1000 + // } // allianceDuration(): Tick { // return 10 * 10 // } // numFakeHumans(gameID: GameID): number { - // return 0 + // return 50 // } // startTroops(playerInfo: PlayerInfo): number { diff --git a/src/core/execution/FakeHumanExecution.ts b/src/core/execution/FakeHumanExecution.ts index 75f0ebbfd..9104d3e69 100644 --- a/src/core/execution/FakeHumanExecution.ts +++ b/src/core/execution/FakeHumanExecution.ts @@ -106,16 +106,18 @@ export class FakeHumanExecution implements Execution { const toAlly = this.random.randElement(enemies) if (!this.player.isAlliedWith(toAlly)) { this.player.createAllianceRequest(toAlly) + return } } if (this.random.chance(2)) { - if (!this.player.isAlliedWith(enemies[0]) || (this.random.chance(90) && this.isTraitor)) { + if (!this.player.isAlliedWith(enemies[0]) || (this.random.chance(50) && this.isTraitor)) { this.sendAttack(enemies[0]) } } else { - if (!this.player.isAlliedWith(enemies[0]) || (this.random.chance(180) && this.isTraitor)) { - this.sendAttack(this.random.randElement(enemies)) + const toAttack = this.random.randElement(enemies) + if (!this.player.isAlliedWith(toAttack) || (this.random.chance(100) && this.isTraitor)) { + this.sendAttack(toAttack) } } } @@ -174,6 +176,9 @@ export class FakeHumanExecution implements Execution { if (this.isSmallIsland(dst)) { continue } + if (dst.owner().isPlayer() && this.player.isAlliedWith(dst.owner() as Player)) { + continue + } this.mg.addExecution(new BoatAttackExecution( this.player.id(),