Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

Administrator / lesson16_4

  • This project
    • Loading...
  • Sign in
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 184a1ba5 authored 4 years ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

save project

parent 5a82f3bf
Show whitespace changes
Inline Side-by-side
Showing with 6 additions and 1 deletions
  • diy1.py
diy1.py
View file @ 184a1ba5
......@@ -7,9 +7,14 @@ class Hero(object):
self.hp = 250
self.attack = 40
self.max_hp = self.hp
self.critical_hit = 20
#self.cure = 35
def cure(self): # 治疗
cure = random.randint(30,50)
if random.randint(1,100/self.critical_hit) == 1:
cure = 70 #self.cure*2
else:
cure = 35 #self.cure
if self.hp + cure > self.max_hp:
self.hp = self.max_hp
else:
......
This diff is collapsed. Click to expand it.
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment