Commit 356f6a53 by BellCodeEditor

save project

parent 01fb3ee3
Showing with 11 additions and 0 deletions
...@@ -10,3 +10,13 @@ kunkun3=Hero('kunkun3',5600,199) ...@@ -10,3 +10,13 @@ kunkun3=Hero('kunkun3',5600,199)
print("kunkun1的攻击力:",kunkun1.attack) print("kunkun1的攻击力:",kunkun1.attack)
print("kunkun2的攻击力:",kunkun2.attack) print("kunkun2的攻击力:",kunkun2.attack)
print("kunkun3的攻击力:",kunkun3.attack) print("kunkun3的攻击力:",kunkun3.attack)
def upgrade():
kunkun1.level=kunkun1.level+1
kunkun1.hp=kunkun1.hp+50
kunkun1.attack=kunkun1.attack+10
upgrade()
upgrade()
print("kunkun1的攻击力:",kunkun1.attack)
\ No newline at end of file
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