Skip to content

Commit

Permalink
Dynamic node functions to allow for multiple & various functions per …
Browse files Browse the repository at this point in the history
…node

Dynamic node functions for multiple funcs
  • Loading branch information
timswyzen authored Jan 31, 2022
2 parents 73596a6 + 8aaa6c3 commit 7a0ae51
Show file tree
Hide file tree
Showing 155 changed files with 853 additions and 909 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ If you have suggestions for cards or mechanics, feel free to open an Issue!
5. Run matchFunctions.py

## Potential features
- Multiple triggers per Node (list of objects with function and its type?)
- ~Multiple triggers per Node~
- Integrations with other bots
- Analytics
- Automatic testing
- Fuzzy matching for search + card selection

## Refactoring todo
- Rework trade monolith function?
- ~Dynamic triggers~

To add cards, use the New Card.py file and "fill in the blanks".

Expand Down
5 changes: 2 additions & 3 deletions cardList.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,5 @@ def addCard(name, cost, rarity, desc, targets, cardtype, ability):
cardsDB[name.lower()] = cardbase.Card(name, cost, rarity, desc, targets, cardtype, ability)


def addNode(name, desc, ability, oneTimeAbility, energy, deathFunc, triggerType, triggerFunc):
nodesDB[name.lower()] = nodebase.GameNode(name, desc, ability, oneTimeAbility, energy, deathFunc, triggerType,
triggerFunc)
def addNode(name, desc, energy, func_list):
nodesDB[name.lower()] = nodebase.GameNode(name, desc, energy, func_list)
2 changes: 1 addition & 1 deletion cards/Adrenaline Rush.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Adrenaline Rush"
Expand Down
2 changes: 1 addition & 1 deletion cards/Amateur Architecture.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Amateur Architecture"
Expand Down
2 changes: 1 addition & 1 deletion cards/Ambush.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Ambush"
Expand Down
2 changes: 1 addition & 1 deletion cards/Anything for Power.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Anything for Power"
Expand Down
2 changes: 1 addition & 1 deletion cards/Back Alley.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Back Alley"
Expand Down
2 changes: 1 addition & 1 deletion cards/Backlash.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Backlash"
Expand Down
2 changes: 1 addition & 1 deletion cards/Beg for Mercy.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Beg for Mercy"
Expand Down
2 changes: 1 addition & 1 deletion cards/Blind Shot.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics, random
import mechanics, random

#Simple variables
NAME = "Blind Shot"
Expand Down
2 changes: 1 addition & 1 deletion cards/Bloodborne.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Bloodborne"
Expand Down
2 changes: 1 addition & 1 deletion cards/Bloody Pentagram.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Bloody Pentagram"
Expand Down
2 changes: 1 addition & 1 deletion cards/Caltrops.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Caltrops"
Expand Down
2 changes: 1 addition & 1 deletion cards/Cannibalize.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Cannibalize"
Expand Down
2 changes: 1 addition & 1 deletion cards/Cataclysm.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Cataclysm"
Expand Down
2 changes: 1 addition & 1 deletion cards/Change of Plans.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Change of Plans"
Expand Down
2 changes: 1 addition & 1 deletion cards/Childish Fury.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Childish Fury"
Expand Down
2 changes: 1 addition & 1 deletion cards/Collected Shot.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Collected Shot"
Expand Down
2 changes: 1 addition & 1 deletion cards/Confusion.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Confusion"
Expand Down
2 changes: 1 addition & 1 deletion cards/Creativity.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Creativity"
Expand Down
2 changes: 1 addition & 1 deletion cards/Deep Breath.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Deep Breath"
Expand Down
2 changes: 1 addition & 1 deletion cards/Defiant Allies.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Defiant Allies"
Expand Down
2 changes: 1 addition & 1 deletion cards/Desperate Measures.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Desperate Measures"
Expand Down
2 changes: 1 addition & 1 deletion cards/Discarded Needles.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Discarded Needles"
Expand Down
2 changes: 1 addition & 1 deletion cards/Double Tap.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Double Tap"
Expand Down
2 changes: 1 addition & 1 deletion cards/Drug Infusion.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Drug Infusion"
Expand Down
2 changes: 1 addition & 1 deletion cards/Embrace Temptation.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers


#Simple variables
NAME = "Embrace Temptation"
Expand Down
2 changes: 1 addition & 1 deletion cards/Energy Blast.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Energy Blast"
Expand Down
2 changes: 1 addition & 1 deletion cards/Energy Inversion.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Energy Inversion"
Expand Down
2 changes: 1 addition & 1 deletion cards/External Knowledge.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics, random, os
import mechanics, random, os

#Simple variables
NAME = "External Knowledge"
Expand Down
2 changes: 1 addition & 1 deletion cards/False Hope.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "False Hope"
Expand Down
2 changes: 1 addition & 1 deletion cards/Feral Reach.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics, random
import mechanics, random

#Simple variables
NAME = "Feral Reach"
Expand Down
2 changes: 1 addition & 1 deletion cards/Fizzle.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Fizzle"
Expand Down
2 changes: 1 addition & 1 deletion cards/Force Feed.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Force Feed"
Expand Down
2 changes: 1 addition & 1 deletion cards/Frantic Dig.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Frantic Dig"
Expand Down
2 changes: 1 addition & 1 deletion cards/Full System.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Full System"
Expand Down
2 changes: 1 addition & 1 deletion cards/Genetic Analysis.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Genetic Analysis"
Expand Down
2 changes: 1 addition & 1 deletion cards/Gluttonous Temptation.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Gluttonous Temptation"
Expand Down
2 changes: 1 addition & 1 deletion cards/Grand Feast.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Grand Feast"
Expand Down
2 changes: 1 addition & 1 deletion cards/Hasty Shot.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Hasty Shot"
Expand Down
2 changes: 1 addition & 1 deletion cards/Hellfire.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Hellfire"
Expand Down
2 changes: 1 addition & 1 deletion cards/Hidden Supplies.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Hidden Supplies"
Expand Down
2 changes: 1 addition & 1 deletion cards/Hivemind.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/user/bin/env python

from cardList import addCard
import tcgpowers, mechanics
import mechanics

#Simple variables
NAME = "Hivemind"
Expand Down
Loading

0 comments on commit 7a0ae51

Please sign in to comment.