mirror of
https://github.com/mwisnowski/mtg_python_deckbuilder.git
synced 2025-12-17 16:10:12 +01:00
Started logic for adding creatures, ramp, board wipes, interaction, and other cards based on the chosen themes
Fixed logical error in tagger causing it to look for 'Artifact' in a lowercase 'type' column Need to refine logic for adding by tags and weighted theme values.
This commit is contained in:
parent
279d81ed3c
commit
c81a5fb64e
3 changed files with 544 additions and 263 deletions
786
deck_builder.py
786
deck_builder.py
File diff suppressed because it is too large
Load diff
|
|
@ -23,10 +23,15 @@ banned_cards = [# in commander
|
|||
'Jihad', 'Imprison', 'Crusade'
|
||||
]
|
||||
|
||||
basic_lands = ['Plains', 'Island', 'Swamp', 'Mountain', 'Forest']
|
||||
|
||||
board_wipe_tags = ['destroy all', 'destroy each', 'return all', 'return each', 'deals damage to each',
|
||||
'exile all', 'exile each', 'creatures get -X/-X', 'sacrifices all', 'sacrifices each',
|
||||
'sacrifices the rest']
|
||||
|
||||
card_types = ['Artifact','Creature', 'Enchantment', 'Instant', 'Land', 'Planeswalker', 'Sorcery',
|
||||
'Kindred', 'Dungeon', 'Battle']
|
||||
|
||||
csv_directory = 'csv_files'
|
||||
|
||||
colors = ['colorless', 'white', 'blue', 'black', 'red', 'green',
|
||||
|
|
@ -108,6 +113,10 @@ creature_types = ['Advisor', 'Aetherborn', 'Alien', 'Ally', 'Angel', 'Antelope',
|
|||
enchantment_tokens = ['Cursed Role', 'Monster Role', 'Royal Role', 'Sorcerer Role',
|
||||
'Virtuous Role', 'Wicked Role', 'Young Hero Role', 'Shard']
|
||||
|
||||
multiple_copy_cards = ['Dragon\'s Approach', 'Hare Apparent', 'Nazgûl', 'Persistent Petitioners',
|
||||
'Rat Colony','Relentless Rars', 'Seven Dwarves', 'Shadowborn Apostle',
|
||||
'Slime Against Humanity', 'Templar Knights']
|
||||
|
||||
non_creature_types = ['Legendary', 'Creature', 'Enchantment', 'Artifact',
|
||||
'Battle', 'Sorcery', 'Instant', 'Land', '-', '—',
|
||||
'Blood', 'Clue', 'Food', 'Gold', 'Incubator',
|
||||
|
|
|
|||
|
|
@ -2941,7 +2941,7 @@ def mana_dorks(df, color):
|
|||
for index, row in df.iterrows():
|
||||
theme_tags = row['themeTags']
|
||||
if pd.notna(row['text']):
|
||||
if ('Creature' in row['type'].lower()
|
||||
if ('Creature' in row['type']
|
||||
):
|
||||
# Tap itself for mana
|
||||
if ('{T}: Add' in row['text']):
|
||||
|
|
@ -3003,7 +3003,7 @@ def mana_rocks(df, color):
|
|||
for index, row in df.iterrows():
|
||||
theme_tags = row['themeTags']
|
||||
if pd.notna(row['text']):
|
||||
if ('Artifact' in row['type'].lower()
|
||||
if ('Artifact' in row['type']
|
||||
):
|
||||
# Tap itself for mana
|
||||
if ('{T}: Add' in row['text']):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue