Skip to content

"Craftable" property wrong #51

Open
@qustrolabe

Description

@qustrolabe

Code that checks whether card is craftable doesn't work properly.

Currently it looks like this:

@property
def craftable(self):
	if isinstance(self.card_set, CardSet) and not self.card_set.craftable:
		return False
	if not self.type.craftable:
		return False
	if not self.rarity.craftable:
		return False
	return True

And this works for "Uncraftable" cards like Bob The Bartender (gets flagged because it's in EVENT CardSet), but there also card like Marin The Fox which passes all three checks (it's a legendary, minion, from catacombs (LOOTAPALOOZA) set). This leads to wrong calculations on Craft/Disenchant costs and just other complications.

From Hearthstone API docs (from what I found) seems like there no direct way to tell that card is Uncraftable so the only way I see to fix that would be to have list of all Uncraftable cards hardcoded somewhere that needs to be updated as new Uncraftable cards get introduced

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions