#!/usr/bin/env python
# -*- coding: utf-8 -*-
#用户次数控制相关数据
class UserTimes():
    def __init__(self,puser):
        self.user = puser
        self.buyCopperTimes = 0             #铜钱购买次数
        self.lastBuyCopperTime = 0          #上次购买铜钱时间
        self.buyPKtimes = 0         #购买军机处调战次数
        self.canPKTimes = 0         #军机处可挑战次数
        self.lastBuyPKTime = 0      #上次购买军机时间
        self.buyForageTimes = 0     #购买粮草次数
        self.lastBuyForageTime = 0  #上次购买粮草时间
        self.buyShiLianTimes = 0    #购买试练塔次数
        self.canShiLianTimes = 0    #试练塔可挑战次数
        self.lastBuyTowerTime = 0   #上次购买试练塔时间
    def setBuyForageTimes(self,ptimes):#通过配置表初始化可使用次数
        self.buyForageTimes = ptimes
    def getBuyForageTimes(self):
        return self.buyForageTimes
    def setbuyShiLianTimes(self,ptimes):
        self.buyShiLianTimes = ptimes
    def getbuyShiLianTimes(self):
        self.buyShiLianTimes
    def addCanShiLianTimes(self):
        self.canShiLianTimes += 1
    def addCanPkTimes(self):
        self.canPKTimes += 1