Skip to content

Commit

Permalink
- Use the compound source of the monster compoundium (ironic, I know)
Browse files Browse the repository at this point in the history
  • Loading branch information
agilbert1412 committed Aug 5, 2024
1 parent f4efa2f commit ca04c5b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions worlds/stardew_valley/content/vanilla/pelican_town.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from ..game_content import ContentPack
from ...data import villagers_data, fish_data
from ...data.game_item import GenericSource, ItemTag, Tag, CustomRuleSource
from ...data.game_item import GenericSource, ItemTag, Tag, CustomRuleSource, CompoundSource
from ...data.harvest import ForagingSource, SeasonalForagingSource, ArtifactSpotSource
from ...data.requirement import ToolRequirement, BookRequirement, SkillRequirement, SeasonRequirement
from ...data.shop import ShopSource, MysteryBoxSource, ArtifactTroveSource, PrizeMachineSource, FishingTreasureChestSource
Expand Down Expand Up @@ -229,8 +229,10 @@
ShopSource(money_price=20000, shop_region=LogicRegion.bookseller_3),),
Book.mapping_cave_systems: (
Tag(ItemTag.BOOK, ItemTag.BOOK_POWER),
GenericSource(regions=(Region.adventurer_guild_bedroom,)),
ShopSource(money_price=20000, shop_region=LogicRegion.bookseller_3),),
CompoundSource(sources=(
GenericSource(regions=(Region.adventurer_guild_bedroom,)),
ShopSource(money_price=20000, shop_region=LogicRegion.bookseller_3),
))),
Book.monster_compendium: (
Tag(ItemTag.BOOK, ItemTag.BOOK_POWER),
CustomRuleSource(create_rule=lambda logic: logic.monster.can_kill_many(Generic.any)),
Expand Down
4 changes: 2 additions & 2 deletions worlds/stardew_valley/test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,9 @@ def run_default_tests(self) -> bool:
return False
return super().run_default_tests

def collect_lots_of_money(self):
def collect_lots_of_money(self, percent: float = 0.25):
self.multiworld.state.collect(self.world.create_item("Shipping Bin"), event=False)
required_prog_items = int(round(self.multiworld.worlds[self.player].total_progression_items * 0.25))
required_prog_items = int(round(self.multiworld.worlds[self.player].total_progression_items * percent))
for i in range(required_prog_items):
self.multiworld.state.collect(self.world.create_item("Stardrop"), event=False)

Expand Down
2 changes: 1 addition & 1 deletion worlds/stardew_valley/test/rules/TestBooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class TestBooksLogic(SVTestBase):
}

def test_need_weapon_for_mapping_cave_systems(self):
self.collect_all_the_money()
self.collect_lots_of_money(0.5)

location = self.multiworld.get_location("Read Mapping Cave Systems", self.player)

Expand Down

0 comments on commit ca04c5b

Please sign in to comment.