示例#1
0
    public void CreateNewGame(PlayerCharacter detective)       //Called when the player presses play
    //Reset values from a previous playthough
    {
        ResetNotebook();
        ResetAll(scenes);
        //Create a Scenario
        scenario = new Scenario(murderWeapons, itemClues, characters);
        scenario.chooseMotive();
        string motive = scenario.getMotive();

        murderer = scenario.chooseMurderer();
        scenario.chooseWeapon();
        MurderWeapon weapon = scenario.getWeapon();

        scenario.CreateVerbalClues(motive, weapon, murderer);
        scenario.BuildCluePools(motive, murderer, weapon);
        scenario.DistributeVerbalClues(murderer);
        itemClues             = scenario.getItemCluePool().ToArray();
        characters            = scenario.getNPCs();
        verbalClues           = scenario.getVerbalCluePool().ToArray();
        relevant_items        = scenario.getRelevantItems();
        relevant_verbal_clues = scenario.getRelevantVerbalClues();
        relevantClues         = scenario.getRelevantClues();
        riddle = scenario.SelectRiddle();

        //Assign To rooms
        AssignNPCsToScenes(characters, scenes);                                         //Assigns NPCS to scenes
        AssignItemsToScenes(itemClues, scenes);                                         //Assigns Items to scenes
        playerCharacter = detective;

        gameScore = 1000;               //ADDITION BY WEDUNNIT
    }
示例#2
0
    // Chooses a random weapon from the MurderWeapon array 'weapons'
    public void chooseWeapon()
    {
        Shuffler shuffler = new Shuffler();

        shuffler.Shuffle(weapons);
        weapon = weapons [0];
    }
示例#3
0
    // given a murderer, weapon and motive, creates a VerbalClue[] containing 6 relevant verbal clues
    public void CreateVerbalClues(string motive, MurderWeapon weapon, NonPlayerCharacter murderer) //UPDATED BY WEDUNNIT
    {
        murdererName = murderer.getNickname();                                                     //UPDATED BY WEDUNNIT
        string weapon_name = weapon.getID();

        VerbalClue disposing_of_weapon = new VerbalClue("Disposing of a Weapon", "I saw " + murdererName + " trying to " +
                                                        "dispose of a " + weapon_name + ". Or was it " + getRandomNonMurderingNPCName(murdererName) + "? I can't remember.");                                                                        //UPDATED BY WEDUNNIT

        VerbalClue old_friends = new VerbalClue("Old Friends", "The victim fell out with with " + getRandomNonMurderingNPCName(murdererName) + " and " + murdererName + " a long time ago " + getMotiveClause(motive));                              //UPDATED BY WEDUNNIT

        VerbalClue old_enemies = new VerbalClue("Old Enemies", "Rumour is that the victim had an unpleasant past with " + murdererName + ".");                                                                                                       //UPDATED BY WEDUNNIT

        VerbalClue last_seen_with = new VerbalClue("Last Seen With", "I saw the victim talking with " + getRandomNonMurderingNPCName(murdererName) + " and " + murdererName + " just a few minutes before their body was discovered.");              //UPDATED BY WEDUNNIT

        VerbalClue altercation = new VerbalClue("An Altercation", "There once was an altercation between" + getRandomNonMurderingNPCName(murdererName) + " and " + murdererName + ", " + getMotiveClause(motive));                                   //UPDATED BY WEDUNNIT

        VerbalClue changed_story = new VerbalClue("Stories Have Changed", murdererName + " told me they last saw the victim before 8pm, but told " + getRandomNonMurderingNPCName(murdererName) + " that they didnt speak to the victim at all..."); //UPDATE BY WEDUNNIT

        verbal_clues = new VerbalClue[6] {
            old_friends,
            altercation,
            disposing_of_weapon,
            old_enemies,
            last_seen_with,
            changed_story
        };
    }
示例#4
0
    public void GetDescriptionTest()
    {
        //Arrange
        var description  = "My Description";
        var murderWeapon = new MurderWeapon(null, null, null, null, description);


        //Assert
        //The object has a new name
        Assert.AreSame(description, murderWeapon.getSteveDescription());
    }
示例#5
0
    // Creates two lists of clues, one containing 3 verbal clues (two relevant, one useless) and one containing 6 item clues (2 relevent, 4 useless).
    public void BuildCluePools(string motive, NonPlayerCharacter murderer, MurderWeapon weapon)
    {
        // one of the relevant item clues is the murder weapon, there is only ever one MurderWeapon item present in the game.
        item_clue_pool.Add(weapon);
        relevant_item_clues.Add(weapon);

        int verbalClueWithMotive = Random.Range(0, 2);                  // UPDATED BY WEDUNNIT either 'old friends' or 'altercation' for the first verbal clue

        verbal_clue_pool.Add(verbal_clues [verbalClueWithMotive]);      //ADDITION BY WEDUNNIT
        relevant_verbal_clues.Add(verbal_clues [verbalClueWithMotive]); //ADDITION BY WEDUNNIT

        int verbalClueWithWeapon = Random.Range(2, 6);                  // UPDATED BY WEDUNNIT any of the remaining verbal clues for the second verbal clue

        verbal_clue_pool.Add(verbal_clues [verbalClueWithWeapon]);
        relevant_verbal_clues.Add(verbal_clues [verbalClueWithWeapon]);

        switch (murdererName)           //REFACTORED BY WEDUNNIT
        {
        case "Salty Seadog":
            item_clue_pool.Add(item_clues [4]);              // shattered glass
            relevant_item_clues.Add(item_clues [4]);
            break;

        case "mimes":
            item_clue_pool.Add(item_clues [0]);              // beret
            relevant_item_clues.Add(item_clues [0]);
            break;

        case "Money Bags":
            item_clue_pool.Add(item_clues [2]);              // gloves
            relevant_item_clues.Add(item_clues [2]);
            break;

        case "Outlaw":
            item_clue_pool.Add(item_clues [8]);              // tripwire
            relevant_item_clues.Add(item_clues [8]);
            break;

        case "Legionnaire":
            item_clue_pool.Add(item_clues [3]);              // wine
            relevant_item_clues.Add(item_clues [3]);
            break;

        case "Dodgy Dealer":
            item_clue_pool.Add(item_clues [7]);              // spellbook
            relevant_item_clues.Add(item_clues [7]);
            break;

        case "Superhero":
            item_clue_pool.Add(item_clues [19]);                        //Dumbbells     //ADDITION BY WEDUNNIT
            relevant_item_clues.Add(item_clues [19]);                   //ADDITION BY WEDUNNIT
            break;

        case "Mad scientist":
            item_clue_pool.Add(item_clues [18]);                        // glasses	//ADDITION BY WEDUNNIT
            relevant_item_clues.Add(item_clues [18]);                   //ADDITION BY WEDUNNIT
            break;

        case "Telechubbie":
            item_clue_pool.Add(item_clues [15]);                //purse			//ADDITION BY WEDUNNIT
            relevant_item_clues.Add(item_clues [15]);           //ADDITION BY WEDUNNIT
            break;

        case "Reginald M IV":
            item_clue_pool.Add(item_clues [17]);                //monocle			//ADDITION BY WEDUNNIT
            relevant_item_clues.Add(item_clues [17]);           //ADDITION BY WEDUNNIT
            break;

        default:
            throw new System.ArgumentException(murdererName + " does not have any clues associated with them.");
        }

        // add the 4 irrelevant verbal clues
        while (item_clue_pool.Count() < 6)
        {
            int index = Random.Range(0, item_clues.Count() - 1);
            if (item_clue_pool.Contains(item_clues [index]) == false)
            {
                item_clue_pool.Add(item_clues [index]);
            }
        }

        // add 'red herring' verbal clue
        int    weapon_index       = Random.Range(0, weapons.Count() - 1);
        string red_herring_weapon = weapons [weapon_index].getID();

        while (red_herring_weapon == weapon.getID())
        {
            weapon_index       = Random.Range(0, weapons.Count() - 1);
            red_herring_weapon = weapons [weapon_index].getID();
        }
        int    npc_index             = Random.Range(0, npcs.Count() - 1);
        string red_herring_character = npcs [npc_index].getCharacterID();

        while (red_herring_character == murderer.getCharacterID())
        {
            npc_index             = Random.Range(0, npcs.Count() - 1);
            red_herring_character = npcs [npc_index].getCharacterID();
        }


        // create and then choose one of two irrelevant verbal clues
        VerbalClue police_failure = new VerbalClue("Lack of Evidence", "The police think the victim was killed using a " + red_herring_weapon + ", but they can’t find evidence of one.");

        VerbalClue shifty_looking = new VerbalClue("Looking Shifty", "I think I saw " + red_herring_character + " acting suspiciously.");

        VerbalClue[] red_herring_verbal_clues = new VerbalClue[2] {
            police_failure, shifty_looking
        };
        int herring_index = Random.Range(0, 1);

        verbal_clue_pool.Add(red_herring_verbal_clues [herring_index]);
    }
示例#6
0
    void Start()
    {
        //Initialises Variables
        //Response Arrays
        speechData = new JSONObject(speechFile.text);
        Debug.Log("Accessing JSON: ");
        foreach (var character in speechData.keys)
        {
            if (character == "Pirate")
            {
                pirateResponses = SpeechHandler.AccessData(speechData, character).ToList().ToList();
            }
            else if (character == "Mime")
            {
                mimeResponses = SpeechHandler.AccessData(speechData, character).ToList().ToList();
            }
            else if (character == "Millionaire")
            {
                millionaireResponses = SpeechHandler.AccessData(speechData, character).ToList();
            }
            else if (character == "Cowgirl")
            {
                cowgirlResponses = SpeechHandler.AccessData(speechData, character).ToList();
            }
            else if (character == "Roman")
            {
                romanResponses = SpeechHandler.AccessData(speechData, character).ToList();
            }
            else if (character == "Wizard")
            {
                wizardResponses = SpeechHandler.AccessData(speechData, character).ToList();
            }
            else if (character == "Chubbie")
            {
                chubbieResponses = SpeechHandler.AccessData(speechData, character).ToList();
            }
            else if (character == "HeMan")
            {
                hemanResponses = SpeechHandler.AccessData(speechData, character).ToList();
            }
            else if (character == "Reginald")
            {
                reginaldResponses = SpeechHandler.AccessData(speechData, character).ToList();
            }
            else if (character == "Scientist")
            {
                scientistResponses = SpeechHandler.AccessData(speechData, character).ToList();
            }


            //Saving and loading
        }

        //Weaknesses
        List <string> pirateWeaknesses = new List <string> {
            "Forceful", "Wisecracking", "Kind"
        };
        List <string> mimeWeaknesses = new List <string> {
            "Intimidating", "Coaxing", "Inspiring"
        };
        List <string> millionaireWeaknesses = new List <string> {
            "Forceful", "Rushed", "Kind"
        };
        List <string> cowgirlWeaknesses = new List <string> {
            "Condescending", "Wisecracking", "Inspiring"
        };
        List <string> romanWeaknesses = new List <string> {
            "Condescending", "Coaxing", "Inquisitive"
        };
        List <string> wizardWeaknesses = new List <string> {
            "Intimidating", "Rushed", "Inquisitive"
        };
        List <string> chubbieWeaknesses = new List <string> {
            "Condescending", "Wizecracking", "Kind"
        };                                                                                                      //ADDITION BY WEDUNNIT
        List <string> scientistWeaknesses = new List <string> {
            "Forceful", "Coaxing", "Inspiring"
        };                                                                                                              //ADDITION BY WEDUNNIT
        List <string> reginaldWeaknesses = new List <string> {
            "Forceful", "Coaxing", "Inspiring"
        };                                                                                                                      //ADDITION BY WEDUNNIT
        List <string> hemanWeaknesses = new List <string> {
            "Condescending", "Rushed", "Kind"
        };                                                                                                                      //ADDITION BY WEDUNNIT



        //Defining NPC's
        NonPlayerCharacter reginald    = new NonPlayerCharacter("Reginald Montgomery IV", reginaldSprite, "Reginald M IV", reginaldPref, reginaldWeaknesses, reginaldResponses);        //ADDITION BY WEDUNNIT
        NonPlayerCharacter pirate      = new NonPlayerCharacter("Captain Bluebottle", pirateSprite, "Salty Seadog", piratePref, pirateWeaknesses, pirateResponses);
        NonPlayerCharacter mimes       = new NonPlayerCharacter("The Mime Twins", mimesSprite, "mimes", mimesPref, mimeWeaknesses, mimeResponses);
        NonPlayerCharacter millionaire = new NonPlayerCharacter("Sir Worchester", millionaireSprite, "Money Bags", millionarePref, millionaireWeaknesses, millionaireResponses);
        NonPlayerCharacter cowgirl     = new NonPlayerCharacter("Jesse Ranger", cowgirlSprite, "Outlaw", cowgirlPref, cowgirlWeaknesses, cowgirlResponses);
        NonPlayerCharacter roman       = new NonPlayerCharacter("Celcius Maximus", romanSprite, "Legionnaire", romanPref, romanWeaknesses, romanResponses);
        NonPlayerCharacter wizard      = new NonPlayerCharacter("Randolf the Deep Purple", wizardSprite, "Dodgy Dealer", wizardPref, wizardWeaknesses, wizardResponses);
        NonPlayerCharacter chubbie     = new NonPlayerCharacter("Tinky Wobbly", chubbieSprite, "Telechubbie", chubbiePref, chubbieWeaknesses, chubbieResponses);                        //ADDITION BY WEDUNNIT
        NonPlayerCharacter heman       = new NonPlayerCharacter("HisMan", hemanSprite, "Superhero", hemanPref, hemanWeaknesses, hemanResponses);                                        //ADDITION BY WEDUNNIT
        NonPlayerCharacter scientist   = new NonPlayerCharacter("Dr Emmanuel Brown", scientistSprite, "Mad scientist", scientistPref, scientistWeaknesses, scientistResponses);         //ADDITION BY WEDUNNIT



        //Defining Scenes
        Scene controlRoom         = new Scene("Control Room");
        Scene kitchen             = new Scene("Kitchen");
        Scene lectureTheatre      = new Scene("Lecture Theatre");
        Scene lakehouse           = new Scene("Lakehouse");
        Scene islandOfInteraction = new Scene("Island of Interaction");
        Scene roof           = new Scene("Roof");
        Scene atrium         = new Scene("Atrium");
        Scene undergroundLab = new Scene("Underground Lab");
        Scene factory        = new Scene("Factory");

        //Defining Items
        MurderWeapon cutlass       = new MurderWeapon(cutlassPrefab, "Cutlass", "A worn and well used cutlass", cutlassSprite, "SD");
        MurderWeapon poison        = new MurderWeapon(poisonPrefab, "Empty Poison Bottle", "This had poison in once ", poisonSprite, "SD");
        MurderWeapon garrote       = new MurderWeapon(garrotePrefab, "Garrote", "Used for strangling someone... to death!", garroteSprite, "SD");
        MurderWeapon knife         = new MurderWeapon(knifePrefab, "Knife", "A sharp tool meant for cutting meat", knifeSprite, "SD");
        MurderWeapon laserGun      = new MurderWeapon(laserGunPrefab, "Laser Gun", "It's still warm, implying it has been recently fired", laserGunSprite, "SD");
        MurderWeapon leadPipe      = new MurderWeapon(leadPipePrefab, "Lead Pipe", "It's a bit battered with a few dents on the side", leadPipeSprite, "SD");
        MurderWeapon westernPistol = new MurderWeapon(westernPistolPrefab, "Western Pistol", "The gunpowder residue implies it has been recently fired", westernPistolSprite, "SD");
        MurderWeapon wizardStaff   = new MurderWeapon(wizardStaffPrefab, "Wizard Staff", "The gems still seem to be glow as if it has been used recently", wizardStaffSprite, "SD");

        Item beret          = new Item(beretPrefab, "Beret", "A hat most stereotypically worn by the French", beretSprite);
        Item footprints     = new Item(footprintsPrefab, "Bloody Footprints", "Bloody footprints most likely left by the murderer", footprintsSprite);
        Item gloves         = new Item(glovesPrefab, "Bloody Gloves", "Bloody gloves most likely used by the murderer", glovesSprite);
        Item wine           = new Item(winePrefab, "Fine Wine", "An expensive vintage that's close to 100 years old", wineSprite);
        Item shatteredGlass = new Item(shatteredGlassPrefab, "Shattered Glass", "Broken glass shards spread quite close together", shatteredGlassSprite);
        Item shrapnel       = new Item(shrapnelPrefab, "Shrapnel", "Shrapnel from an explosion or gun being fired", shrapnelSprite);
        Item smellyDeath    = new Item(smellyDeathPrefab, "Smelly Ashes", "All that remains of the victim", smellyDeathSprite);
        Item spellbook      = new Item(spellbookPrefab, "Spellbook", "A spellbook used by those who practise in the magic arts", spellbookSprite);
        Item tripwire       = new Item(tripwirePrefab, "Tripwire", "A used tripwire most likely used to immobilize the victim", tripwireSprite);
        Item chefHat        = new Item(chefHatPrefab, "Chef's Hat", "A clean and fresh smelling hat, worn by chefs.", chefHatSprite);                          //ADDITION BY WEDUNNIT
        Item whistle        = new Item(whistlePrefab, "Whistle", "A bright, shiny whistle that's as clean as... well.", whistleSprite);                        //ADDITION BY WEDUNNIT
        Item toast          = new Item(toastPrefab, "Toast", "A slice of well buttered toast. It's slightly warm.", toastSprite);                              //ADDITION BY WEDUNNIT
        Item stapler        = new Item(staplerPrefab, "Stapler", "A bright red stapler, with no staples in it.", staplerSprite);                               //ADDITION BY WEDUNNIT
        Item seaweed        = new Item(seaweedPrefab, "Seaweed", "Oceanman, take me by the hand lead me to the land, that you understand.", seaweedSprite);    //ADDITION BY WEDUNNIT
        Item sandwitch      = new Item(sandwichPrefab, "Sandwich", "A ham sandwich with cheese and lettuce on white bread.", sandwitchSprite);                 //ADDITION BY WEDUNNIT
        Item purse          = new Item(pursePrefab, "Fancy Purse", "A finely made, hand crafted, now-empty purse.", purseSprite);                              //ADDITION BY WEDUNNIT
        Item plunger        = new Item(plungerPrefab, "Plunger", "A toilet plunger. It hasn't been used recently.", plungerSprite);                            //ADDITION BY WEDUNNIT
        Item monocle        = new Item(monoclePrefab, "Monocle", "A finely made monocle, complete with gold chain.", monocleSprite);                           //ADDITION BY WEDUNNIT
        Item feather        = new Item(featherPrefab, "Feather", "A goose feather, apparently freshly plucked.", featherSprite);                               //ADDITION BY WEDUNNIT
        Item glasses        = new Item(glassesPrefab, "Safety Glasses", "Safety glasses good for keeping splinters and acid out of the eyes.", glassesSprite); //ADDITION BY WEDUNNIT
        Item dumbbell       = new Item(dumbbellPrefab, "Dumbbbell", "Dumbbells; the source of pure strength.", dumbbellSprite);                                //ADDITION BY WEDUNNIT

        murderWeapons = new MurderWeapon[8] {
            cutlass, poison, garrote, knife, laserGun, leadPipe, westernPistol, wizardStaff
        };
        itemClues = new Item [21] {
            beret,
            footprints,
            gloves,
            wine,
            shatteredGlass,
            shrapnel,
            smellyDeath,
            spellbook,
            tripwire,
            whistle,
            chefHat,
            toast,
            stapler,
            seaweed,
            sandwitch,
            purse,
            plunger,
            monocle,
            feather,
            dumbbell,
            glasses
        };
        characters = new NonPlayerCharacter[10] {
            pirate,
            mimes,
            millionaire,
            cowgirl,
            roman,
            wizard,
            heman,
            chubbie,
            scientist,
            reginald
        };
        scenes = new Scene[9] {
            atrium, lectureTheatre, lakehouse, controlRoom, kitchen, islandOfInteraction, roof, undergroundLab, factory
        };
    }
示例#7
0
    void Start()
    {
        //Initialises Variables
        //Responce Arrays
        string[] pirateResponses = new string[9] {
            "Shiver me timbers I know nothing!",
            "Arrr matey it ain’t that difficult to understand.",
            "Shiver me timbers, how dare ye threaten me!",
            "Arrr, no matey I really don’t think I do. I saw nothing!",
            "Ho ho ho, Arr matey I didn’t see anything!",
            "Shiver me timbers ye need to plan ye lunch breaks better!",
            "Arrr matey I saw nothing of import.",
            "Arr, matey I suppose ye do, but I saw nothing.",
            "Arrr matey I don’t think ye need my help to solve this conundrum."
        };

        string[] mimeResponses = new string[9] {
            "The mimes are taken aback, but contribute nothing more.",
            "The mimes shake their heads.",
            "The mimes flinch, but tell you nothing.",
            "The mimes shake their heads.",
            "The mimes imitate laughter but tell you nothing.",
            "The mimes look at their wrist watches with a puzzled expression.",
            "The mines mime out some routine which doesn’t make sense and contribute nothing.",
            "The mimes look at you with passing curiosity but contribute nothing more.",
            "The mimes shake their heads. They tell you nothing."
        };

        string[] millionaireResponses = new string[9] {
            "Don’t try and force me to tell you anything. I’ve got more money than you.",
            "Don’t patronise me you cretin. I’ve got more money than you.",
            "How dare you threaten me you lunatic, I’ve got more money than you.",
            "No my dear fellow for you see I have more money than you.",
            "Ha ha ha. Not that funny dear fellow, you’ll need more money to make it funnier.",
            "My good man, I know that time is money, but you can’t rush magnificence!",
            "My good man, there isn’t enough money around here to warrant seeing anything.",
            "I thank you for your kindness, but it would be better with some patronage!",
            "My good man, you don’t need my help to solve this. Not to mention there’s no money involved."
        };

        string[] cowgirlResponses = new string[9] {
            "I appreciate your candour pardner but I didn’t see anything.",
            "Pardner I do understand, I just didn’t see anything.",
            "Pardner I don’t appreciate threats so don’t try it.",
            "Pardner I didn’t see anything, I wasn’t paying attention.",
            "Ha ha ha, funny pardner but I still didn’t see anything.",
            "I don’t know nuthin'. If you’ve got to be gone by high noon, I’d go ask someone else.",
            "I understand pardner but I didn’t see anything",
            "Thank you pardner, but I didn’t see anything. ",
            "Pardner, you’ll have to solve this one without my help, I didn’t see anything."
        };

        string[] romanResponses = new string[9] {
            "What Ho! I understand you want to solve the problem but I saw nothing!",
            "What Ho! Yes I understand, but I saw nothing!",
            "What Ho! Don’t try and threaten me you madman!",
            "What Ho! I didn’t see anything.",
            "What Ho ho ho ho! That’s funny but I saw nothing of interest.",
            "What Ho! I feel you’re trying to rush an answer out of me! Nay I say, Nay!",
            "What Ho! My good man you are inquisitive but I don’t know anything.",
            "What Ho! Thanks my good man but I didn’t see anything.",
            "What Ho!  My good man I’m sorry but I saw nothing."
        };

        string[] wizardResponses = new string[9] {
            "Errrm...are you sure I can’t interest you in some merchandise instead?",
            "Errrm...I do understand what is going on, I just didn’t see anything.",
            "Errrm...I think you might need to calm down, I’ve got something for that.",
            "Errrm...I saw nothing but I have seen some of my merchandise, would you like some?",
            "Hee hee hee...that's funny. Errrm...but I still saw nothing though.",
            "*Looks around shiftily* Sorry mate, I don’t know anything.",
            "Errrm...I understand, but wouldn’t you prefer to buy some merchandise instead?",
            "Errrm...yes there was something…. But I’ve forgotten it now.",
            "Errrm...are you sure? I’m not that useful really."
        };

        // NEW FOR ASSSESSMENT 3 - REPOSNES FOR ADDING NEW NPCS

        string[] astrogirlResponses = new string[9] {
            "Hah, as if you can force me to say anything incriminating, earthling!",
            "Hey, careful. You don't know who you're talking to!",
            "Okay, friend, you ain't fooling anyone with that scary attitude!",
            "I'd like to help a respectable man such as yourself, but I haven’t seen anything.",
            "Hahaha, I might just steal that joke! Yet, I haven't seen anything.",
            "Hold your horses, mate, I haven't seen anything of note!",
            "All of these questions aren't going to magically make me remember something I haven't seen.",
            "Well, aren't you a kind fellow? Still, I haven't seen anything.",
            "Hey, you know more than me about this, so you clearly don't need my help."
        };

        string[] chefRepsonses = new string[9] {
            "Sacré bleu! You are very rude, monsieur detective!",
            "How dare you patronise me, monsieur! I am the best Chef in the world!",
            "Oh! No need for this, my friend! I have not seen one thing!",
            "Qui, qui! I would love to help, but I know nothing.",
            "Hahaha, very funny, monsieur! However, I don't know anything aside from the culinary arts!",
            "Monsieur, slow down, please! English is not my first language!",
            "So many questions, but I don't have the answer for any of them.",
            "Oh! That is very kind, monsieur, but the only thing I know is how great my food is!",
            "What did you say, monsieur? Would you like to taste this freshly baked baguette?"
        };

        string[] madscientistRepsonses = new string[9] {
            "Do you know who you are talking to! Watch your language, peasant!",
            "This patronising attitude of yours is annoying, I don't know anything that would interest you!",
            "Hahaha, as if someone like you could intimidate someone like me!",
            "I have no interest in this affair. It's not like I am the guilty one this time!",
            "Your childish humour doesn’t compel me to help you at all…",
            "I have no respect for people who lack patience! There's nothing I can tell you!",
            "You ask too many questions for a pathetic commoner such as yourself.",
            "You’re too kind for your own good, detective. I have no information regarding this case.",
            "Very inspiring, but I have no interest in solving this murder."
        };

        string[] robotResponses = new string[9] {
            "Goodness me! I am not programmed to answer to this kind of attitude, beep boop.",
            "Don't you dare patronise me, you mean glob of grease! Beep boop.",
            "Oh my, you are scary… I don't know anything, unfortunately. Beep boop.",
            "Helping humans is part of my protocol. However, I haven't seen anything important. Beep boop.",
            "You humans and your weird sense of humour… I could never understand it. Beep boop.",
            "I can perform thousands of calculations every second… Even so I don't have any important information about this terrible crime. Beep boop.",
            "If I told you half of the things I've heard about all of the people here, you'd short circuit… Oh wait, humans don't short circuit.",
            "Oh my, that is very kind of you to say, detective! I haven't seen anything important though.",
            "I'm sorry, detective, but there's nothing that I can do to help you. I'm sure you'll manage on your own."
        };

        // NEW FOR ASSESSEMNT 3 - IGNORE
        NonPlayerCharacter[] ignoredNPCs = new NonPlayerCharacter[6];

        //Weaknesses
        List <string> pirateWeaknesses = new List <string> {
            "Forceful", "Wisecracking", "Kind"
        };
        List <string> mimeWeaknesses = new List <string> {
            "Intimidating", "Coaxing", "Inspiring"
        };
        List <string> millionaireWeaknesses = new List <string> {
            "Forceful", "Rushed", "Kind"
        };
        List <string> cowgirlWeaknesses = new List <string> {
            "Condescending", "Wisecracking", "Inspiring"
        };
        List <string> romanWeaknesses = new List <string> {
            "Condescending", "Coaxing", "Inquisitive"
        };
        List <string> wizardWeaknesses = new List <string> {
            "Intimidating", "Rushed", "Inquisitive"
        };
        List <string> robotWeaknesses = new List <string> {
            "Intimidating", "Coaxing", "Kind"
        };
        List <string> astrogirlWeaknesses = new List <string> {
            "Forceful", "Wisecracking", "Inspiring"
        };
        List <string> chefWeaknesses = new List <string> {
            "Condescending", "Coaxing", "Inquisitie"
        };
        List <string> madscientistWeaknesses = new List <string> {
            "Forceful", "Rushed", "Kind"
        };


        //Defining NPC's
        NonPlayerCharacter pirate      = new NonPlayerCharacter("Captain Bluebottle", pirateSprite, "Salty Seadog", piratePref, pirateWeaknesses, pirateResponses);
        NonPlayerCharacter mimes       = new NonPlayerCharacter("The Mime Twins", mimesSprite, "mimes", mimesPref, mimeWeaknesses, mimeResponses);
        NonPlayerCharacter millionaire = new NonPlayerCharacter("Sir Worchester", millionaireSprite, "Money Bags", millionarePref, millionaireWeaknesses, millionaireResponses);
        NonPlayerCharacter cowgirl     = new NonPlayerCharacter("Jesse Ranger", cowgirlSprite, "Outlaw", cowgirlPref, cowgirlWeaknesses, cowgirlResponses);
        NonPlayerCharacter roman       = new NonPlayerCharacter("Celcius Maximus", romanSprite, "Legionnaire", romanPref, romanWeaknesses, romanResponses);
        NonPlayerCharacter wizard      = new NonPlayerCharacter("Randolf the Deep Purple", wizardSprite, "Dodgy Dealer", wizardPref, wizardWeaknesses, wizardResponses);

        // NEW FOR ASSESSMETN 3 - ADDING NEW NPCS //
        NonPlayerCharacter robot        = new NonPlayerCharacter("Droid Mayweather", robotSprite, "Mean Machine", robotPref, robotWeaknesses, robotResponses);
        NonPlayerCharacter astrogirl    = new NonPlayerCharacter("Astrigirl", astrogirlSprite, "Spacegirl", astrogirlPref, astrogirlWeaknesses, astrogirlResponses);
        NonPlayerCharacter chef         = new NonPlayerCharacter("Philip Mingot", chefSprite, "The Gastronomer", chefPref, chefWeaknesses, chefRepsonses);
        NonPlayerCharacter madscientist = new NonPlayerCharacter("Professor Bon Vose", madscientistSprite, "Dr. Evil", madscientistPref, madscientistWeaknesses, madscientistRepsonses);

        //Defining Scenes
        Scene controlRoom         = new Scene("Control Room");
        Scene kitchen             = new Scene("Kitchen");
        Scene lectureTheatre      = new Scene("Lecture Theatre");
        Scene lakehouse           = new Scene("Lakehouse");
        Scene islandOfInteraction = new Scene("Island of Interaction");
        Scene roof           = new Scene("Roof");
        Scene atrium         = new Scene("Atrium");
        Scene undergroundLab = new Scene("Underground Lab");

        //Defining Items
        MurderWeapon cutlass        = new MurderWeapon(cutlassPrefab, "Cutlass", "A worn and well used cutlass", cutlassSprite, "SD");
        MurderWeapon poison         = new MurderWeapon(poisonPrefab, "Empty Poison Bottle", "An empty poison bottle ", poisonSprite, "SD");
        MurderWeapon garrote        = new MurderWeapon(garrotePrefab, "Garrote", "Used for strangling a victim to death", garroteSprite, "SD");
        MurderWeapon knife          = new MurderWeapon(knifePrefab, "Knife", "An incredibly sharp tool meant for cutting meat", knifeSprite, "SD");
        MurderWeapon laserGun       = new MurderWeapon(laserGunPrefab, "Laser Gun", "It's still warm which implies it has been recently fired", laserGunSprite, "SD");
        MurderWeapon leadPipe       = new MurderWeapon(leadPipePrefab, "Lead Pipe", "It's a bit battered with a few dents on the side", leadPipeSprite, "SD");
        MurderWeapon westernPistol  = new MurderWeapon(westernPistolPrefab, "Western Pistol", "The gunpowder residue implies it has been recently fired", westernPistolSprite, "SD");
        MurderWeapon wizardStaff    = new MurderWeapon(wizardStaffPrefab, "Wizard Staff", "The gems still seem to be glow as if it has been used recently", wizardStaffSprite, "SD");
        Item         beret          = new Item(beretPrefab, "Beret", "A hat most stereotypically worn by the French", beretSprite);
        Item         footprints     = new Item(footprintsPrefab, "Bloody Footprints", "Bloody footprints most likely left by the murderer", footprintsSprite);
        Item         gloves         = new Item(glovesPrefab, "Bloody Gloves", "Bloody gloves most likely used by the murderer", glovesSprite);
        Item         wine           = new Item(winePrefab, "Fine Wine", "An expensive vintage that's close to 100 years old", wineSprite);
        Item         shatteredGlass = new Item(shatteredGlassPrefab, "Shattered Glass", "Broken glass shards spread quite close together", shatteredGlassSprite);
        Item         shrapnel       = new Item(shrapnelPrefab, "Shrapnel", "Shrapnel from an explosion or gun being fired", shrapnelSprite);
        Item         smellyDeath    = new Item(smellyDeathPrefab, "Smelly Death", "All that remains of the victim", smellyDeathSprite);
        Item         spellbook      = new Item(spellbookPrefab, "Spellbook", "A spellbook used by those who practise in the magic arts", spellbookSprite);
        Item         tripwire       = new Item(tripwirePrefab, "Tripwire", "A used tripwire most likely used to immobilize the victim", tripwireSprite);

        // NEW FOR ASSESSMENT 3 - LOCKED ROOM FEATURE
        Item key = new Item(keyPrefab, "Key", "Key has the words underground lab on it", keySprite);

        murderWeapons = new MurderWeapon[8] {
            cutlass, poison, garrote, knife, laserGun, leadPipe, westernPistol, wizardStaff
        };
        itemClues = new Item[9] {
            beret, footprints, gloves, wine, shatteredGlass, shrapnel, smellyDeath, spellbook, tripwire
        };
        characters = new NonPlayerCharacter[10] {
            pirate, mimes, millionaire, cowgirl, roman, wizard, robot, astrogirl, chef, madscientist
        };
        scenes = new Scene[8] {
            atrium, lectureTheatre, lakehouse, controlRoom, kitchen, islandOfInteraction, roof, undergroundLab
        };
        keyobj = key;
    }
示例#8
0
    // given a murderer, weapon and motive, creates a VerbalClue[] containing 6 relevant verbal clues
    public void CreateVerbalClues(string motive, MurderWeapon weapon, NonPlayerCharacter murderer)
    {
        string murderer_name = murderer.getNickname();
        string weapon_name   = weapon.getID();

        VerbalClue disposing_of_weapon = new VerbalClue("Disposing of a Weapon", "I saw " + murderer_name + " trying to " +
                                                        "dispose of a " + weapon_name + ".");

        string old_friends_description = "The victim and " + murderer_name + " fell out ";
        string motive_clause           = ".";

        if (motive == "homewrecker")
        {
            string partner_gender;
            int    binary = Random.Range(0, 1);
            if (binary == 0)
            {
                partner_gender = "wife";
            }
            else
            {
                partner_gender = "husband";
            }
            motive_clause = "because the victim slept with their " + partner_gender + ".";
        }
        if (motive == "loanshark")
        {
            motive_clause = "because " + murderer_name + " was in debt to the victim.";
        }
        if (motive == "promotion")
        {
            motive_clause = "because they were in competition professionally.";
        }
        if (motive == "unfriended")
        {
            motive_clause = "because the victim unfriended " + murderer_name + " on Facebook.";
        }
        if (motive == "blackmail")
        {
            motive_clause = "because the victim knew " + murderer_name + "'s darkest secret.";
        }

        if (motive == "avenge_friend")
        {
            old_friends_description = "";
            motive_clause           = murderer_name + " holds the victim responsible for a friend's death.";
        }
        if (motive == "avenge_pet")
        {
            string species;
            int    rand = Random.Range(0, 4);
            if (rand == 0)
            {
                species = "parrot";
            }
            else if (rand == 1)
            {
                species = "chihuahua";
            }
            else if (rand == 2)
            {
                species = "iguana";
            }
            else if (rand == 3)
            {
                species = "goldfish";
            }
            else
            {
                species = "rattlesnake";
            }
            string cause_of_death;
            rand = Random.Range(0, 4);
            if (rand == 0)
            {
                cause_of_death = "starvation";
            }
            else if (rand == 1)
            {
                cause_of_death = "loneliness";
            }
            else if (rand == 2)
            {
                cause_of_death = "a broken heart";
            }
            else if (rand == 3)
            {
                cause_of_death = "boredom";
            }
            else
            {
                cause_of_death = "electrocution";
            }
            old_friends_description = "";
            motive_clause           = "The victim was looking after " + murderer_name + "'s " + species + " when it " +
                                      "died of " + cause_of_death + ".";
        }
        old_friends_description += motive_clause;
        VerbalClue old_friends = new VerbalClue("Old Friends", old_friends_description);

        VerbalClue old_enemies = new VerbalClue("Old Enemies", "Rumour is that the victim had an unpleasant " +
                                                "history with " + murderer_name + ".");

        VerbalClue last_seen_with = new VerbalClue("Last Seen With", "I saw the victim alone with " + murderer_name + " just a few " +
                                                   "minutes before their body was discovered.");

        string altercation_description = murderer_name + "and the victim had an altercation about ";

        motive_clause = ".";
        if (motive == "homewrecker")
        {
            string partner_gender;
            int    binary = Random.Range(0, 1);
            if (binary == 0)
            {
                partner_gender = "wife";
            }
            else
            {
                partner_gender = "husband";
            }
            motive_clause = "the victim sleeping with their " + partner_gender + ".";
        }
        if (motive == "loanshark")
        {
            motive_clause = murderer_name + " being in debt to the victim.";
        }
        if (motive == "promotion")
        {
            motive_clause = "them being in competition professionally.";
        }
        if (motive == "unfriended")
        {
            motive_clause = "the victim unfriending them on Facebook.";
        }
        if (motive == "blackmail")
        {
            motive_clause = "the victim having found out their darkest secret.";
        }
        if (motive == "avenge_friend")
        {
            motive_clause = "the death of a mutual friend.";
        }
        if (motive == "avenge_pet")
        {
            motive_clause = murderer_name + "'s pet having died.";
        }

        VerbalClue altercation = new VerbalClue("An Altercation", altercation_description);

        int        random         = Random.Range(0, npcs.Count());
        string     character_name = npcs [random].getCharacterID();
        VerbalClue changed_story  = new VerbalClue("Stories Have Changed", murderer_name + " told me they last saw the " +
                                                   "victim before 8pm, but told " + character_name + " they spoke to the victim after 9pm.");

        verbal_clues = new VerbalClue[6] {
            old_friends,
            altercation,
            disposing_of_weapon,
            old_enemies,
            last_seen_with,
            changed_story
        };
    }
示例#9
0
    // Creates two lists of clues, one containing 3 verbal clues (two relevant, one useless) and one containing 6 item clues (2 relevent, 4 useless).
    public void BuildCluePools(string motive, NonPlayerCharacter murderer, MurderWeapon weapon)
    {
        // one of the relevant item clues is the murder weapon, there is only ever one MurderWeapon item present in the game.
        item_clue_pool.Add(weapon);
        relevant_item_clues.Add(weapon);

        int pick_motive_clue = Random.Range(0, 1);          // 'old friends' or 'altercation'

        if (motive == "homewrecker")
        {
            relevant_item_clues.Add(item_clues [pick_motive_clue]);
            verbal_clue_pool.Add(verbal_clues [pick_motive_clue]);
        }
        else if (motive == "loanshark")
        {
            verbal_clue_pool.Add(verbal_clues [pick_motive_clue]);
            relevant_verbal_clues.Add(verbal_clues [pick_motive_clue]);
        }
        else if (motive == "promotion")
        {
            verbal_clue_pool.Add(verbal_clues [pick_motive_clue]);
            relevant_verbal_clues.Add(verbal_clues [pick_motive_clue]);
        }
        else if (motive == "unfriended")
        {
            verbal_clue_pool.Add(verbal_clues [pick_motive_clue]);
            relevant_verbal_clues.Add(verbal_clues [pick_motive_clue]);
        }
        else if (motive == "blackmail")
        {
            verbal_clue_pool.Add(verbal_clues [pick_motive_clue]);
            relevant_verbal_clues.Add(verbal_clues [pick_motive_clue]);
        }
        else if (motive == "avenge_friend")
        {
            verbal_clue_pool.Add(verbal_clues [pick_motive_clue]);
            relevant_verbal_clues.Add(verbal_clues [pick_motive_clue]);
        }
        else if (motive == "avenge_pet")
        {
            verbal_clue_pool.Add(verbal_clues [pick_motive_clue]);
            relevant_verbal_clues.Add(verbal_clues [pick_motive_clue]);
        }

        int pick_weapon_clue = Random.Range(2, 5);

        verbal_clue_pool.Add(verbal_clues [pick_weapon_clue]);
        relevant_verbal_clues.Add(verbal_clues [pick_weapon_clue]);

        if (murderer.getCharacterID() == "Captain Bluebottle")
        {
            item_clue_pool.Add(item_clues [4]);              // shattered glass
            relevant_item_clues.Add(item_clues [4]);
        }
        else if (murderer.getCharacterID() == "The Mime Twins")
        {
            item_clue_pool.Add(item_clues [0]);              // beret
            relevant_item_clues.Add(item_clues [0]);
        }
        else if (murderer.getCharacterID() == "Sir Worchester")
        {
            item_clue_pool.Add(item_clues [2]);              // gloves
            relevant_item_clues.Add(item_clues [2]);
        }
        else if (murderer.getCharacterID() == "Jesse Ranger")
        {
            item_clue_pool.Add(item_clues [8]);              // tripwire
            relevant_item_clues.Add(item_clues [8]);
        }
        else if (murderer.getCharacterID() == "Celcius Maximus")
        {
            item_clue_pool.Add(item_clues [3]);              // wine
            relevant_item_clues.Add(item_clues [3]);
        }
        else if (murderer.getCharacterID() == "Randolf the Deep Purple")
        {
            item_clue_pool.Add(item_clues [7]);              // spellbook
            relevant_item_clues.Add(item_clues [7]);
        }

        // add the 6 irrelevant physical clues - NEW FOR ASSESSMENT 3
        while (item_clue_pool.Count() < 8)
        {
            int index = Random.Range(0, item_clues.Count() - 1);
            if (item_clue_pool.Contains(item_clues [index]) == false)
            {
                item_clue_pool.Add(item_clues [index]);
            }
        }

        // add 'red herring' verbal clue
        int    weapon_index       = Random.Range(0, weapons.Count() - 1);
        string red_herring_weapon = weapons [weapon_index].getID();

        while (red_herring_weapon == weapon.getID())
        {
            weapon_index       = Random.Range(0, weapons.Count() - 1);
            red_herring_weapon = weapons [weapon_index].getID();
        }
        int    npc_index             = Random.Range(0, npcs.Count() - 1);
        string red_herring_character = npcs [npc_index].getCharacterID();

        while (red_herring_character == murderer.getCharacterID())
        {
            npc_index             = Random.Range(0, npcs.Count() - 1);
            red_herring_character = npcs [npc_index].getCharacterID();
        }


        // create and then choose one of two irrelevant verbal clues
        VerbalClue police_failure = new VerbalClue("Lack of Evidence", "The police think the victim was killed " +
                                                   "using a " + red_herring_weapon + ", but they can’t find evidence of one.");

        VerbalClue shifty_looking = new VerbalClue("Looking Shifty", "I think I saw " + red_herring_character + " acting suspiciously.");

        VerbalClue[] red_herring_verbal_clues = new VerbalClue[2] {
            police_failure, shifty_looking
        };
        int herring_index = Random.Range(0, 1);

        verbal_clue_pool.Add(red_herring_verbal_clues [herring_index]);
    }