Commit Graph

48 Commits

Author SHA1 Message Date
Scott Anderson 1b672420b3 Combine Bot and Nation behaviors in to a shared class (#434)
This is the first move in the effort to combine the redundant logic that
exists between BotExecution and FakeHumonExecution.

This commit:
1. Combines the alliance request handler, moving bots to use the same
logic as nations for acceptance.
2. Combines the sendAttack() functions, which may later be reworked.
3. Introduces selectEnemy() function to wrap enemy selection logic that
nations use.
4. Blocks nations from nuking bots.
5. Alters enemy selection to prefer neighboring bots if there are any.

## Description:

Fixes #467 

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

## Please put your Discord username so you can be contacted if a bug or
regression is found:

fake.neo

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
2025-04-17 19:37:16 -07:00
Evan 8b6895d745 add prettier import plugin 2025-03-31 13:09:27 -07:00
PilkeySEK d6e596f7d8 fix: Make bots not attack teammates (#368)
Bug report:
https://discord.com/channels/1284581928254701718/1355194642592694412
## Please complete the following:

- [X] I have added screenshots for all UI updates
- [X] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [X] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

## Please put your Discord username so you can be contacted if a bug or
regression is found:
PilkeySEK
2025-03-30 10:43:24 -07:00
evanpelle d8fe41de7a teams (#349) 2025-03-27 20:43:56 -07:00
Ilan Schemoul 7ec3f0c81f Revert "Change BorderTiles from Array to Set (#230)" (#238)
This reverts commit 8124651382 which
breaks compilation, has wrong indentation and uses flatMap without
Array.from which is also wrong.
2025-03-13 14:51:35 -07:00
ByGoalZ 8124651382 Change BorderTiles from Array to Set (#230)
Changed border constant from Array to Set, to avoid potential
duplicates.
2025-03-13 06:05:10 -07:00
Evan 64d13a46bd bugfix: bots were not losing troops in attack. rebalanced difficulties. 2025-02-13 11:50:15 -08:00
Evan 40966ca3b9 format all files with prettier 2025-02-12 08:28:15 -08:00
Evan 4182eaa449 rebalance difficulties 2025-02-08 20:59:44 -08:00
Evan 4ee37323f9 format codebase with prettier 2025-02-01 12:05:11 -08:00
evanpelle de1dbff570 combine Game & MutableGame 2025-02-01 12:05:11 -08:00
evanpelle 7d15c0c065 combine Player & MutablePlayer interfaces 2025-02-01 12:05:11 -08:00
Evan b91d9d4148 fix bugs from using tilerefs 2025-02-01 12:05:11 -08:00
Evan f0f5bae79f thread_split: convert all tile to tileref 2025-02-01 12:05:11 -08:00
evanpelle a17ae48cd3 use TileRef instead of tile 2025-02-01 12:05:11 -08:00
Evan dab427d614 put methods onto terraintile 2025-02-01 12:05:11 -08:00
Evan 2d2df14ae3 add GameConfig to Game 2024-12-07 09:45:39 -08:00
evanpelle d874392467 refactored alliance 2024-09-22 13:38:43 -07:00
evanpelle 9e4b38c333 can betray traitor without becoming traitor. allied bots less likely to attack traitor than non allied. 2024-09-19 08:19:54 -07:00
evanpelle 37e529ac84 fix traitor bot attack bug 2024-09-19 08:09:43 -07:00
evanpelle 7e986806d7 bots more likely to attack traitors 2024-09-19 08:09:11 -07:00
evanpelle 41e77858ee add traitor icon, bots don't ally traitors 2024-09-18 20:27:12 -07:00
evanpelle 4bab6a5271 bots don't attack allies 2024-09-17 21:01:57 -07:00
evanpelle d4d0be5e37 gameimpl store alliances 2024-09-17 20:30:15 -07:00
evanpelle f3307300ef refactored GameImpl into multiple files 2024-09-17 19:49:16 -07:00
evanpelle a7f838d442 updated balance 2024-09-13 15:55:17 -07:00
evanpelle a3fc8879b4 minor fixes 2024-09-10 18:33:31 -07:00
evanpelle f24a4b894a fixed pacing bug, improved expansion 2024-09-09 20:31:45 -07:00
evanpelle a7ad8790aa fakehumans send boats, improved map 2024-09-08 20:21:39 -07:00
evanpelle a92bebce05 when attacking by boat, attack execution only starts from boat pixel 2024-09-04 20:06:20 -07:00
evanpelle d2a8b48764 remove playerconfig 2024-08-29 20:24:50 -07:00
evanpelle 0281db46fa make bots more likely to attack larger border 2024-08-29 20:19:56 -07:00
evanpelle 8c902a70b8 added spawn timer bar 2024-08-26 09:13:05 -07:00
evanpelle 51650eb930 can change spawn in beginning of game 2024-08-25 20:21:35 -07:00
evanpelle bb8c24e230 move config to Game 2024-08-24 12:12:46 -07:00
evanpelle 5e7c206f0d improved terrain api 2024-08-21 19:51:01 -07:00
evanpelle bc8463fa79 game start delay 5 seconds 2024-08-16 20:42:10 -07:00
evanpelle 1cf112c0fb trying to fix nondetermism 2024-08-16 17:43:00 -07:00
evanpelle a60daed8ef create game hash 2024-08-16 15:24:01 -07:00
evanpelle 9a64a83b43 bots wait until active 2024-08-16 15:11:28 -07:00
evanpelle d12ebc5f4b increased game length, balanced attacks 2024-08-16 14:48:51 -07:00
evanpelle 51c05f9d10 moved attack logic to config 2024-08-16 13:10:44 -07:00
evanpelle fab17bd48a bot attacks terranullius first 2024-08-11 17:57:24 -07:00
evanpelle dd94bb4c65 use tiles to improve perf 2024-08-10 19:35:31 -07:00
evanpelle 5efd9f4779 removed sharesborderwith cache 2024-08-10 12:29:35 -07:00
evanpelle ca5cc49763 working 2024-08-10 11:32:06 -07:00
evanpelle f9fddeb7c6 fix directed expansion 2024-08-07 20:54:20 -07:00
evanpelle 05f55c490f First Commit 2024-08-04 19:51:23 -07:00