magefree / magefree/mage

Server: add objects limit in games

Open
#6,594 1 comment 0 reactions 0 assignees View on GitHub
enhancement server
Dominant language
Java
Stars
2.4k
Forks
940
Avg merge
2d 12h
Merged PRs (30d)
160

Description

Some card combos can auto-generate too much objects (thanks to skip buttons too). It can freeze the server (AI or other calculations), make memory overflow and etc.

So it can be useful to add default settings in server's config and close the game on too much objects count.

TODO:
* add config's param: `maxGameObjects` (default: 3000);
* what's to check:
* permanents on battlefield;
* objects on stack;
* cards amount in libraries, hands and other zones;
* If sum of all game objects >= 3000 then end the game;
* Player with lowest objects count will win the game, all other will lose (or maybe it will be draw, hmm).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.