Skip to content

Commit 7d8ea8d

Browse files
authored
Merge pull request #3 from joshfokis/heroes_unite
Heroes unite
2 parents 399d2eb + bf315ce commit 7d8ea8d

16 files changed

Lines changed: 2725 additions & 105 deletions

File tree

.gitignore

Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
2+
# Created by https://www.gitignore.io/api/python,pycharm
3+
# Edit at https://www.gitignore.io/?templates=python,pycharm
4+
5+
### PyCharm ###
6+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
7+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
8+
9+
# User-specific stuff
10+
.idea/**/workspace.xml
11+
.idea/**/tasks.xml
12+
.idea/**/usage.statistics.xml
13+
.idea/**/dictionaries
14+
.idea/**/shelf
15+
16+
# Generated files
17+
.idea/**/contentModel.xml
18+
19+
# Sensitive or high-churn files
20+
.idea/**/dataSources/
21+
.idea/**/dataSources.ids
22+
.idea/**/dataSources.local.xml
23+
.idea/**/sqlDataSources.xml
24+
.idea/**/dynamic.xml
25+
.idea/**/uiDesigner.xml
26+
.idea/**/dbnavigator.xml
27+
28+
# Gradle
29+
.idea/**/gradle.xml
30+
.idea/**/libraries
31+
32+
# Gradle and Maven with auto-import
33+
# When using Gradle or Maven with auto-import, you should exclude module files,
34+
# since they will be recreated, and may cause churn. Uncomment if using
35+
# auto-import.
36+
# .idea/modules.xml
37+
# .idea/*.iml
38+
# .idea/modules
39+
# *.iml
40+
# *.ipr
41+
42+
# CMake
43+
cmake-build-*/
44+
45+
# Mongo Explorer plugin
46+
.idea/**/mongoSettings.xml
47+
48+
# File-based project format
49+
*.iws
50+
51+
# IntelliJ
52+
out/
53+
54+
# mpeltonen/sbt-idea plugin
55+
.idea_modules/
56+
57+
# JIRA plugin
58+
atlassian-ide-plugin.xml
59+
60+
# Cursive Clojure plugin
61+
.idea/replstate.xml
62+
63+
# Crashlytics plugin (for Android Studio and IntelliJ)
64+
com_crashlytics_export_strings.xml
65+
crashlytics.properties
66+
crashlytics-build.properties
67+
fabric.properties
68+
69+
# Editor-based Rest Client
70+
.idea/httpRequests
71+
72+
# Android studio 3.1+ serialized cache file
73+
.idea/caches/build_file_checksums.ser
74+
75+
### PyCharm Patch ###
76+
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
77+
78+
# *.iml
79+
# modules.xml
80+
# .idea/misc.xml
81+
# *.ipr
82+
83+
# Sonarlint plugin
84+
.idea/sonarlint
85+
86+
### Python ###
87+
# Byte-compiled / optimized / DLL files
88+
__pycache__/
89+
*.py[cod]
90+
*$py.class
91+
92+
# C extensions
93+
*.so
94+
95+
# Distribution / packaging
96+
.Python
97+
build/
98+
develop-eggs/
99+
dist/
100+
downloads/
101+
eggs/
102+
.eggs/
103+
lib/
104+
lib64/
105+
parts/
106+
sdist/
107+
var/
108+
wheels/
109+
pip-wheel-metadata/
110+
share/python-wheels/
111+
*.egg-info/
112+
.installed.cfg
113+
*.egg
114+
MANIFEST
115+
116+
# PyInstaller
117+
# Usually these files are written by a python script from a template
118+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
119+
*.manifest
120+
*.spec
121+
122+
# Installer logs
123+
pip-log.txt
124+
pip-delete-this-directory.txt
125+
126+
# Unit test / coverage reports
127+
htmlcov/
128+
.tox/
129+
.nox/
130+
.coverage
131+
.coverage.*
132+
.cache
133+
nosetests.xml
134+
coverage.xml
135+
*.cover
136+
.hypothesis/
137+
.pytest_cache/
138+
139+
# Translations
140+
*.mo
141+
*.pot
142+
143+
# Django stuff:
144+
*.log
145+
local_settings.py
146+
db.sqlite3
147+
db.sqlite3-journal
148+
149+
# Flask stuff:
150+
instance/
151+
.webassets-cache
152+
153+
# Scrapy stuff:
154+
.scrapy
155+
156+
# Sphinx documentation
157+
docs/_build/
158+
159+
# PyBuilder
160+
target/
161+
162+
# Jupyter Notebook
163+
.ipynb_checkpoints
164+
165+
# IPython
166+
profile_default/
167+
ipython_config.py
168+
169+
# pyenv
170+
.python-version
171+
172+
# pipenv
173+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
174+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
175+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
176+
# install all needed dependencies.
177+
#Pipfile.lock
178+
179+
# celery beat schedule file
180+
celerybeat-schedule
181+
182+
# SageMath parsed files
183+
*.sage.py
184+
185+
# Environments
186+
.env
187+
.venv
188+
env/
189+
venv/
190+
ENV/
191+
env.bak/
192+
venv.bak/
193+
194+
# Spyder project settings
195+
.spyderproject
196+
.spyproject
197+
198+
# Rope project settings
199+
.ropeproject
200+
201+
# mkdocs documentation
202+
/site
203+
204+
# mypy
205+
.mypy_cache/
206+
.dmypy.json
207+
dmypy.json
208+
209+
# Pyre type checker
210+
.pyre/
211+
212+
# End of https://www.gitignore.io/api/python,pycharm

base/cards.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class blue_beetle(card_frame.card):
141141
vp = 2
142142
cost = 6
143143
ctype = cardtype.HERO
144-
defence = True
144+
defense = True
145145
text = "+3 Power. Defense: You may reveal this card from your hand to avoid an Attack. (It stays in your hand)"
146146
image = "base/images/cards/Blue_Beetle.jpeg"
147147

@@ -158,7 +158,7 @@ class bulletproof(card_frame.card):
158158
vp = 1
159159
cost = 4
160160
ctype = cardtype.SUPERPOWER
161-
defence = True
161+
defense = True
162162
text = "+2 Power. Defense: You may discard this card to avoid an Attack. If you do, draw a card and you may destroy a card in your discard pile."
163163
image = "base/images/cards/Bulletproof.jpeg"
164164

@@ -185,7 +185,7 @@ class the_cape_and_cowl(card_frame.card):
185185
vp = 1
186186
cost = 4
187187
ctype = cardtype.EQUIPMENT
188-
defence = True
188+
defense = True
189189
text = "+2 Power. Defense: You may discard this card to avoid an Attack. If you do, draw two cards."
190190
image = "base/images/cards/The_Cape_and_Cowl.jpeg"
191191

@@ -270,10 +270,7 @@ class the_dark_knight(card_frame.card):
270270
def trigger(self,ttype,data,player,active,immediate):
271271
if globe.DEBUG:
272272
print("test - DK",self.name,flush=True)
273-
if trigger.test(immediate,\
274-
trigger.GAIN_CARD, \
275-
self.trigger, \
276-
player,ttype) \
273+
if trigger.test(immediate,trigger.GAIN_CARD,self.trigger,player,ttype) \
277274
and data[0] == False \
278275
and effects.ok_or_no(f"Would you like to put {data[1].name} into your hand?",player,data[1],ai_hint.ALWAYS):
279276
if globe.DEBUG:
@@ -570,7 +567,7 @@ class lasso_of_truth(card_frame.card):
570567
vp = 1
571568
cost = 2
572569
ctype = cardtype.EQUIPMENT
573-
defence = True
570+
defense = True
574571
text = "+1 Power\nDefence:: You may discard this card to avoid an Attack. If you do, draw a card."
575572
image = "base/images/cards/Lasso_of_Truth.jpeg"
576573

@@ -909,7 +906,7 @@ class super_speed(card_frame.card):
909906
vp = 1
910907
cost = 3
911908
ctype = cardtype.SUPERPOWER
912-
defence = True
909+
defense = True
913910
text = "Draw a card. Defense: You may discard this card to avoid an Attack. If you do, draw two cards."
914911
image = "base/images/cards/Super_Speed.jpeg"
915912

base/deck.py

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -22,58 +22,58 @@ def initialize_supervillains():
2222
assemble.append(cards.ras_al_ghul())
2323
return assemble
2424

25-
deck = {cards.aquamans_trident: 3, \
26-
cards.bane: 2, \
27-
cards.the_batmobile: 3, \
28-
cards.the_bat_signal: 3, \
29-
cards.bizarro: 1, \
30-
cards.blue_beetle: 1, \
31-
cards.bulletproof: 3, \
32-
cards.the_cape_and_cowl: 3, \
33-
cards.catwoman: 3, \
34-
cards.cheetah: 2, \
35-
cards.clayface: 2, \
36-
cards.the_dark_knight: 1, \
37-
cards.doomsday: 2, \
38-
cards.the_emerald_knight: 1, \
39-
cards.fastest_man_alive: 1, \
40-
cards.gorilla_grodd: 2, \
41-
cards.green_arrow: 3, \
42-
cards.green_arrows_bow: 3, \
43-
cards.harley_quinn: 2, \
44-
cards.heat_vision: 3, \
45-
cards.high_tech_hero: 3, \
46-
cards.jonn_jonzz: 1, \
47-
cards.kid_flash: 4, \
48-
cards.king_of_atlantis: 1, \
49-
cards.lasso_of_truth: 3, \
50-
cards.lobo: 1, \
51-
cards.the_man_of_steel: 1, \
52-
cards.mera: 2, \
53-
cards.nth_metal: 4, \
54-
cards.the_penguin: 2, \
55-
cards.poison_ivy: 2, \
56-
cards.power_ring: 3, \
57-
cards.princess_diana_of_themyscira: 1, \
58-
cards.the_riddler: 2, \
59-
cards.robin: 3, \
60-
cards.scarecrow: 2, \
61-
cards.solomon_grundy: 2, \
62-
cards.starro: 1, \
63-
cards.suicide_squad: 6, \
64-
cards.super_speed: 4, \
65-
cards.super_strength: 3, \
66-
cards.super_girl: 2, \
67-
cards.swamp_thing: 2, \
68-
cards.two_face: 2, \
69-
cards.utility_belt: 3, \
70-
cards.x_ray_vision: 3, \
71-
cards.zatanna_zatara: 2, \
72-
cards.arkham_asylum: 1, \
73-
cards.the_batcave: 1, \
74-
cards.fortress_of_solitude: 1, \
75-
cards.titans_tower: 1, \
76-
cards.the_watchtower: 1, \
25+
deck = {cards.aquamans_trident: 3,
26+
cards.bane: 2,
27+
cards.the_batmobile: 3,
28+
cards.the_bat_signal: 3,
29+
cards.bizarro: 1,
30+
cards.blue_beetle: 1,
31+
cards.bulletproof: 3,
32+
cards.the_cape_and_cowl: 3,
33+
cards.catwoman: 3,
34+
cards.cheetah: 2,
35+
cards.clayface: 2,
36+
cards.the_dark_knight: 1,
37+
cards.doomsday: 2,
38+
cards.the_emerald_knight: 1,
39+
cards.fastest_man_alive: 1,
40+
cards.gorilla_grodd: 2,
41+
cards.green_arrow: 3,
42+
cards.green_arrows_bow: 3,
43+
cards.harley_quinn: 2,
44+
cards.heat_vision: 3,
45+
cards.high_tech_hero: 3,
46+
cards.jonn_jonzz: 1,
47+
cards.kid_flash: 4,
48+
cards.king_of_atlantis: 1,
49+
cards.lasso_of_truth: 3,
50+
cards.lobo: 1,
51+
cards.the_man_of_steel: 1,
52+
cards.mera: 2,
53+
cards.nth_metal: 4,
54+
cards.the_penguin: 2,
55+
cards.poison_ivy: 2,
56+
cards.power_ring: 3,
57+
cards.princess_diana_of_themyscira: 1,
58+
cards.the_riddler: 2,
59+
cards.robin: 3,
60+
cards.scarecrow: 2,
61+
cards.solomon_grundy: 2,
62+
cards.starro: 1,
63+
cards.suicide_squad: 6,
64+
cards.super_speed: 4,
65+
cards.super_strength: 3,
66+
cards.super_girl: 2,
67+
cards.swamp_thing: 2,
68+
cards.two_face: 2,
69+
cards.utility_belt: 3,
70+
cards.x_ray_vision: 3,
71+
cards.zatanna_zatara: 2,
72+
cards.arkham_asylum: 1,
73+
cards.the_batcave: 1,
74+
cards.fortress_of_solitude: 1,
75+
cards.titans_tower: 1,
76+
cards.the_watchtower: 1,
7777
}
7878

7979
def initialize_deck():

0 commit comments

Comments
 (0)