Stardew Valley: Fix magic altar logic (#3417)
* Fix magic altar logic * Force a tuple (really?) * Fix received and force progression on all spells * Reversing the tuple change (?yllaer)
This commit is contained in:
parent
34f903e97a
commit
378af4b07c
|
@ -735,26 +735,26 @@ id,name,classification,groups,mod_name
|
||||||
10007,Tractor Garage,useful,,Tractor Mod
|
10007,Tractor Garage,useful,,Tractor Mod
|
||||||
10008,Woods Obelisk,progression,,DeepWoods
|
10008,Woods Obelisk,progression,,DeepWoods
|
||||||
10009,Spell: Clear Debris,progression,MAGIC_SPELL,Magic
|
10009,Spell: Clear Debris,progression,MAGIC_SPELL,Magic
|
||||||
10010,Spell: Till,useful,MAGIC_SPELL,Magic
|
10010,Spell: Till,progression,MAGIC_SPELL,Magic
|
||||||
10011,Spell: Water,progression,MAGIC_SPELL,Magic
|
10011,Spell: Water,progression,MAGIC_SPELL,Magic
|
||||||
10012,Spell: Blink,progression,MAGIC_SPELL,Magic
|
10012,Spell: Blink,progression,MAGIC_SPELL,Magic
|
||||||
10013,Spell: Evac,useful,MAGIC_SPELL,Magic
|
10013,Spell: Evac,progression,MAGIC_SPELL,Magic
|
||||||
10014,Spell: Haste,useful,MAGIC_SPELL,Magic
|
10014,Spell: Haste,progression,MAGIC_SPELL,Magic
|
||||||
10015,Spell: Heal,progression,MAGIC_SPELL,Magic
|
10015,Spell: Heal,progression,MAGIC_SPELL,Magic
|
||||||
10016,Spell: Buff,useful,MAGIC_SPELL,Magic
|
10016,Spell: Buff,progression,MAGIC_SPELL,Magic
|
||||||
10017,Spell: Shockwave,progression,MAGIC_SPELL,Magic
|
10017,Spell: Shockwave,progression,MAGIC_SPELL,Magic
|
||||||
10018,Spell: Fireball,progression,MAGIC_SPELL,Magic
|
10018,Spell: Fireball,progression,MAGIC_SPELL,Magic
|
||||||
10019,Spell: Frostbolt,progression,MAGIC_SPELL,Magic
|
10019,Spell: Frostbolt,progression,MAGIC_SPELL,Magic
|
||||||
10020,Spell: Teleport,progression,MAGIC_SPELL,Magic
|
10020,Spell: Teleport,progression,MAGIC_SPELL,Magic
|
||||||
10021,Spell: Lantern,useful,MAGIC_SPELL,Magic
|
10021,Spell: Lantern,progression,MAGIC_SPELL,Magic
|
||||||
10022,Spell: Tendrils,progression,MAGIC_SPELL,Magic
|
10022,Spell: Tendrils,progression,MAGIC_SPELL,Magic
|
||||||
10023,Spell: Photosynthesis,useful,MAGIC_SPELL,Magic
|
10023,Spell: Photosynthesis,progression,MAGIC_SPELL,Magic
|
||||||
10024,Spell: Descend,progression,MAGIC_SPELL,Magic
|
10024,Spell: Descend,progression,MAGIC_SPELL,Magic
|
||||||
10025,Spell: Meteor,progression,MAGIC_SPELL,Magic
|
10025,Spell: Meteor,progression,MAGIC_SPELL,Magic
|
||||||
10026,Spell: Bloodmana,useful,MAGIC_SPELL,Magic
|
10026,Spell: Bloodmana,progression,MAGIC_SPELL,Magic
|
||||||
10027,Spell: Lucksteal,useful,MAGIC_SPELL,Magic
|
10027,Spell: Lucksteal,progression,MAGIC_SPELL,Magic
|
||||||
10028,Spell: Spirit,progression,MAGIC_SPELL,Magic
|
10028,Spell: Spirit,progression,MAGIC_SPELL,Magic
|
||||||
10029,Spell: Rewind,useful,MAGIC_SPELL,Magic
|
10029,Spell: Rewind,progression,MAGIC_SPELL,Magic
|
||||||
10030,Pendant of Community,progression,,DeepWoods
|
10030,Pendant of Community,progression,,DeepWoods
|
||||||
10031,Pendant of Elders,progression,,DeepWoods
|
10031,Pendant of Elders,progression,,DeepWoods
|
||||||
10032,Pendant of Depths,progression,,DeepWoods
|
10032,Pendant of Depths,progression,,DeepWoods
|
||||||
|
|
|
|
@ -8,7 +8,7 @@ from ...mods.mod_data import ModNames
|
||||||
from ...stardew_rule import StardewRule, False_
|
from ...stardew_rule import StardewRule, False_
|
||||||
from ...strings.ap_names.skill_level_names import ModSkillLevel
|
from ...strings.ap_names.skill_level_names import ModSkillLevel
|
||||||
from ...strings.region_names import MagicRegion
|
from ...strings.region_names import MagicRegion
|
||||||
from ...strings.spells import MagicSpell
|
from ...strings.spells import MagicSpell, all_spells
|
||||||
|
|
||||||
|
|
||||||
class MagicLogicMixin(BaseLogicMixin):
|
class MagicLogicMixin(BaseLogicMixin):
|
||||||
|
@ -27,7 +27,8 @@ class MagicLogic(BaseLogic[Union[RegionLogicMixin, ReceivedLogicMixin, HasLogicM
|
||||||
def can_use_altar(self) -> StardewRule:
|
def can_use_altar(self) -> StardewRule:
|
||||||
if ModNames.magic not in self.options.mods:
|
if ModNames.magic not in self.options.mods:
|
||||||
return False_()
|
return False_()
|
||||||
return self.logic.region.can_reach(MagicRegion.altar)
|
spell_rule = False_()
|
||||||
|
return self.logic.region.can_reach(MagicRegion.altar) & self.logic.received_any(*all_spells)
|
||||||
|
|
||||||
def has_any_spell(self) -> StardewRule:
|
def has_any_spell(self) -> StardewRule:
|
||||||
if ModNames.magic not in self.options.mods:
|
if ModNames.magic not in self.options.mods:
|
||||||
|
|
|
@ -1,22 +1,30 @@
|
||||||
|
all_spells = []
|
||||||
|
|
||||||
|
|
||||||
|
def spell(name: str) -> str:
|
||||||
|
all_spells.append(name)
|
||||||
|
return name
|
||||||
|
|
||||||
|
|
||||||
class MagicSpell:
|
class MagicSpell:
|
||||||
clear_debris = "Spell: Clear Debris"
|
clear_debris = spell("Spell: Clear Debris")
|
||||||
till = "Spell: Till"
|
till = spell("Spell: Till")
|
||||||
water = "Spell: Water"
|
water = spell("Spell: Water")
|
||||||
blink = "Spell: Blink"
|
blink = spell("Spell: Blink")
|
||||||
evac = "Spell: Evac"
|
evac = spell("Spell: Evac")
|
||||||
haste = "Spell: Haste"
|
haste = spell("Spell: Haste")
|
||||||
heal = "Spell: Heal"
|
heal = spell("Spell: Heal")
|
||||||
buff = "Spell: Buff"
|
buff = spell("Spell: Buff")
|
||||||
shockwave = "Spell: Shockwave"
|
shockwave = spell("Spell: Shockwave")
|
||||||
fireball = "Spell: Fireball"
|
fireball = spell("Spell: Fireball")
|
||||||
frostbite = "Spell: Frostbolt"
|
frostbite = spell("Spell: Frostbolt")
|
||||||
teleport = "Spell: Teleport"
|
teleport = spell("Spell: Teleport")
|
||||||
lantern = "Spell: Lantern"
|
lantern = spell("Spell: Lantern")
|
||||||
tendrils = "Spell: Tendrils"
|
tendrils = spell("Spell: Tendrils")
|
||||||
photosynthesis = "Spell: Photosynthesis"
|
photosynthesis = spell("Spell: Photosynthesis")
|
||||||
descend = "Spell: Descend"
|
descend = spell("Spell: Descend")
|
||||||
meteor = "Spell: Meteor"
|
meteor = spell("Spell: Meteor")
|
||||||
bloodmana = "Spell: Bloodmana"
|
bloodmana = spell("Spell: Bloodmana")
|
||||||
lucksteal = "Spell: Lucksteal"
|
lucksteal = spell("Spell: Lucksteal")
|
||||||
spirit = "Spell: Spirit"
|
spirit = spell("Spell: Spirit")
|
||||||
rewind = "Spell: Rewind"
|
rewind = spell("Spell: Rewind")
|
||||||
|
|
Loading…
Reference in New Issue