From fce96a671c6346e96010ef381d5f04057bbd34b5 Mon Sep 17 00:00:00 2001 From: OcelotWalrus Date: Mon, 30 Dec 2024 13:10:23 +0100 Subject: [PATCH 01/18] crap --- .github/code_checks/run_yaml_data_tests.py | 23 +- copyright | 2 + credits.txt | 4 +- data/items.yaml | 536 +++++++++++++++++++++ data/mounts.yaml | 3 + schemas/items_Armor Piece Boots.yaml | 1 + schemas/items_Armor Piece Chestplate.yaml | 1 + schemas/items_Armor Piece Leggings.yaml | 1 + schemas/items_Armor Piece Shield.yaml | 1 + schemas/items_Bag.yaml | 1 + schemas/items_Consumable.yaml | 1 + schemas/items_Fishing Rod.yaml | 8 + schemas/items_Food.yaml | 1 + schemas/items_Key.yaml | 1 + schemas/items_Lure.yaml | 8 + schemas/items_Map.yaml | 1 + schemas/items_Metal.yaml | 1 + schemas/items_Misc.yaml | 1 + schemas/items_Note.yaml | 1 + schemas/items_Primary Material.yaml | 1 + schemas/items_Utility.yaml | 1 + schemas/items_Weapon.yaml | 1 + source/check_yaml.py | 23 +- source/main.py | 37 +- 24 files changed, 645 insertions(+), 14 deletions(-) create mode 100644 schemas/items_Fishing Rod.yaml create mode 100644 schemas/items_Lure.yaml diff --git a/.github/code_checks/run_yaml_data_tests.py b/.github/code_checks/run_yaml_data_tests.py index cb50eb9..67a5ed5 100644 --- a/.github/code_checks/run_yaml_data_tests.py +++ b/.github/code_checks/run_yaml_data_tests.py @@ -708,7 +708,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 @@ -734,6 +734,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] @@ -1201,11 +1203,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: @@ -1220,9 +1234,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" "$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": diff --git a/copyright b/copyright index 83709f1..6a47a6a 100644 --- a/copyright +++ b/copyright @@ -39,7 +39,9 @@ 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 License: GPL-3+ Comment: Items thumbnails are the ASCII art taken from various artists. diff --git a/credits.txt b/credits.txt index 6e9c7a7..15fa511 100644 --- a/credits.txt +++ b/credits.txt @@ -52,8 +52,10 @@ 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+) sk (GPL-3+) valkyrie (GPL-3+) diff --git a/data/items.yaml b/data/items.yaml index b8f36a3..be7acb6 100644 --- a/data/items.yaml +++ b/data/items.yaml @@ -2481,6 +2481,7 @@ Raw Salmon: max bonus: 0 healing level: 2 gold: 5.2 + fishing weight: .15 description: "A raw salmon may not be the best thing to eat but it's always better than nothing." thumbnail raw: | ╔════════════════════════════╗ @@ -2512,6 +2513,319 @@ Raw Salmon: ║ ║ ║ ║ ╚════════════════════════════╝ +Catfish: + type: "Food" + max bonus: 0 + healing level: 6 + gold: 23.4 + fishing weight: .55 + description: > + Catfishes are bottom feeders, meaning that you'll most of the time find them in the bottom + of lakes. They are of medium weight. + thumbnail raw: | + ╔════════════════════════════╗ + ║ ║ + ║ ║ + ║ ║ + ║ /`-._ ║ + ║ /_,.._`:- ║ + ║ ,.-' , `-:..-') ║ + ║ : x ):'; _ { ║ + ║ `-._ `'__,.-'\`-.) ║ + ║ `\\ \,.-'` ║ + ║ ║ + ║ ║ + ║ ║ + ╚════════════════════════════╝ + thumbnail: | + ╔════════════════════════════╗ + ║ ║ + ║ ║ + ║ ║ + ║$BLUE /`-._ $WHITE║ + ║$BLUE /$PURPLE_,.._$BLUE`:- $WHITE║ + ║$PURPLE ,.-' , `-:..$BLUE-') $WHITE║ + ║$PURPLE : $REDx $PURPLE):$BLUE'; _ { $WHITE║ + ║$PURPLE `-._ `'__,.-'$BLUE\`-.) $WHITE║ + ║$BLUE `\\ \,.-'` $WHITE║ + ║ ║ + ║ ║ + ║ ║ + ╚════════════════════════════╝ +Tropical Fish: + type: "Food" + max bonus: 0 + healing level: 3 + gold: 34.2 + fishing weight: .25 + description: > + Tropical fish are very colored fish that you'll mostly find + on tropical zones and hot lakes. + thumbnail raw: | + ╔════════════════════════════╗ + ║ ║ + ║ ║ + ║ ║ + ║ ___ ║ + ║ _ / __)_ ║ + ║ _ .'_'-'\ /-'-. ║ + ║ \'-._.'-'\ / _\-(X)_: ║ + ║ \ (__\/_ \ '._) _\ ║ + ║ /.' (_.'----''./' ║ + ║ ' ║ + ║ ║ + ║ ║ + ╚════════════════════════════╝ + thumbnail: | + ╔════════════════════════════╗ + ║ ║ + ║ ║ + ║ ║ + ║$RED ___ $WHITE║ + ║$ORANGE _ $RED/ __)_ $WHITE║ + ║$RED _ $ORANGE.'_'-'$RED\ /$ORANGE-'-. $WHITE║ + ║$RED \$ORANGE'-._.'-'$RED\ / _\$ORANGE-($DARK_REDX$ORANGE)_: $WHITE║ + ║$RED \$ORANGE $RED(__\/_ \ $ORANGE'.$RED_) _\ $WHITE║ + ║$RED /$ORANGE.' $RED(_$ORANGE.'----''.$RED/$ORANGE' $WHITE║ + ║ ' $WHITE║ + ║ ║ + ║ ║ + ╚════════════════════════════╝ +Sea Horse: + type: "Food" + max bonus: 0 + healing level: 30 + gold: 375.7 + fishing weight: .65 + description: > + Sea horses are clearly non-conventional fish but some people still + like them as meals. + thumbnail raw: | + ╔════════════════════════════╗ + ║ ║ + ║ ║ + ║ \/)/) ║ + ║ _' xx(_.-. ║ + ║ /'. .---' ║ + ║ /'-./ ( ║ + ║ ) ; __\ ║ + ║ \_.'\ : __| ║ + ║ ) _/ ║ + ║ ( (,. ║ + ║ '-.-' ║ + ║ ║ + ╚════════════════════════════╝ + thumbnail: | + $CYAN@$WHITE════════════════════════════$CYAN@$WHITE + ║ ║ + ║ ║ + ║$YELLOW \/)/) $WHITE║ + ║$ORANGE _' $DARK_REDxx$ORANGE(_.-. $WHITE║ + ║$ORANGE /'. .$YELLOW---$ORANGE' $WHITE║ + ║$ORANGE /'-./ ( $WHITE║ + ║$ORANGE ) ; $YELLOW__$ORANGE\ $WHITE║ + ║$ORANGE \_.'\ : $YELLOW__$ORANGE| $WHITE║ + ║$ORANGE ) $YELLOW_$ORANGE/ $WHITE║ + ║$ORANGE ( (,. $WHITE║ + ║$ORANGE '-.-' $WHITE║ + ║ ║ + $CYAN@$WHITE════════════════════════════$CYAN@$WHITE +Greengill: + type: "Food" + max bonus: 0 + healing level: 2 + gold: 15.9 + fishing weight: .2 + description: > + Greengills are very light fish, sometime referred as sunfishes. You'll find them + in pretty much every lake or sea around the archipelago. + thumbnail raw: | + ╔════════════════════════════╗ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ /`·_, ║ + ║ /,___,`:· ║ + ║ ,_·´ , `·_,_·´) ║ + ║ : X ):´, , { ║ + ║ `·_, `· ,_·´\`·,) ║ + ║ `\\´´\,_·´ ║ + ║ ║ + ║ ║ + ╚════════════════════════════╝ + thumbnail: | + ╔════════════════════════════╗ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║$RED /`·_, $WHITE║ + ║$RED /,___,`:· $WHITE║ + ║$SILVER ,_·$RED´ , `·_,_·´) $WHITE║ + ║$SILVER : $YELLOWX$SILVER )$RED:´, , { $WHITE║ + ║$SILVER `·_,$RED `· ,_·´\`·,) $WHITE║ + ║$RED `\\´´\,_·´ $WHITE║ + ║ ║ + ║ ║ + ╚════════════════════════════╝ +Kathallion Bass: + type: "Food" + max bonus: 0 + healing level: 7 + gold: 9.34 + fishing weight: .425 + description: This type of bass is commonly found in pretty much every lake of the archipelago. + thumbnail raw: | + ╔════════════════════════════╗ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ /`·_, ║ + ║ /,___,`:· ║ + ║ ,_·´ , `·_,_·´) ║ + ║ : X ):´, , { ║ + ║ `·_, `· ,_·´\`·,) ║ + ║ `\\´´\,_·´ ║ + ║ ║ + ║ ║ + ╚════════════════════════════╝ + thumbnail: | + ╔════════════════════════════╗ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║$RED /`·_, $WHITE║ + ║$RED /,___,`:· $WHITE║ + ║$SILVER ,_·$RED´ , `·_,_·´) $WHITE║ + ║$SILVER : $YELLOWX$SILVER )$RED:´, , { $WHITE║ + ║$SILVER `·_,$RED `· ,_·´\`·,) $WHITE║ + ║$RED `\\´´\,_·´ $WHITE║ + ║ ║ + ║ ║ + ╚════════════════════════════╝ +Kathallion Loach: + type: "Food" + max bonus: 0 + healing level: 25 + gold: 325.2 + fishing weight: 1.125 + description: > + The Kathallion Loach is very famous among fishers of the Kathallion Archipelago. With its average + length of 18 in and average weight of 100 lbs, it's the rarest and hardest-to-catch fish of the + world, probably. + thumbnail raw: | + ╔════════════════════════════╗ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ /`·_, ║ + ║ /,___,`:· ║ + ║ ,_·´ , `·_,_·´) ║ + ║ : X ):´, , { ║ + ║ `·_, `· ,_·´\`·,) ║ + ║ `\\´´\,_·´ ║ + ║ ║ + ║ ║ + ╚════════════════════════════╝ + thumbnail: | + ╔════════════════════════════╗ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║$RED /`·_, $WHITE║ + ║$RED /,___,`:· $WHITE║ + ║$SILVER ,_·$RED´ , `·_,_·´) $WHITE║ + ║$SILVER : $YELLOWX$SILVER )$RED:´, , { $WHITE║ + ║$SILVER `·_,$RED `· ,_·´\`·,) $WHITE║ + ║$RED `\\´´\,_·´ $WHITE║ + ║ ║ + ║ ║ + ╚════════════════════════════╝ +Kathallion Pike: + type: "Food" + max bonus: 0 + healing level: 15 + gold: 115.2 + fishing weight: .925 + description: > + Less famous than the Kathallion Loach, the Kathallion Pike is still a very famous fish + among fishers. It's clearly lighter than the loach with its 60 lbs, but it's actually + longer, with its 22 in of average length. + thumbnail raw: | + ╔════════════════════════════╗ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ /`·_, ║ + ║ /,___,`:· ║ + ║ ,_·´ , `·_,_·´) ║ + ║ : X ):´, , { ║ + ║ `·_, `· ,_·´\`·,) ║ + ║ `\\´´\,_·´ ║ + ║ ║ + ║ ║ + ╚════════════════════════════╝ + thumbnail: | + ╔════════════════════════════╗ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║$RED /`·_, $WHITE║ + ║$RED /,___,`:· $WHITE║ + ║$SILVER ,_·$RED´ , `·_,_·´) $WHITE║ + ║$SILVER : $YELLOWX$SILVER )$RED:´, , { $WHITE║ + ║$SILVER `·_,$RED `· ,_·´\`·,) $WHITE║ + ║$RED `\\´´\,_·´ $WHITE║ + ║ ║ + ║ ║ + ╚════════════════════════════╝ +Reekfish: + type: "Food" + max bonus: 0 + healing level: -5 + gold: 56.25 + fishing weight: .725 + description: > + Reekfishes are probably the most disgusting type of fishes, + with their terrible odor and feed on coral. Its only use is + to feed dwarf steeds, that enjoys them as meals. + thumbnail raw: | + ╔════════════════════════════╗ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ /`·_, ║ + ║ /,___,`:· ║ + ║ ,_·´ , `·_,_·´) ║ + ║ : X ):´, , { ║ + ║ `·_, `· ,_·´\`·,) ║ + ║ `\\´´\,_·´ ║ + ║ ║ + ║ ║ + ╚════════════════════════════╝ + thumbnail: | + ╔════════════════════════════╗ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║$RED /`·_, $WHITE║ + ║$RED /,___,`:· $WHITE║ + ║$SILVER ,_·$RED´ , `·_,_·´) $WHITE║ + ║$SILVER : $YELLOWX$SILVER )$RED:´, , { $WHITE║ + ║$SILVER `·_,$RED `· ,_·´\`·,) $WHITE║ + ║$RED `\\´´\,_·´ $WHITE║ + ║ ║ + ║ ║ + ╚════════════════════════════╝ Bread: type: "Food" max bonus: 0 @@ -3305,3 +3619,225 @@ Flexible String: ║ ║ ║ ║ ╚════════════════════════════╝ +# Fishing gear +Spinning Rod: + type: "Fishing Rod" + gold: 11.7 + speed coefficient: 1 + rod strength: .4 + description: > + The most generic fishing rod you can find pretty much everywhere. Very easy to use and also + versatile,it's prefect for both rookies and intermediate fishermen and fisherwomen. + thumbnail: | + ╔════════════════════════════╗ + ║ ║ + ║$DARK_BROWN \ $WHITE║ + ║ $SILVERo$DARK_BROWN\ $WHITE║ + ║$DARK_BROWN \ $WHITE║ + ║ $SILVERo$DARK_BROWN\ $WHITE║ + ║$DARK_BROWN \ $WHITE║ + ║ $SILVERo$DARK_BROWN\ $WHITE║ + ║$DARK_BROWN \ $WHITE║ + ║ $SILVER7$GRAY@$DARK_BROWN| $WHITE║ + ║ $DARK_RED\\ $WHITE║ + ║ $DARK_RED\\ $WHITE║ + ║ $DARK_BROWN^^ $WHITE║ + ╚════════════════════════════╝ + thumbnail raw: | + ╔════════════════════════════╗ + ║ ║ + ║ \ ║ + ║ o\ ║ + ║ \ ║ + ║ o\ ║ + ║ \ ║ + ║ o\ ║ + ║ \ ║ + ║ 7@| ║ + ║ \\ ║ + ║ \\ ║ + ║ ^^ ║ + ╚════════════════════════════╝ +Casting Rod: + type: "Fishing Rod" + gold: 23.25 + speed coefficient: 1.15 + rod strength: .625 + description: > + Casting rods are in every way similar to spinning rods, though they're more + durable and have been enhanced to handle heavier fish. + thumbnail: | + ╔════════════════════════════╗ + ║ ║ + ║$DARK_BROWN \ $WHITE║ + ║ $SILVERo$DARK_BROWN\ $WHITE║ + ║$DARK_BROWN \ $WHITE║ + ║ $SILVERo$DARK_BROWN\ $WHITE║ + ║$DARK_BROWN \ $WHITE║ + ║ $SILVERo$DARK_BROWN\ $WHITE║ + ║$DARK_BROWN \ $WHITE║ + ║ $SILVER7$GRAY@$DARK_BROWN| $WHITE║ + ║ $DARK_RED\\ $WHITE║ + ║ $DARK_RED\\ $WHITE║ + ║ $DARK_BROWN^^ $WHITE║ + ╚════════════════════════════╝ + thumbnail raw: | + ╔════════════════════════════╗ + ║ ║ + ║ \ ║ + ║ o\ ║ + ║ \ ║ + ║ o\ ║ + ║ \ ║ + ║ o\ ║ + ║ \ ║ + ║ 7@| ║ + ║ \\ ║ + ║ \\ ║ + ║ ^^ ║ + ╚════════════════════════════╝ +Surf Rod: + type: "Fishing Rod" + gold: 75.3 + speed coefficient: 1.25 + rod strength: 1 + description: > + Surf rods are built to handle the challenges of casting heavy baits + or lures into the surf and battling large fish that inhabit the coastal + waters. They're the heaviest and longest type of rod that exists. + thumbnail: | + ╔════════════════════════════╗ + ║ $LIGHT_GRAY0$DARK_BROWN\\ $WHITE║ + ║ $DARK_BROWN\\ $WHITE║ + ║ $GRAYo$DARK_BROWN\\ $WHITE║ + ║ $DARK_BROWN\\ $WHITE║ + ║ $LIGHT_GRAY0$DARK_BROWN\\ $WHITE║ + ║ $DARK_BROWN\\ $WHITE║ + ║ $GRAYo$DARK_BROWN\\ $WHITE║ + ║ $DARK_BROWN\\ $WHITE║ + ║ $GRAY7$SILVER@$DARK_BROWN|| $WHITE║ + ║ $SILVER@$DARK_RED\\\ $WHITE║ + ║$DARK_RED \\\ $WHITE║ + ║ $YELLOW^^^ $WHITE║ + ╚════════════════════════════╝ + thumbnail raw: | + ╔════════════════════════════╗ + ║ 0\\ ║ + ║ \\ ║ + ║ o\\ ║ + ║ \\ ║ + ║ 0\\ ║ + ║ \\ ║ + ║ o\\ ║ + ║ \\ ║ + ║ 7@|| ║ + ║ @\\\ ║ + ║ \\\ ║ + ║ ^^^ ║ + ╚════════════════════════════╝ +Swimmer Lure: + type: "Lure" + gold: 10.5 + speed coefficient: .925 + preferred types: + - Raw Salmon + - Tropical Fish + - Greengill + description: > + This is the most common lure used by fishers. It's light-weight but however + it can't attract deep-water dwelling fish. + thumbnail: | + ╔════════════════════════════╗ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ╚════════════════════════════╝ +Popper Lure: + type: "Lure" + gold: 27.82 + speed coefficient: 1.125 + preferred types: + - Tropical Fish + - Greengill + - Reekfish + - Kathallion Bass + description: > + The popper is an enhanced version of the swimmer lure, that allows the + catch of deeper-water dwelling fish. + thumbnail: | + ╔════════════════════════════╗ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ╚════════════════════════════╝ +Frog Lure: + type: "Lure" + gold: 52.15 + speed coefficient: 1.225 + preferred types: + - Reekfish + - Kathallion Bass + - Catfish + description: > + The frog lure is the most common lure used among advanced and expert fishers. It's + quite light-weight and allows the catch of heavy and deep-water dwelling fish, + that are often more valuable than other ones. + thumbnail: | + ╔════════════════════════════╗ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ╚════════════════════════════╝ +Seahorse Lure: + type: "Lure" + gold: 86.34 + speed coefficient: 1.35 + preferred types: + - Catfish + - Kathallion Bass + - Kathallion Pike + - Kathallion Loach + description: > + This expensive lure is made for fishers searching for the rarest fishes. + thumbnail: | + ╔════════════════════════════╗ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ╚════════════════════════════╝ diff --git a/data/mounts.yaml b/data/mounts.yaml index b7c0526..98220f7 100644 --- a/data/mounts.yaml +++ b/data/mounts.yaml @@ -72,6 +72,7 @@ Bear: food: - Beef - Porkchop + - Reekfish feed needs: 3 stable: required stable: Dwarf Stable @@ -99,6 +100,7 @@ Goat Steed: - Hay Bale - Carrot - Apple + - Reekfish feed needs: 1.8 stable: required stable: Dwarf Stable @@ -128,6 +130,7 @@ Dwarf Boar: - Hay Bale - Carrot - Apple + - Reekfish feed needs: 2.3 stable: required stable: Dwarf Stable diff --git a/schemas/items_Armor Piece Boots.yaml b/schemas/items_Armor Piece Boots.yaml index f8af135..0f20553 100644 --- a/schemas/items_Armor Piece Boots.yaml +++ b/schemas/items_Armor Piece Boots.yaml @@ -8,3 +8,4 @@ description: str() for this upgrade: list(str(), required=False) thumbnail: str() thumbnail raw: str(required=False) +fishing weight: num(required=False) diff --git a/schemas/items_Armor Piece Chestplate.yaml b/schemas/items_Armor Piece Chestplate.yaml index f8af135..0f20553 100644 --- a/schemas/items_Armor Piece Chestplate.yaml +++ b/schemas/items_Armor Piece Chestplate.yaml @@ -8,3 +8,4 @@ description: str() for this upgrade: list(str(), required=False) thumbnail: str() thumbnail raw: str(required=False) +fishing weight: num(required=False) diff --git a/schemas/items_Armor Piece Leggings.yaml b/schemas/items_Armor Piece Leggings.yaml index f8af135..0f20553 100644 --- a/schemas/items_Armor Piece Leggings.yaml +++ b/schemas/items_Armor Piece Leggings.yaml @@ -8,3 +8,4 @@ description: str() for this upgrade: list(str(), required=False) thumbnail: str() thumbnail raw: str(required=False) +fishing weight: num(required=False) diff --git a/schemas/items_Armor Piece Shield.yaml b/schemas/items_Armor Piece Shield.yaml index f8af135..0f20553 100644 --- a/schemas/items_Armor Piece Shield.yaml +++ b/schemas/items_Armor Piece Shield.yaml @@ -8,3 +8,4 @@ description: str() for this upgrade: list(str(), required=False) thumbnail: str() thumbnail raw: str(required=False) +fishing weight: num(required=False) diff --git a/schemas/items_Bag.yaml b/schemas/items_Bag.yaml index 71b2630..7b4f9c1 100644 --- a/schemas/items_Bag.yaml +++ b/schemas/items_Bag.yaml @@ -4,3 +4,4 @@ gold: num() description: str() thumbnail: str() thumbnail raw: str(required=False) +fishing weight: num(required=False) diff --git a/schemas/items_Consumable.yaml b/schemas/items_Consumable.yaml index 90ee4b3..40f73e3 100644 --- a/schemas/items_Consumable.yaml +++ b/schemas/items_Consumable.yaml @@ -4,3 +4,4 @@ description: str() thumbnail: str() thumbnail raw: str(required=False) effects: any() +fishing weight: num(required=False) diff --git a/schemas/items_Fishing Rod.yaml b/schemas/items_Fishing Rod.yaml new file mode 100644 index 0000000..728e6bd --- /dev/null +++ b/schemas/items_Fishing Rod.yaml @@ -0,0 +1,8 @@ +type: str() +speed coefficient: num() +rod strength: num() +gold: num() +description: str() +thumbnail: str() +thumbnail raw: str(required=False) +fishing weight: num(required=False) diff --git a/schemas/items_Food.yaml b/schemas/items_Food.yaml index bc0945c..06d755a 100644 --- a/schemas/items_Food.yaml +++ b/schemas/items_Food.yaml @@ -5,3 +5,4 @@ gold: num() description: str() thumbnail: str() thumbnail raw: str(required=False) +fishing weight: num(required=False) diff --git a/schemas/items_Key.yaml b/schemas/items_Key.yaml index a55e76e..2838d3a 100644 --- a/schemas/items_Key.yaml +++ b/schemas/items_Key.yaml @@ -3,3 +3,4 @@ description: str() gold: num(required=False) thumbnail: str() thumbnail raw: str(required=False) +fishing weight: num(required=False) diff --git a/schemas/items_Lure.yaml b/schemas/items_Lure.yaml new file mode 100644 index 0000000..afd3bb9 --- /dev/null +++ b/schemas/items_Lure.yaml @@ -0,0 +1,8 @@ +type: str() +speed coefficient: num() +preferred types: list(str()) +gold: num() +description: str() +thumbnail: str() +thumbnail raw: str(required=False) +fishing weight: num(required=False) diff --git a/schemas/items_Map.yaml b/schemas/items_Map.yaml index 44e9782..754f735 100644 --- a/schemas/items_Map.yaml +++ b/schemas/items_Map.yaml @@ -4,3 +4,4 @@ map: str() thumbnail: str() thumbnail raw: str(required=False) gold: num() +fishing weight: num(required=False) diff --git a/schemas/items_Metal.yaml b/schemas/items_Metal.yaml index 042ec84..39ba625 100644 --- a/schemas/items_Metal.yaml +++ b/schemas/items_Metal.yaml @@ -3,3 +3,4 @@ gold: num() description: str() thumbnail: str() thumbnail raw: str(required=False) +fishing weight: num(required=False) diff --git a/schemas/items_Misc.yaml b/schemas/items_Misc.yaml index 042ec84..39ba625 100644 --- a/schemas/items_Misc.yaml +++ b/schemas/items_Misc.yaml @@ -3,3 +3,4 @@ gold: num() description: str() thumbnail: str() thumbnail raw: str(required=False) +fishing weight: num(required=False) diff --git a/schemas/items_Note.yaml b/schemas/items_Note.yaml index 3aad0c1..71c9b75 100644 --- a/schemas/items_Note.yaml +++ b/schemas/items_Note.yaml @@ -3,3 +3,4 @@ description: str() thumbnail: str() thumbnail raw: str(required=False) gold: num() +fishing weight: num(required=False) diff --git a/schemas/items_Primary Material.yaml b/schemas/items_Primary Material.yaml index 12d8dc3..d1f5904 100644 --- a/schemas/items_Primary Material.yaml +++ b/schemas/items_Primary Material.yaml @@ -3,3 +3,4 @@ description: str() gold: num() thumbnail: str() thumbnail raw: str(required=False) +fishing weight: num(required=False) diff --git a/schemas/items_Utility.yaml b/schemas/items_Utility.yaml index ee1f8ba..1c78742 100644 --- a/schemas/items_Utility.yaml +++ b/schemas/items_Utility.yaml @@ -6,3 +6,4 @@ description: str() arguments: list(required=False) thumbnail: str() thumbnail raw: str(required=False) +fishing weight: num(required=False) diff --git a/schemas/items_Weapon.yaml b/schemas/items_Weapon.yaml index 3954241..a5b8c0e 100644 --- a/schemas/items_Weapon.yaml +++ b/schemas/items_Weapon.yaml @@ -10,3 +10,4 @@ description: str() for this upgrade: list(str(), required=False) thumbnail: str() thumbnail raw: str(required=False) +fishing weight: num(required=False) diff --git a/source/check_yaml.py b/source/check_yaml.py index d5902e6..21f03fc 100644 --- a/source/check_yaml.py +++ b/source/check_yaml.py @@ -835,7 +835,7 @@ def verify_data( ) text_handling.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 @@ -861,6 +861,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] @@ -1328,11 +1330,23 @@ def verify_data( ) text_handling.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 + ) + text_handling.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: @@ -1347,9 +1361,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" "$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": diff --git a/source/main.py b/source/main.py index ed03c7f..55362a2 100644 --- a/source/main.py +++ b/source/main.py @@ -3240,18 +3240,18 @@ def run(play): "ARMOR PROTECTION: " + COLOR_GREEN + COLOR_STYLE_BRIGHT + str(round(item[which_item]["armor protection"], 2)) + COLOR_RESET_ALL ) - if item[which_item]["type"] == "Metal": + elif item[which_item]["type"] == "Metal": text = ( " Metals are items that you buy in village " + "forges that you often use to order weapons in blacksmith." ) - if item[which_item]["type"] == "Primary Material": + elif item[which_item]["type"] == "Primary Material": text = ( " Primary materials are items that you " + "can find naturally but that you can also buy from many villages shops." ) text_handling.print_long_string(text) - if item[which_item]["type"] == "Weapon": + elif item[which_item]["type"] == "Weapon": item_next_upgrade = weapon_upgrade_handling.detect_weapon_next_upgrade_items(which_item, item) cout( "UPGRADE TIER: " + COLOR_GREEN + COLOR_STYLE_BRIGHT + @@ -3265,7 +3265,7 @@ def run(play): "CRITICAL HIT CHANCE: " + COLOR_MAGENTA + COLOR_STYLE_BRIGHT + str(round(item[which_item]["critical hit chance"] * 100, 2)) + "%" + COLOR_RESET_ALL ) - if item[which_item]["type"] == "Food": + elif item[which_item]["type"] == "Food": cout( "HEALTH BONUS: " + COLOR_STYLE_BRIGHT + COLOR_YELLOW + str(item[which_item]["max bonus"]) + COLOR_RESET_ALL @@ -3277,7 +3277,7 @@ def run(play): "HEALING: " + COLOR_STYLE_BRIGHT + COLOR_MAGENTA + healing_level + COLOR_RESET_ALL ) - if item[which_item]["type"] == "Consumable": + elif item[which_item]["type"] == "Consumable": cout("") cout("EFFECTS:") logger_sys.log_message(f"INFO: Getting consumable '{which_item}' effects") @@ -3294,6 +3294,33 @@ def run(play): count += 1 else: cout(" -None") + elif item[which_item]["type"] == "Fishing Rod": + cout("") + cout( + "SPEED COEFFICIENT: " + COLOR_BACK_BLUE + COLOR_STYLE_BRIGHT + + str(round(item[which_item]["speed coefficient"] * 100)) + COLOR_RESET_ALL + ) + cout( + "STRENGTH: " + COLOR_BACK_GREEN + COLOR_STYLE_BRIGHT + + str(round(item[which_item]["strength"] * 100)) + COLOR_RESET_ALL + ) + elif item[which_item]["type"] == "Lure": + cout("") + cout( + "SPEED COEFFICIENT: " + COLOR_BACK_BLUE + COLOR_STYLE_BRIGHT + + str(round(item[which_item]["speed coefficient"] * 100)) + COLOR_RESET_ALL + ) + + # preferred catches + preferred_catches = [] + for i in item[which_item]["preferred types"]: + if i not in preferred_catches: + preferred_catches += [i] + preferred_catches = str(preferred_catches) + preferred_catches = preferred_catches.replace('[', '') + preferred_catches = preferred_catches.replace(']', '') + preferred_catches = preferred_catches.replace("'", '') + text = "PREFERRED CATCHES: " + str(preferred_catches) text = '=' text_handling.print_separator(text) if str( From 2b669649c5393f8dabeffdb99366842a934de0ec Mon Sep 17 00:00:00 2001 From: Cromha <87318892+OcelotWalrus@users.noreply.github.com> Date: Mon, 30 Dec 2024 13:11:42 +0100 Subject: [PATCH 02/18] Palace of drought (#108) * crap * crap --- copyright | 7 + credits.txt | 2 + data/enemies.yaml | 117 ++++++++++++++- data/items.yaml | 137 +++++++++++++++--- data/lists.yaml | 68 ++++++++- data/map.yaml | 2 +- data/mounts.yaml | 25 ++++ data/zone.yaml | 73 ++++++++++ imgs/Bomskit.txt | 0 imgs/Death Sword.txt | 18 +++ imgs/Dry Ork.txt | 11 ++ imgs/Lyzalfos.txt | 7 + imgs/Phantom Rider.txt | 0 imgs/Poe.txt | 13 ++ scripts/palace_of_drought_entrance.py | 200 ++++++++++++++++++++++++++ vanilla-environment | 2 +- 16 files changed, 661 insertions(+), 21 deletions(-) create mode 100644 imgs/Bomskit.txt create mode 100644 imgs/Death Sword.txt create mode 100644 imgs/Dry Ork.txt create mode 100644 imgs/Lyzalfos.txt create mode 100644 imgs/Phantom Rider.txt create mode 100644 imgs/Poe.txt create mode 100644 scripts/palace_of_drought_entrance.py diff --git a/copyright b/copyright index 6a47a6a..cff6ea5 100644 --- a/copyright +++ b/copyright @@ -8,6 +8,7 @@ Files: * Copyright: Cromha 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/* @@ -68,6 +69,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+ @@ -135,6 +138,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.) diff --git a/credits.txt b/credits.txt index 15fa511..d89bb2d 100644 --- a/credits.txt +++ b/credits.txt @@ -28,6 +28,7 @@ Storyline & Plot Authors Artwork AF (GPL-3+) + Andreas Freise (GPL-3+) AoS (GPL-3+) BP (GPL-3+) Chev (GPL-3+) @@ -57,6 +58,7 @@ Artwork mga (GPL-3+) Morfina (GPL-3+) nic (GPL-3+) + Sanne Jabs (GPL-3+) sk (GPL-3+) valkyrie (GPL-3+) Veronica Karlsson (GPL-3+) diff --git a/data/enemies.yaml b/data/enemies.yaml index 9adacb9..f4ffc1d 100644 --- a/data/enemies.yaml +++ b/data/enemies.yaml @@ -129,6 +129,29 @@ White Warg: - Wolf Skull - Beef description: "White Wargs are even bigger Wolves than came from Snowy Peaks. They are captains of the Wargs." +Bomskit: + plural: "Bomskits" + never run away: true + damage: + min damage: 10 + max damage: 15 + critical chance: .725 + one shot: true + health: + min spawning health: 3 + max spawning health: 5 + max health level: 5 + agility: 1.25 + inventory: + - Rotten Flesh + - Slime + - Gunpowder + - Gunpowder + description: > + Bomskits are small, insect-like creatures. Even though they have low health, they can overcome the + not prepared adventurer in larger groups, by their attack: they explode as they hit you. They + can easily be taken out with any weapon. They are commonly found in dungeons around the + Kathallion Archipelago, but also in certain wheat fields. # Troll enemies Cavern Troll: plural: "Cavern Trolls" @@ -266,6 +289,24 @@ Doomed Horror: inventory: - Wooden Stick description: "Doomed Horrors were once men, which are now cursed to anguish in the evil places, roaming them to strike all enemies. They are slow and deal low damages but they have high health." +Poe: + plural: "Poes" + damage: + min damage: 5 + max damage: 13 + critical chance: .25 + health: + min spawning health: 10 + max spawning health: 25 + max health level: 25 + agility: .45 + inventory: + - Raw Aluminum + - Tissue Bag + description: > + These cloaked spirits freely roam graveyards and other haunted locales on the Shire Island. They carry a lantern with them + that serves as the container for their own soul and the ones they conquered. Many people think that they're spirits of deads + that became monsters because of an unresolved attachment to the mortal world. # Creatures enemies Corrupted Ent: plural: Corrupted Ents @@ -469,7 +510,7 @@ Desert Undead: description: > These monsters have been wandering in the Stall Island for a long time. So long that depending on the place you're, it's a different species that you'll have to slay. Desert undeads are known to be the most dangerous one, often coming in large groups. -# Dragon bosses +# Bosses Balrog: plural: "Balrogs" damage: @@ -529,6 +570,39 @@ Fellbeast: description: > Fellbeasts may look like dragons, they do not have the power of breathing fire, but they have huge clawed hands. They are often used by the evil forces wizards. +Phantom Rider: + plural: "Phantom Riders" + damage: + min damage: 8 + max damage: 15 + critical chance: .425 + health: + min spawning health: 10 + max spawning health: 30 + max health level: 30 + agility: 1.08 + inventory: + - Long Sword + description: > + Phantom riders are summoned creatures present in many dungeons across the Kathallion Archipelago. They don't do + much damage for advanced fighters but they're swift and it's hard to dodged their hits. Their long sword allows + them to reach you from a long distance. +Death Sword: + plural: "Death Swords" + damage: + min damage: 10 + max damage: 25 + critical chance: .625 + health: + min spawning health: 30 + max spawning health: 70 + max health level: 70 + agility: .35 + inventory: + - Chuckle Sword (4) + description: > + This frightening spirit uses a gigantic and powerful chuckle sword. His horns on his head could + qualify him as the devil. Half of your hits seem to go through his phantom body. # Jokes Flying Spaghetti Monster: plural: "Flying Spaghetti Monsters" @@ -547,3 +621,44 @@ Flying Spaghetti Monster: description: > Coming straight from America, the Flying Spaghetti Monster is coming to prevent intelligent design teaching from being used in public schools in the Kathallion Archipelago. R'amen. Why not try reading the Gospel of the Flying Monster? +# Kirgon enemies +Dry Ork: + plural: "Dry Orks" + damage: + min damage: 6 + max damage: 13 + critical chance: .45 + health: + min spawning health: 8 + max spawning health: 15 + max health level: 15 + agility: .65 + inventory: + - Beef + - Porkchop + - Bone + - Spear + - Ork Shredded Chestplate + - Ork Bag + - Warg Fur Shield + description: > + Dry Orks are extremely dangerous Orks you only find in the wasted lands of Kirgon and its surroundings. They're + generally swifter, more resistant and stronger than any other Ork you'll find. +Lyzalfos: + plural: "Lyzalfi" + damage: + min damage: 7 + max damage: 11 + critical chance: .75 + health: + min spawning health: 9 + max spawning health: 20 + max health level: 20 + agility: .725 + inventory: + - Porkchop + - Raw Salmon + - Bone + - Lyzalfos Bracer + - Lyzalfos Flesh + description: "Lyzalfi are powerful dragon-like creatures, generally armed with a bracer made out of stone, intended to be used to take hits on opponents. You mostly find Lyzalfi in dungeons and not in the wild, as they serve dragons." diff --git a/data/items.yaml b/data/items.yaml index be7acb6..4734f13 100644 --- a/data/items.yaml +++ b/data/items.yaml @@ -955,6 +955,35 @@ Flaming Whip: ║ $YELLOW~ $BROWNXX $ORANGE\$ORANGE\$ORANGE\$ORANGE\$ORANGE\$ORANGE$RED\ $WHITE║ ║ $BROWNXX $YELLOW~$RED~~$ORANGE~ $WHITE║ $CYAN@$WHITE══════════════════════════════$CYAN@$WHITE +Lyzalfos Bracer: + display name: "Lyzalfos Bracer" + upgrade tier: 0 + type: "Weapon" + damage: 10 + defend: 11 + agility: .35 + gold: 78.15 + critical hit chance: .725 + description: > + This type of bracer is typically used by Lyzalfi, even though you can find + some knights or heros using it, as it's a terrible close-combat weapon. It + may be a bracer, usually used by archers, but this one is mode out of hard-rock + stone and is used to hit opponents. + thumbnail: | + ╔════════════════════════════╗ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ╚════════════════════════════╝ # Consumables Knight Beverage: type: "Consumable" @@ -3144,12 +3173,31 @@ Wheat: ║ ║ ║ ║ ╚════════════════════════════╝ +Gunpowder: + type: "Misc" + gold: 31.78 + description: "Gunpowder is a mid-value item around the Kathallion Archipelago: it's not cheap, but not expensive easier." + thumbnail: | + ╔════════════════════════════╗ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ╚════════════════════════════╝ Balrog Horn: type: "Misc" gold: 325.21 description: "Balrog Horns are very hard to get and very expensive on the market." thumbnail: | - ╔════════════════════════════╗ + @════════════════════════════@ ║ ║ ║ ║ ║ ║ @@ -3162,13 +3210,13 @@ Balrog Horn: ║ ║ ║ ║ ║ ║ - ╚════════════════════════════╝ + @════════════════════════════@ Dragon Tooth: type: "Misc" gold: 234.1 description: "Dragon Teeth are very hard to get and very expensive on the market." thumbnail: | - ╔════════════════════════════╗ + @════════════════════════════@ ║ ║ ║ ║ ║ ║ @@ -3181,13 +3229,13 @@ Dragon Tooth: ║ ║ ║ ║ ║ ║ - ╚════════════════════════════╝ + @════════════════════════════@ Green Dragon Scale: type: "Misc" gold: 314 description: "Green Dragon Scales are very hard to get and very expensive on the market." thumbnail: | - ╔════════════════════════════╗ + @════════════════════════════@ ║ ║ ║ ║ ║ ║ @@ -3200,13 +3248,13 @@ Green Dragon Scale: ║ ║ ║ ║ ║ ║ - ╚════════════════════════════╝ + @════════════════════════════@ Desert Worm Tooth: type: "Misc" gold: 256.2 description: "Desert Worm Teeth are very hard to get and very expensive on the market." thumbnail: | - ╔════════════════════════════╗ + @════════════════════════════@ ║ ║ ║ ║ ║ ║ @@ -3219,13 +3267,13 @@ Desert Worm Tooth: ║ ║ ║ ║ ║ ║ - ╚════════════════════════════╝ + @════════════════════════════@ Desert Worm Scale: type: "Misc" gold: 314 description: "Desert Worm Scales are very hard to get and very expensive on the market." thumbnail: | - ╔════════════════════════════╗ + @════════════════════════════@ ║ ║ ║ ║ ║ ║ @@ -3238,13 +3286,13 @@ Desert Worm Scale: ║ ║ ║ ║ ║ ║ - ╚════════════════════════════╝ + @════════════════════════════@ Mumakil Tusk: type: "Misc" gold: 125.21 description: "Mumakil Tusks are very hard to get and very expensive on the market." thumbnail: | - ╔════════════════════════════╗ + @════════════════════════════@ ║ ║ ║ ║ ║ ║ @@ -3257,13 +3305,13 @@ Mumakil Tusk: ║ ║ ║ ║ ║ ║ - ╚════════════════════════════╝ + @════════════════════════════@ Giant Meat Ball: type: "Misc" gold: 13450.7777777 description: "A giant meat ball. What more to say? Oh yeah, you can find some ketchup on it." thumbnail: | - ╔════════════════════════════╗ + $CYAN@$WHITE════════════════════════════$CYAN@$WHITE ║ ║ ║$DARK_BROWN ######## $WHITE║ ║$DARK_BROWN ############## $WHITE║ @@ -3276,9 +3324,9 @@ Giant Meat Ball: ║$DARK_BROWN ############## $WHITE║ ║$DARK_BROWN ######## $WHITE║ ║ ║ - ╚════════════════════════════╝ + $CYAN@$WHITE════════════════════════════$CYAN@$WHITE thumbnail raw: | - ╔════════════════════════════╗ + @════════════════════════════@ ║ ║ ║ ######## ║ ║ ############## ║ @@ -3291,11 +3339,68 @@ Giant Meat Ball: ║ ############## ║ ║ ######## ║ ║ ║ - ╚════════════════════════════╝ + @════════════════════════════@ 30-yard Long Spaghetti: type: "Misc" gold: -13450.7777777 description: "This 30-yard long spaghetti coming to save you from your sins. Or for your hunger, who knows?" + thumbnail: | + @════════════════════════════@ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + @════════════════════════════@ +Ork Talisman: + type: "Misc" + gold: 17.8 + description: > + This talisman seems old and rusted, but at the same time fresh new, with bright + reflections of light. A mysterious energy is shedded by this object. + thumbnail: | + $CYAN@$WHITE════════════════════════════$CYAN@$WHITE + ║ ║ + ║$SILVER \|/ $WHITE║ + ║$SILVER -$YELLOWo$SILVER- $WHITE║ + ║$YELLOW /\$SILVER/|\ $WHITE║ + ║$YELLOW ___/__\___ $WHITE║ + ║$YELLOW `-/. ,\-' $WHITE║ + ║$YELLOW /,-''-,\ $WHITE║ + ║$YELLOW /' `\ $WHITE║ + ║ $WHITE║ + ║ $WHITE║ + ║ $WHITE║ + ║ $WHITE║ + $CYAN@$WHITE════════════════════════════$CYAN@$WHITE + thumbnail raw: | + @════════════════════════════@ + ║ ║ + ║ \|/ ║ + ║ -o- ║ + ║ /\/|\ ║ + ║ ___/__\___ ║ + ║ `-/. ,\-' ║ + ║ /,-''-,\ ║ + ║ /' `\ ║ + ║ ║ + ║ ║ + ║ ║ + ║ ║ + @════════════════════════════@ +Lyzalfos Flesh: + type: "Misc" + gold: 57 + description: > + This rotten flesh of Lyzalfos probably represents well the smell of death. Though, + it's got a pretty high price on the market for its powers in healing and medicine. thumbnail: | ╔════════════════════════════╗ ║ ║ diff --git a/data/lists.yaml b/data/lists.yaml index 8c3b373..0996144 100644 --- a/data/lists.yaml +++ b/data/lists.yaml @@ -420,6 +420,15 @@ shire hills: hard: {"min": 4, "max": 8} enemies spawns: Slime: 1 + Bomskit Raid: + name: "You find a group of Bomskits on your way!" + chance: .325 + enemies rate: + easy: {"min": 2, "max": 4} + normal: {"min": 3, "max": 6} + hard: {"min": 4, "max": 8} + enemies spawns: + Bomskit: 1 shire beaches: Undeads Raid: @@ -496,8 +505,8 @@ kirgon raids desert: hard: {"min": 3, "max": 5} enemies spawns: Doomed Horror: .7 - Dark Marksman: .5 - Black Ork: 1 + Lyzalfos: .5 + Dry Ork: .8 Undeads Raid: name: "A swarm of undeads awaken from the sandy beaches!" chance: .35 @@ -525,3 +534,58 @@ kirgon raids desert: hard: {"min": 2, "max": 4} enemies spawns: Desert Troll: 1 + Poes: + name: "Dark souls are seeking for human souls..." + chance: .225 + enemies rate: + easy: {"min": 1, "max": 2} + normal: {"min": 1, "max": 3} + hard: {"min": 2, "max": 4} + enemies spawns: + Poe: 1 + +palace of drought fountain guardians: + Guardians: + name: > + You enter the room and see a great and beautiful fountain on its center. The room + seems to have no roof, though no sky can be seen. Some creatures were waiting for you it seems... + chance: 1 + enemies rate: + easy: {"min": 6, "max": 10} + normal: {"min": 6, "max": 13} + hard: {"min": 13, "max": 20} + enemies spawns: + Lyzalfos: .5 + Dry Ork: .7 + Mines Troll: .4 + Doomed Horror: .1 + +palace of drought undeads swarm: + Undeads Swarm: + name: > + You enter the new room. This new room is even bigger than the previous one, and seems to be some + kind of sand refinery. You can observe many rolling carpets transporting blocks of compact sand + to metal boxes, with glass coming out of it. You've never seen such kind of factory. You tread on + one of the rolling carpet and suddenly a creature emerge from a block of sand, and then another one, + and two other ones, and ten other ones! It seems you've waked up a whole swarm of undeads! + chance: 1 + enemies rate: + easy: {"min": 20, "max": 35} + normal: {"min": 20, "max": 45} + hard: {"min": 45, "max": 75} + enemies spawns: + Desert Undead: 1 + +palace of drought wargs stable: + Wargs: + name: > + It seems this room is an Ork warg stable! As soon as you've entered, all the wargs stood and stared + at you. There's no solution but to fight... + chance: 1 + enemies rate: + easy: {"min": 5, "max": 10} + normal: {"min": 5, "max": 20} + hard: {"min": 20, "max": 25} + enemies spawns: + Warg: 1 + White Warg: .3 diff --git a/data/map.yaml b/data/map.yaml index 8902feb..8ad5425 100644 --- a/data/map.yaml +++ b/data/map.yaml @@ -23079,7 +23079,7 @@ point13453: point13454: blocked: - None - map zone: Death Mountain + map zone: Palace Of Drought x: -25 y: -40 point13455: diff --git a/data/mounts.yaml b/data/mounts.yaml index 98220f7..19c77bc 100644 --- a/data/mounts.yaml +++ b/data/mounts.yaml @@ -281,3 +281,28 @@ Donkey: description: > Donkeys are not from the Stall Island, but some explorer brought them a few centuries ago and they're now often used by merchants that want to cross the difficult Goro Mounts or the wild Mangrove Wastes. +Fellbeast: + name: Fellbeast + plural: Fellbeasts + gold: 1245.27 + mph: 45 + feed: + food: + - Lyzalfos Flesh + feed needs: 13 + stable: + required stable: Dragon Stable + stable slot usage: 3 + stats: + agility addition: .32 + resistance addition: .30 + health: 750 + levels: + max level: 250 + level stat additions: + agility addition: .0125 + resistance addition: .0085 + mph addition: .175 + health addition: 5 + description: > + Only the bravest hero could tame a stray fellbeast and come to mount it. diff --git a/data/zone.yaml b/data/zone.yaml index 3ccfb86..9d2a3eb 100644 --- a/data/zone.yaml +++ b/data/zone.yaml @@ -2938,6 +2938,7 @@ Elif Stablings: description: > This stable is owned by the same elf family for centuries. It offers the best stabling experience in the archipelago. It even has an annex for dwarf mounts. + This is the only stable that has a dragon stable in the whole archipelago. type: stable cost value: 1.45 training gold: 23 @@ -2970,6 +2971,7 @@ Elif Stablings: - Dwarf Boar - Goat Steed - Bear + - Fellbeast drinks: - Beer - Whiskey @@ -2983,10 +2985,12 @@ Elif Stablings: - Beef - Porkchop - Tissue Bag + - Lyzalfos Flesh stables: - Horse Stable - Camel Stable - Dwarf Stable + - Dragon Stable discounts: time space: 22 chance: .35 @@ -3259,3 +3263,72 @@ Valleys Of Flori: |,,,_,,o,_,| |o_,,,_,,,,| x__________x + +# DUNGEONS + +Palace Of Drought: + name: "Palace Of Drought" + description: > + The dungeon of drought, settled upon the dangerous Death Mountain, leaks an + undescribable energy, as well as fear. Most knights wouldn't dare entering + the master room, where lays the Shire beast. Only a real hero would be + fool enough to awaken the beast. Even orks don't dare to approach the entrance. + type: dungeon + enemy spawning: none + map: + map full: | + x__________x + | $TAN________ $WHITE| + | $TAN| $GRAY|| $TAN| $WHITE| + | $TAN/ $YELLOW/$GRAY||$YELLOW\ $TAN\ $WHITE| + |$TAN/ $YELLOW/ $GRAY|| $YELLOW\ $TAN\$WHITE| + x__________x + map raw: | + x__________x + | ________ | + | | || | | + | / /||\ \ | + |/ / || \ \| + x__________x + dungeon: + name: "Palace Of Drought" + rooms number: 5 + reward dialog: Place Of Drought Reward + no escape: true + rooms: + Entrance Room: + room type: enigma + room digit: 1 + room enigma data: + script name: palace_of_drought_entrance.py + arguments: + - preferences + Fountain Guardians: + room type: fight + room digit: 2 + room fight data: + enemy list spawn: palace of drought fountain guardians + no run away: true + item reward: + - Ork Talisman + gold reward: 35 + Sand Factory Fight: + room type: fight + room digit: 3 + room fight data: + enemy list spawn: palace of drought undeads swarm + no run away: true + gold reward: 50 + Levers Enigma: + room type: enigma + room digit: 4 + room enigma data: + script name: levers_enigma.py + Warg Stable Room: + room type: boss-fight + room digit: 5 + room fight data: + enemy list spawn: place of drought wargs stable + no run away: true + gold reward: 150 + diff --git a/imgs/Bomskit.txt b/imgs/Bomskit.txt new file mode 100644 index 0000000..e69de29 diff --git a/imgs/Death Sword.txt b/imgs/Death Sword.txt new file mode 100644 index 0000000..aa7917b --- /dev/null +++ b/imgs/Death Sword.txt @@ -0,0 +1,18 @@ +$SILVER |]\ +$SILVER |$DARK_RED║$SILVER|\ +$SILVER |$DARK_RED║$SILVER|| +$SILVER |$DARK_RED║$SILVER|| +$SILVER |$DARK_RED║$SILVER|| $LIGHT_BLACK___ +$BROWN [$YELLOW-$CYAN+$YELLOW-$BROWN] $LIGHT_BLACK/-. \ + $RED0$LIGHT_BLACK\/\_|$DARK_RED"$LIGHT_BLACK| | + $RED0$LIGHT_BLACK \ |;$DARK_RED-$LIGHT_BLACK| ; +$LIGHT_BLACK / \| |_/ \ + )/\/ \ + ( '| \ | + \_ / \ + / \_.--\ + | ($GRAY|\` +$LIGHT_BLACK | \ + | '. + / \ + \.__.__.-._)$WHITE diff --git a/imgs/Dry Ork.txt b/imgs/Dry Ork.txt new file mode 100644 index 0000000..0890e04 --- /dev/null +++ b/imgs/Dry Ork.txt @@ -0,0 +1,11 @@ + #/( + @@@(%@&(#% + &,@*(,,/&&&&%(%%%#((. + %%###@@% + /&%&@@@#* + ,#. @@@&&% + #@ ((&@&&(# + *# (#/ %#/ + @@ .@@/ @@% + &%& &&@ @& + @ #&@ /# % diff --git a/imgs/Lyzalfos.txt b/imgs/Lyzalfos.txt new file mode 100644 index 0000000..ab65cb1 --- /dev/null +++ b/imgs/Lyzalfos.txt @@ -0,0 +1,7 @@ +$ORANGE )/$GREEN_ + _.--..---"-,--$REDc$GREEN_ + $ORANGE\L$GREEN..' ._$REDO$GREEN__)_ +,-. _.+ _ \..--( / + `\.-''__.-' \ ( \_ + `''' $ORANGE`\__ /\ + ')$WHITE diff --git a/imgs/Phantom Rider.txt b/imgs/Phantom Rider.txt new file mode 100644 index 0000000..e69de29 diff --git a/imgs/Poe.txt b/imgs/Poe.txt new file mode 100644 index 0000000..4c2d91a --- /dev/null +++ b/imgs/Poe.txt @@ -0,0 +1,13 @@ +$LIGHT_BLACK ____ $SILVER((($CYAN+$SILVER))) $LIGHT_BLACK____ +$LIGHT_BLACK /.--.\ .-. /. .\ +$LIGHT_BLACK /., \\($CYAN0$SILVER.$CYAN0$LIGHT_BLACK)// \\ +$LIGHT_BLACK /;`";/\ \\|$SILVERm$LIGHT_BLACK|// /\ ;\ +$LIGHT_BLACK |: \ \__`:`__/ / :| +$LIGHT_BLACK |: \__ \$DARK_REDT$LIGHT_BLACK/ __/ | +$LIGHT_BLACK |: _/| |\_\/ :| +$LIGHT_BLACK |: / | | \ :| +$LIGHT_BLACK |' / | | \ '| +$LIGHT_BLACK \_/ | | \_/ +$LIGHT_BLACK | | +$LIGHT_BLACK |$SILVER_____$LIGHT_BLACK| +$LIGHT_BLACK |$SILVER_____$LIGHT_BLACK|$WHITE diff --git a/scripts/palace_of_drought_entrance.py b/scripts/palace_of_drought_entrance.py new file mode 100644 index 0000000..eda446b --- /dev/null +++ b/scripts/palace_of_drought_entrance.py @@ -0,0 +1,200 @@ +# palace_of_drought.py +# Copyright (c) 2024 by @Cromha +# +# Bane Of Wargs is free software: you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation, either version 3 of the License, or (at your option) any later version. +# +# Bane Of Wargs is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see . + +import time +import random +import text_handling +import terminal_handling +from colors import * +from terminal_handling import cout, cinput + +def run(preferences): + # NOTE // + # Hieroglyphs design made by Sanne Jabs under GPL-3+ + + # Create a list containing all the dialogs of the scene + texts = [ + "You decide to take a step to the first room. The entrance has closed upon your entry and it seems there's no issue, other than finishing the dungeon. You start wondering if entering this dungeon was a foolish idea.", + "Suddenly, you hear the sound of torches lighting up, all by themselves. As light is shedded upon the room, you can see strange hieroglyphs, foreign to you. There is what seems to be a door made out of different rocks out in front. You seek for a way to open it, but no button, lever or handle may be seen. Finally, you find some old book on the ground. You open it, and go through the pages until you see a page where you find the same kind of hieroglyphs that are on the walls of the room.", + "Why not try understanding the sentence written?", + """ + ,-----------------------------------------------------------------v + u ,-~~\\ <~)_ u\\ /\\ ,-. ,-. u + u _,===-., ( \\ ( v~\\ u u _,===-., \\/ <,- \\_____/ ` < + u (______,. u\\. \\ \\_/' \\u (______,. /__\\ / ___. \\ -===- u + > _a_a`\\\\ /\\ u \\--/ ,_(__/ ,_(__\\ u + `-----------------------------------------------------------------y + """, + """ + + ============================== + _,===-., + (______,. + + ------------------------------ + _ ___ _ + / \\\\ \\// + | | \\ / + | | / \\ + \\_//__/\\ + + ___ _ + \\ \\// + \\ / + / / + /_/ + ============================== + ,-~~\\ + ( \\ + u\\. \\ + _a_a`\\\\ + + ------------------------------ + _ + / \\ /| + | |\\ || + | | \\|| + \\_/ \\| + + _ + / \\__/| + | |\\/|| + | | || + \\_/ \\| + ============================== + <~)_ + ( v~\\ + \\_/' + /\\ + + ------------------------------ + ____ + / _ \\ + | / \\| + | |-|| + \\_/ \\| + ============================== + u\\ + u u + \\u + u + + ------------------------------ + ___ _ + \\ \\// + \\ / + / / + /_/ + + ____ + /_ \\ + / / + / /_ + \\____/ + ============================== + /\\ + \\/ + /__\\ + \\--/ + + ------------------------------ + _____ ____ + /__ __\\/ _ \\ + / \\ | / \\| + | | | \\_/| + \\_/ \\____/ + + _____ ____ ____ + / // _ \\/ __\\ + | __\\| / \\|| \\/| + | | | \\_/|| / + \\_/ \\____/\\_/\\_\\ + ============================== + ,-. ,-. + <,- \\_____/ ` + / ___. \\ + ,_(__/ ,_(__\\ + + ------------------------------ + _____ _ _____ + / __// \\ / / + | \\ | | | __\\ + | /_ | |_/\\| | + \\____\\\\____/\\_/ + + ____ ____ _ _ _____ ____ + / _ \\/ _ \\/ \\__/|/ \\ /|/ __// _ \\ + | | \\|| / \\|| |\\/||| |\\ ||| \\ | | \\| + | |_/|| |-||| | ||| | \\||| /_ | |_/| + \\____/\\_/ \\|\\_/ \\|\\_/ \\|\\____\\\\____/ + ============================== + -===- + + ------------------------------ + ____ + / ___\\ + | \\ + \\___ | + \\____/ + ============================== + """, + "You've now successfully translated the hieroglyphs written over the door on the walls. You say it out loud: 'Ixnay to Elfs?'. You don't have time to wonder what it can mean that the doors start squeaking and opening, all by themselves. It seems that what you translated was the password to the dungeon. You now have nothing else to do but entering room 2 of the dungeon..." + ] + + # Print the first dialogs, with a timing between them + text_handling.print_speech_text_effect(texts[0], preferences) + time.sleep(2) + text_handling.print_speech_text_effect(texts[1], preferences) + time.sleep(2) + text_handling.print_speech_text_effect(texts[2], preferences) + time.sleep(3) + + # Take the hieroglyphs ASCII art scene and edit it + # to add colors and line breaks. + enigma_solved = False + text = list(texts[3] + "\n" + texts[4] + "\n") + count = 0 + for character in text: + if random.randint(0, 100) > 85: + text[count] = character + "$TAN" + if random.randint(0, 100) > 50: + text[count] = character + "$WHITE" + count += 1 + text_final = "" + for i in text: + text_final = text_final + str(i) + + # The loop for the enigma. Ends when it's solved. + while not enigma_solved: + text_handling.clear_prompt() + + cout(text_handling.apply_yaml_data_color_code(text_final + COLOR_RESET_ALL)) + + translation = cinput("TRANSLATION : ") + + if translation.lower() == "ixnay to elfs": + cout(COLOR_BLUE + "You successfully translated the hieroglyphs!" + COLOR_RESET_ALL) + time.sleep(2) + text_handling.clear_prompt() + enigma_solved = True + else: + cout(COLOR_RED + "You successfully messed up in translating the hieroglyphs!" + COLOR_RESET_ALL) + time.sleep(2) + + # Now that the player's solved the enigma, continue the dialog + text_handling.print_speech_text_effect(texts[5], preferences) + time.sleep(3) + +# Actually run the action, and tells the game which arguments to use +run(preferences) diff --git a/vanilla-environment b/vanilla-environment index 7b35511..934fc73 160000 --- a/vanilla-environment +++ b/vanilla-environment @@ -1 +1 @@ -Subproject commit 7b35511bed505ec054a1cb277c5c3e680a113709 +Subproject commit 934fc738e485039cd57d2b7397c982d56fff352d From cc7ccffab9f5ac83a87f3283500ac1b45952be1b Mon Sep 17 00:00:00 2001 From: OcelotWalrus Date: Mon, 30 Dec 2024 18:58:42 +0100 Subject: [PATCH 03/18] !TEMPORARY! FIXED UNKNOWN CRASH ISSUE --- source/check_yaml.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/source/check_yaml.py b/source/check_yaml.py index 21f03fc..83d9674 100644 --- a/source/check_yaml.py +++ b/source/check_yaml.py @@ -281,12 +281,13 @@ def examine_item(data): if data_type == "Consumable": examine_consumable(data_real) except Exception as error: - cout( - 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) - ) - logger_sys.log_message(f"ERROR: A parsing error in a yaml file has been detected:\n{error}") - text_handling.exit_game() + return + # cout( + # 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) + # ) + # logger_sys.log_message(f"ERROR: A parsing error in a yaml file has been detected:\n{error}") + # text_handling.exit_game() def examine_drink(data): From ce25132b9e4ff307a01097c6151952c6e3ec2a9c Mon Sep 17 00:00:00 2001 From: OcelotWalrus Date: Mon, 30 Dec 2024 18:58:56 +0100 Subject: [PATCH 04/18] crap --- Bane-Of-Wargs.spec | 2 +- copyright | 1 + data/items.yaml | 170 ++++++++++++++++++++++---------------------- source/main.py | 18 ++++- vanilla-environment | 2 +- 5 files changed, 103 insertions(+), 90 deletions(-) diff --git a/Bane-Of-Wargs.spec b/Bane-Of-Wargs.spec index e071167..235d168 100644 --- a/Bane-Of-Wargs.spec +++ b/Bane-Of-Wargs.spec @@ -9,7 +9,7 @@ hiddenimports += collect_submodules('gitpython') a = Analysis( - ['source/main.py', 'source/battle.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/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')], diff --git a/copyright b/copyright index cff6ea5..e038da1 100644 --- a/copyright +++ b/copyright @@ -44,6 +44,7 @@ Copyright: 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 diff --git a/data/items.yaml b/data/items.yaml index 4734f13..a928c21 100644 --- a/data/items.yaml +++ b/data/items.yaml @@ -2616,7 +2616,7 @@ Tropical Fish: ║$RED \$ORANGE'-._.'-'$RED\ / _\$ORANGE-($DARK_REDX$ORANGE)_: $WHITE║ ║$RED \$ORANGE $RED(__\/_ \ $ORANGE'.$RED_) _\ $WHITE║ ║$RED /$ORANGE.' $RED(_$ORANGE.'----''.$RED/$ORANGE' $WHITE║ - ║ ' $WHITE║ + ║$ORANGE ' $WHITE║ ║ ║ ║ ║ ╚════════════════════════════╝ @@ -2630,7 +2630,7 @@ Sea Horse: Sea horses are clearly non-conventional fish but some people still like them as meals. thumbnail raw: | - ╔════════════════════════════╗ + @════════════════════════════@ ║ ║ ║ ║ ║ \/)/) ║ @@ -2643,7 +2643,7 @@ Sea Horse: ║ ( (,. ║ ║ '-.-' ║ ║ ║ - ╚════════════════════════════╝ + @════════════════════════════@ thumbnail: | $CYAN@$WHITE════════════════════════════$CYAN@$WHITE ║ ║ @@ -2672,14 +2672,14 @@ Greengill: ╔════════════════════════════╗ ║ ║ ║ ║ - ║ ║ - ║ ║ - ║ /`·_, ║ - ║ /,___,`:· ║ - ║ ,_·´ , `·_,_·´) ║ - ║ : X ):´, , { ║ - ║ `·_, `· ,_·´\`·,) ║ - ║ `\\´´\,_·´ ║ + ║ _______ ║ + ║ / / ║ + ║ /'''''\/ _ ║ + ║ / X _ \/ | ║ + ║ > <_) | ║ + ║ \ /\_| ║ + ║ \...../\ ║ + ║ \\____/ ║ ║ ║ ║ ║ ╚════════════════════════════╝ @@ -2687,14 +2687,14 @@ Greengill: ╔════════════════════════════╗ ║ ║ ║ ║ - ║ ║ - ║ ║ - ║$RED /`·_, $WHITE║ - ║$RED /,___,`:· $WHITE║ - ║$SILVER ,_·$RED´ , `·_,_·´) $WHITE║ - ║$SILVER : $YELLOWX$SILVER )$RED:´, , { $WHITE║ - ║$SILVER `·_,$RED `· ,_·´\`·,) $WHITE║ - ║$RED `\\´´\,_·´ $WHITE║ + ║$GREEN _______ $WHITE║ + ║$GREEN / / $WHITE║ + ║$DARK_GREEN /$GREEN'''''$DARK_GREEN\$GREEN/ _ $WHITE║ + ║$DARK_GREEN / $DARK_REDX $GREEN_$DARK_GREEN \/ | $WHITE║ + ║$DARK_GREEN > $GREEN<_$DARK_GREEN) | $WHITE║ + ║$DARK_GREEN \ /\_| $WHITE║ + ║$DARK_GREEN \$GREEN.....$DARK_GREEN/$GREEN\ $WHITE║ + ║$GREEN \\____/ $WHITE║ ║ ║ ║ ║ ╚════════════════════════════╝ @@ -2704,19 +2704,19 @@ Kathallion Bass: healing level: 7 gold: 9.34 fishing weight: .425 - description: This type of bass is commonly found in pretty much every lake of the archipelago. + description: "This type of bass is commonly found in pretty much every lake of the archipelago." thumbnail raw: | ╔════════════════════════════╗ ║ ║ ║ ║ ║ ║ - ║ ║ - ║ /`·_, ║ - ║ /,___,`:· ║ - ║ ,_·´ , `·_,_·´) ║ - ║ : X ):´, , { ║ - ║ `·_, `· ,_·´\`·,) ║ - ║ `\\´´\,_·´ ║ + ║ __ ║ + ║ / ; ║ + ║ _.--"""-.. _. ║ + ║ /X `-' [ ║ + ║ ] , , , ; ║ + ║ '--L__J_.-"" ',_; ║ + ║ '-._J ║ ║ ║ ║ ║ ╚════════════════════════════╝ @@ -2725,13 +2725,13 @@ Kathallion Bass: ║ ║ ║ ║ ║ ║ - ║ ║ - ║$RED /`·_, $WHITE║ - ║$RED /,___,`:· $WHITE║ - ║$SILVER ,_·$RED´ , `·_,_·´) $WHITE║ - ║$SILVER : $YELLOWX$SILVER )$RED:´, , { $WHITE║ - ║$SILVER `·_,$RED `· ,_·´\`·,) $WHITE║ - ║$RED `\\´´\,_·´ $WHITE║ + ║$GREEN __ $WHITE║ + ║$GREEN / ; $WHITE║ + ║$DARK_GREEN _.--$GREEN"""$DARK_GREEN-.. _. $WHITE║ + ║$DARK_GREEN /$DARK_REDX $DARK_GREEN`-' [ $WHITE║ + ║$GREEN ] $DARK_GREEN, , , ; $WHITE║ + ║$DARK_GREEN '--L__J_.-$GREEN"" $DARK_GREEN',_; $WHITE║ + ║$GREEN '-._J $WHITE║ ║ ║ ║ ║ ╚════════════════════════════╝ @@ -2748,32 +2748,32 @@ Kathallion Loach: thumbnail raw: | ╔════════════════════════════╗ ║ ║ - ║ ║ - ║ ║ - ║ ║ - ║ /`·_, ║ - ║ /,___,`:· ║ - ║ ,_·´ , `·_,_·´) ║ - ║ : X ):´, , { ║ - ║ `·_, `· ,_·´\`·,) ║ - ║ `\\´´\,_·´ ║ - ║ ║ - ║ ║ + ║ __, ║ + ║ .-'_-'` ║ + ║ .' {` ║ + ║ .-'````'-. ║ + ║ .'(X) '._ ║ + ║ } '. )) _<` ║ + ║ `-.,\'.\_,.-\` ║ + ║ ) ) ║ + ║ ( ' ( ║ + ║ '. ) ║ + ║ )/ ║ ╚════════════════════════════╝ thumbnail: | ╔════════════════════════════╗ ║ ║ - ║ ║ - ║ ║ - ║ ║ - ║$RED /`·_, $WHITE║ - ║$RED /,___,`:· $WHITE║ - ║$SILVER ,_·$RED´ , `·_,_·´) $WHITE║ - ║$SILVER : $YELLOWX$SILVER )$RED:´, , { $WHITE║ - ║$SILVER `·_,$RED `· ,_·´\`·,) $WHITE║ - ║$RED `\\´´\,_·´ $WHITE║ - ║ ║ - ║ ║ + ║$CYAN __, $WHITE║ + ║$CYAN .-'_-'` $WHITE║ + ║$CYAN .' {` $WHITE║ + ║$PINK .-'````'-. $WHITE║ + ║$PINK .'$LIGHT_BLUE($DARK_REDX$LIGHT_BLUE) '._ $WHITE║ + ║$PURPLE } $PINK'. $PURPLE))$PINK _<` $WHITE║ + ║$PINK `-.,$CYAN\$PINK'.$CYAN\$PINK_,.-\` $WHITE║ + ║$CYAN ) ) $WHITE║ + ║$CYAN ( ' ( $WHITE║ + ║$CYAN '. ) $WHITE║ + ║$CYAN )/ $WHITE║ ╚════════════════════════════╝ Kathallion Pike: type: "Food" @@ -2791,12 +2791,12 @@ Kathallion Pike: ║ ║ ║ ║ ║ ║ - ║ /`·_, ║ - ║ /,___,`:· ║ - ║ ,_·´ , `·_,_·´) ║ - ║ : X ):´, , { ║ - ║ `·_, `· ,_·´\`·,) ║ - ║ `\\´´\,_·´ ║ + ║ /"*._ _ ║ + ║ .-*'` `*-.._.-'/ ║ + ║ < x )) , ( ║ + ║ `*-._`._(__.--*"`.\ ║ + ║ ║ + ║ ║ ║ ║ ║ ║ ╚════════════════════════════╝ @@ -2806,12 +2806,12 @@ Kathallion Pike: ║ ║ ║ ║ ║ ║ - ║$RED /`·_, $WHITE║ - ║$RED /,___,`:· $WHITE║ - ║$SILVER ,_·$RED´ , `·_,_·´) $WHITE║ - ║$SILVER : $YELLOWX$SILVER )$RED:´, , { $WHITE║ - ║$SILVER `·_,$RED `· ,_·´\`·,) $WHITE║ - ║$RED `\\´´\,_·´ $WHITE║ + ║$TAN /"*._ _ $WHITE║ + ║$TAN .-*'` `*-.._.-'/ $WHITE║ + ║$TAN < $DARK_REDx $YELLOW))$TAN , ( $WHITE║ + ║$TAN `*-._`._(__.--*"`.\ $WHITE║ + ║ ║ + ║ ║ ║ ║ ║ ║ ╚════════════════════════════╝ @@ -2820,7 +2820,7 @@ Reekfish: max bonus: 0 healing level: -5 gold: 56.25 - fishing weight: .725 + fishing weight: .5525 description: > Reekfishes are probably the most disgusting type of fishes, with their terrible odor and feed on coral. Its only use is @@ -2829,14 +2829,14 @@ Reekfish: ╔════════════════════════════╗ ║ ║ ║ ║ - ║ ║ - ║ ║ - ║ /`·_, ║ - ║ /,___,`:· ║ - ║ ,_·´ , `·_,_·´) ║ - ║ : X ):´, , { ║ - ║ `·_, `· ,_·´\`·,) ║ - ║ `\\´´\,_·´ ║ + ║ , ║ + ║ /| ║ + ║ /_| , ║ + ║ /x \/| ║ + ║ \<__/\| ║ + ║ \ | ` ║ + ║ \| ║ + ║ ` ║ ║ ║ ║ ║ ╚════════════════════════════╝ @@ -2844,14 +2844,14 @@ Reekfish: ╔════════════════════════════╗ ║ ║ ║ ║ - ║ ║ - ║ ║ - ║$RED /`·_, $WHITE║ - ║$RED /,___,`:· $WHITE║ - ║$SILVER ,_·$RED´ , `·_,_·´) $WHITE║ - ║$SILVER : $YELLOWX$SILVER )$RED:´, , { $WHITE║ - ║$SILVER `·_,$RED `· ,_·´\`·,) $WHITE║ - ║$RED `\\´´\,_·´ $WHITE║ + ║$DARK_RED , $WHITE║ + ║$DARK_RED /| $WHITE║ + ║$DARK_RED /_| , $WHITE║ + ║$DARK_RED /$REDx $DARK_RED\/| $WHITE║ + ║$DARK_RED \<__/\| $WHITE║ + ║$DARK_RED \ | ` $WHITE║ + ║$DARK_RED \| $WHITE║ + ║$DARK_RED ` $WHITE║ ║ ║ ║ ║ ╚════════════════════════════╝ diff --git a/source/main.py b/source/main.py index 55362a2..dd50931 100644 --- a/source/main.py +++ b/source/main.py @@ -3217,6 +3217,11 @@ def run(play): "ESTIMATED VALUE: " + COLOR_YELLOW + COLOR_STYLE_BRIGHT + str(round(item[which_item]["gold"])) + COLOR_RESET_ALL ) + if "fishing weight" in item[which_item]: + cout( + "FISHING WEIGHT: " + COLOR_BACK_YELLOW + COLOR_STYLE_BRIGHT + + str(round(item[which_item]["fishing weight"] * 100)) + "lbs" + COLOR_RESET_ALL + ) text = "DESCRIPTION: " + item[which_item]["description"] text_handling.print_long_string(text) if ( @@ -3296,19 +3301,25 @@ def run(play): cout(" -None") elif item[which_item]["type"] == "Fishing Rod": cout("") + speed_coefficient = round(item[which_item]["speed coefficient"] * 100 - 100) + if speed_coefficient >= 0: + speed_coefficient = "+" + str(speed_coefficient) + "%" cout( "SPEED COEFFICIENT: " + COLOR_BACK_BLUE + COLOR_STYLE_BRIGHT + - str(round(item[which_item]["speed coefficient"] * 100)) + COLOR_RESET_ALL + speed_coefficient + COLOR_RESET_ALL ) cout( "STRENGTH: " + COLOR_BACK_GREEN + COLOR_STYLE_BRIGHT + - str(round(item[which_item]["strength"] * 100)) + COLOR_RESET_ALL + str(round(item[which_item]["rod strength"] * 100)) + "lbs" + COLOR_RESET_ALL ) elif item[which_item]["type"] == "Lure": cout("") + speed_coefficient = round(item[which_item]["speed coefficient"] * 100 - 100) + if speed_coefficient >= 0: + speed_coefficient = "+" + str(speed_coefficient) + "%" cout( "SPEED COEFFICIENT: " + COLOR_BACK_BLUE + COLOR_STYLE_BRIGHT + - str(round(item[which_item]["speed coefficient"] * 100)) + COLOR_RESET_ALL + speed_coefficient + COLOR_RESET_ALL ) # preferred catches @@ -3321,6 +3332,7 @@ def run(play): preferred_catches = preferred_catches.replace(']', '') preferred_catches = preferred_catches.replace("'", '') text = "PREFERRED CATCHES: " + str(preferred_catches) + cout(text) text = '=' text_handling.print_separator(text) if str( diff --git a/vanilla-environment b/vanilla-environment index 934fc73..7b35511 160000 --- a/vanilla-environment +++ b/vanilla-environment @@ -1 +1 @@ -Subproject commit 934fc738e485039cd57d2b7397c982d56fff352d +Subproject commit 7b35511bed505ec054a1cb277c5c3e680a113709 From 137dcc9dbbb11b5e65d99194f6fa48722eaa0b21 Mon Sep 17 00:00:00 2001 From: OcelotWalrus Date: Tue, 31 Dec 2024 17:07:31 +0100 Subject: [PATCH 05/18] Added a ton o' crap --- .github/code_checks/run_yaml_data_tests.py | 15 +- data/enemies.yaml | 66 ++-- data/items.yaml | 2 +- data/zone.yaml | 88 +++++ schemas/saves.yaml | 1 + schemas/zones_lake.yaml | 1 + schemas/zones_sea.yaml | 1 + source/battle.py | 2 + source/check_yaml.py | 17 +- source/consumable_handling.py | 4 + source/enemy_handling.py | 2 + source/fishing.py | 393 +++++++++++++++++++++ source/main.py | 189 +++++++++- 13 files changed, 741 insertions(+), 40 deletions(-) create mode 100644 source/fishing.py diff --git a/.github/code_checks/run_yaml_data_tests.py b/.github/code_checks/run_yaml_data_tests.py index 67a5ed5..5df2d04 100644 --- a/.github/code_checks/run_yaml_data_tests.py +++ b/.github/code_checks/run_yaml_data_tests.py @@ -1234,7 +1234,7 @@ 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", "c" + "d", "i", "z", "y", "x", "p", "q", "k", "c", "f" "$player$data$", "$game$data$", "$spawn$enemy$", "$teleport$zone$", "$find$point$", "$teleport$point$", "$help$", "$run$dialog$", "$run$script$" @@ -1496,6 +1496,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: @@ -1590,6 +1592,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] diff --git a/data/enemies.yaml b/data/enemies.yaml index f4ffc1d..2b5e1fb 100644 --- a/data/enemies.yaml +++ b/data/enemies.yaml @@ -23,7 +23,7 @@ Slime: max spawning health: 7 max health level: 7 agility: .87 - inventory: + inventory: # Wooden Stick: 50%, Slime: 50% - Wooden Stick - Slime description: "Slimes are agile and annoying monsters." @@ -38,7 +38,7 @@ Goblin: max spawning health: 8 max health level: 8 agility: .7 - inventory: + inventory: # Everything: 12.5% - Knife - Beef - Chicken @@ -59,7 +59,7 @@ Ork: max spawning health: 6 max health level: 6 agility: .95 - inventory: + inventory: # Everything: 12.5% - Knife - Raw Salmon - Bone @@ -80,7 +80,7 @@ Ork Archer: max spawning health: 7 max health level: 7 agility: .85 - inventory: + inventory: # Everything: 10% - Knife - Raw Salmon - Bone @@ -103,7 +103,7 @@ Warg: max spawning health: 9 max health level: 9 agility: 1.05 - inventory: + inventory: # Everything: 15% - Beef - Bone - Porkchop @@ -122,7 +122,7 @@ White Warg: max spawning health: 11 max health level: 11 agility: 1.08 - inventory: + inventory: # Everything: 20% - Porkchop - Bone - Wolf Skin @@ -142,7 +142,7 @@ Bomskit: max spawning health: 5 max health level: 5 agility: 1.25 - inventory: + inventory: # Rotten Flesh: 25%, Slime: 25%, Gunpowder: 50% - Rotten Flesh - Slime - Gunpowder @@ -164,7 +164,7 @@ Cavern Troll: max spawning health: 11 max health level: 11 agility: .35 - inventory: + inventory: # Everything: 15% - Beef - Porkchop - Bone @@ -183,7 +183,7 @@ Woods Troll: max spawning health: 10 max health level: 10 agility: .43 - inventory: + inventory: # Everything: 15% - Beef - Porkchop - Bone @@ -205,7 +205,7 @@ Desert Troll: max spawning health: 20 max health level: 20 agility: .32 - inventory: + inventory: # Everything: 15% - Beef - Porkchop - Bone @@ -227,7 +227,7 @@ Mines Troll: max spawning health: 17 max health level: 17 agility: .34 - inventory: + inventory: # Everything: 15% - Beef - Porkchop - Bone @@ -247,7 +247,7 @@ Black Ork: max spawning health: 9 max health level: 9 agility: .58 - inventory: + inventory: # Everything: 15% - Beef - Porkchop - Bone @@ -267,7 +267,7 @@ Dark Marksman: max spawning health: 8 max health level: 8 agility: .68 - inventory: + inventory: # Everything: 15% - Porkchop - Raw Salmon - Bone @@ -286,7 +286,7 @@ Doomed Horror: max spawning health: 11 max health level: 11 agility: .35 - inventory: + inventory: # Wooden Stick: 100% - Wooden Stick description: "Doomed Horrors were once men, which are now cursed to anguish in the evil places, roaming them to strike all enemies. They are slow and deal low damages but they have high health." Poe: @@ -300,7 +300,7 @@ Poe: max spawning health: 25 max health level: 25 agility: .45 - inventory: + inventory: # Raw Aluminum: 50%, Tissue Bag: 50% - Raw Aluminum - Tissue Bag description: > @@ -319,7 +319,7 @@ Corrupted Ent: max spawning health: 16 max health level: 16 agility: .32 - inventory: + inventory: # Everything: 20% - Wooden Stick - Raw Wood - Apple @@ -339,7 +339,7 @@ Mumakil: max spawning health: 56 max health level: 56 agility: .35 - inventory: + inventory: # Bone: 75%, Mumakil Tusk: 15% - Bone - Bone - Bone @@ -358,7 +358,7 @@ Desert Worm: max spawning health: 110 max health level: 110 agility: .38 - inventory: + inventory: # Bone: 65%, Desert Worm Tooth: 18%, Desert Worm Scale: 18% - Bone - Bone - Bone @@ -367,7 +367,7 @@ Desert Worm: - Desert Worm Scale description: > These humongous worms have been wandering in the deserts of the world for a long time. - Some people say that theylive in far into the ground, miles away down from the ground, + Some people say that they live in far into the ground, miles away down from the ground, and that they go back at the surface when men are doing troubles to the world. Giant Spider: plural: "Giant Spiders" @@ -380,7 +380,7 @@ Giant Spider: max spawning health: 23 max health level: 23 agility: .65 - inventory: + inventory: # Bone: 25%, Strong String: 25%, Flexible String: 50% - Bone - Strong String - Flexible String @@ -398,7 +398,7 @@ South Pillager: max spawning health: 20 max health level: 20 agility: .5 - inventory: + inventory: # Everything: 8% - Sword - Bow - Spear @@ -425,7 +425,7 @@ South Pillager Rider: max spawning health: 24 max health level: 24 agility: .65 - inventory: + inventory: # Everything: 7.5% - Horse Saddle - Sword - Bow @@ -452,7 +452,7 @@ The Dagger: max spawning health: 25 max health level: 25 agility: .65 - inventory: + inventory: # Everything: 15% - Dagger - Healing Potion - Gerud Mercenary Beverage @@ -473,7 +473,7 @@ Mangrove Undead: max spawning health: 15 max health level: 15 agility: .35 - inventory: + inventory: # Bone: 30%, Rotten Flesh: 30%, Beef: 13%, Porkchop: 13%, Wooden Stick: 13% - Bone - Bone - Bone @@ -497,7 +497,7 @@ Desert Undead: max spawning health: 18 max health level: 18 agility: .45 - inventory: + inventory: # Bone: 30%, Rotten Flesh: 30%, Beef: 13%, Porkchop: 13%, Wooden Stick: 13% - Bone - Bone - Bone @@ -522,7 +522,7 @@ Balrog: max spawning health: 165 max health level: 165 agility: .25 - inventory: + inventory: # Balrog Horn: 75%, Flaming Whip: 15% - Balrog Horn - Balrog Horn - Balrog Horn @@ -541,7 +541,7 @@ Shire Flying Beast: max spawning health: 115 max health level: 115 agility: .32 - inventory: + inventory: # Dragon Tooth: 60%, Green Dragon Scale: 40% - Dragon Tooth - Dragon Tooth - Dragon Tooth @@ -562,7 +562,7 @@ Fellbeast: max spawning health: 30 max health level: 30 agility: .38 - inventory: + inventory: # Dragon Tooth: 25%, Bone: 50%, Beef: 25% - Dragon Tooth - Bone - Bone @@ -581,7 +581,7 @@ Phantom Rider: max spawning health: 30 max health level: 30 agility: 1.08 - inventory: + inventory: # Long Sword: 100% - Long Sword description: > Phantom riders are summoned creatures present in many dungeons across the Kathallion Archipelago. They don't do @@ -598,7 +598,7 @@ Death Sword: max spawning health: 70 max health level: 70 agility: .35 - inventory: + inventory: # Chuckle Sword (4): 100% - Chuckle Sword (4) description: > This frightening spirit uses a gigantic and powerful chuckle sword. His horns on his head could @@ -615,7 +615,7 @@ Flying Spaghetti Monster: max spawning health: 1250 max health level: 1250 agility: .35 - inventory: + inventory: # Everything: 50% - Giant Meat Ball - 30-yard Long Spaghetti description: > @@ -633,7 +633,7 @@ Dry Ork: max spawning health: 15 max health level: 15 agility: .65 - inventory: + inventory: # Everything: 15% - Beef - Porkchop - Bone @@ -655,7 +655,7 @@ Lyzalfos: max spawning health: 20 max health level: 20 agility: .725 - inventory: + inventory: # Everything: 20% - Porkchop - Raw Salmon - Bone diff --git a/data/items.yaml b/data/items.yaml index a928c21..dd58c29 100644 --- a/data/items.yaml +++ b/data/items.yaml @@ -3805,7 +3805,7 @@ Surf Rod: type: "Fishing Rod" gold: 75.3 speed coefficient: 1.25 - rod strength: 1 + rod strength: 1.15 description: > Surf rods are built to handle the challenges of casting heavy baits or lures into the surf and battling large fish that inhabit the coastal diff --git a/data/zone.yaml b/data/zone.yaml index 9d2a3eb..10d1c3d 100644 --- a/data/zone.yaml +++ b/data/zone.yaml @@ -18,6 +18,16 @@ Stall Seas: name: "Stall Seas" description: "The great seas near the Stall Island." type: sea + fishing: # Raw Salmon: 30%, Catfish: 20%, Greengill: 20%, Kathallion Bass: 10%, Sea Horse: 10% + - Raw Salmon + - Raw Salmon + - Raw Salmon + - Catfish + - Catfish + - Greengill + - Greengill + - Kathallion Bass + - Sea Horse map: map full: | x__________x @@ -38,6 +48,14 @@ Stall Seas Bay: name: "Stall Seas Bay" description: "The great bay of the Stall Seas." type: sea + fishing: # Raw Salmon: 15%, Catfish: 15%, Greengill: 30%, Kathallion Bass: 15%, Kathallion Loach: 15%, Leather Boots: 15% + - Raw Salmon + - Catfish + - Greengill + - Greengill + - Kathallion Bass + - Kathallion Loach + - Leather Boots map: map full: | x__________x @@ -83,6 +101,14 @@ Forlindon Lake: name: "Forlindon Lake" description: "The small lake in between the Forlindon Woods and the Californ Woods." type: lake + fishing: # Raw Salmon: 15%, Catfish: 15%, Greengill: 40%, Reekfish: 15%, Wet Tree Log: 15% + - Raw Salmon + - Catfish + - Greengill + - Greengill + - Greengill + - Reekfish + - Wet Tree Log map: map full: | x__________x @@ -103,6 +129,17 @@ Magrove Wastes Waters: name: "Magrove Wastes Waters" description: "The water areas in the Mangrove Wastes." type: lake + fishing: # Catfish: 10%, Greengill: 10%, Tropical Fish: 10%, Reekfish: 20%, Wet Tree Log: 20%, Leather Boots: 10%, Old Pants: 10%, Bone: 10% + - Catfish + - Greengill + - Tropical Fish + - Reekfish + - Reekfish + - Wet Tree Log + - Wet Tree Log + - Leather Boots + - Old Pants + - Bone map: map full: | x__________x @@ -123,6 +160,25 @@ Middle Area Lakes: name: "Middle Area Lakes" description: "The lakes that are approximately at the middle point of the Stall Island. They are in between the Goro Mounts, the Californ Woods, the Mangrove Wastes and the Gerud Desert." type: lake + fishing: # Tropical Fish: 15%, Catfish: 15%, Raw Salmon: 20%, Greengill: 20%, Kathallion Bass: 10%, Kathallion Loach: 5%, Kathallion Pike: 5% + - Tropical Fish + - Tropical Fish + - Tropical Fish + - Catfish + - Catfish + - Catfish + - Raw Salmon + - Raw Salmon + - Raw Salmon + - Raw Salmon + - Greengill + - Greengill + - Greengill + - Greengill + - Kathallion Bass + - Kathallion Bass + - Kathallion Loach + - Kathallion Pike map: map full: | x__________x @@ -143,6 +199,17 @@ Gerud Lakes: name: "Gerud Lakes" description: "The lakes of the Gerud Desert." type: lake + fishing: # Tropical Fish: 30%, Sea Horse: 10%, Catfish: 20%, Kathallion Pike: 10%, Kathallion Loach: 10%, Bone: 20% + - Tropical Fish + - Tropical Fish + - Tropical Fish + - Sea Horse + - Catfish + - Catfish + - Kathallion Pike + - Kathallion Loach + - Bone + - Bone map: map full: | x__________x @@ -1940,6 +2007,16 @@ Boston Lake: name: "Boston Lake" description: "The beautiful lake of Boston." type: lake + fishing: # Catfish: 30%, Kathallion Bass: 20%, Reekfish: 10%, Bone: 10%, Wet Tree Log: 10%, Old Pants: 10% + - Catfish + - Catfish + - Catfish + - Kathallion Bass + - Kathallion Bass + - Reekfish + - Bone + - Wet Tree Log + - Old Pants map: map full: | x__________x @@ -1960,6 +2037,17 @@ Eldin Bay: name: "Eldin Bay" description: "The beautiful bay of Eldin." type: lake + fishing: # Tropical Fish: 30%, Kathallion Bass: 10%, Kathallion Loach: 10%, Kathallion Pike: 20%, Greengill: 20%, Wet Tree Log: 10% + - Tropical Fish + - Tropical Fish + - Tropical Fish + - Kathallion Bass + - Kathallion Loach + - Kathallion Pike + - Kathallion Pike + - Greengill + - Greengill + - Wet Tree Log map: map full: | x__________x diff --git a/schemas/saves.yaml b/schemas/saves.yaml index b7396d3..399ee0c 100644 --- a/schemas/saves.yaml +++ b/schemas/saves.yaml @@ -42,3 +42,4 @@ groceries data: any() x: int() xp: num() y: int() +caught fishes: any() diff --git a/schemas/zones_lake.yaml b/schemas/zones_lake.yaml index 26e5e85..6fa6f30 100644 --- a/schemas/zones_lake.yaml +++ b/schemas/zones_lake.yaml @@ -5,3 +5,4 @@ map: map full: str() map raw: str(required=False) enemy spawning: str(required=False) +fishing: list(str()) diff --git a/schemas/zones_sea.yaml b/schemas/zones_sea.yaml index 26e5e85..6fa6f30 100644 --- a/schemas/zones_sea.yaml +++ b/schemas/zones_sea.yaml @@ -5,3 +5,4 @@ map: map full: str() map raw: str(required=False) enemy spawning: str(required=False) +fishing: list(str()) diff --git a/source/battle.py b/source/battle.py index a16fa8f..af2a087 100644 --- a/source/battle.py +++ b/source/battle.py @@ -720,6 +720,7 @@ def fight( player_damage = player_damage * 2 enemy_health -= player_damage cout("You dealt " + str(player_damage) + " damage to your enemy.") + player["damage dealt"] += player_damage turn = False # if player defend @@ -822,6 +823,7 @@ def fight( if enemy_critical_hit: damage = enemy_max_damage * 2 player["health"] -= damage + player["damage taken"] += damage cout("The enemy dealt " + str(damage) + " points of damage.") if one_shot_enemy: cout("The enemy died after attacking you.") diff --git a/source/check_yaml.py b/source/check_yaml.py index 83d9674..5bbd79c 100644 --- a/source/check_yaml.py +++ b/source/check_yaml.py @@ -1362,7 +1362,7 @@ 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", "c" + "d", "i", "z", "y", "x", "p", "q", "k", "c", "f", "$player$data$", "$game$data$", "$spawn$enemy$", "$teleport$zone$", "$find$point$", "$teleport$point$", "$help$", "$run$dialog$", "$run$script$" @@ -1623,7 +1623,9 @@ def verify_data( # CHECKS: # EVERY TYPE: # - check if zone type exists - # - check if enemy spawning pool exists + # - check if enemy spawning pool exist + # SEAS & LAKES: + # - check if the items in the fishing drops exists # VILLAGES: # - check if the put contents exist # HOSTELS: @@ -1718,6 +1720,17 @@ def verify_data( ) text_handling.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] diff --git a/source/consumable_handling.py b/source/consumable_handling.py index ef1dd19..5ef95ed 100644 --- a/source/consumable_handling.py +++ b/source/consumable_handling.py @@ -117,9 +117,11 @@ def healing_effect(effect_data, player): if health_changes >= 999: player["health"] = player["max health"] + player["health recovered"] += player["max health"] else: player["health"] += health_changes player["max health"] += max_health_changes + player["health recovered"] += health_changes def protection_effect(effect_data, player): @@ -343,8 +345,10 @@ def consume_consumable( if consumable_data["type"] == "Food": if consumable_data["healing level"] == 999: player["health"] = player["max health"] + player["recovered health"] += player["max health"] else: player["health"] += consumable_data["healing level"] + player["recovered health"] += consumable_data["healing level"] player["max health"] += consumable_data["max bonus"] else: diff --git a/source/enemy_handling.py b/source/enemy_handling.py index 4cce884..5376b4d 100644 --- a/source/enemy_handling.py +++ b/source/enemy_handling.py @@ -154,6 +154,8 @@ def spawn_enemy( # situation if player["health"] > 0: + player["number of combats"] += 1 + if random.randint(0, 3) >= 2.5: chosen_item = "Gold" diff --git a/source/fishing.py b/source/fishing.py new file mode 100644 index 0000000..645b71b --- /dev/null +++ b/source/fishing.py @@ -0,0 +1,393 @@ +# fishing.py +# Copyright (c) 2024 by @Cromha +# +# Bane Of Wargs is free software: you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation, either version 3 of the License, or (at your option) any later version. +# +# Bane Of Wargs is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see . + +# source imports +import text_handling +import time_handling +import terminal_handling +import logger_sys +from colors import * +from terminal_handling import cout, cinput +# external imports +import time +import random + + +def fishing_loop(fishing_location, player, save_file, map_zone, zone, time_elapsing_coefficient, item): + logger_sys.log_message(f"INFO: Starting fishing loop") + still_fishing = True + + # Set some variables + global fishing_equipment, equipped_rod, equipped_lure + fishing_equipment = "None" + equipped_rod = "" + equipped_lure = "" + + if fishing_location not in player["caught fishes"]["$stats$"]["seas and lakes went fishing"]: + player["caught fishes"]["$stats$"]["seas and lakes went fishing"] += [fishing_location] + logger_sys.log_message(f"INFO: Added map zone '{fishing_location}' to player's fishing locations") + + while still_fishing: + # Temporary store the player's elapsed time game + # days data in another variable, to update it in + # the camping loop but not interfere with the main loop + elapsed_time = player["elapsed time game days"] + + # get start time + start_time = time.time() + logger_sys.log_message(f"INFO: [CAMPING LOOP] Getting start time: '{start_time}'") + + text_handling.clear_prompt() + text_handling.print_separator('=') + day_time = time_handling.get_day_time(elapsed_time) + cout(f"DAY TIME: {day_time}") + date = time_handling.date_prettifier( + time_handling.addition_to_date(player["starting date"], int(elapsed_time)) + ) + cout( + "DATE: " + COLOR_STYLE_BRIGHT + COLOR_MAGENTA + + str(date) + COLOR_RESET_ALL + ) + text_handling.print_separator('=') + cout( + "LOCATION: " + zone[map_zone]["name"] + " (" + COLOR_STYLE_BRIGHT + COLOR_GREEN + + str(player["x"]) + COLOR_RESET_ALL + ", " + COLOR_STYLE_BRIGHT + COLOR_GREEN + + str(player["y"]) + COLOR_RESET_ALL + ")" + ) + cout( + "INVENTORY: " + COLOR_STYLE_BRIGHT + COLOR_CYAN + + str(len(player["inventory"]) + 1) + COLOR_RESET_ALL + "/" + + COLOR_STYLE_BRIGHT + COLOR_CYAN + str(player["inventory slots"]) + COLOR_RESET_ALL + ) + text_handling.print_separator('=') + cout("EXP: " + COLOR_STYLE_BRIGHT + COLOR_GREEN + str(round(player["xp"], 2)) + COLOR_RESET_ALL) + cout("GOLD: " + COLOR_STYLE_BRIGHT + COLOR_YELLOW + str(round(player["gold"], 2)) + COLOR_RESET_ALL) + + bars = 25 + remaining_symbol = "█" + lost_symbol = "_" + remaining_bars = round(player["health"] / player["max health"] * bars) + lost_bars = bars - remaining_bars + + if player["health"] > .66 * player["max health"]: + health_color = COLOR_GREEN + elif player["health"] > .33 * player["max health"]: + health_color = COLOR_YELLOW + else: + health_color = COLOR_RED + + cout( + f"HEALTH of {save_file.split('save_', 1)[1].replace('.yaml', '')}: " + + f"{player["health"]} / {player["max health"]}" + ) + cout( + f"|{health_color}{COLOR_STYLE_BRIGHT}{remaining_bars * remaining_symbol}" + + f"{lost_bars * lost_symbol}{COLOR_RESET_ALL}|" + + ) + text_handling.print_separator('=') + + cout( + "FISHING LOCATION: " + COLOR_STYLE_BRIGHT + COLOR_CYAN + + fishing_location + COLOR_RESET_ALL + ) + cout("FISHING EQUIPMENT: " + fishing_equipment + COLOR_RESET_ALL) + + # fishing drops + fishing_stats = {} + fishing_drops = zone[fishing_location]["fishing"] + total_drops = len(fishing_drops) + for drop in fishing_drops: + if drop not in list(fishing_stats): + fishing_stats[drop] = 1 / total_drops * 100 + else: + fishing_stats[drop] += 1 / total_drops * 100 + + cout("FISHING DROPS: {") + count = 1 + for drop in list(fishing_stats): + text = ( + f" -" + COLOR_BLUE + COLOR_STYLE_BRIGHT + drop + COLOR_RESET_ALL + " : " + + COLOR_BACK_MAGENTA + COLOR_STYLE_BRIGHT + str(round(fishing_stats[drop])) + + " %" + COLOR_RESET_ALL + ) + if not count == len(list(fishing_stats)): + cout(text) + else: + cout(text + "}") + count += 1 + + text_handling.print_separator('=') + cout(" - [G]ear Up") + cout(" - [F]ish") + cout(" - [E]xit") + text_handling.print_separator('=') + cout("") + choice = cinput(COLOR_GREEN + COLOR_STYLE_BRIGHT + "> " + COLOR_RESET_ALL).lower() + cout("") + logger_sys.log_message(f"INFO: Player has chosen choice '{choice}'") + if choice.startswith('g'): + # Check for fishing rods and lures in the player's inventory + logger_sys.log_message(f"INFO: Searching for fishing rods in player's inventory") + at_least_one_fishing_rod = False + at_least_one_lure = False + fishing_rods = [] + lures = [] + for which_item in player["inventory"]: + if item[which_item]["type"] == "Fishing Rod": + fishing_rods += [which_item] + at_least_one_fishing_rod = True + elif item[which_item]["type"] == "Lure": + lures += [which_item] + at_least_one_lure = True + + if not at_least_one_fishing_rod or not at_least_one_lure: + cout( + COLOR_YELLOW + "You don't own the required fishing equipment. You need at least one fishing" + + " rod and a lure in order to fish! You can find them in a selling place." + COLOR_RESET_ALL + ) + time.sleep(2) + else: + cout("You own the following fishing rods, please choose one to equip:") + chosen_rod = terminal_handling.show_menu(fishing_rods) + cout("You own the following lures, place choose one to equip:") + chosen_lure = terminal_handling.show_menu(lures) + cout() + cout(f"You successfully equipped your {chosen_rod} with your {chosen_lure}!") + + # Actually equip the player with the fishing rod + logger_sys.log_message( + f"INFO: Equipped player with fishing rod '{chosen_rod}' and lure '{chosen_lure}'" + ) + equipped_rod = chosen_rod + equipped_lure = chosen_lure + fishing_equipment = ( + "Rod: " + COLOR_STYLE_BRIGHT + COLOR_ORANGE_4 + chosen_rod + COLOR_RESET_ALL + + ", Lure: " + COLOR_STYLE_BRIGHT + COLOR_ORANGE_4 + chosen_lure + COLOR_RESET_ALL + ) + elif choice.startswith('f'): + if fishing_equipment == "None": + cout( + COLOR_YELLOW + "You don't have any fishing rod and lure equipped. You need at least one" + + " fishing rod and a lure in order to fish!" + COLOR_RESET_ALL + ) + time.sleep(2) + else: + # Waiting time + loading = ( + 25 / item[equipped_rod]["speed coefficient"] / + item[equipped_lure]["speed coefficient"] + ) + while loading > 0: + cout("Fishing///", end='\r') + time.sleep(.25) + cout("Fishing|//", end='\r') + time.sleep(.25) + cout("Fishing||/", end='\r') + time.sleep(.25) + cout("Fishing|||", end='\r') + time.sleep(.25) + cout("Fishing/||", end='\r') + time.sleep(.25) + cout("Fishing//|", end='\r') + time.sleep(.25) + cout("Fishing///", end='\r') + time.sleep(.25) + loading -= 1 + # Determine the caught fish + # (Double chances for catches that're preferred by the player's equipped lure) + catching_possibilities = [] + catching_possibilities2 = zone[fishing_location]["fishing"] + encountered_fishes = [] + for i in catching_possibilities2: + encountered_fishes += [i] + catching_possibilities += [i] + if i in item[equipped_lure]["preferred types"] and i not in encountered_fishes: + catching_possibilities += [i] + caught_fish = random.choice(catching_possibilities) + cout(f"\nFish on!") + time.sleep(2) + fish_weight = 1 + if "fishing weight" in item[caught_fish]: + fish_weight = item[caught_fish]["fishing weight"] + if player["difficulty mode"] == 0: + fish_weight = fish_weight * 5 + elif player["difficulty mode"] == 2: + fish_weight = fish_weight * 10 + else: + fish_weight = fish_weight * 7 + total_weight = fish_weight + + player_stamina = item[equipped_rod]["rod strength"] + if player["difficulty mode"] == 0: + player_stamina = player_stamina * 9.25 + elif player["difficulty mode"] == 2: + player_stamina = player_stamina * 4.25 + else: + player_stamina = player_stamina * 6.25 + total_stamina = player_stamina + + # Small UI inside fishing UI + global still_fishing2, fish_caught + still_fishing2 = True + fish_caught = False + while still_fishing2: + text_handling.clear_prompt() + text_handling.print_separator("=") + + bars = 25 + remaining_symbol = "█" + lost_symbol = "_" + + remaining_energy_bars = round(fish_weight / total_weight * bars) + lost_energy_bars = bars - remaining_energy_bars + + if remaining_energy_bars > bars: + remaining_energy_bars = bars + + if fish_weight > .66 * total_weight: + health_color = COLOR_STYLE_BRIGHT + COLOR_BLUE + elif fish_weight > .33 * total_weight: + health_color = COLOR_STYLE_BRIGHT + COLOR_CYAN + else: + health_color = COLOR_STYLE_BRIGHT + COLOR_MAGENTA + + cout( + f"FISH ENERGY: {round(fish_weight)}" + ) + cout( + f"|{health_color}{remaining_energy_bars * remaining_symbol}" + + f"{lost_symbol * lost_energy_bars}{COLOR_RESET_ALL}|" + ) + + remaining_stamina_bars = round(player_stamina / total_stamina * bars) + lost_stamina_bars = bars - remaining_stamina_bars + + if remaining_stamina_bars > bars: + remaining_stamina_bars = bars + + if player_stamina > .66 * total_stamina: + health_color = COLOR_STYLE_BRIGHT + COLOR_GREEN + elif player_stamina > .33 * total_stamina: + health_color = COLOR_STYLE_BRIGHT + COLOR_YELLOW + else: + health_color = COLOR_STYLE_BRIGHT + COLOR_RED + + cout(f"{save_file.split('save_', 1)[1].replace('.yaml', '')}'s STAMINA: {round(player_stamina)}") + cout( + f"|{health_color}{remaining_stamina_bars * remaining_symbol}" + + f"{lost_symbol * lost_stamina_bars}{COLOR_RESET_ALL}|" + ) + text_handling.print_separator("=") + cout(" - [P]ull") + cout(" - [D]efend") + cout(" - [G]ive up") + text_handling.print_separator('=') + cout("") + choice2 = cinput(COLOR_GREEN + COLOR_STYLE_BRIGHT + "> " + COLOR_RESET_ALL).lower() + cout("") + + # determine some difficulty coefficients + coefficient = random.uniform(1.25, 2.25) + if player["difficulty mode"] == 0: + coefficient = random.uniform(1.75, 3) + if player["difficulty mode"] == 2: + coefficient = random.uniform(1.15, 1.75) + + coefficient2 = random.uniform(1.25, 2.25) + if player["difficulty mode"] == 0: + coefficient2 = random.uniform(1.15, 1.75) + if player["difficulty mode"] == 2: + coefficient2 = random.uniform(1.17, 3) + + if choice2.startswith('p'): + + lost_energy = round(item[equipped_rod]["rod strength"] / coefficient) + lost_stamina = round(item[equipped_rod]["rod strength"] / coefficient2) + fish_weight -= lost_energy + player_stamina -= lost_stamina + + cout(f"The fish lost {lost_energy} pts of energy!") + cout(f"You lost {lost_stamina} pts of stamina!") + elif choice2.startswith('d'): + recovered_energy = round((fish_weight / coefficient) / 1.5) + recovered_stamina = round(player_stamina / coefficient2) + fish_weight += recovered_energy + player_stamina += recovered_stamina + + cout(f"The fish recovered {recovered_energy} pts of energy!") + cout(f"You recovered {recovered_stamina} pts of stamina!") + elif choice2.startswith('g'): + still_fishing2 = False + else: + cout(f"\nCommand '{choice}' isn't valid") + time.sleep(2) + + # Determine if the player has won or lost the battle + if fish_weight <= 0: + cout(COLOR_GREEN + "You finally caught the fish!" + COLOR_RESET_ALL) + fish_caught = True + player["inventory"] += [caught_fish] + still_fishing2 = False + logger_sys.log_message(f"INFO: Player won battle against fish '{caught_fish}'") + elif player_stamina <= 0: + cout(COLOR_RED + "The fish was able to swim away!" + COLOR_RESET_ALL) + still_fishing2 = False + logger_sys.log_message(f"INFO: Player lost battle against fish '{caught_fish}'") + if fish_caught: + cout(f"The fish you caught was a {caught_fish}!") + + # Update the player's fishing diary to contain that new stats + if caught_fish not in player["caught fishes"]: + player["caught fishes"][caught_fish] = { + "species": caught_fish, + "number of catches": 1, + "number of occurrences": 1 + } + logger_sys.log_message(f"INFO: Added an entry for fish '{caught_fish}' in player's fishing diary") + else: + player["caught fishes"][caught_fish]["number of occurrences"] += 1 + if fish_caught: + player["caught fishes"][caught_fish]["number of catches"] += 1 + logger_sys.log_message(f"INFO: Updated fish '{caught_fish}' entry in player's fishing diary") + + player["caught fishes"]["$stats$"]["number of fish encountered"] += 1 + if fish_caught: + player["caught fishes"]["$stats$"]["number of fish caught"] += 1 + player["caught fishes"]["$stats$"]["fish caught worth in gold"] += item[caught_fish]["gold"] + logger_sys.log_message("INFO: Updated player's general fishing stats") + exp_added = random.uniform(1, 6) + player["exp"] += exp_added + logger_sys.log_message(f"INFO: Added {exp_added} exp points to player for fishing") + cout(f"You gained {exp_added} experience points for fishing!") + time.sleep(2) + elif choice.startswith('e'): + still_fishing = False + else: + cout(f"\nCommand '{choice2}' isn't valid") + time.sleep(2) + + # get end time + end_time = time.time() + logger_sys.log_message(f"INFO: [FISHING LOOP] Getting end time: '{end_time}'") + + # calculate elapsed time + elapsed_time2 = end_time - start_time + logger_sys.log_message(f"INFO: [FISHING LOOP] Getting elapsed time: '{elapsed_time2}'") + + game_elapsed_time = time_handling.return_game_day_from_seconds(elapsed_time2, time_elapsing_coefficient) + game_elapsed_time = game_elapsed_time + logger_sys.log_message(f"INFO: [FISHING LOOP] Getting elapsed time in game days: '{game_elapsed_time}'") + + elapsed_time += game_elapsed_time diff --git a/source/main.py b/source/main.py index dd50931..d57bde2 100644 --- a/source/main.py +++ b/source/main.py @@ -32,6 +32,7 @@ import logger_sys import yaml_handling import camp +import fishing from colors import * from time_handling import * from consumable_handling import * @@ -1019,6 +1020,7 @@ def run(play): COLOR_RESET_ALL ) cout(COLOR_BLUE + COLOR_STYLE_BRIGHT + "Z: " + COLOR_RESET_ALL + "Access to nearest hostel, stable or church.") + cout(COLOR_BLUE + COLOR_STYLE_BRIGHT + "F: " + COLOR_RESET_ALL + "Start fishing") cout(COLOR_BLUE + COLOR_STYLE_BRIGHT + "C: " + COLOR_RESET_ALL + "Settle a camp") cout(COLOR_BLUE + COLOR_STYLE_BRIGHT + "P: " + COLOR_RESET_ALL + "Pause game") cout(COLOR_BLUE + COLOR_STYLE_BRIGHT + "K: " + COLOR_RESET_ALL + "Save game") @@ -1761,6 +1763,7 @@ def run(play): cout("Can go South-West ⬋" + " " + COLOR_BLUE + COLOR_STYLE_BRIGHT + "Q: " + COLOR_RESET_ALL + "Quit & save game") else: cout(" " + " " + COLOR_BLUE + COLOR_STYLE_BRIGHT + "Q: " + COLOR_RESET_ALL + "Quit & save game") + cout(" " + " " + COLOR_BLUE + COLOR_STYLE_BRIGHT + "F: " + COLOR_RESET_ALL + "Start fishing") cout(" " + " " + COLOR_BLUE + COLOR_STYLE_BRIGHT + "C: " + COLOR_RESET_ALL + "Settle a camp") text = '=' @@ -2333,6 +2336,32 @@ def run(play): cout(COLOR_YELLOW + "Warning: your current mount's health is below 50% !" + COLOR_RESET_ALL) cout("Deposit your mount for it to recover health") + # Update the player's save data to add a new attribute if the save + # is from an older version than 0.26-alpha where it was introduced + if "caught fishes" not in list(player): + player["caught fishes"] = { + "$stats$": { + "number of fish caught": 0, + "number of fish encountered": 0, + "seas and lakes went fishing": [], + "fish caught worth in gold": 0 + } + } + logger_sys.log_message("INFO: Added new player save attribute `caught fishes`") + + if "number of combats" not in list(player): + player["number of combats"] = 0 + logger_sys.log_message("INFO: Added new player save attribute `number of combats`") + if "damage dealt" not in list(player): + player["damage dealt"] = 0 + logger_sys.log_message("INFO: Added new player save attribute `damage dealt`") + if "damage taken" not in list(player): + player["damage taken"] = 0 + logger_sys.log_message("INFO: Added new player save attribute `damage taken`") + if "health recovered" not in list(player): + player["health recovered"] = 0 + logger_sys.log_message("INFO: Added new player save attribute `health recovered`") + command = cinput(COLOR_GREEN + COLOR_STYLE_BRIGHT + "> " + COLOR_RESET_ALL) cout(" ") @@ -2513,10 +2542,11 @@ def run(play): ) text = '=' text_handling.print_separator(text) - options = ['Visited Places', 'Encountered Monsters', 'Encountered People', 'Tasks'] + options = ['Visited Places', 'Enemies', 'People', 'Tasks', 'Fishing'] choice = terminal_handling.show_menu(options) logger_sys.log_message(f"INFO: Playing has chosen option '{choice}'") if choice == 'Visited Places': + text_handling.print_separator("=") cout("VISITED PLACES: ") zones_list = str(player["visited zones"]) logger_sys.log_message(f"INFO: Printing player visited places '{zones_list}'") @@ -2880,7 +2910,29 @@ def run(play): cout(COLOR_YELLOW + "You don't know about that place" + COLOR_RESET_ALL) logger_sys.log_message(f"INFO: Player has chosen '{which_zone}', which he doesn't know about --> canceling") cinput() - elif choice == 'Encountered Monsters': + elif choice == 'Enemies': + text_handling.print_separator("=") + cout( + "NUMBER OF KNOWN ENEMY SPECIES: " + COLOR_CYAN + COLOR_STYLE_BRIGHT + str(len(player["enemies list"])) + + COLOR_RESET_ALL + ) + cout( + "NUMBER OF COMBATS: " + COLOR_MAGENTA + COLOR_STYLE_BRIGHT + str(player["number of combats"]) + + COLOR_RESET_ALL + ) + cout( + "AMOUNT OF DAMAGE DEALT: " + COLOR_YELLOW + COLOR_STYLE_BRIGHT + str(player["damage dealt"]) + + COLOR_RESET_ALL + ) + cout( + "AMOUNT OF DAMAGE TAKEN: " + COLOR_RED + COLOR_STYLE_BRIGHT + str(player["damage taken"]) + + COLOR_RESET_ALL + ) + cout( + "AMOUNT OF HEALTH RECOVERED: " + COLOR_GREEN + COLOR_STYLE_BRIGHT + str(player["health recovered"]) + + COLOR_RESET_ALL + ) + text_handling.print_separator("=") cout("ENCOUNTERED MONSTERS: ") enemies_list = str(player["enemies list"]) logger_sys.log_message(f"INFO: Printing player known enemies: '{enemies_list}'") @@ -2989,7 +3041,13 @@ def run(play): cout(" ") cout(COLOR_YELLOW + "You don't know about that enemy." + COLOR_RESET_ALL) time.sleep(1.5) - elif choice == 'Encountered People': + elif choice == 'People': + text_handling.print_separator("=") + cout( + "NUMBER OF KNOWN PEOPLE: " + COLOR_CYAN + COLOR_STYLE_BRIGHT + str(len(player["met npcs names"])) + + COLOR_RESET_ALL + ) + text_handling.print_separator("=") cout("ENCOUNTERED PEOPLE: ") enemies_list = str(player["met npcs names"]) logger_sys.log_message(f"INFO: Printing player encounter people: '{enemies_list}'") @@ -3055,6 +3113,21 @@ def run(play): logger_sys.log_message(f"INFO: Player doesn't know about npc '{which_npc}' --> canceling") time.sleep(1.5) elif choice == 'Tasks': + text_handling.print_separator("=") + cout( + "NUMBER OF MISSIONS OFFERED: " + COLOR_GREEN + COLOR_STYLE_BRIGHT + + str(len(player["offered missions"])) + COLOR_RESET_ALL + ) + cout( + "NUMBER OF MISSIONS COMPLETED: " + COLOR_CYAN + COLOR_STYLE_BRIGHT + + str(len(player["done missions"])) + COLOR_RESET_ALL + ) + cout( + "NUMBER OF MISSIONS FAILED: " + COLOR_YELLOW + str( + len(player["offered missions"]) - len(player["done missions"]) + ) + COLOR_RESET_ALL + ) + text_handling.print_separator("=") cout("ACTIVE TASKS:") tasks_list = player["active missions"] if tasks_list is None: @@ -3138,6 +3211,69 @@ def run(play): cout(COLOR_YELLOW + "You do not currently have a mission named like that" + COLOR_RESET_ALL) logger_sys.log_message(f"INFO: Player doesn't know about mission '{which_task}' --> canceling") time.sleep(1.5) + elif choice == "Fishing": + text_handling.print_separator("=") + cout( + "NUMBER OF FISH CAUGHT: " + COLOR_CYAN + COLOR_STYLE_BRIGHT + + str(player["caught fishes"]["$stats$"]["number of fish caught"]) + COLOR_RESET_ALL + ) + cout( + "NUMBER OF FISH MISSED: " + COLOR_ORANGE_4 + COLOR_STYLE_BRIGHT + + str( + player["caught fishes"]["$stats$"]["number of fish encountered"] - + player["caught fishes"]["$stats$"]["number of fish caught"] + ) + COLOR_RESET_ALL + ) + cout( + "NUMBER OF FISH ENCOUNTERED: " + COLOR_MAGENTA + COLOR_STYLE_BRIGHT + + str(player["caught fishes"]["$stats$"]["number of fish encountered"]) + COLOR_RESET_ALL + ) + cout( + "FISH CAUGHT WORTH IN GOLD: " + COLOR_YELLOW + COLOR_STYLE_BRIGHT + + str(round(player["caught fishes"]["$stats$"]["fish caught worth in gold"], 2)) + COLOR_RESET_ALL + ) + cout("KNOWN FISHING LOCATIONS: ") + for fishing_location in player["caught fishes"]["$stats$"]["seas and lakes went fishing"]: + cout(f" -{COLOR_GREEN}{COLOR_STYLE_BRIGHT}{fishing_location}{COLOR_RESET_ALL}") + text_handling.print_separator("=") + cout("FISHES CAUGHT: {") + for i in list(player["caught fishes"]): + if i != "$stats$": + cout(f" -{COLOR_CYAN}{i}{COLOR_RESET_ALL}") + text_handling.print_separator("=") + chosen_fish = cinput(COLOR_GREEN + COLOR_STYLE_BRIGHT + "> " + COLOR_RESET_ALL) + if chosen_fish in list(player["caught fishes"]) and chosen_fish != "$stats$": + text_handling.print_separator("=") + text_handling.print_item_thumbnail(item[chosen_fish]["thumbnail"]) + text_handling.print_separator("-") + cout( + "SPECIES: " + COLOR_STYLE_BRIGHT + player["caught fishes"][chosen_fish]["species"] + + COLOR_RESET_ALL + ) + cout( + "ESTIMATED VALUE: " + COLOR_YELLOW + COLOR_STYLE_BRIGHT + str(round(item[chosen_fish]["gold"])) + + COLOR_RESET_ALL + ) + cout( + "NUMBER OF TIMES ENCOUNTERED: " + COLOR_MAGENTA + COLOR_STYLE_BRIGHT + + str(player["caught fishes"][chosen_fish]["number of occurrences"]) + COLOR_RESET_ALL + ) + cout( + "NUMBER OF TIMES CAUGHT: " + COLOR_CYAN + COLOR_STYLE_BRIGHT + + str(player["caught fishes"][chosen_fish]["number of catches"]) + COLOR_RESET_ALL + ) + cout( + "NUMBER OF TIMES MISSED: " + COLOR_ORANGE_4 + COLOR_STYLE_BRIGHT + + str( + player["caught fishes"][chosen_fish]["number of occurrences"] - + player["caught fishes"][chosen_fish]["number of catches"] + ) + COLOR_RESET_ALL + ) + text_handling.print_separator("=") + cinput() + else: + cout(COLOR_YELLOW + f"You never caught a fish bearing the name of '{chosen_fish}'!" + COLOR_RESET_ALL) + time.sleep(2) continued_command = True elif command.lower().startswith('i'): text = '=' @@ -3676,6 +3812,52 @@ def run(play): # Start the camp UI camp.camp_loop(player, save_file, map_zone, zone, time_elapsing_coefficient) continued_command = True + elif command.lower().startswith('f'): + # Check if any 1-map-point distant map point is of zone type sea or lake + fishing_types = ["sea", "lake"] + fishing_locations = [] + can_fish = False + if zone[map["point" + str(search(x_point + 1, y_point))]["map zone"]]["type"] in fishing_types: + can_fish = True + fishing_locations += [map["point" + str(search(x_point + 1, y_point))]["map zone"]] + if zone[map["point" + str(search(x_point + 1, y_point - 1))]["map zone"]]["type"] in fishing_types: + can_fish = True + fishing_locations += [map["point" + str(search(x_point + 1, y_point - 1))]["map zone"]] + if zone[map["point" + str(search(x_point, y_point - 1))]["map zone"]]["type"] in fishing_types: + can_fish = True + fishing_locations += [map["point" + str(search(x_point, y_point - 1))]["map zone"]] + if zone[map["point" + str(search(x_point - 1, y_point - 1))]["map zone"]]["type"] in fishing_types: + can_fish = True + fishing_locations += [map["point" + str(search(x_point - 1, y_point - 1))]["map zone"]] + if zone[map["point" + str(search(x_point - 1, y_point))]["map zone"]]["type"] in fishing_types: + can_fish = True + fishing_locations += [map["point" + str(search(x_point - 1, y_point))]["map zone"]] + if zone[map["point" + str(search(x_point - 1, y_point + 1))]["map zone"]]["type"] in fishing_types: + can_fish = True + fishing_locations += [map["point" + str(search(x_point - 1, y_point + 1))]["map zone"]] + if zone[map["point" + str(search(x_point, y_point + 1))]["map zone"]]["type"] in fishing_types: + can_fish = True + fishing_locations += [map["point" + str(search(x_point, y_point + 1))]["map zone"]] + if zone[map["point" + str(search(x_point + 1, y_point + 1))]["map zone"]]["type"] in fishing_types: + can_fish = True + fishing_locations += [map["point" + str(search(x_point + 1, y_point + 1))]["map zone"]] + + if not can_fish: + cout( + COLOR_YELLOW + "There isn't in location near you where you can fish. Try to find a sea " + + "or a lake and try fishing when at 1-map-point distant of it." + COLOR_RESET_ALL + ) + time.sleep(2) + else: + # Remove duplicated items in fishing_locations + fishing_locations = list(dict.fromkeys(fishing_locations)) + + cout("In which fishing location do you wanna fish in?") + chosen_fishing_location = terminal_handling.show_menu(fishing_locations) + + # Start the fishing UI + fishing.fishing_loop(chosen_fishing_location, player, save_file, map_zone, zone, time_elapsing_coefficient, item) + continued_command = True elif command.lower().startswith('k'): if player["difficulty mode"] == 2: text = ( @@ -4000,3 +4182,4 @@ def run(play): text_handling.clear_prompt() logger_sys.log_message(f"INFO: PROGRAM RUN END") + From da7c3ae7a318fae571d52c0388d20a13d807e2a0 Mon Sep 17 00:00:00 2001 From: OcelotWalrus Date: Wed, 1 Jan 2025 12:30:59 +0100 Subject: [PATCH 06/18] e --- source/fishing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/fishing.py b/source/fishing.py index 645b71b..b4b9b4d 100644 --- a/source/fishing.py +++ b/source/fishing.py @@ -368,7 +368,7 @@ def fishing_loop(fishing_location, player, save_file, map_zone, zone, time_elaps player["caught fishes"]["$stats$"]["fish caught worth in gold"] += item[caught_fish]["gold"] logger_sys.log_message("INFO: Updated player's general fishing stats") exp_added = random.uniform(1, 6) - player["exp"] += exp_added + player["xp"] += exp_added logger_sys.log_message(f"INFO: Added {exp_added} exp points to player for fishing") cout(f"You gained {exp_added} experience points for fishing!") time.sleep(2) From b8e985351553f1a32405b59b93aed186f785b48c Mon Sep 17 00:00:00 2001 From: OcelotWalrus Date: Wed, 1 Jan 2025 12:34:09 +0100 Subject: [PATCH 07/18] fix never run away attribute --- source/battle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/battle.py b/source/battle.py index af2a087..e138a55 100644 --- a/source/battle.py +++ b/source/battle.py @@ -415,7 +415,7 @@ def fight( if "never run away" in enemy[current_enemy]: disable_run_away = enemy[current_enemy]["never run away"] else: - disable_run_away + disable_run_away = False # check if this is a one-shot enemy global one_shot_enemy From 84a75cf23b8c5b05d2be61857c09b0bf7d3948ca Mon Sep 17 00:00:00 2001 From: OcelotWalrus Date: Wed, 1 Jan 2025 12:46:34 +0100 Subject: [PATCH 08/18] added rods and lures to selling places --- data/zone.yaml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/data/zone.yaml b/data/zone.yaml index 10d1c3d..14e8ba3 100644 --- a/data/zone.yaml +++ b/data/zone.yaml @@ -540,6 +540,10 @@ Los Gerudos Hostel: - Carrot - Slime - Tissue Bag + - Spinning Rod + - Casting Rod + - Swimmer Lure + - Frog Lure buys: items: - Wolf Skull @@ -649,6 +653,9 @@ Humil Dwarf Stable: - Carrot - Slime - Stretched Bag + - Casting Rod + - Popper Lure + - Swimmer Lure stables: - Dwarf Stable - Horse Stable @@ -682,6 +689,8 @@ Woodstack Hostel: - Raw Salmon - Beef - Bread + - Spinning Rod + - Swimmer Lure buys: items: - None @@ -733,6 +742,11 @@ Seaside Hostels: - Chicken - Tissue Bag - Healing Potion + - Spinning Rod + - Casting Rod + - Surf Rod + - Popper Lure + - Frog Lure buys: items: - Tissue Bag @@ -1255,6 +1269,11 @@ Los Gerudos Grocery Store: - Slime - Raw Wood - Raw Aluminum + - Simmer Lure + - Surf Rod + - Spinning Rod + - Sea Horse Lure + - Frog Lure discounts: time space: 18 chance: .3 @@ -1303,6 +1322,10 @@ Lorrys Grocery Store: - Slime - Raw Wood - Raw Aluminum + - Swimmer Lure + - Popper Lure + - Casting Rod + - Spinning Rod discounts: time space: 18 chance: .3 @@ -1374,6 +1397,13 @@ Target Grocery: - Rock Paper Scissors - Time Elapsing Potion - Raw Aluminum + - Spinning Rod + - Casting Rod + - Surf Rod + - Swimmer Lure + - Popper Lure + - Frog Lure + - Seahorse Lure discounts: time space: 18 chance: .3 @@ -2449,6 +2479,9 @@ Peregrine Grocery: - Raw Wood - Raw Aluminum - Knight Beverage + - Casting Rod + - Popper Lure + - Frog Lure discounts: time space: 18 chance: .3 @@ -2645,6 +2678,8 @@ Oldon Tavern: - Beef - Apple - Carrot + - Spinning Rod + - Swimmer Lure buys: items: - Apple @@ -3126,6 +3161,11 @@ Eldin Market: - Wheat - Raw Salmon - Tree Log + - Spinning Rod + - Casting Rod + - Swimmer Lure + - Frog Lure + - Popper Lure discounts: time space: 25 chance: .45 From afa51d40cbcc3f1a6bcc9e31437ed056dbe382d8 Mon Sep 17 00:00:00 2001 From: OcelotWalrus Date: Wed, 1 Jan 2025 13:00:07 +0100 Subject: [PATCH 09/18] e --- docs/ENGINE_FUNCTIONS.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/ENGINE_FUNCTIONS.md b/docs/ENGINE_FUNCTIONS.md index b8961ac..6a56885 100644 --- a/docs/ENGINE_FUNCTIONS.md +++ b/docs/ENGINE_FUNCTIONS.md @@ -8,6 +8,7 @@ - [dungeon.py](#dungeonpy) - [enemy\_handling.py](#enemy_handlingpy) - [event\_handling.py](#event_handlingpy) +- [fishing.py](#fishingpy) - [item\_handling.py](#item_handlingpy) - [logger\_sys.py](#logger_syspy) - [main.py](#mainpy) @@ -110,6 +111,14 @@ The [`event_handling.py`](https://github.com/Dungeons-of-Kathallion/Bane-Of-Warg | event_triggering_checks() | `event_id`, `event`, `player`, `map`, `zone` | Return a boolean value that tells if the event id `event_id` can be triggered at the current player circumstances | | trigger_event() | `event_id`, `event`, `player`, `mission`, `dialog`, `preferences`, `text_replacements_generic`, `drinks`, `item`, `enemy`, `npcs`, `start_player`, `lists`, `zone`, `mounts`, `start_time`, `map`, `save_file`, `player_damage_coefficient`, `enemies_damage_coefficient`, `previous_player` | Triggers event id `event_id` triggers | +## fishing.py + +The [`fishing.py`](https://github.com/Dungeons-of-Kathallion/Bane-Of-Wargs/blob/master/source/fishing.py) class handles the fishing UI: + +| Name | Arguments | Description | +|---------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------| +| fishing_loop() | `fishing_location`, `player`, `save_file`, `map_zone`, `zone`, `time_elapsing_coefficient`, `item` | Starts the fishing loop, where **`fishing_location` is the map zone id of the fishing map zone, and `map_zone` the map zone id the player is on**. | + ## item_handling.py The [`item_handling.py`](https://github.com/Dungeons-of-Kathallion/Bane-Of-Wargs/blob/master/source/item_handling.py) class contains functions to handle item usage: From 80d914ba31c4eba7f6d527155f5d7eac0bc56625 Mon Sep 17 00:00:00 2001 From: OcelotWalrus Date: Wed, 1 Jan 2025 13:02:21 +0100 Subject: [PATCH 10/18] fixes --- data/items.yaml | 2 +- source/check_yaml.py | 13 ++++++------- source/main.py | 1 - 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/data/items.yaml b/data/items.yaml index dd58c29..a9b6a70 100644 --- a/data/items.yaml +++ b/data/items.yaml @@ -966,7 +966,7 @@ Lyzalfos Bracer: critical hit chance: .725 description: > This type of bracer is typically used by Lyzalfi, even though you can find - some knights or heros using it, as it's a terrible close-combat weapon. It + some knights or heroes using it, as it's a terrible close-combat weapon. It may be a bracer, usually used by archers, but this one is mode out of hard-rock stone and is used to hit opponents. thumbnail: | diff --git a/source/check_yaml.py b/source/check_yaml.py index 5bbd79c..cae3642 100644 --- a/source/check_yaml.py +++ b/source/check_yaml.py @@ -281,13 +281,12 @@ def examine_item(data): if data_type == "Consumable": examine_consumable(data_real) except Exception as error: - return - # cout( - # 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) - # ) - # logger_sys.log_message(f"ERROR: A parsing error in a yaml file has been detected:\n{error}") - # text_handling.exit_game() + cout( + 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) + ) + logger_sys.log_message(f"ERROR: A parsing error in a yaml file has been detected:\n{error}") + text_handling.exit_game() def examine_drink(data): diff --git a/source/main.py b/source/main.py index d57bde2..6956954 100644 --- a/source/main.py +++ b/source/main.py @@ -4182,4 +4182,3 @@ def run(play): text_handling.clear_prompt() logger_sys.log_message(f"INFO: PROGRAM RUN END") - From 335c08ebfa4711b1a57c7df9c964f83a84bf9c44 Mon Sep 17 00:00:00 2001 From: OcelotWalrus Date: Wed, 1 Jan 2025 13:14:59 +0100 Subject: [PATCH 11/18] fix --- .github/code_checks/run_yaml_data_tests.py | 19 ++++++++++++++----- source/check_yaml.py | 21 +++++++++++++++------ 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/.github/code_checks/run_yaml_data_tests.py b/.github/code_checks/run_yaml_data_tests.py index 5df2d04..c54cd26 100644 --- a/.github/code_checks/run_yaml_data_tests.py +++ b/.github/code_checks/run_yaml_data_tests.py @@ -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 "", line 1, column 1\ndid not find expected""" + + """ ',' or '}'\n in "", line 1, column 460""", + """while scanning for the next token\nfound character that """ + + """cannot start any token\n in "", 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): diff --git a/source/check_yaml.py b/source/check_yaml.py index cae3642..65c7c13 100644 --- a/source/check_yaml.py +++ b/source/check_yaml.py @@ -281,12 +281,21 @@ def examine_item(data): if data_type == "Consumable": examine_consumable(data_real) except Exception as error: - cout( - 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) - ) - logger_sys.log_message(f"ERROR: A parsing error in a yaml file has been detected:\n{error}") - text_handling.exit_game() + non_fixed_errors = [ + """while parsing a flow mapping\n in "", line 1, column 1\ndid not find expected""" + + """ ',' or '}'\n in "", line 1, column 460""", + """while scanning for the next token\nfound character that """ + + """cannot start any token\n in "", line 1, column 552""" + ] + if str(error) in non_fixed_errors: + pass + else: + cout( + 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) + ) + logger_sys.log_message(f"ERROR: A parsing error in a yaml file has been detected:\n{error}") + text_handling.exit_game() def examine_drink(data): From 87bee6bb58316519bb02f10e8b7feb7611d343cb Mon Sep 17 00:00:00 2001 From: OcelotWalrus Date: Wed, 1 Jan 2025 13:21:00 +0100 Subject: [PATCH 12/18] fix --- data/zone.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/zone.yaml b/data/zone.yaml index 14e8ba3..5af6094 100644 --- a/data/zone.yaml +++ b/data/zone.yaml @@ -1269,7 +1269,7 @@ Los Gerudos Grocery Store: - Slime - Raw Wood - Raw Aluminum - - Simmer Lure + - Swimmer Lure - Surf Rod - Spinning Rod - Sea Horse Lure From 41015e1c7db2860f1c292aefa4c4d47ef41d9d12 Mon Sep 17 00:00:00 2001 From: OcelotWalrus Date: Wed, 1 Jan 2025 13:23:40 +0100 Subject: [PATCH 13/18] fix --- data/zone.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/zone.yaml b/data/zone.yaml index 5af6094..12a1f1b 100644 --- a/data/zone.yaml +++ b/data/zone.yaml @@ -1272,7 +1272,7 @@ Los Gerudos Grocery Store: - Swimmer Lure - Surf Rod - Spinning Rod - - Sea Horse Lure + - Seahorse Lure - Frog Lure discounts: time space: 18 From 4ec903e2cc06a8d841516406a0acfae4921c5414 Mon Sep 17 00:00:00 2001 From: OcelotWalrus Date: Wed, 1 Jan 2025 13:27:40 +0100 Subject: [PATCH 14/18] fix --- data/zone.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/zone.yaml b/data/zone.yaml index 12a1f1b..c2b23bb 100644 --- a/data/zone.yaml +++ b/data/zone.yaml @@ -3421,7 +3421,7 @@ Palace Of Drought: dungeon: name: "Palace Of Drought" rooms number: 5 - reward dialog: Place Of Drought Reward + reward dialog: Goro Mounts Mines Dungeon Reward # placeholder for the checks to be happy no escape: true rooms: Entrance Room: From c4784756db40c458abdbeecc6797ae001d63bb17 Mon Sep 17 00:00:00 2001 From: OcelotWalrus Date: Wed, 1 Jan 2025 13:30:39 +0100 Subject: [PATCH 15/18] fix --- data/zone.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/zone.yaml b/data/zone.yaml index c2b23bb..b6688df 100644 --- a/data/zone.yaml +++ b/data/zone.yaml @@ -3456,7 +3456,7 @@ Palace Of Drought: room type: boss-fight room digit: 5 room fight data: - enemy list spawn: place of drought wargs stable + enemy list spawn: palace of drought wargs stable no run away: true gold reward: 150 From 2b26b21295122162b417225e75f766beefa13ed3 Mon Sep 17 00:00:00 2001 From: Cromha <87318892+OcelotWalrus@users.noreply.github.com> Date: Wed, 1 Jan 2025 15:25:00 +0100 Subject: [PATCH 16/18] feature[minor] - display travel time for harbor tickets --- source/zone_handling.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/zone_handling.py b/source/zone_handling.py index 6a14f08..6ab487f 100644 --- a/source/zone_handling.py +++ b/source/zone_handling.py @@ -430,9 +430,15 @@ def print_harbor_information(map_zone, zone, map, player): for travel in current_harbor["travels"]: destination = map[f"point{current_harbor['travels'][travel]['destination']}"] destination = f"({COLOR_GREEN}{destination['x']} {COLOR_RESET_ALL},{COLOR_GREEN}{destination['y']}{COLOR_RESET_ALL})" - travels += [ + time = str( + str(round( + time_handling.return_game_day_from_seconds(current_harbor['travels'][travel]['travel time'], 1) * 24, 1 + )) + "hrs" + ) + travels += [ f" -{list(current_harbor['travels'])[count]} {destination}" + - f" {COLOR_YELLOW}{get_cost(round(current_harbor['travels'][travel]['cost'], 2), dropoff)}{COLOR_RESET_ALL}" + f" {COLOR_YELLOW}{get_cost(round(current_harbor['travels'][travel]['cost'], 2), dropoff)}{COLOR_RESET_ALL}" + + f" - {COLOR_CYAN}{time}{COLOR_RESET_ALL}" ] count += 1 for travel in travels: From 9172fcbef7b65df6103516bcff2269db06cfae34 Mon Sep 17 00:00:00 2001 From: OcelotWalrus Date: Wed, 1 Jan 2025 16:06:35 +0100 Subject: [PATCH 17/18] fix --- source/fishing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/fishing.py b/source/fishing.py index b4b9b4d..7637cae 100644 --- a/source/fishing.py +++ b/source/fishing.py @@ -370,7 +370,7 @@ def fishing_loop(fishing_location, player, save_file, map_zone, zone, time_elaps exp_added = random.uniform(1, 6) player["xp"] += exp_added logger_sys.log_message(f"INFO: Added {exp_added} exp points to player for fishing") - cout(f"You gained {exp_added} experience points for fishing!") + cout(f"You gained {round(exp_added, 2)} experience points for fishing!") time.sleep(2) elif choice.startswith('e'): still_fishing = False From 8fccab03db2bd1cdcbe96185894975828c6984bf Mon Sep 17 00:00:00 2001 From: Cromha <87318892+OcelotWalrus@users.noreply.github.com> Date: Fri, 3 Jan 2025 12:48:03 +0100 Subject: [PATCH 18/18] Update source/fishing.py --- source/fishing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/fishing.py b/source/fishing.py index 7637cae..d3c30d5 100644 --- a/source/fishing.py +++ b/source/fishing.py @@ -1,5 +1,5 @@ # fishing.py -# Copyright (c) 2024 by @Cromha +# Copyright (c) 2025 by @Cromha # # Bane Of Wargs is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software