forked from coderwilson/FFX_TAS_Python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
x_blitz_only.py
62 lines (49 loc) · 1.49 KB
/
x_blitz_only.py
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
# currently unused file, should be removed if abandoned
import time
import area.luca
import blitz
import load_game
import memory.main
import reset
import xbox
import area.dream_zan
import save_sphere
from json_ai_files.write_seed import write_custom_message
FFXC = xbox.controller_handle()
memory.main.start()
attempts = 0
success = 0
result = False
if memory.main.get_map not in [23, 348, 349]:
reset.reset_to_main_menu()
area.dream_zan.new_game("BlitzballTesting")
load_game.load_save_num(1)
memory.main.reset_battle_end()
while attempts < 2:
# ---------This is the actual movement/code/logic/etc---------------
# area.luca.blitz_start()
save_sphere.approach_save_sphere()
while memory.main.save_menu_cursor() != 2 and memory.main.save_menu_cursor_2() != 2:
xbox.menu_down()
xbox.menu_b()
time.sleep(3)
write_custom_message(f"Blitz game {attempts+1} of 2")
result = blitz.blitz_main(False)
attempts += 1
# print("------------------------------")
# print("Attempts:", attempts)
# print("Success:", success)
# print("All attempts results:")
# print("------------------------------")
time.sleep(3)
save_sphere.touch_and_save(save_num=1)
memory.main.close_menu()
# if blitzoff_win:
# success += 1
# ---------End of the actual movement/code/logic/etc---------------
reset.reset_no_battles()
memory.main.end()
time.sleep(5)
print("--------------------------")
print("Program - end")
print("--------------------------")