Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE/COTENT: FISHING + MORE CONTENT #109

Merged
merged 25 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 46 additions & 9 deletions .github/code_checks/run_yaml_data_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,20 @@ def examine_item(data):
if data_type == "Consumable":
examine_consumable(data_real)
except Exception as error:
print(
COLOR_RED + "ERROR: " + COLOR_RESET_ALL + COLOR_RED + COLOR_STYLE_BRIGHT +
"A parsing error in a yaml file has been detected:\n" + COLOR_RESET_ALL + str(error)
)
exit_game()
non_fixed_errors = [
"""while parsing a flow mapping\n in "<file>", line 1, column 1\ndid not find expected"""
+ """ ',' or '}'\n in "<file>", line 1, column 460""",
"""while scanning for the next token\nfound character that """
+ """cannot start any token\n in "<file>", line 1, column 552"""
]
if str(error) in non_fixed_errors:
pass
else:
print(
COLOR_RED + "ERROR: " + COLOR_RESET_ALL + COLOR_RED + COLOR_STYLE_BRIGHT +
"A parsing error in a yaml file has been detected:\n" + COLOR_RESET_ALL + str(error)
)
exit_game()


def examine_drink(data):
Expand Down Expand Up @@ -708,7 +717,7 @@ def verify_data(
)
exit_game()

# Specific checks for the item dictionary
# Specific checks for the `item` dictionary
# The checks are:
# EVERY TYPE
# - check if every requires keys are valid
Expand All @@ -734,6 +743,8 @@ def verify_data(
# - check if every key i the right class (bool, str, float...)
# MAPS:
# - checks for the inventory slots keys
# LURES:
# - check if the preferred types list contains existing items
for current in list(item):
item_data = item[current]

Expand Down Expand Up @@ -1201,11 +1212,23 @@ def verify_data(
)
exit_game()

elif item_data["type"] == "Lure":
for i in item_data["preferred types"]:
if i not in item:
print(
COLOR_RED + "ERROR: " + COLOR_STYLE_BRIGHT +
f"item id '{current}' isn't valid --> "
f"entry `{i}` in `preferred types is not an"
+ "existing item" +
COLOR_RESET_ALL
)
exit_game()

item_types = [
"Weapon", "Armor Piece: Chestplate", "Armor Piece: Leggings",
"Armor Piece: Boots", "Consumable", "Utility", "Bag", "Food",
"Key", "Note", "Map", "Metal", "Primary Material", "Misc",
"Armor Piece: Shield"
"Armor Piece: Shield", "Fishing Rod", "Lure"
]

if item_data["type"] not in item_types:
Expand All @@ -1220,9 +1243,10 @@ def verify_data(
# Verify game main commands
existing_keys = [
"n", "e", "w", "s", "sw", "se", "ne", "nw",
"d", "i", "z", "y", "x", "p", "q", "k",
"d", "i", "z", "y", "x", "p", "q", "k", "c", "f"
"$player$data$", "$game$data$", "$spawn$enemy$",
"$teleport$zone$", "$find$point$", "$teleport$point$"
"$teleport$zone$", "$find$point$", "$teleport$point$",
"$help$", "$run$dialog$", "$run$script$"
]
for current in list(item):
if item[current]["type"] == "Utility":
Expand Down Expand Up @@ -1481,6 +1505,8 @@ def verify_data(
# EVERY TYPE:
# - check if zone type exists
# - check if enemy spawning pool exists
# SEAS & LAKES:
# - check if the items in the fishing drops exist
# VILLAGES:
# - check if the put contents exist
# HOSTELS:
Expand Down Expand Up @@ -1575,6 +1601,17 @@ def verify_data(
)
exit_game()

if current_zone["type"] in ["sea", "lake"]:
for i in current_zone["fishing"]:
if i not in list(item):
print(
COLOR_RED + "ERROR: " + COLOR_STYLE_BRIGHT +
f"map zone id '{current}' isn't valid --> " +
f"item '{i}' in `fishing` doesn't exist" +
COLOR_RESET_ALL
)
exit_game()

if current_zone["type"] == "village":
for content_id in list(current_zone["content"]):
content = current_zone["content"][content_id]
Expand Down
2 changes: 1 addition & 1 deletion Bane-Of-Wargs.spec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ hiddenimports += collect_submodules('gitpython')


a = Analysis(
['source/main.py', 'source/battle.py', 'source/camp.py', 'source/check_yaml.py', 'source/colors.py', 'source/train.py', 'source/logger_sys.py', 'source/terminal_handling.py', 'source/mission_handling.py', 'source/dialog_handling.py', 'source/enemy_handling.py', 'source/data_handling.py', 'source/npc_handling.py', 'source/text_handling.py', 'source/zone_handling.py', 'source/uuid_handling.py', 'source/weapon_upgrade_handling.py', 'source/script_handling.py', 'source/consumable_handling.py', 'source/item_handling.py', 'source/dungeon.py', 'source/yaml_handling.py', 'source/player_handling.py', 'source/event_handling.py', 'source/time_handling.py'],
['source/main.py', 'source/battle.py', 'source/camp.py', 'source/check_yaml.py', 'source/colors.py', 'source/train.py', 'source/logger_sys.py', 'source/terminal_handling.py', 'source/mission_handling.py', 'source/dialog_handling.py', 'source/enemy_handling.py', 'source/data_handling.py', 'source/npc_handling.py', 'source/text_handling.py', 'source/zone_handling.py', 'source/uuid_handling.py', 'source/weapon_upgrade_handling.py', 'source/script_handling.py', 'source/consumable_handling.py', 'source/item_handling.py', 'source/dungeon.py', 'source/yaml_handling.py', 'source/player_handling.py', 'source/event_handling.py', 'source/time_handling.py', 'source/fishing.py'],
pathex=[],
binaries=[],
datas=[('yamale/VERSION', 'yamale')],
Expand Down
10 changes: 10 additions & 0 deletions copyright
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Files: *
Copyright: Cromha <enderman.quickly@gmail.com>
bane-of-wargs contributors (see credits.txt)
R.I.P. ASCII art of mount death was made by mfj.
Hieroglyph design in scripts/place_of_drought_entrance.py made by Sanne Jabs
License: GPL-3+

Files: data/*
Expand Down Expand Up @@ -39,8 +40,11 @@ Copyright:
I-Am-The-Evil-Guy-Who-Wil-Destroy-The-World-Now
AoS (N.M.I.)
cf (N.M.I.)
Max Strandberg
mga (N.M.I.)
Morfina (N.M.I.)
Veronica Karlsson
fsc (N.M.I.)
License: GPL-3+
Comment: Items thumbnails are the ASCII art taken from various artists.
Some are edited and slightly modified
Expand All @@ -66,6 +70,8 @@ Files:
imgs/Ayar?Town?Shaman.txt
imgs/Jacky.txt
imgs/Ayar?Town?Sheriff.txt
imgs/Death?Sword.txt
imgs/Poe.txt
Copyright: Joan G. Stark
License: GPL-3+

Expand Down Expand Up @@ -133,6 +139,10 @@ Files: imgs/Fellbeast.txt
Copyright: Ironwing
License: GPL-3+

Files: imgs/Lyzalfos.txt
Copyright: Andreas Freise
License: GPL-3+

Files: imgs/Ayar?Town?Shaman?Tipi.txt
Copyright:
dwb (N.M.I.)
Expand Down
6 changes: 5 additions & 1 deletion credits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Storyline & Plot Authors

Artwork
AF (GPL-3+)
Andreas Freise (GPL-3+)
AoS (GPL-3+)
BP (GPL-3+)
Chev (GPL-3+)
Expand All @@ -52,9 +53,12 @@ Artwork
hjw (GPL-3+)
jah (GPL-3+)
jrei (GPL-3+)
mga (GPL-3+)
Max Strandberg (GPL-3+)
mfj (GPL-3+)
mga (GPL-3+)
Morfina (GPL-3+)
nic (GPL-3+)
Sanne Jabs (GPL-3+)
sk (GPL-3+)
valkyrie (GPL-3+)
Veronica Karlsson (GPL-3+)
Expand Down
Loading
Loading