forked from ArchipelagoMW/Archipelago
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
24 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,39 @@ | ||
from dataclasses import dataclass | ||
from typing import Tuple, Optional | ||
|
||
from .game_item import ItemSource, kw_only, Requirement | ||
from .game_item import ItemSource | ||
from ..strings.season_names import Season | ||
|
||
ItemPrice = Tuple[int, str] | ||
|
||
|
||
@dataclass(frozen=True, **kw_only) | ||
@dataclass(frozen=True, kw_only=True) | ||
class ShopSource(ItemSource): | ||
shop_region: str | ||
money_price: Optional[int] = None | ||
items_price: Optional[Tuple[ItemPrice, ...]] = None | ||
seasons: Tuple[str, ...] = Season.all | ||
other_requirements: Tuple[Requirement, ...] = () | ||
|
||
def __post_init__(self): | ||
assert self.money_price is not None or self.items_price is not None, "At least money price or items price need to be defined." | ||
assert self.items_price is None or all(isinstance(p, tuple) for p in self.items_price), "Items price should be a tuple." | ||
|
||
|
||
@dataclass(frozen=True, **kw_only) | ||
@dataclass(frozen=True, kw_only=True) | ||
class MysteryBoxSource(ItemSource): | ||
amount: int | ||
|
||
|
||
@dataclass(frozen=True, **kw_only) | ||
@dataclass(frozen=True, kw_only=True) | ||
class ArtifactTroveSource(ItemSource): | ||
amount: int | ||
|
||
|
||
@dataclass(frozen=True, **kw_only) | ||
@dataclass(frozen=True, kw_only=True) | ||
class PrizeMachineSource(ItemSource): | ||
amount: int | ||
|
||
|
||
@dataclass(frozen=True, **kw_only) | ||
@dataclass(frozen=True, kw_only=True) | ||
class FishingTreasureChestSource(ItemSource): | ||
amount: int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
from dataclasses import dataclass, field | ||
|
||
from ..data.game_item import kw_only | ||
|
||
|
||
@dataclass(frozen=True) | ||
class Skill: | ||
name: str | ||
has_mastery: bool = field(**kw_only) | ||
has_mastery: bool = field(kw_only=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters