mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00

Major Content update for Stardew Valley, including the following features - Major performance improvements all across the Stardew Valley apworld, including a significant reduction in the test time - Randomized Farm Type - Bundles rework (Remixed Bundles and Missing Bundle!) - New Settings: * Shipsanity - Shipping individual items * Monstersanity - Slaying monsters * Cooksanity - Cooking individual recipes * Chefsanity - Learning individual recipes * Craftsanity - Crafting individual items - New Goals: * Protector of the Valley - Complete every monster slayer goal * Full Shipment - Ship every item * Craftmaster - Craft every item * Gourmet Chef - Cook every recipe * Legend - Earn 10 000 000g * Mystery of the Stardrops - Find every stardrop (Maguffin Hunt) * Allsanity - Complete every check in your slot - Building Shuffle: Cheaper options - Tool Shuffle: Cheaper options - Money rework - New traps - New isolated checks and items, including the farm cave, the movie theater, etc - Mod Support: SVE [Albrekka] - Mod Support: Distant Lands [Albrekka] - Mod Support: Hat Mouse Lacey [Albrekka] - Mod Support: Boarding House [Albrekka] Co-authored-by: Witchybun <elnendil@gmail.com> Co-authored-by: Witchybun <96719127+Witchybun@users.noreply.github.com> Co-authored-by: Jouramie <jouramie@hotmail.com> Co-authored-by: Alchav <59858495+Alchav@users.noreply.github.com>
56 lines
2.7 KiB
Python
56 lines
2.7 KiB
Python
from typing import Union
|
|
|
|
from ..mod_regions import SVERegion
|
|
from ...logic.base_logic import BaseLogicMixin, BaseLogic
|
|
from ...logic.combat_logic import CombatLogicMixin
|
|
from ...logic.cooking_logic import CookingLogicMixin
|
|
from ...logic.has_logic import HasLogicMixin
|
|
from ...logic.money_logic import MoneyLogicMixin
|
|
from ...logic.quest_logic import QuestLogicMixin
|
|
from ...logic.received_logic import ReceivedLogicMixin
|
|
from ...logic.region_logic import RegionLogicMixin
|
|
from ...logic.relationship_logic import RelationshipLogicMixin
|
|
from ...logic.season_logic import SeasonLogicMixin
|
|
from ...logic.time_logic import TimeLogicMixin
|
|
from ...logic.tool_logic import ToolLogicMixin
|
|
from ...strings.ap_names.mods.mod_items import SVELocation, SVERunes, SVEQuestItem
|
|
from ...strings.quest_names import Quest
|
|
from ...strings.region_names import Region
|
|
from ...strings.tool_names import Tool, ToolMaterial
|
|
from ...strings.wallet_item_names import Wallet
|
|
from ...stardew_rule import Or
|
|
from ...strings.quest_names import ModQuest
|
|
|
|
|
|
class SVELogicMixin(BaseLogicMixin):
|
|
def __init__(self, *args, **kwargs):
|
|
super().__init__(*args, **kwargs)
|
|
self.sve = SVELogic(*args, **kwargs)
|
|
|
|
|
|
class SVELogic(BaseLogic[Union[HasLogicMixin, ReceivedLogicMixin, QuestLogicMixin, RegionLogicMixin, RelationshipLogicMixin, TimeLogicMixin, ToolLogicMixin,
|
|
CookingLogicMixin, MoneyLogicMixin, CombatLogicMixin, SeasonLogicMixin, QuestLogicMixin]]):
|
|
def initialize_rules(self):
|
|
self.registry.sve_location_rules.update({
|
|
SVELocation.tempered_galaxy_sword: self.logic.money.can_spend_at(SVERegion.alesia_shop, 350000),
|
|
SVELocation.tempered_galaxy_dagger: self.logic.money.can_spend_at(SVERegion.isaac_shop, 600000),
|
|
SVELocation.tempered_galaxy_hammer: self.logic.money.can_spend_at(SVERegion.isaac_shop, 400000),
|
|
})
|
|
|
|
def has_any_rune(self):
|
|
rune_list = SVERunes.nexus_items
|
|
return Or(*(self.logic.received(rune) for rune in rune_list))
|
|
|
|
def has_iridium_bomb(self):
|
|
if self.options.quest_locations < 0:
|
|
return self.logic.quest.can_complete_quest(ModQuest.RailroadBoulder)
|
|
return self.logic.received(SVEQuestItem.iridium_bomb)
|
|
|
|
def can_buy_bear_recipe(self):
|
|
access_rule = (self.logic.quest.can_complete_quest(Quest.strange_note) & self.logic.tool.has_tool(Tool.axe, ToolMaterial.basic) &
|
|
self.logic.tool.has_tool(Tool.pickaxe, ToolMaterial.basic))
|
|
forage_rule = self.logic.region.can_reach_any((Region.forest, Region.backwoods, Region.mountain))
|
|
knowledge_rule = self.logic.received(Wallet.bears_knowledge)
|
|
return access_rule & forage_rule & knowledge_rule
|
|
|