代码拉取完成,页面将自动刷新
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2018/10/31 12:19
# @Author : Triste_hui
from game_db import *
class Combat(object): # 战斗用
def __init__(self):
self.name = "" # 名字
self.hp = 0 # 生命
self.atk = 0 # 攻击
self.defe = 0 # 防御
self.lv = 0 # 等级
class Equip(object): # 装备
def __init__(self, name="", id=0, quality=0, lv=0, atk=0, defe=0, hp=0, side=0):
self.name = name # 装备名
self.id = id # 装备id
self.quality = quality # 装备品质,1白2绿3蓝4紫5橙6史诗
self.lv = lv # 装备级别
self.atk = atk # 装备带来的攻击力
self.defe = defe # 装备带来的防御
self.hp = hp # 装备带来的生命值
self.side = side # 装备位置
def set(self, i, l): # 根据ID和级别初始化装备
pass
def buyEq(self, i): # 根据ID购买装备
pass
def getATK(self): # 返回攻击力
pass
def getDEF(self): # 返回防御力
pass
def getHP(self):
pass
def getSIDE(self):
pass
def getLV(self):
pass
def getQU(self):
pass
def getNAME(self):
pass
def setSIDE(self, s): # 设置装备位置,移出卡牌的装备时使用
pass
def show(self): # 显示装备属性
pass
def getLVLimit(self): # 装备级别限制
pass
def operator(self, i):
pass
def isHere(self): # 装备是否存在
pass
class Player(object): # 玩家
def __init__(self):
self.id = None
self.name = None
self.card = None
self.cardbk = None
self.gold = None
self.diamond = None
self.lv = None
self.stars = None
self.eqbank = None
self.map = None
def getGold(self):
return self.gold
def getDiamond(self):
return self.diamond
def getLV(self):
return self.lv
def getStars(self):
return self.stars
def getMAP(self):
return self.map
def getName(self):
return self.name
def addMAP(self, m):
self.map = m
def addGold(self, g):
self.gold += g
def addDiamond(self, d):
self.diamond += d
def addLV(self):
self.lv += 1
def addStars(self, s):
self.stars += s
def save(self):
pass
def load(self, **result):
self.id = result.get('id')
self.name = result.get('name')
self.gold = result.get('gold')
self.diamond = result.get('diamond')
self.lv = result.get('lv')
self.card = result.get('card')
def create(self):
pass
def show(self):
pass
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。