From c122b0adef3ce94ab39ba5898b9bb9bde1793fbe Mon Sep 17 00:00:00 2001 From: TheMadPunter <106832853+familycomicsstudios@users.noreply.github.com> Date: Mon, 7 Nov 2022 20:33:49 +0000 Subject: [PATCH] Finished game --- GAMEINFO.md | 8 ++++++++ README.md | 23 ++++++++++++++++++++++- main.py | 49 +++++++++++++++++++++++++++++++++---------------- 3 files changed, 63 insertions(+), 17 deletions(-) diff --git a/GAMEINFO.md b/GAMEINFO.md index 525c6be..f2ef65f 100644 --- a/GAMEINFO.md +++ b/GAMEINFO.md @@ -40,6 +40,10 @@ news hint +debug + +game + # Items take @@ -76,6 +80,10 @@ get grab +kill + +slay + # Magic xyzzy diff --git a/README.md b/README.md index 4d58d48..b1a05d9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,25 @@ # Readme -Welcome to the Colossal Cave Adventure unnamed sequel! +Welcome to the Colossal Cave Adventure sequel! This is a fan-made sequel to the famous game "Colossal Cave Adventure" created in Python. +To play the game, type in one or two word commands in the terminal prompt. The game will then interpert these commands to make your in-game character do things. + +Some sample commands you must know: + +``` +north +east +south +west +inventory +look +info +help +hint +take +drop +debug +game +``` + +To fork this game and make a mod, please press the button below. [![Run on Repl.it](https://replit.com/badge/github/familycomicsstudios/NewCaveAdventure)](https://replit.com/new/github/familycomicsstudios/NewCaveAdventure) diff --git a/main.py b/main.py index 4d2d7b9..45048cc 100644 --- a/main.py +++ b/main.py @@ -1,6 +1,6 @@ """ Colossal Cave Adventure Sequel -v0.6 +v1.0.0 Working Created by TheMadPunter © 2022 @@ -11,11 +11,11 @@ """ import sys #-------------------METADATA----------------# -version = "v0.6.0" +version = "v1.0.0" branch_creator = "TheMadPunter" python_version = sys.version mods = ["Vanilla CCA Engine by Themadpunter"] -mod_versions = ["v1.0 Completed"] +mod_versions = ["v1.0.0 Completed"] modpack_name = "Vanilla CCA Engine" acknowledgements = ["Willie Crowther and Don Woods for Original Game"] other = """""" @@ -59,10 +59,10 @@ def createList(r1, r2): Scale (25) Platinum Sword (50) OTHER STUFF -Get well in (25) +Get well in (26) Don't die (30) Get Excalibur (25) -SCORE: 196 +SCORE: 267 """ #Other vmach = 0 @@ -233,10 +233,22 @@ def createList(r1, r2): 0) +### Need to pre reference +def rscore(): + return (ts + ss + wis + ots) + + #funcs def start_room(room): global room_no, wis, invent, hs, vmach, tookCoins global isKey, ss, ots + scores = rscore() + if scores + hs >= 267: + cprint( + "Congratulations, adventurer! Your adventure is over! You have collected everything in the game.", + "green") + score() + game_over() cprint(room.str, "green") room_no = room.no if wis < room_no: @@ -555,6 +567,8 @@ def start_room(room): cprint("You can't attack that.", "green") elif command == "debug": debug_stuff() + elif command == "game": + game_data() #----------------MODDING-------------# elif False: pass @@ -565,6 +579,16 @@ def start_room(room): cprint("I don't think that works.", "green") +def score(): + cprint("Treasures: " + str(ts), "green") + cprint("Survival: " + str(ss), "green") + cprint("Getting well in: " + str(wis), "green") + cprint("Hints used: " + str(0 - hs), "green") + if ots > 0: + cprint("Other: " + str(ots), "green") + cprint("Score: " + str(ts + ss + wis + hs + ots), "green") + + def inventory(): cprint("You are holding:", "green") for item in invent: @@ -639,18 +663,11 @@ def info_cca(): "green") -def score(): - cprint("Treasures: " + str(ts), "green") - cprint("Survival: " + str(ss), "green") - cprint("Getting well in: " + str(wis), "green") - cprint("Hints used: " + str(0 - hs), "green") - if ots > 0: - cprint("Other: " + str(ots), "green") - cprint("Score: " + str(ts + ss + wis + hs + ots), "green") - - def news(): - cprint("V0.5 more stuff like excalibur", "green") + cprint( + "V1.0.0 Working: You can win now! Added a lot of documentation, plus the game works.", + "green") + cprint("V0.5: more stuff like excalibur", "green") cprint("V0.4: Added a lot more treasure and also a dragon", "green") cprint("V0.3: We have a 151 point game yay", "green") cprint(