ajout des minions (orc, mage, archer), des towers

This commit is contained in:
Philippe Roy 2022-03-25 01:56:02 +01:00
parent 01930a14b5
commit a19fa62b94
4 changed files with 14 additions and 7 deletions

Binary file not shown.

View File

@ -42,11 +42,12 @@ def stop():
# En: Tower commands
# Fr: Commandes des tours
#
# Build a tower : ct_build(x, y, name, color)
# Build a tower : ct_build(x, y, name, color,style)
# - x position (integer)
# - y position (integer)
# - name (string)
# - color (RGB model) : purple, turquoise, magenta, orange, yellow, green, red or [R, G, B, 1]
# - style : square or round and version (A,B or C), exemple : 'square-A'
# - Return boolean flag
# - True : builded
# - False : not builded

View File

@ -112,14 +112,20 @@ def thread_stop(threads, type_txt):
minion_carac={
'Knight-lv1' : ["Knight", 1 , 2.0, 1.0, 0.0, 5,1],
'Knight-lv2' : ["Knight", 2, 4.0, 1.0, 1.0, 20,1],
'Knight-lv3' : ["Knight", 3, 8.0, 1.0, 2.0, 80,1]}
'Knight-lv3' : ["Knight", 3, 8.0, 1.0, 2.0, 80,1],
'Orc-lv1' : ["Orc", 1 , 2.0, 1.0, 0.0, 5,1],
'Orc-lv2' : ["Orc", 2, 4.0, 1.0, 1.0, 20,1],
'Orc-lv3' : ["Orc", 3, 8.0, 1.0, 2.0, 80,1]}
# Minion 3d object : body (male,female,old, ...), head (A,B,C,D), level
# Minion 3d object : body (male,female,old, ...), variante (A,B,C,D, ...), level
minion_3d={
'Knight-lv1' : [['Knight_m', 'Knight_f', 'OldKnight_m'],['A','B','C','D'],['common']],
'Knight-lv2' : [['Knight_m', 'Knight_f', 'OldKnight_m'],['A','B','C','D'],['uncommon']],
'Knight-lv3' : [['Knight_m', 'Knight_f', 'OldKnight_m'],['A','B','C','D'],['rare']]}
'Knight-lv3' : [['Knight_m', 'Knight_f', 'OldKnight_m'],['A','B','C','D'],['rare']],
'Orc-lv1' : [['Orc'],['A','B','C','D','E','F'],['common']],
'Orc-lv2' : [['Orc'],['A','B','C','D','E','F'],['uncommon']],
'Orc-lv3' : [['Orc'],['A','B','C','D','E','F'],['rare']]}
# Création d'un minion
def ct_minion(x,y,cat,level):
@ -174,7 +180,7 @@ tower_carac={
# 'Base' : ["Base", 1.0 , 0.02, 3.0]}
# Création d'une tour
def ct_build(x,y,tower_name="Tower",color=tower_purple, cat='Base'):
def ct_build(x,y,tower_name="Tower",color=tower_purple, tower_3d="square-A",cat='Base'):
# Vérification de la place
if [x,y] in scene.objects['Terrain']['scene_tile_noncontruct'] or [x,y] in scene.objects['Terrain']['scene_tile_tower']:
@ -190,7 +196,7 @@ def ct_build(x,y,tower_name="Tower",color=tower_purple, cat='Base'):
return False
# Objet 3D
tour= scene.addObject("Tower", scene.objects['Terrain'])
tour= scene.addObject('Tower-'+tower_3d, scene.objects['Terrain'])
tour.color = color
tour.worldPosition=mathutils.Vector((x,y,0.2))
tour.worldScale=mathutils.Vector((1,1,1))

View File

@ -69,7 +69,7 @@ def waves():
# Wave 1
ct_map_text("Wave 1")
for i in range (15):
ct_minion(14,3,"Knight",1)
ct_minion(14,3,"Orc",1)
# ct_tempo_wave (1)
ct_sleep (1)