Stardew Valley: Refactor skill progression to use new feature system (#3662)

* create a first draft of the feature

* use feature in items and locations

* add content to more places

* use feature in logic

* replace option check by feature

* remove unused code

* remove weird white space

* some import nitpicking

* flip negative if
This commit is contained in:
Jouramie
2024-11-30 21:52:07 -05:00
committed by GitHub
parent f735416bda
commit a67688749f
21 changed files with 244 additions and 181 deletions

View File

@@ -1,6 +1,5 @@
from typing import Union
from ... import options
from ...logic.base_logic import BaseLogicMixin, BaseLogic
from ...logic.combat_logic import CombatLogicMixin
from ...logic.cooking_logic import CookingLogicMixin
@@ -45,9 +44,9 @@ CookingLogicMixin]]):
self.logic.received(ModTransportation.woods_obelisk))
tier = int(depth / 25) + 1
if self.options.skill_progression >= options.SkillProgression.option_progressive:
combat_tier = min(10, max(0, tier + 5))
rules.append(self.logic.skill.has_level(Skill.combat, combat_tier))
if self.content.features.skill_progression.is_progressive:
combat_level = min(10, max(0, tier + 5))
rules.append(self.logic.skill.has_level(Skill.combat, combat_level))
return self.logic.and_(*rules)