Minigames - ogrady/inf3project GitHub Wiki
Players are able to play certain minigames with each other. Those are basically games from the branch of game theory where you can earn or lose points by competing with other players. Every minigame has certain preconditions that have to be fulfilled in order to be playable. But, assuming that the specific preconditions are met, the general course goes like this:
- Player A challenges player B
- Player B challenges player A
- Both players autmatically enter a private match and have their state set to "busy"
- The minigame will now automatically play a number of rounds as predefined in the serverconfig
- The server will wait for some time to give the players the opportunity to change their deicision for the game
- Then the two current decisions of the players will be compared and points will be distributed (which is being sent to the players as a result-object)
- When the maximum number of rounds is reached or one of the players disconnectes, the game will end by resetting their busy-state
The games
Note for the gametables: the rows are your decisions, the columns are the opponents decisions.
Staghunt
Some forests contain wild animals, namely stags and bunnies. Stags are big and wild and you won't stand a chance hunting one alone and you will probably get injured trying to do so (negative points). But the result will be more rewarding, as you gain a pleasent amount of points, when working together. On the other hand, hunting a bunny is far less dangerous and will get you safe points. But if both of you choose to hunt the bunny, they will see you approach and flee, so you will both go home with a grumbling tummy (no points at all).
Preconditions
Both players have to stand on the same tile that is marked as "huntable" and are not busy.
Decisions
STAG, BUNNY
Gametable
Stag | Bunny | |
---|---|---|
Stag | 2 | -1 |
Bunny | 1 | 0 |
Dragonhunt
Two players can engage in a battle with dragons that roam around on the map. In this round-wise battle, both players can decide to either fight or rest. Uniting your strength on the dragon will grant both of you some points. But sneaky players might want to take a break, while the other player does all the work. In that case, you are refreshed and the dragon is being damaged, which will grant you the maximum in points. Your teammate will not be as effective and gain less points. He will probably despise your loafing and rest as well. In that case, none of you is getting any points.
Preconditions
Both players have to stand on the same tile with a dragon that is not already busy and are not busy themselves.
FIGHT, REST
Gametable
Fight | Rest | |
---|---|---|
Fight | 2 | 1 |
Rest | 5 | 0 |
Skirmish
Skirmish is ye good ol' hand-to-hand-fight. All players are skilled in magic, alchemy and swinging a sword. But there is no best choice in this, as every weapon can beat another weapon and be beaten alike. So it is basically rock-paper-scissors.
Preconditions
Both players have to stand on the same tile and are not busy.
Decisions
SWORD, MAGIC, ALCHEMY
Gametable
Sword | Magic | Alchemy | |
---|---|---|---|
Sword | 0 | -1 | 1 |
Magic | 1 | 0 | -1 |
Alchemy | -1 | 1 | 0 |