mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Zillion: Use Useful Item Classification (#4179)
This commit is contained in:
@@ -1,6 +1,34 @@
|
||||
from typing import Counter
|
||||
from BaseClasses import Item, ItemClassification as IC
|
||||
from zilliandomizer.logic_components.items import Item as ZzItem
|
||||
|
||||
_useful_thresholds = {
|
||||
"Apple": 9999,
|
||||
"Champ": 9999,
|
||||
"JJ": 9999,
|
||||
"Win": 9999,
|
||||
"Empty": 0,
|
||||
"ID Card": 10,
|
||||
"Red ID Card": 2,
|
||||
"Floppy Disk": 7,
|
||||
"Bread": 0,
|
||||
"Opa-Opa": 20,
|
||||
"Zillion": 8,
|
||||
"Scope": 8,
|
||||
}
|
||||
""" make the item useful if the number in the item pool is below this number """
|
||||
|
||||
|
||||
def get_classification(name: str, zz_item: ZzItem, item_counts: Counter[str]) -> IC:
|
||||
classification = IC.filler
|
||||
if zz_item.required:
|
||||
classification = IC.progression
|
||||
if not zz_item.is_progression:
|
||||
classification = IC.progression_skip_balancing
|
||||
if item_counts[name] < _useful_thresholds.get(name, 0):
|
||||
classification |= IC.useful
|
||||
return classification
|
||||
|
||||
|
||||
class ZillionItem(Item):
|
||||
game = "Zillion"
|
||||
|
||||
Reference in New Issue
Block a user