Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CM1101 Team Project
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Harry Wyatt
CM1101 Team Project
Commits
2cd697d5
Commit
2cd697d5
authored
2 years ago
by
Harry Wyatt
Browse files
Options
Downloads
Patches
Plain Diff
Teneously fixed an issue causing an issue with dying
parent
5ba6e35b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
enemies.py
+2
-2
2 additions, 2 deletions
enemies.py
enemies_dist.py
+4
-0
4 additions, 0 deletions
enemies_dist.py
game.py
+6
-1
6 additions, 1 deletion
game.py
with
12 additions
and
3 deletions
enemies.py
+
2
−
2
View file @
2cd697d5
...
...
@@ -83,7 +83,7 @@ class Golbin(Enemy):
# how to scale stats with levels
self
.
hp_scale
=
2
self
.
attack_scale
=
1
self
.
attack_scale
=
3
self
.
defense_scale
=
3
self
.
luck_scale
=
3
...
...
@@ -110,7 +110,7 @@ class Wolf(Enemy):
# how to scale stats with levels
self
.
hp_scale
=
3
self
.
attack_scale
=
4
self
.
attack_scale
=
5
self
.
defense_scale
=
1
self
.
luck_scale
=
4
...
...
This diff is collapsed.
Click to expand it.
enemies_dist.py
+
4
−
0
View file @
2cd697d5
...
...
@@ -12,6 +12,10 @@ def populate_enemies():
for
room_id
in
rooms
:
room
=
rooms
[
room_id
]
# Clear room of all items
room
.
enemies
=
[]
room
.
items
=
[]
if
room
.
cleared
==
False
:
random_monster
=
random
.
choice
(
enemy_classes
)
...
...
This diff is collapsed.
Click to expand it.
game.py
+
6
−
1
View file @
2cd697d5
...
...
@@ -685,6 +685,8 @@ def loadingbar():
# This is the entry point of our program
def
main
():
global
player
clear
()
loading
=
[
'
Loading -
'
,
'
Loading
\\
'
,
'
Loading |
'
,
'
Loading /
'
]
for
i
in
range
(
10
):
...
...
@@ -703,8 +705,8 @@ def main():
while
True
:
clear
()
populate_rooms
()
populate_enemies
()
populate_rooms
()
player
.
fought_boss
=
False
print
(
"
You suddenly wake up in an ancient abandoned manner house. Every window boarded, every door to the real world locked...
"
)
print
(
"
The old house finds itself inhabited by a plethora of strange monsters, of which many seem violent. It is up to you...
"
)
...
...
@@ -749,6 +751,9 @@ def main():
print
(
"
You beat the game, well done!!
"
)
time
.
sleep
(
0.5
)
input
(
"
> Press enter to play again.
"
)
# Reset the player var
player
=
Player
()
if
__name__
==
"
__main__
"
:
main
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment