Add mac support and fix spelling mistakes

This commit is contained in:
Goppier 2024-04-17 21:41:25 +02:00
parent 2e33bd37c3
commit af490f9fe6
4 changed files with 25 additions and 18 deletions

View File

@ -1,3 +1,5 @@
#!/usr/bin/python
"""
feebasCalcs.py
@ -165,15 +167,15 @@ class FeebasCalculator:
Returns:
self.random_value: The upper 16 bits of the previous random value.
"""
self.random_value = 0xEEB9EB65 * self.random_value + 0x0A3561A1;
self.random_value = 0xEEB9EB65 * self.random_value + 0x0A3561A1
self.random_value &= 0xFFFFFFFF
return (self.random_value >> 16)
def findFeebasStartingPoint(self):
"""
This function finds the starting point for the Trendy Phrase calculation based on the Lottory
This function finds the starting point for the Trendy Phrase calculation based on the Lottery
Number. It does this by progressing the RNG 20000 frames (around 5,5 minutes) forward and saves
all moments the RNG generated the given Lottory Number in an array.
all moments the RNG generated the given Lottery Number in an array.
Args:
self: The class itself
@ -187,14 +189,14 @@ class FeebasCalculator:
def findTrendyPhraseRubySapphire(self, lottery_seed):
"""
This function generates the dewford phrases for Ruby and Sapphire based on the lottory seed that was
This function generates the dewford phrases for Ruby and Sapphire based on the lottery seed that was
found before. It first find the starting point using the Trainer ID. Afterwards the Dewford Phrases
are generated. If the last RNG call made ends with the Lottory Number and the Trendiest Phrase
are generated. If the last RNG call made ends with the Lottery Number and the Trendiest Phrase
matches, then Feebas is found successfully!
Args:
self: The class itself
lottery_seed: The seed of the RNG which generated the Lottory Number
lottery_seed: The seed of the RNG which generated the Lottery Number
"""
lottery_no = 0
final_trendy_prase = ["NO", "FEEBAS"]
@ -221,7 +223,7 @@ class FeebasCalculator:
self.generateDewfordPhrases()
final_trendy_prase = self.dewford_trends[0].getPhrase()
# Generate the lottory number
# Generate the lottery number
lottery_no = self.getRandomValue()
# Check all the values. If it all matches, then Feebas is found!!
@ -236,13 +238,13 @@ class FeebasCalculator:
def findTrendyPhraseEmerald(self, lottery_seed):
"""
This function generates the dewford phrases for Ruby and Sapphire based on the lottory seed that was found before. Emerald doesn't have a clear
starting point, so we need to regress a variable amount of time until we Trendy Phrase and the Lottory ID matches up. If this happens, then we have
This function generates the dewford phrases for Ruby and Sapphire based on the lottery seed that was found before. Emerald doesn't have a clear
starting point, so we need to regress a variable amount of time until we Trendy Phrase and the Lottery ID matches up. If this happens, then we have
found Feebas successfully! It also tries to find the Secret ID, but it is possible however to find more than one Secret ID...
Args:
self: The class itself
lottery_seed: The seed of the RNG which generated the Lottory Number
lottery_seed: The seed of the RNG which generated the Lottery Number
"""
reverse_steps = 50
@ -266,7 +268,7 @@ class FeebasCalculator:
self.generateDewfordPhrases()
final_trendy_prase = self.dewford_trends[0].getPhrase()
# Generate the lottory number
# Generate the lottery number
lottery_no = self.getRandomValue()
# Check all the values. If it all matches, then Feebas is found!!

View File

@ -1,3 +1,5 @@
#!/usr/bin/python
FEEBAS_BRIDGE_TILES = [
[16*16, 33*16], [17*16, 33*16], [18*16, 33*16], [19*16, 33*16], [20*16, 33*16],
[16*16, 34*16], [17*16, 34*16], [18*16, 34*16], [19*16, 34*16], [20*16, 34*16]

15
main.py
View File

@ -1,3 +1,4 @@
#!/usr/bin/python
"""
main.py
@ -57,13 +58,13 @@ class Route119:
feebas_button_width = 2
fixed_game_checkbox_x = 375
elif(platform.system() == "Darwin"):
desired_font = tkinter.font.Font(family = "Segoe UI", size = 9, weight = "normal")
dropdown_x1 = 404
dropdown_x2 = 556
dropdown_width = 15
secret_id_label_place_x = 353
secret_id_entry_place_x = 514
secret_id_entry_width = 31
desired_font = tkinter.font.Font(family = '.AppleSystemUIFont', size = 11, weight = "normal")
dropdown_x1 = 400
dropdown_x2 = 560
dropdown_width = 17
secret_id_label_place_x = 370
secret_id_entry_place_x = 512
secret_id_entry_width = 30
feebas_button_width = 0
fixed_game_checkbox_x = 375

View File

@ -1,3 +1,5 @@
#!/usr/bin/python
"""
trendyPhrase.py