Skip to content

Commit

Permalink
3.25, battle mg returns
Browse files Browse the repository at this point in the history
  • Loading branch information
RainbowTabitha committed Aug 29, 2024
1 parent 632b9b1 commit 6ad3b13
Show file tree
Hide file tree
Showing 13 changed files with 363 additions and 1 deletion.
7 changes: 7 additions & 0 deletions codes/marioParty4.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,4 +395,11 @@ def initialCoinsMod4(hex, hexDec):
return f'''
MP4 - Gain {hexDec} Coins at the Start of the Game
020A8F0E 0000{hex}
'''

def getBattleGame4(p1, p2, p3, p4, p5, s1, s2, s3, s4, s5):
return f'''
MP4 - Battle Minigames Bounties are {s1}, {s2}, {s3}, {s4}, and {s5}
041D5DE0 {p1}{p2}{p3}{p4}
041D5DE4 {p5}000000
'''
10 changes: 10 additions & 0 deletions codes/marioParty5.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,14 @@ def initialCoinsMod5(hex, hexDec):
return f'''
MP5 - Gain {hexDec} Coins at the Start of the Game
0208C8E6 0000{hex}
'''

def getBattleGame5(p1, p2, p3, p4, p5, s1, s2, s3, s4, s5):
return f'''
MP5 - Battle Minigames Bounties are {s1}, {s2}, {s3}, {s4}, and {s5}
041CBFFC 0000{p1}
041CC000 0000{p2}
041CC004 0000{p3}
041C0008 0000{p4}
041C000C 0000{p5}
'''
10 changes: 10 additions & 0 deletions codes/marioParty6.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,4 +354,14 @@ def initialCoinsMod6(hex, hexDec):
return f'''
MP6 - Gain {hexDec} Coins at the Start of the Game
0214B3AE 0000{hex}
'''

def getBattleGame6(p1, p2, p3, p4, p5, s1, s2, s3, s4, s5):
return f'''
MP6 - Battle Minigames Bounties are {s1}, {s2}, {s3}, {s4}, and {s5}
0424BAB0 0000{p1}
0424BAB4 0000{p2}
0424BAB8 0000{p3}
0424BABC 0000{p4}
0424BAC0 0000{p5}
'''
12 changes: 12 additions & 0 deletions codes/marioParty7.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,3 +403,15 @@ def initialCoinsMod7(hex, hexDec):
02196D12 0000{hex}
02151DEA 0000{hex}
'''

def getBattleGame7(p1, p2, p3, p4, p5, s1, s2, s3, s4, s5):
return f'''
MP7 - Battle Minigames Bounties are {s1}, {s2}, {s3}, {s4}, and {s5}
04276F34 0000{p1}
04276F38 0000{p2}
04276F3C 0000{p3}
04276F40 0000{p4}
04276F44 0000{p5}
04276F48 0000{p5}
042215E0 60000000
'''
41 changes: 41 additions & 0 deletions events/marioParty4_battle.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# ============================================
# Mario Party Toolkit
# Author: Nayla Hanegan ([email protected])
# Date: 5/16/2024
# License: MIT
# ============================================

from functions import *
from codes.marioParty4 import *

import pyperclip

def battleCoins_mp4(p1, p2, p3, p4, p5):
if not p1.get() and not p2.get() and not p3.get() and not p4.get() and not p5.get():
createDialog("Error", "error", "Please fill out atleast one box.", None)
return

p1Handicap = hex(int(p1.get()))[2:].zfill(2).upper() if p1.get() else "05"
p2Handicap = hex(int(p2.get()))[2:].zfill(2).upper() if p2.get() else "0A"
p3Handicap = hex(int(p3.get()))[2:].zfill(2).upper() if p3.get() else "14"
p4Handicap = hex(int(p4.get()))[2:].zfill(2).upper() if p4.get() else "1F"
p5Handicap = hex(int(p5.get()))[2:].zfill(2).upper() if p5.get() else "32"

p1String = p1.get() if p1.get() != "" else "5"
p2String = p2.get() if p2.get() != "" else "10"
p3String = p3.get() if p3.get() != "" else "20"
p4String = p4.get() if p4.get() != "" else "30"
p5String = p5.get() if p5.get() != "" else "50"

# Generate codes for blue and red spaces
marioPartyFour = getBattleGame4(p1Handicap, p2Handicap, p3Handicap, p4Handicap, p5Handicap, p1String, p2String, p3String, p4String, p5String)

# Replace placeholder in generated codes
generatedCode = (marioPartyFour).strip()

# Copy generated codes to clipboard
pyperclip.copy(generatedCode)

# Notify user about successful operation
print("Generated codes copied to the clipboard.")
createDialog("Operation Successful", "success", "Generated codes copied to clipboard!", None)
41 changes: 41 additions & 0 deletions events/marioParty5_battle.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# ============================================
# Mario Party Toolkit
# Author: Nayla Hanegan ([email protected])
# Date: 5/16/2024
# License: MIT
# ============================================

from functions import *
from codes.marioParty5 import *

import pyperclip

def battleCoins_mp5(p1, p2, p3, p4, p5):
if not p1.get() and not p2.get() and not p3.get() and not p4.get() and not p5.get():
createDialog("Error", "error", "Please fill out atleast one box.", None)
return

p1Handicap = hex(int(p1.get()))[2:].zfill(4).upper() if p1.get() else "0005"
p2Handicap = hex(int(p2.get()))[2:].zfill(4).upper() if p2.get() else "000A"
p3Handicap = hex(int(p3.get()))[2:].zfill(4).upper() if p3.get() else "0014"
p4Handicap = hex(int(p4.get()))[2:].zfill(4).upper() if p4.get() else "001F"
p5Handicap = hex(int(p5.get()))[2:].zfill(4).upper() if p5.get() else "0032"

p1String = p1.get() if p1.get() != "" else "5"
p2String = p2.get() if p2.get() != "" else "10"
p3String = p3.get() if p3.get() != "" else "20"
p4String = p4.get() if p4.get() != "" else "30"
p5String = p5.get() if p5.get() != "" else "50"

# Generate codes for blue and red spaces
marioPartyFive = getBattleGame5(p1Handicap, p2Handicap, p3Handicap, p4Handicap, p5Handicap, p1String, p2String, p3String, p4String, p5String)

# Replace placeholder in generated codes
generatedCode = (marioPartyFive).strip()

# Copy generated codes to clipboard
pyperclip.copy(generatedCode)

# Notify user about successful operation
print("Generated codes copied to the clipboard.")
createDialog("Operation Successful", "success", "Generated codes copied to clipboard!", None)
41 changes: 41 additions & 0 deletions events/marioParty6_battle.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# ============================================
# Mario Party Toolkit
# Author: Nayla Hanegan ([email protected])
# Date: 5/16/2024
# License: MIT
# ============================================

from functions import *
from codes.marioParty6 import *

import pyperclip

def battleCoins_mp6(p1, p2, p3, p4, p5):
if not p1.get() and not p2.get() and not p3.get() and not p4.get() and not p5.get():
createDialog("Error", "error", "Please fill out atleast one box.", None)
return

p1Handicap = hex(int(p1.get()))[2:].zfill(4).upper() if p1.get() else "0005"
p2Handicap = hex(int(p2.get()))[2:].zfill(4).upper() if p2.get() else "000A"
p3Handicap = hex(int(p3.get()))[2:].zfill(4).upper() if p3.get() else "0014"
p4Handicap = hex(int(p4.get()))[2:].zfill(4).upper() if p4.get() else "001F"
p5Handicap = hex(int(p5.get()))[2:].zfill(4).upper() if p5.get() else "0032"

p1String = p1.get() if p1.get() != "" else "5"
p2String = p2.get() if p2.get() != "" else "10"
p3String = p3.get() if p3.get() != "" else "20"
p4String = p4.get() if p4.get() != "" else "30"
p5String = p5.get() if p5.get() != "" else "50"

# Generate codes for blue and red spaces
marioPartySix = getBattleGame6(p1Handicap, p2Handicap, p3Handicap, p4Handicap, p5Handicap, p1String, p2String, p3String, p4String, p5String)

# Replace placeholder in generated codes
generatedCode = (marioPartySix).strip()

# Copy generated codes to clipboard
pyperclip.copy(generatedCode)

# Notify user about successful operation
print("Generated codes copied to the clipboard.")
createDialog("Operation Successful", "success", "Generated codes copied to clipboard!", None)
41 changes: 41 additions & 0 deletions events/marioParty7_battle.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# ============================================
# Mario Party Toolkit
# Author: Nayla Hanegan ([email protected])
# Date: 5/16/2024
# License: MIT
# ============================================

from functions import *
from codes.marioParty7 import *

import pyperclip

def battleCoins_mp7(p1, p2, p3, p4, p5):
if not p1.get() and not p2.get() and not p3.get() and not p4.get() and not p5.get():
createDialog("Error", "error", "Please fill out atleast one box.", None)
return

p1Handicap = hex(int(p1.get()))[2:].zfill(4).upper() if p1.get() else "0005"
p2Handicap = hex(int(p2.get()))[2:].zfill(4).upper() if p2.get() else "000A"
p3Handicap = hex(int(p3.get()))[2:].zfill(4).upper() if p3.get() else "0014"
p4Handicap = hex(int(p4.get()))[2:].zfill(4).upper() if p4.get() else "001F"
p5Handicap = hex(int(p5.get()))[2:].zfill(4).upper() if p5.get() else "0032"

p1String = p1.get() if p1.get() != "" else "5"
p2String = p2.get() if p2.get() != "" else "10"
p3String = p3.get() if p3.get() != "" else "20"
p4String = p4.get() if p4.get() != "" else "30"
p5String = p5.get() if p5.get() != "" else "50"

# Generate codes for blue and red spaces
marioPartySeven = getBattleGame7(p1Handicap, p2Handicap, p3Handicap, p4Handicap, p5Handicap, p1String, p2String, p3String, p4String, p5String)

# Replace placeholder in generated codes
generatedCode = (marioPartySeven).strip()

# Copy generated codes to clipboard
pyperclip.copy(generatedCode)

# Notify user about successful operation
print("Generated codes copied to the clipboard.")
createDialog("Operation Successful", "success", "Generated codes copied to clipboard!", None)
40 changes: 40 additions & 0 deletions frames/marioParty4_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from events.marioParty4_lotteryPrize import *
from events.marioParty4_mgreplace import *
from events.marioParty4_items import *
from events.marioParty4_battle import *
from events.marioParty4_initialItems import *
from events.marioParty4_spaceReplace import *

Expand All @@ -29,6 +30,7 @@ def create_mario_party_4_interface(frame):
tabview.add("Initial Items")
tabview.add("Space Replacement")
tabview.add("Lottery Rewards")
tabview.add("Battle Minigame")
tabview.add("Star Handicaps")
tabview.set("Coins Mods")

Expand Down Expand Up @@ -405,4 +407,42 @@ def fillViaCode4Actions():
parse_stars_button = ctk.CTkButton(master=tabview.tab("Star Handicaps"), command=lambda: handicapEvent_mp4(p1Stars, p2Stars, p3Stars, p4Stars), text="Generate Codes")
parse_stars_button.place(x=10, y=800)

label = ctk.CTkLabel(master=tabview.tab("Battle Minigame"), text=" Replace 5 Coins with ", font=("Arial", 16))
label.grid(row=0, column=1, pady=10)
fiveCoins = ctk.CTkEntry(master=tabview.tab("Battle Minigame"), width=48, font=("Arial", 16, "bold"))
fiveCoins.grid(row=0, column=2)
label = ctk.CTkLabel(master=tabview.tab("Battle Minigame"), text=" Coins ", font=("Arial", 16))
label.grid(row=0, column=3)

label = ctk.CTkLabel(master=tabview.tab("Battle Minigame"), text=" Replace 10 Coins with ", font=("Arial", 16))
label.grid(row=1, column=1, pady=10)
tenCoins = ctk.CTkEntry(master=tabview.tab("Battle Minigame"), width=48, font=("Arial", 16, "bold"))
tenCoins.grid(row=1, column=2)
label = ctk.CTkLabel(master=tabview.tab("Battle Minigame"), text=" Coins ", font=("Arial", 16))
label.grid(row=1, column=3)

label = ctk.CTkLabel(master=tabview.tab("Battle Minigame"), text=" Replace 20 Coins with ", font=("Arial", 16))
label.grid(row=2, column=1, pady=10)
twentyCoins = ctk.CTkEntry(master=tabview.tab("Battle Minigame"), width=48, font=("Arial", 16, "bold"))
twentyCoins.grid(row=2, column=2)
label = ctk.CTkLabel(master=tabview.tab("Battle Minigame"), text=" Coins ", font=("Arial", 16))
label.grid(row=2, column=3)

label = ctk.CTkLabel(master=tabview.tab("Battle Minigame"), text=" Replace 30 Coins with ", font=("Arial", 16))
label.grid(row=3, column=1, pady=10)
thirtyCoins = ctk.CTkEntry(master=tabview.tab("Battle Minigame"), width=48, font=("Arial", 16, "bold"))
thirtyCoins.grid(row=3, column=2)
label = ctk.CTkLabel(master=tabview.tab("Battle Minigame"), text=" Coins ", font=("Arial", 16))
label.grid(row=3, column=3)

label = ctk.CTkLabel(master=tabview.tab("Battle Minigame"), text=" Replace 50 Coins with ", font=("Arial", 16))
label.grid(row=4, column=1, pady=10)
fiftyCoins = ctk.CTkEntry(master=tabview.tab("Battle Minigame"), width=48, font=("Arial", 16, "bold"))
fiftyCoins.grid(row=4, column=2)
label = ctk.CTkLabel(master=tabview.tab("Battle Minigame"), text=" Coins ", font=("Arial", 16))
label.grid(row=4, column=3)

parse_stars_button = ctk.CTkButton(master=tabview.tab("Battle Minigame"), command=lambda: battleCoins_mp4(fiveCoins, tenCoins, twentyCoins, thirtyCoins, fiftyCoins), text="Generate Codes")
parse_stars_button.place(x=10, y=800)

return frame
40 changes: 40 additions & 0 deletions frames/marioParty5_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from events.marioParty5_mgreplace import *
from events.marioParty5_items import *
from events.marioParty5_boardSpecific import *
from events.marioParty5_battle import *

# Import custom tkinter module as ctk
import customtkinter as ctk
Expand All @@ -27,6 +28,7 @@ def create_mario_party_5_interface(frame):
tabview.add("Capsule Mods")
tabview.add("Bonus Star Replacement")
tabview.add("Star Handicaps")
tabview.add("Battle Minigame")
tabview.add("Board Specific")
tabview.set("Coins Mods")

Expand Down Expand Up @@ -543,4 +545,42 @@ def fillViaCode5Actions():
spinx_button = ctk.CTkButton(master=tabview.tab("Board Specific"), command=lambda: underseaEvent_mp5(comboSpinx, spinx_list), text="Generate Code")
spinx_button.place(x=450, y=10)

label = ctk.CTkLabel(master=tabview.tab("Battle Minigame"), text=" Replace 5 Coins with ", font=("Arial", 16))
label.grid(row=0, column=1, pady=10)
fiveCoins = ctk.CTkEntry(master=tabview.tab("Battle Minigame"), width=48, font=("Arial", 16, "bold"))
fiveCoins.grid(row=0, column=2)
label = ctk.CTkLabel(master=tabview.tab("Battle Minigame"), text=" Coins ", font=("Arial", 16))
label.grid(row=0, column=3)

label = ctk.CTkLabel(master=tabview.tab("Battle Minigame"), text=" Replace 10 Coins with ", font=("Arial", 16))
label.grid(row=1, column=1, pady=10)
tenCoins = ctk.CTkEntry(master=tabview.tab("Battle Minigame"), width=48, font=("Arial", 16, "bold"))
tenCoins.grid(row=1, column=2)
label = ctk.CTkLabel(master=tabview.tab("Battle Minigame"), text=" Coins ", font=("Arial", 16))
label.grid(row=1, column=3)

label = ctk.CTkLabel(master=tabview.tab("Battle Minigame"), text=" Replace 20 Coins with ", font=("Arial", 16))
label.grid(row=2, column=1, pady=10)
twentyCoins = ctk.CTkEntry(master=tabview.tab("Battle Minigame"), width=48, font=("Arial", 16, "bold"))
twentyCoins.grid(row=2, column=2)
label = ctk.CTkLabel(master=tabview.tab("Battle Minigame"), text=" Coins ", font=("Arial", 16))
label.grid(row=2, column=3)

label = ctk.CTkLabel(master=tabview.tab("Battle Minigame"), text=" Replace 30 Coins with ", font=("Arial", 16))
label.grid(row=3, column=1, pady=10)
thirtyCoins = ctk.CTkEntry(master=tabview.tab("Battle Minigame"), width=48, font=("Arial", 16, "bold"))
thirtyCoins.grid(row=3, column=2)
label = ctk.CTkLabel(master=tabview.tab("Battle Minigame"), text=" Coins ", font=("Arial", 16))
label.grid(row=3, column=3)

label = ctk.CTkLabel(master=tabview.tab("Battle Minigame"), text=" Replace 50 Coins with ", font=("Arial", 16))
label.grid(row=4, column=1, pady=10)
fiftyCoins = ctk.CTkEntry(master=tabview.tab("Battle Minigame"), width=48, font=("Arial", 16, "bold"))
fiftyCoins.grid(row=4, column=2)
label = ctk.CTkLabel(master=tabview.tab("Battle Minigame"), text=" Coins ", font=("Arial", 16))
label.grid(row=4, column=3)

parse_stars_button = ctk.CTkButton(master=tabview.tab("Battle Minigame"), command=lambda: battleCoins_mp5(fiveCoins, tenCoins, twentyCoins, thirtyCoins, fiftyCoins), text="Generate Codes")
parse_stars_button.place(x=10, y=800)

return frame
Loading

0 comments on commit 6ad3b13

Please sign in to comment.