Core: move multiple Item properties into a single Flag (#638)
This commit is contained in:
@@ -14,7 +14,7 @@ from .ExtractedData import locations, starts, multi_locations, location_to_regio
|
||||
event_names, item_effects, connectors, one_ways
|
||||
from .Charms import names as charm_names
|
||||
|
||||
from BaseClasses import Region, Entrance, Location, MultiWorld, Item, RegionType, LocationProgressType, Tutorial
|
||||
from BaseClasses import Region, Entrance, Location, MultiWorld, Item, RegionType, LocationProgressType, Tutorial, ItemClassification
|
||||
from ..AutoWorld import World, LogicMixin, WebWorld
|
||||
|
||||
path_of_pain_locations = {
|
||||
@@ -385,16 +385,18 @@ class HKItem(Item):
|
||||
game = "Hollow Knight"
|
||||
|
||||
def __init__(self, name, advancement, code, type, player: int = None):
|
||||
super(HKItem, self).__init__(name, advancement, code if code else None, player)
|
||||
self.type = type
|
||||
if name == "Mimic_Grub":
|
||||
self.trap = True
|
||||
|
||||
if type in ("Grub", "DreamWarrior", "Root", "Egg"):
|
||||
self.skip_in_prog_balancing = True
|
||||
|
||||
if type == "Charm" and name not in progression_charms:
|
||||
self.skip_in_prog_balancing = True
|
||||
classification = ItemClassification.trap
|
||||
elif type in ("Grub", "DreamWarrior", "Root", "Egg"):
|
||||
classification = ItemClassification.progression_skip_balancing
|
||||
elif type == "Charm" and name not in progression_charms:
|
||||
classification = ItemClassification.progression_skip_balancing
|
||||
elif advancement:
|
||||
classification = ItemClassification.progression
|
||||
else:
|
||||
classification = ItemClassification.filler
|
||||
super(HKItem, self).__init__(name, classification, code if code else None, player)
|
||||
self.type = type
|
||||
|
||||
|
||||
class HKLogicMixin(LogicMixin):
|
||||
|
||||
Reference in New Issue
Block a user