Skip to content

Commit a822429

Browse files
committed
whitespace and code formatting cleanup
1 parent b644bc2 commit a822429

File tree

13 files changed

+84
-68
lines changed

13 files changed

+84
-68
lines changed

Showcase/chocoEater.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
import time
2-
31
import memory.main
4-
import screen
52
import targetPathing
63
import xbox
74

85
FFXC = xbox.controllerHandle()
96

7+
108
def engage():
119
checkpoint = 0
1210
input("Confirm that CSR is running!!!")
@@ -35,6 +33,7 @@ def engage():
3533
if memory.main.diagSkipPossible():
3634
xbox.tapB()
3735

36+
3837
def battle():
3938
memory.main.waitFrames(10)
4039
chocoIndex = memory.main.actorIndex(actorNum=4200)
@@ -49,4 +48,4 @@ def battle():
4948
xbox.tapB()
5049
xbox.tapB()
5150
xbox.tapB()
52-
exit()
51+
exit()

area/besaid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def Beach():
5252
checkpoint = 29
5353
elif checkpoint == 36 and memory.main.getMap() == 17:
5454
checkpoint = 37
55-
55+
5656
# Events
5757
elif memory.main.userControl():
5858
if checkpoint == 34: # Into the temple for the first time

area/guadosalam.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def arrival():
5555
xbox.tapB()
5656
FFXC.set_neutral()
5757
memory.main.clickToControl3()
58-
58+
5959
while not targetPathing.setMovement([4, -114]):
6060
pass
6161
print("Mark1")
@@ -64,7 +64,7 @@ def arrival():
6464
xbox.tapB()
6565
FFXC.set_neutral()
6666
memory.main.clickToControl3()
67-
67+
6868
else:
6969
while not targetPathing.setMovement([4, -114]):
7070
pass
@@ -92,11 +92,11 @@ def arrival():
9292
xbox.tapB()
9393
FFXC.set_neutral()
9494
memory.main.clickToControl3()
95-
95+
9696
# Line up for Rikku/Yuna
9797
while not targetPathing.setMovement([15, -52]):
9898
pass
99-
99+
100100
while not targetPathing.setMovement([22, -25]):
101101
pass
102102
print("Mark5")
@@ -114,7 +114,7 @@ def arrival():
114114
xbox.tapB()
115115
FFXC.set_neutral()
116116
memory.main.clickToControl3()
117-
117+
118118
if not gameVars.csr():
119119
while not memory.main.cutsceneSkipPossible():
120120
xbox.tapB()

area/kilika.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -262,35 +262,37 @@ def trials():
262262
elif checkpoint < 53 and memory.main.getMap() == 45: # Inner sanctum
263263
checkpoint = 53
264264

265+
265266
def trialsEnd():
266267
# Talking to Wakka
267268
while memory.main.getStoryProgress() < 346:
268269
if memory.main.userControl():
269270
if memory.main.getCoords()[0] < -28:
270-
targetPathing.setMovement([-10,-23])
271+
targetPathing.setMovement([-10, -23])
271272
else:
272-
targetPathing.setMovement([-20,1])
273+
targetPathing.setMovement([-20, 1])
273274
xbox.tapB()
274275
else:
275276
FFXC.set_neutral()
276277
if memory.main.diagSkipPossible():
277278
xbox.tapB()
278-
279+
279280
#Leave the chamber, then name Ifrit.
280281
memory.main.clickToControl3()
281282
while memory.main.userControl():
282-
FFXC.set_movement(0,-1)
283+
FFXC.set_movement(0, -1)
283284
FFXC.set_neutral()
284285
xbox.nameAeon("Ifrit") # Set Ifrit name
285-
286+
286287
while memory.main.getMap() != 18:
287288
if memory.main.userControl():
288-
FFXC.set_movement(0,-1)
289+
FFXC.set_movement(0, -1)
289290
else:
290291
FFXC.set_neutral()
291292
if memory.main.diagSkipPossible():
292293
xbox.tapB()
293294

295+
294296
def forest3():
295297
# First, re-order the party
296298
memory.main.fullPartyFormat('kilika')

area/miihen.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@
1010

1111
FFXC = xbox.controllerHandle()
1212

13-
def post_battle_logic(forceCharge = False):
13+
14+
def post_battle_logic(forceCharge=False):
1415
if memory.main.overdriveState2()[1] < 43 or (forceCharge and memory.main.overdriveState2()[1] != 100):
1516
memory.main.fullPartyFormat('kilikawoods1', fullMenuClose=False)
1617
else:
17-
if gameVars.selfDestructGet():
18+
if gameVars.selfDestructGet():
1819
memory.main.fullPartyFormat('miihen', fullMenuClose=False)
1920
else:
2021
memory.main.fullPartyFormat('djose', fullMenuClose=False)
@@ -26,6 +27,7 @@ def post_battle_logic(forceCharge = False):
2627
print("No need to heal up. Moving onward.")
2728
memory.main.closeMenu()
2829

30+
2931
def arrival():
3032
print("Waiting for Yuna/Tidus to stop laughing.")
3133
FFXC.set_movement(0, 1)

area/neArmor.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111

1212
FFXC = xbox.controllerHandle()
1313

14+
1415
def toHiddenCave():
1516
#Force manip NEA
1617
if gameVars.marathonSafety():
17-
if rngTrack.neaTrack()[1] in [0,1]:
18+
if rngTrack.neaTrack()[1] in [0, 1]:
1819
pass
1920
else:
2021
FFXC.set_neutral()
@@ -38,8 +39,7 @@ def toHiddenCave():
3839
advanceCount += 1
3940
memory.main.advanceRNG13()
4041
nextItem, preAdvance13 = rngTrack.itemToBeDropped(enemy='ghost')
41-
42-
42+
4343
if memory.main.nextChanceRNG10() > 10:
4444
print("Advance 10 - ", advanceCount)
4545
advanceCount += 1
@@ -55,7 +55,7 @@ def toHiddenCave():
5555
memory.main.waitFrames(9)
5656
print("===============")
5757
memory.main.waitFrames(9)
58-
58+
5959
#Regular logic
6060
memory.main.fullPartyFormat('rikku')
6161
rngTrack.printManipInfo()
@@ -116,6 +116,7 @@ def toHiddenCave():
116116
logs.writeStats("NEA extra manip battles:")
117117
logs.writeStats(prepBattles)
118118

119+
119120
def nextGreen():
120121
nextGreen = memory.main.nextChanceRNG01(version='green')[0][0]
121122
nextWhite = memory.main.nextChanceRNG01()[0][0]
@@ -126,6 +127,7 @@ def nextGreen():
126127
if nextGreen >= 2:
127128
goGreen = True
128129

130+
129131
def dropHunt():
130132
print("Now in the cave. Ready to try to get the NE armor.")
131133
memory.main.fullPartyFormat('rikku')
@@ -162,7 +164,7 @@ def dropHunt():
162164
battle.main.healUp(fullMenuClose=False)
163165
memory.main.fullPartyFormat('rikku')
164166
memory.main.closeMenu()
165-
167+
166168
if nextGreen() and not goGreen:
167169
goGreen = True
168170
preGhostBattles += 1

battle/main.py

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import random
2-
31
import logs
42
import memory.main
53
import rngTrack
@@ -165,7 +163,7 @@ def useSkill(position: int = 0, target: int = 20):
165163
_navigate_to_position(position)
166164
while memory.main.otherBattleMenu():
167165
xbox.tapB()
168-
if target != 20 and memory.main.getEnemyCurrentHP()[target-20] != 0:
166+
if target != 20 and memory.main.getEnemyCurrentHP()[target - 20] != 0:
169167
direction = 'l'
170168
while memory.main.battleTargetId() != target:
171169
if direction == 'l':
@@ -776,7 +774,7 @@ def Echuilles():
776774
print("Tidus attack")
777775
attack('none')
778776
elif screen.turnWakka():
779-
if tidusCounter == 1: #and memory.main.rngSeed() != 160:
777+
if tidusCounter == 1: # and memory.main.rngSeed() != 160:
780778
print("Dark Attack")
781779
useSkill(0) # Dark Attack
782780
#elif memory.main.getEnemyCurrentHP()[0] <= 558:
@@ -1452,9 +1450,9 @@ def chocoEater():
14521450
if screen.faintCheck() >= 2:
14531451
print("Attempting revive")
14541452
if screen.turnKimahri():
1455-
if not 0 in memory.main.getActiveBattleFormation():
1453+
if 0 not in memory.main.getActiveBattleFormation():
14561454
buddySwapTidus()
1457-
elif not 4 in memory.main.getActiveBattleFormation():
1455+
elif 4 not in memory.main.getActiveBattleFormation():
14581456
buddySwapWakka()
14591457
else:
14601458
buddySwapAuron()
@@ -2352,6 +2350,7 @@ def thunderPlains(section):
23522350
memory.main.closeMenu()
23532351
print("Ready to continue onward.")
23542352

2353+
23552354
def mWoods(woodsVars):
23562355
print("Logic depends on completion of specific goals. In Order:")
23572356
print("Rikku charged, stolen Fish Scale, stolen Arctic Wind")
@@ -2408,7 +2407,7 @@ def mWoods(woodsVars):
24082407
elif not woodsVars[0]:
24092408
if turnchar == 6:
24102409
if memory.main.nextStealRare(preAdvance=2):
2411-
#Manip for crit
2410+
# Manip for crit
24122411
_steal()
24132412
else:
24142413
attackByNum(num=6)
@@ -2524,8 +2523,8 @@ def spherimorph():
25242523
logs.writeRNGTrack("RNG11 before Spherimorph")
25252524
logs.writeRNGTrack(memory.main.rngArrayFromIndex(index=11, arrayLen=30))
25262525
#if memory.main.nextStealRare(preAdvance=6):
2527-
# One each for Spherimorph, Negator, Crawler, and guados.
2528-
# Except we haven't learned Steal yet. That's no good.
2526+
# One each for Spherimorph, Negator, Crawler, and guados.
2527+
# Except we haven't learned Steal yet. That's no good.
25292528
# _steal()
25302529
#else:
25312530
defend()
@@ -2604,6 +2603,7 @@ def spherimorph():
26042603
if not gameVars.csr():
26052604
xbox.SkipDialog(5)
26062605

2606+
26072607
def negator_with_steal():
26082608
tidusturns = 0
26092609
rikkuturns = 0
@@ -2629,7 +2629,7 @@ def negator_with_steal():
26292629
xbox.weapSwap(0)
26302630
elif kimahriturns == 2:
26312631
_steal()
2632-
elif not 0 in memory.main.getActiveBattleFormation():
2632+
elif 0 not in memory.main.getActiveBattleFormation():
26332633
buddySwapTidus()
26342634
else:
26352635
defend()
@@ -2654,7 +2654,7 @@ def negator_with_steal():
26542654
pass
26552655
if memory.main.getEnemyCurrentHP()[1] != 0:
26562656
rikkuturns -= 1
2657-
elif rikkuturns in [1,2]:
2657+
elif rikkuturns in [1, 2]:
26582658
useItem(lightningmarbleslot)
26592659
elif tidusturns < 2:
26602660
xbox.weapSwap(0)
@@ -2663,10 +2663,11 @@ def negator_with_steal():
26632663
rikkuFullOD('crawler')
26642664
rikkuturns += 1
26652665

2666+
26662667
def negator(): # AKA crawler
26672668
print("Starting battle with Crawler")
26682669
xbox.clickToBattle()
2669-
2670+
26702671
if memory.main.nextStealRare(preAdvance=5):
26712672
# One each for two Negators, Crawler, and guados.
26722673
negator_with_steal()
@@ -3418,7 +3419,7 @@ def wendigo():
34183419
if wendigoresheal(turnchar=turnchar, usepowerbreak=usepowerbreak, tidusmaxHP=tidusmaxHP) == 0:
34193420
xbox.weapSwap(0)
34203421
else:
3421-
if usepowerbreak and not powerbreakused and not 2 in memory.main.getActiveBattleFormation():
3422+
if usepowerbreak and not powerbreakused and 2 not in memory.main.getActiveBattleFormation():
34223423
print("Swapping to Auron to Power Break")
34233424
buddySwapAuron()
34243425
#if memory.main.getEnemyCurrentHP()[1] < stopHealing and memory.main.getBattleHP()[tidusSlot] != 0:
@@ -3445,7 +3446,7 @@ def zu():
34453446
memory.main.clickToControl()
34463447

34473448

3448-
def bikanelBattleLogic(status, sandyFightComplete:bool=False):
3449+
def bikanelBattleLogic(status, sandyFightComplete: bool = False):
34493450
# status should be an array length 2
34503451
# [rikkuCharged, speedNeeded, powerNeeded, itemsNeeded]
34513452
encounterID = memory.main.getEncounterID()
@@ -4207,6 +4208,7 @@ def evraeAltana():
42074208

42084209
memory.main.clickToControl()
42094210

4211+
42104212
def evraeAltanaSteal():
42114213
print("=======================================")
42124214
print("Steal logic, we will get two gems")
@@ -4228,6 +4230,7 @@ def evraeAltanaSteal():
42284230
print("=======================================")
42294231
#memory.main.waitFrames(180)
42304232

4233+
42314234
def attackHighbridge():
42324235
if memory.main.getEncounterID() == 270:
42334236
attackByNum(22, 'r')
@@ -6790,11 +6793,11 @@ def ghostAdvanceRNG10Silence(silenceSlot: int, owner1: int, owner2: int):
67906793
while memory.main.nextChanceRNG10():
67916794
if memory.main.turnReady():
67926795
if not silenceUsed:
6793-
if not 6 in memory.main.getActiveBattleFormation():
6796+
if 6 not in memory.main.getActiveBattleFormation():
67946797
buddySwapRikku()
67956798
useItem(slot=silenceSlot) # Throw silence grenade
67966799
silenceUsed = True
6797-
elif not 3 in memory.main.getActiveBattleFormation():
6800+
elif 3 not in memory.main.getActiveBattleFormation():
67986801
buddySwapKimahri()
67996802
useItem(slot=silenceSlot) # Throw silence grenade
68006803
silenceUsed = True
@@ -6804,25 +6807,25 @@ def ghostAdvanceRNG10Silence(silenceSlot: int, owner1: int, owner2: int):
68046807
else:
68056808
defend()
68066809
#Next, put in preferred team
6807-
elif owner2 in prefDrop or not owner1 in prefDrop: # prefer aeon kill
6810+
elif owner2 in prefDrop or owner1 not in prefDrop: # prefer aeon kill
68086811
if screen.turnRikku() or screen.turnKimahri():
68096812
Steal()
6810-
elif not 6 in memory.main.getActiveBattleFormation():
6813+
elif 6 not in memory.main.getActiveBattleFormation():
68116814
buddySwapRikku()
6812-
elif not 3 in memory.main.getActiveBattleFormation():
6815+
elif 3 not in memory.main.getActiveBattleFormation():
68136816
buddySwapKimahri()
6814-
elif not 0 in memory.main.getActiveBattleFormation():
6817+
elif 0 not in memory.main.getActiveBattleFormation():
68156818
buddySwapTidus()
68166819
else:
68176820
defend()
68186821
else: # Will need a non-Aeon kill
6819-
if not 6 in memory.main.getActiveBattleFormation():
6822+
if 6 not in memory.main.getActiveBattleFormation():
68206823
buddySwapRikku()
6821-
elif not 0 in memory.main.getActiveBattleFormation():
6824+
elif 0 not in memory.main.getActiveBattleFormation():
68226825
buddySwapTidus()
6823-
elif not 3 in memory.main.getActiveBattleFormation() and memory.main.nextChanceRNG10() > 3:
6826+
elif 3 not in memory.main.getActiveBattleFormation() and memory.main.nextChanceRNG10() > 3:
68246827
buddySwapKimahri()
6825-
elif not 1 in memory.main.getActiveBattleFormation() and memory.main.nextChanceRNG10() <= 3:
6828+
elif 1 not in memory.main.getActiveBattleFormation() and memory.main.nextChanceRNG10() <= 3:
68266829
buddySwapYuna()
68276830
elif screen.turnRikku() or screen.turnKimahri():
68286831
Steal()

0 commit comments

Comments
 (0)