Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson14_3
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
2b499711
authored
Feb 02, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
c4dc4a26
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
13 deletions
diy2.py
diy2.py
View file @
2b499711
...
...
@@ -11,27 +11,26 @@ class Hero:
self
.
sillk1
=
sillk1
self
.
sillk2
=
sillk2
self
.
sillk3
=
sillk3
def
upgrade
(
self
):
self
.
hp
=
self
.
hp
+
500
self
.
attack
=
self
.
attack
+
100
z
=
input
(
'你想知道的属性是:'
)
亚瑟
=
Hero
(
1
,
3622
,
145
,
亚
b
,
亚
1
,
亚
2
,
亚
3
)
yase
=
Hero
(
1
,
3622
,
145
,
亚
b
,
亚
1
,
亚
2
,
亚
3
)
yase
.
upgrade
()
if
z
==
'易难度'
:
print
(
'亚瑟的'
+
z
+
'为:'
,
亚瑟
.
difficultdegree
)
print
(
'亚瑟的'
+
z
+
'为:'
,
yase
.
difficultdegree
)
if
z
==
'血量'
:
print
(
'亚瑟的'
+
z
+
'为:'
,
亚瑟
.
hp
)
print
(
'亚瑟的'
+
z
+
'为:'
,
yase
.
hp
)
if
z
==
'攻击'
:
print
(
'亚瑟的'
+
z
+
'为:'
,
亚瑟
.
attack
)
print
(
'亚瑟的'
+
z
+
'为:'
,
yase
.
attack
)
if
z
==
'被动'
:
print
(
'亚瑟的'
+
z
+
'为:'
,
亚瑟
.
passive
)
print
(
'亚瑟的'
+
z
+
'为:'
,
yase
.
passive
)
if
z
==
'一技能'
:
print
(
'亚瑟的'
+
z
+
'为:'
,
亚瑟
.
sillk1
)
print
(
'亚瑟的'
+
z
+
'为:'
,
yase
.
sillk1
)
if
z
==
'二技能'
:
print
(
'亚瑟的'
+
z
+
'为:'
,
亚瑟
.
sillk2
)
print
(
'亚瑟的'
+
z
+
'为:'
,
yase
.
sillk2
)
if
z
==
'三技能'
:
print
(
'亚瑟的'
+
z
+
'为:'
,
亚瑟
.
sillk3
)
def
uplevel
():
亚瑟
.
hp
=
亚瑟
.
hp
+
100
亚瑟
.
attack
=
亚瑟
.
attack
+
100
uplevel
()
uplevel
()
print
(
'亚瑟的'
+
z
+
'为:'
,
yase
.
sillk3
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment