Wargroove: apworld (#4764)

- Players and AI can sacrifice their own units and upload them to the multiworld.
- Players and AI can summon random units from the multiworld.
- Has 4 new separate options for how many sacrifices and summons either the player or the AI can make per level attempt.
- New /sacrifice_summon command to toggle sacrifices and summons on/off. Useful if the AI makes a level impossible with their summons.
- Linux Support.
- Is an apworld now.


---------

Co-authored-by: Raspberry Floof <raspberry@rosenthalcastle.org>
Co-authored-by: KScl <ks@rosenthalcastle.org>
Co-authored-by: Abigail Fox <Raspberryfloof@users.noreply.github.com>
Co-authored-by: qwint <qwint.42@gmail.com>
Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
This commit is contained in:
Fly Hyping
2025-05-21 19:00:45 -04:00
committed by GitHub
parent 6827368e60
commit defdf34e60
10 changed files with 298 additions and 49 deletions

View File

@@ -1,6 +1,6 @@
import typing
from dataclasses import dataclass
from Options import Choice, Option, Range, PerGameCommonOptions
from Options import Choice, Range, PerGameCommonOptions, StartInventoryPool, OptionDict, OptionGroup, \
DeathLinkMixin
class IncomeBoost(Range):
@@ -31,8 +31,65 @@ class CommanderChoice(Choice):
option_unlockable_factions = 1
option_random_starting_faction = 2
class PlayerSacrificeLimit(Range):
"""How many times the player can sacrifice a unit at the Stronghold per level attempt.
Sacrificed units are stored in the multiworld for other players to summon."""
display_name = "Player Sacrifice Limit"
range_start = 0
range_end = 5
default = 0
class PlayerSummonLimit(Range):
"""How many times the player can summon a unit at the Stronghold per level attempt.
Summoned units are from the multiworld which were sacrificed by other players."""
display_name = "Player Summon Limit"
range_start = 0
range_end = 5
default = 0
class AISacrificeLimit(Range):
"""How many times the AI can sacrifice a unit at the Stronghold per level attempt.
Sacrificed units are stored in the multiworld for other AIs to summon."""
display_name = "AI Sacrifice Limit"
range_start = 0
range_end = 5
default = 0
class AISummonLimit(Range):
"""How many times the AI can summon a unit at the Stronghold per level attempt.
Summoned units are from the multiworld which were sacrificed by other AIs.
AI summoning can be overwhelming, use /sacrifice_summon in the client if a level becomes impossible."""
display_name = "AI Summon Limit"
range_start = 0
range_end = 5
default = 0
wargroove_option_groups = [
OptionGroup("General Options", [
IncomeBoost,
CommanderDefenseBoost,
CommanderChoice
]),
OptionGroup("Sacrifice and Summon Options", [
PlayerSacrificeLimit,
PlayerSummonLimit,
AISacrificeLimit,
AISummonLimit,
]),
]
@dataclass
class WargrooveOptions(PerGameCommonOptions):
class WargrooveOptions(DeathLinkMixin, PerGameCommonOptions):
income_boost: IncomeBoost
commander_defense_boost: CommanderDefenseBoost
commander_choice: CommanderChoice
player_sacrifice_limit: PlayerSacrificeLimit
player_summon_limit: PlayerSummonLimit
ai_sacrifice_limit: AISacrificeLimit
ai_summon_limit: AISummonLimit
start_inventory_from_pool: StartInventoryPool