Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Branden
/
thiccmud
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
0ca1fc75
authored
2016-12-22 13:33:15 -0500
by
Branden
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
#ruleset start
1 parent
beca4159
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
5 deletions
thiccMud/typeclasses/characters.py
thiccMud/world/ruleset.py
thiccMud/typeclasses/characters.py
View file @
0ca1fc7
...
...
@@ -8,6 +8,7 @@ creation commands.
"""
from
evennia
import
DefaultCharacter
from
random
import
randint
class
Character
(
DefaultCharacter
):
"""
...
...
@@ -31,13 +32,22 @@ class Character(DefaultCharacter):
"""
def
at_object_creation
(
self
):
self
.
db
.
strength
=
5
self
.
db
.
agility
=
4
self
.
db
.
magic
=
2
self
.
db
.
level
=
1
self
.
db
.
HP
=
100
self
.
db
.
EXP
=
0
#Set all default attributes
self
.
db
.
strength
=
randint
(
3
,
18
)
self
.
db
.
constitution
=
randint
(
3
,
18
)
self
.
db
.
dexterity
=
randint
(
3
,
18
)
self
.
db
.
intelligence
=
randint
(
3
,
18
)
self
.
db
.
charisma
=
randint
(
3
,
18
)
self
.
db
.
wisdom
=
randint
(
3
,
18
)
def
get_a
biliti
es
(
self
):
return
self
.
db
.
strength
,
self
.
db
.
agility
,
self
.
db
.
magic
def
get_a
ttribut
es
(
self
):
return
self
.
db
.
strength
,
self
.
db
.
constitution
,
self
.
db
.
dexterity
,
self
.
db
.
intelligence
,
self
.
db
.
charisma
,
self
.
db
.
wisdom
pass
...
...
thiccMud/world/ruleset.py
0 → 100644
View file @
0ca1fc7
'''
Created on Dec 22, 2016
@author: Branden
'''
def
add_EXP
(
character
,
amount
):
"Add experience to a character, tracking level increases"
character
.
db
.
EXP
+=
amount
if
character
.
db
.
EXP
>=
(
character
.
db
.
level
+
1
)
**
2
:
character
.
db
.
level
+=
1
character
.
msg
(
"You are now level
%
i!"
%
character
.
db
.
level
)
\ No newline at end of file
Please
register
or
sign in
to post a comment