Skip to content

Commit 7996184

Browse files
committed
Feature: Add movement options, b-dash, sprint shoe options
1 parent a10b2d8 commit 7996184

11 files changed

Lines changed: 263 additions & 44 deletions

File tree

args/challenges.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ def parse(parser):
1010
challenges.add_argument("-nil", "--no-illuminas", action = "store_true",
1111
help = "Illuminas will not appear in coliseum/auction/shops/chests/events")
1212
ultima = challenges.add_mutually_exclusive_group()
13+
challenges.add_argument("-noshoes", "--no-sprint-shoes", action = "store_true",
14+
help = "Sprint Shoes will not appear in coliseum/auction/shops/chests")
1315
ultima.add_argument("-nu", "--no-ultima", action = "store_true",
1416
help = "Ultima cannot be learned from espers/items/natural magic")
1517
ultima.add_argument("-u254", "--ultima-254-mp", action = "store_true",
@@ -68,6 +70,9 @@ def flags(args):
6870
flags += " -nee"
6971
if args.no_illuminas:
7072
flags += " -nil"
73+
if args.no_sprint_shoes:
74+
flags += " -noshoes"
75+
7176
if args.no_ultima:
7277
flags += " -nu"
7378
elif args.ultima_254_mp:
@@ -96,6 +101,7 @@ def options(args):
96101
("No Exp Eggs", args.no_exp_eggs),
97102
("No Illuminas", args.no_illuminas),
98103
("Ultima", ultima),
104+
("No Sprint Shoes", args.no_sprint_shoes),
99105
("No Free Paladin Shields", args.no_free_paladin_shields),
100106
("No Free Characters/Espers", args.no_free_characters_espers),
101107
("Permadeath", args.permadeath),

args/misc.py

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
2+
13
def name():
24
return "Misc."
35

46
def parse(parser):
57
misc = parser.add_argument_group("Misc.")
6-
misc.add_argument("-as", "--auto-sprint", action = "store_true",
7-
help = "Player always sprints. Sprint Shoes have no effect")
8+
89
misc.add_argument("-ond", "--original-name-display", action = "store_true",
910
help = "Display original character names in party and party select menus")
1011
misc.add_argument("-rr", "--random-rng", action = "store_true",
@@ -16,6 +17,15 @@ def parse(parser):
1617
misc.add_argument("-warp", "--warp-all", action = "store_true",
1718
help = "All characters start with Warp learned. Warp costs 0 MP. Useful for seeds that limit Warp Stone access")
1819

20+
from data.movement import ALL
21+
movement = misc.add_mutually_exclusive_group()
22+
movement.name = "Movement"
23+
movement.add_argument("-move", "--movement", type = str.lower, choices = ALL,
24+
help = "Player movement options")
25+
# Completely ignore this argument, and default to auto sprint when -move is not defined
26+
misc.add_argument("-as", "--auto-sprint", action = "store_true",
27+
help = "DEPRECATED - Use `-move as` instead. Player always sprints. Sprint Shoes have no effect")
28+
1929
event_timers = misc.add_mutually_exclusive_group()
2030
event_timers.add_argument("-etr", "--event-timers-random", action = "store_true",
2131
help = "Collapsing House, Opera House, and Floating Continent timers randomized")
@@ -57,8 +67,8 @@ def process(args):
5767
def flags(args):
5868
flags = ""
5969

60-
if args.auto_sprint:
61-
flags += " -as"
70+
if args.movement:
71+
flags += f" -move {args.movement}"
6272
if args.original_name_display:
6373
flags += " -ond"
6474
if args.random_rng:
@@ -127,8 +137,15 @@ def options(args):
127137
elif args.y_npc_remove:
128138
y_npc = "Remove"
129139

140+
from data.movement import key_name, AUTO_SPRINT
141+
# Similar logic is present in the init fn of settings/movement.py
142+
if args.movement:
143+
movement = key_name[args.movement]
144+
else:
145+
movement = key_name[AUTO_SPRINT]
146+
130147
return [
131-
("Auto Sprint", args.auto_sprint),
148+
("Movement", movement),
132149
("Original Name Display", args.original_name_display),
133150
("Random RNG", args.random_rng),
134151
("Random Clock", args.random_clock),

args/starting_gold_items.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ def parse(parser):
99

1010
starting_gold_items.add_argument("-smc", "--start-moogle-charms", default = 0, type = int, choices = range(4), metavar = "COUNT",
1111
help = "Start game with %(metavar)s Moogle Charms. Overrides No Moogle Charms option")
12+
starting_gold_items.add_argument("-sshoes", "--start-sprint-shoes", default = 0, type = int, choices = range(4), metavar = "COUNT",
13+
help = "Start game with %(metavar)s Sprint Shoes. Overrides No Sprint Shoes option")
14+
1215
starting_gold_items.add_argument("-sws", "--start-warp-stones", default = 0, type = int, choices = range(11), metavar = "COUNT",
1316
help = "Start game with %(metavar)s Warp Stones")
1417
starting_gold_items.add_argument("-sfd", "--start-fenix-downs", default = 0, type = int, choices = range(11), metavar = "COUNT",
@@ -28,6 +31,8 @@ def flags(args):
2831
flags += f" -gp {args.gold}"
2932
if args.start_moogle_charms != 0:
3033
flags += f" -smc {args.start_moogle_charms}"
34+
if args.start_sprint_shoes != 0:
35+
flags += f" -sshoes {args.start_sprint_shoes}"
3136
if args.start_warp_stones != 0:
3237
flags += f" -sws {args.start_warp_stones}"
3338
if args.start_fenix_downs != 0:
@@ -43,6 +48,7 @@ def options(args):
4348
return [
4449
("Start Gold", args.gold),
4550
("Start Moogle Charms", args.start_moogle_charms),
51+
("Start Sprint Shoes", args.start_sprint_shoes),
4652
("Start Warp Stones", args.start_warp_stones),
4753
("Start Fenix Downs", args.start_fenix_downs),
4854
("Start Tools", args.start_tools),

constants/objectives/results.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787

8888
#Additional results
8989
category_types["Command"].append(ResultType(59, "Magitek Upgrade", "Magitek Upgrade", None))
90+
category_types["Item"].append(ResultType(60, "Sprint Shoes", "Sprint Shoes", None))
9091
category_types["Auto"].append(ResultType(61, "Auto Dog Block", "Auto Dog Block", None))
9192
category_types["Auto"].append(ResultType(62, "Auto Life 3", "Auto Life 3", None))
9293

data/items.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,11 @@ def get_excluded(self):
297297
exclude.append(name_id["Exp. Egg"])
298298
if self.args.no_illuminas:
299299
exclude.append(name_id["Illumina"])
300+
301+
from data.movement import AUTO_SPRINT, B_DASH
302+
# Sprint Shoes are a literal dead item if any of these options
303+
if self.args.no_sprint_shoes or self.args.movement in [AUTO_SPRINT, B_DASH]:
304+
exclude.append(name_id["Sprint Shoes"])
300305
if self.args.no_free_paladin_shields:
301306
exclude.append(name_id["Paladin Shld"])
302307
exclude.append(name_id["Cursed Shld"])

data/movement.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
from enum import IntEnum
3+
4+
5+
class MovementSpeed(IntEnum):
6+
WALK = 2 # Original FF6 walk speed
7+
SPRINT = 3 # Original FF6 sprint speed
8+
DASH = 4 # Custom, move twice as fast as sprint.
9+
10+
ORIGINAL = 'og'
11+
AUTO_SPRINT = 'as'
12+
B_DASH = 'bd'
13+
SPRINT_SHOES_B_DASH = 'ssbd'
14+
15+
name_key = {
16+
# WALK by default
17+
# SPRINT with sprint shoes equipped
18+
'ORIGINAL' : ORIGINAL,
19+
# SPRINT by default
20+
# WALK when holding B
21+
'AUTO_SPRINT' : AUTO_SPRINT,
22+
# SPRINT by default
23+
# DASH when holding B
24+
'B-DASH' : B_DASH,
25+
# SPRINT by default
26+
# DASH when holding B with sprint shoes equipped
27+
# WALK when holding B without sprint shoes equipped
28+
'SPR SHOE B-DASH' : SPRINT_SHOES_B_DASH,
29+
}
30+
31+
key_name = {v: k for k, v in name_key.items()}
32+
33+
ALL = [ORIGINAL, AUTO_SPRINT, B_DASH, SPRINT_SHOES_B_DASH]
34+

event/start.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,10 @@ def start_items_mod(self):
187187
src += [
188188
field.AddItem("Moogle Charm", sound_effect = False),
189189
]
190-
190+
for mc in range(self.args.start_sprint_shoes):
191+
src += [
192+
field.AddItem("Sprint Shoes", sound_effect = False),
193+
]
191194
for ws in range(self.args.start_warp_stones):
192195
src += [
193196
field.AddItem("Warp Stone", sound_effect = False),

objectives/results/sprint_shoes.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from objectives.results._objective_result import *
2+
from data.item_names import name_id as item_name_id
3+
4+
class Field(field_result.Result):
5+
def src(self):
6+
return [
7+
field.AddItem(item_name_id["Sprint Shoes"]),
8+
]
9+
10+
class Battle(battle_result.Result):
11+
def src(self):
12+
return [
13+
battle_result.AddItem(item_name_id["Sprint Shoes"]),
14+
]
15+
16+
class Result(ObjectiveResult):
17+
NAME = "Sprint Shoes"
18+
def __init__(self):
19+
super().__init__(Field, Battle)

settings/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from settings.auto_sprint import AutoSprint
21
from settings.initial_spells import InitialSpells
2+
from settings.movement import Movement
33
from settings.random_rng import RandomRNG
44
from settings.permadeath import Permadeath
55
from settings.y_npc import YNPC
@@ -11,8 +11,8 @@
1111
__all__ = ["Settings"]
1212
class Settings:
1313
def __init__(self):
14-
self.auto_sprint = AutoSprint()
1514
self.initial_spells = InitialSpells()
15+
self.movement = Movement()
1616
self.random_rng = RandomRNG()
1717
self.permadeath = Permadeath()
1818
self.y_npc = YNPC()

settings/auto_sprint.py

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)