mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user