Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson14_1
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
b3fab5f4
authored
Jun 18, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
aa89a72e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
diy.py
diy.py
View file @
b3fab5f4
class
yingxiong
:
class
yingxiong
:
def
__init__
(
self
,
name
,
exp
,
hp
,
kun
):
def
__init__
(
self
,
name
):
self
.
exp
=
1
self
.
exp
=
1
self
.
name
=
name
self
.
name
=
name
self
.
hp
=
hp
self
.
hp
=
300
self
.
kun
=
kun
self
.
kun
=
50
def
s1
(
self
):
def
ji
(
self
,
fyb
):
self
.
exp
=
self
.
exp
+
1
j
=
self
.
kun
self
.
hp
=
self
.
hp
+
30
fyb
.
hp
=
fyb
.
hp
-
j
self
.
kun
=
self
.
kun
+
5
if
fyb
.
hp
>
0
:
yase
=
yingxiong
(
'亚瑟'
,
1
,
200
,
30
)
f
=
fyb
.
name
+
'扣'
+
str
(
j
)
+
'血,剩'
+
str
(
fyb
.
hp
)
+
'血'
houyi
=
yingxiong
(
'后羿'
,
1
,
160
,
35
)
else
:
yase
.
s1
()
f
=
fyb
.
name
+
'嗝屁'
houyi
.
s1
()
print
(
f
)
print
(
'亚瑟血量='
,
yase
.
hp
)
yase
=
yingxiong
(
'亚瑟'
)
print
(
'后羿血量='
,
houyi
.
hp
)
fianyibo
=
yingxiong
(
'范家鸡'
)
print
(
'亚瑟攻击='
,
yase
.
kun
)
yase
.
ji
(
fianyibo
)
print
(
'后羿攻击='
,
houyi
.
kun
)
\ No newline at end of file
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