本文整理汇总了Python中Ball.Ball.lockBlueBall方法的典型用法代码示例。如果您正苦于以下问题:Python Ball.lockBlueBall方法的具体用法?Python Ball.lockBlueBall怎么用?Python Ball.lockBlueBall使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ball.Ball
的用法示例。
在下文中一共展示了Ball.lockBlueBall方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: icenova
# 需要导入模块: from Ball import Ball [as 别名]
# 或者: from Ball.Ball import lockBlueBall [as 别名]
def icenova(self=None, criticalChance=0.6, criticalDamage=3.6):
ball = Ball()
Ball.lockBlueBall(ball)
blueBall = Ball.BlueBall
Ball.unlockBlueBall(ball)
if random.random() <= (criticalChance + (0.06 * blueBall * 0.5)):
criticalResult = True
else:
criticalResult = False
if criticalResult:
ice_nova_dph = (IceNova.base_damage) * (1 + Ball.GreenBall * 0.04) * criticalDamage
if Ball.BlueBall < Ball.max_blue_ball:
Ball.lockBlueBall(ball)
Ball.BlueBall += 1
Ball.unlockBlueBall(ball)
else:
ice_nova_dph = (IceNova.base_damage) * (1 + Ball.GreenBall * 0.04)
return ice_nova_dph
示例2: attack
# 需要导入模块: from Ball import Ball [as 别名]
# 或者: from Ball.Ball import lockBlueBall [as 别名]
def attack(self=None, attack_times=4, attack_critical_rate=0.51, attack_speed=3):
castOnCritical = CastOnCritical()
spellDamage = 0.00
ball = Ball()
Ball.lockBlueBall(ball)
blueBall = Ball.BlueBall
Ball.unlockBlueBall(ball)
if random.random() <= (attack_critical_rate+(0.1104*blueBall*0.5)):
for i in range(0, attack_times):
# print("Barrage %r gun critical" % i )
if blueBall< Ball.max_blue_ball:
ball.lockBlueBall()
ball.BlueBall += 1
ball.unlockBlueBall()
if random.random() <= 0.7:
spellDamage += castOnCritical.castoncritical()
#print "Now BlueBall is %r" % Ball.BlueBall
# else:
# print("Barrage %r gun not critical" % i )
return spellDamage
示例3: discharge
# 需要导入模块: from Ball import Ball [as 别名]
# 或者: from Ball.Ball import lockBlueBall [as 别名]
def discharge(self=None, criticalChance=0.6, criticalDamage=3.6):
discharge_dph = 0.00
ball = Ball()
Ball.lockBlueBall(ball)
blueBall = Ball.BlueBall
Ball.unlockBlueBall(ball)
if random.random() <= (criticalChance + (0.07 * blueBall * 0.5)):
criticalResult = True
else:
criticalResult = False
if criticalResult:
discharge_dph = (Discharge.base_ice_dph*Ball.GreenBall+Discharge.base_light_dph
*blueBall+Discharge.base_fire_dph*Ball.RedBall)*(1+Ball.GreenBall*0.04)*criticalDamage
Ball.lockBlueBall(ball)
Ball.BlueBall = 0
Ball.unlockBlueBall(ball)
if Ball.BlueBall< Ball.max_blue_ball:
Ball.lockBlueBall(ball)
Ball.BlueBall +=1
Ball.unlockBlueBall(ball)
else:
discharge_dph = (Discharge.base_ice_dph*Ball.GreenBall+Discharge.base_light_dph
*blueBall+Discharge.base_fire_dph*Ball.RedBall)*(1+Ball.GreenBall*0.04)
#print "discharge boom with %r" % discharge_dph
return discharge_dph
示例4: firestorm
# 需要导入模块: from Ball import Ball [as 别名]
# 或者: from Ball.Ball import lockBlueBall [as 别名]
def firestorm(self=None, criticalChance=0.6, criticalDamage=3.6):
fire_storm_dph = 0.00
ball = Ball()
Ball.lockBlueBall(ball)
blueBall = Ball.BlueBall
Ball.unlockBlueBall(ball)
if random.random() <= (criticalChance + (0.06 * blueBall * 0.5)):
criticalResult = True
else:
criticalResult = False
if criticalResult:
for i in range(0, 20):
fire_storm_dph += (FireStorm.base_damage) * (1 + Ball.GreenBall * 0.04) * criticalDamage
if Ball.BlueBall < Ball.max_blue_ball:
Ball.lockBlueBall(ball)
Ball.BlueBall += 1
Ball.unlockBlueBall(ball)
else:
for i in range(0, 20):
fire_storm_dph += (FireStorm.base_damage) * (1 + Ball.GreenBall * 0.04)
return fire_storm_dph/6