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>
47 lines
2.2 KiB
Python
47 lines
2.2 KiB
Python
from typing import Union
|
|
|
|
from .base_logic import BaseLogicMixin, BaseLogic
|
|
from .mine_logic import MineLogicMixin
|
|
from .received_logic import ReceivedLogicMixin
|
|
from .region_logic import RegionLogicMixin
|
|
from .skill_logic import SkillLogicMixin
|
|
from .tool_logic import ToolLogicMixin
|
|
from ..mods.logic.magic_logic import MagicLogicMixin
|
|
from ..stardew_rule import StardewRule
|
|
from ..strings.region_names import Region
|
|
from ..strings.skill_names import Skill, ModSkill
|
|
from ..strings.tool_names import ToolMaterial, Tool
|
|
|
|
|
|
class AbilityLogicMixin(BaseLogicMixin):
|
|
def __init__(self, *args, **kwargs):
|
|
super().__init__(*args, **kwargs)
|
|
self.ability = AbilityLogic(*args, **kwargs)
|
|
|
|
|
|
class AbilityLogic(BaseLogic[Union[AbilityLogicMixin, RegionLogicMixin, ReceivedLogicMixin, ToolLogicMixin, SkillLogicMixin, MineLogicMixin, MagicLogicMixin]]):
|
|
def can_mine_perfectly(self) -> StardewRule:
|
|
return self.logic.mine.can_progress_in_the_mines_from_floor(160)
|
|
|
|
def can_mine_perfectly_in_the_skull_cavern(self) -> StardewRule:
|
|
return (self.logic.ability.can_mine_perfectly() &
|
|
self.logic.region.can_reach(Region.skull_cavern))
|
|
|
|
def can_farm_perfectly(self) -> StardewRule:
|
|
tool_rule = self.logic.tool.has_tool(Tool.hoe, ToolMaterial.iridium) & self.logic.tool.can_water(4)
|
|
return tool_rule & self.logic.skill.has_farming_level(10)
|
|
|
|
def can_fish_perfectly(self) -> StardewRule:
|
|
skill_rule = self.logic.skill.has_level(Skill.fishing, 10)
|
|
return skill_rule & self.logic.tool.has_fishing_rod(4)
|
|
|
|
def can_chop_trees(self) -> StardewRule:
|
|
return self.logic.tool.has_tool(Tool.axe) & self.logic.region.can_reach(Region.forest)
|
|
|
|
def can_chop_perfectly(self) -> StardewRule:
|
|
magic_rule = (self.logic.magic.can_use_clear_debris_instead_of_tool_level(3)) & self.logic.mod.skill.has_mod_level(ModSkill.magic, 10)
|
|
tool_rule = self.logic.tool.has_tool(Tool.axe, ToolMaterial.iridium)
|
|
foraging_rule = self.logic.skill.has_level(Skill.foraging, 10)
|
|
region_rule = self.logic.region.can_reach(Region.forest)
|
|
return region_rule & ((tool_rule & foraging_rule) | magic_rule)
|