diff --git a/args/arguments.py b/args/arguments.py index eb6a97ad..6e12cc4f 100644 --- a/args/arguments.py +++ b/args/arguments.py @@ -9,7 +9,7 @@ def __init__(self): "espers", "natural_magic", "misc_magic", "starting_gold_items", "items", "shops", "chests", "graphics", - "coliseum", "auction_house", "challenges", "bug_fixes", "misc", + "coliseum", "auction_house", "challenges", "bug_fixes", "misc", "balance_adjustments", ] self.group_modules = {} for group in self.groups: diff --git a/args/balance_adjustments.py b/args/balance_adjustments.py new file mode 100644 index 00000000..6408c313 --- /dev/null +++ b/args/balance_adjustments.py @@ -0,0 +1,35 @@ +def name(): + return "Balance Adjustments" + +def parse(parser): + balance_adjustments = parser.add_argument_group("Balance Adjustments") + balance_adjustments.add_argument("-bqf", "--quick-freeze", action="store_true", help="Freeze effect is shortened") + +def process(args): + pass + +def flags(args): + flags = "" + + if args.quick_freeze: + flags += " -bqf" + + return flags + +def options(args): + return [ + ("Quick Freeze", args.quick_freeze, "quick_freeze"), + ] + +def menu(args): + return name(), options(args) + +def log(args): + from log import format_option + log = [name()] + + entries = options(args) + for entry in entries: + log.append(format_option(*entry)) + + return log diff --git a/balance_adjustments/__init__.py b/balance_adjustments/__init__.py new file mode 100644 index 00000000..b7bfab05 --- /dev/null +++ b/balance_adjustments/__init__.py @@ -0,0 +1,6 @@ +from balance_adjustments.quick_freeze import QuickFreeze + +__all__ = ["BalanceAdjustments"] +class BalanceAdjustments: + def __init__(self): + self.quick_freeze = QuickFreeze() \ No newline at end of file diff --git a/balance_adjustments/quick_freeze.py b/balance_adjustments/quick_freeze.py new file mode 100644 index 00000000..f40664a9 --- /dev/null +++ b/balance_adjustments/quick_freeze.py @@ -0,0 +1,11 @@ +from memory.space import Reserve +import args + +class QuickFreeze: + def __init__(self): + if args.quick_freeze: + self.quick_freeze_mod() + + def quick_freeze_mod(self): + Reserve(0x24695, 0x24695, "Freeze time", 0x10) + diff --git a/wc.py b/wc.py index bff7d690..839bdfad 100644 --- a/wc.py +++ b/wc.py @@ -23,6 +23,9 @@ def main(): from bug_fixes import BugFixes bug_fixes = BugFixes() + from balance_adjustments import BalanceAdjustments + balance_adjustments = BalanceAdjustments() + data.write() memory.write()