-
Notifications
You must be signed in to change notification settings - Fork 21
/
skirmish.rpy
84 lines (70 loc) · 2.49 KB
/
skirmish.rpy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
label skirmish_battle:
python:
store.tempmoney = BM.money
store.tempcmd = BM.cmd
# store.temprockets = store.sunrider.rockets
# store.temprepair_drones = store.sunrider.repair_drones
player_ships_original = player_ships
original_sunrider = sunrider
player_ships = deepcopy(player_ships) #upgrades should not be permanent.
sunrider = get_ship_from_list(player_ships, 'Sunrider')
enemy_ships = []
destroyed_ships = []
clean_grid()
BM.mission = 'skirmish'
BM.xadj.value = 872
BM.yadj.value = 370
store.zoomlevel = 0.65
BM.phase = 'formation'
BM.selected = None #if something is selected it won't get shown in the player pool.
battlemode()
BM.remove_mode = False #when True player can click on units and delete them quickly
for ship in player_ships:
ship.location = None
$ PlayerTurnMusic = "music/Titan.ogg"
$ EnemyTurnMusic = "music/Dusty_Universe.ogg"
hide screen ship_map
show screen battle_screen
show screen player_unit_pool_collapsed
show screen enemy_unit_pool_collapsed
if not BM.seen_skirmish:
show screen skirmishhelp
$ BM.seen_skirmish = True
#start formation set-up phase and come back after
call mission_skirmish from _call_mission_skirmish
python:
BM.phase = 'Player'
BM.mission = 'skirmishbattle'
update_stats()
#start the actual skirmish battle and come back here after
call battle_start from _call_battle_start
python:
BM.cmd = store.tempcmd
BM.money = store.tempmoney
# store.sunrider.rockets = store.temprockets
# store.sunrider.repair_drones = store.temprepair_drones
player_ships = player_ships_original
sunrider = original_sunrider
BM.mission = None
BM.ships = []
for pship in player_ships:
BM.ships.append(pship)
scene Solid((0, 0, 0, 255))
jump dispatch
return
label missionskirmishbattle:
$BM.battle() #continue the battle
if BM.battlemode == True: #whenever this is set to False battle ends.
jump missionskirmishbattle #loop back
else:
pass #continue down
# jump dispatch
return
label mission_skirmish:
$ BM.skirmish_phase()
if BM.battlemode == True: #whenever this is set to False battle ends.
jump mission_skirmish #loop back
else:
pass #continue down
# jump dispatch
return