Exemplo n.º 1
0
# -*- coding: UTF-8 -*-

# ------------------------(max to 80 columns)-----------------------------------
# author by : (学员ID)
# created:  2019.7.10

# Description:
#   练习创建一个完整的英雄类
# ------------------------(max to 80 columns)-----------------------------------

import random
import sys

sys.path.append('..')
from package_KingOfGlory.class_hero import Hero

# 测试英雄生成
print('\n---测试产生一批英雄--------')
for i in range(100):
    hero = Hero()
    hero.show_me()
Exemplo n.º 2
0
import sys

sys.path.append('..')
import package_KingOfGlory.global_var as GLV

from package_KingOfGlory.class_hero import Hero
from package_KingOfGlory.class_soldier import Soldier

from package_KingOfGlory.class_eq_attack import EQAttack
from package_KingOfGlory.class_eq_defense import EQDefense
from package_KingOfGlory.class_eq_mana import EQMana
from package_KingOfGlory.class_eq_move import EQMove

print('\n----------交战前---------')
# 创建一个我方士兵
h = Hero()
eq = EQMove()
our_sol = Soldier(h, eq)
print('\n***我方士兵***', end='')
our_sol.show_me()

# 创建一个敌方士兵
h = Hero()
eq = EQMana()
enemy = Soldier(h, eq)
print('\n***敌方士兵***', end='')
enemy.show_me()

# 仅一次交手,测试交战逻辑是否正确
print('\n----------交战一次---------')
if our_sol.move_speed > enemy.move_speed:
Exemplo n.º 3
0


import random
import sys

sys.path.append('..')
import package_KingOfGlory.global_var as GLV

from package_KingOfGlory.class_eq_move import EQMove
from package_KingOfGlory.class_eq_mana import EQMana
from package_KingOfGlory.class_eq_defense import EQDefense
from package_KingOfGlory.class_eq_attack import EQAttack
from package_KingOfGlory.class_hero import Hero
from package_KingOfGlory.class_soldier import Soldier


for i in range (1,10):
    h=Hero()
    eq =EQAttack()
    s=Soldier(h,eq)
    s.show_me()
    print(i)