Ejemplo n.º 1
0
    public void PotionCheck(Color col)
    {
        if (!potReq)
        {
            handler.Alert("I don't think they came for a potion!");
            return;
        }

        if (col == purple)
        {
            handler.OpenTextBox(potPoisonEnd);
            CompleteMission();
        }
        else if (col == orange)
        {
            handler.OpenTextBox(potAntidoteEnd);
            CompleteMission();
        }
        else if (col == cyan)
        {
            handler.OpenTextBox(potTruthEnd);
            CompleteMission();
        }
        else if (col == magenta)
        {
            handler.OpenTextBox(potCharismaEnd);
            CompleteMission();
        }
    }
Ejemplo n.º 2
0
    public GameObject CheckForPotion()
    {
        GameObject potion = new GameObject("Potion", typeof(Potion));

        if (ings[0] == Color.blue && ings[1] == Color.red)
        {
            potion.GetComponent <Potion>().color = purple.result;
            AudioManager.audioInstance.Audio.PlayOneShot(AudioManager.audioInstance.Correct);
        }
        else if (ings[0] == Color.red && ings[1] == Color.green)
        {
            potion.GetComponent <Potion>().color = orange.result;
            AudioManager.audioInstance.Audio.PlayOneShot(AudioManager.audioInstance.Correct);
        }
        else if (ings[0] == Color.green && ings[1] == Color.blue)
        {
            potion.GetComponent <Potion>().color = cyan.result;
            AudioManager.audioInstance.Audio.PlayOneShot(AudioManager.audioInstance.Correct);
        }
        else if (ings[0] == Color.red && ings[1] == Color.blue)
        {
            potion.GetComponent <Potion>().color = magenta.result;
            AudioManager.audioInstance.Audio.PlayOneShot(AudioManager.audioInstance.Correct);
        }
        else
        {
            AudioManager.audioInstance.Audio.PlayOneShot(AudioManager.audioInstance.Wrong);
            Destroy(potion);
            rend.material.color = new Color(0, 0.4f, 0);
            mission.Alert("That potion didn't seem to have any effect.");
            ResetCauldron();
            return(null);
        }

        rend.material.color = potion.GetComponent <Potion>().color;

        return(potion);
    }
Ejemplo n.º 3
0
 public void Interact()
 {
     if (CameraLoc.transform.position == CameraPinLoc.transform.position)
     {
         if (cauldron.ings.Count == 2)
         {
             mission.Prompt("Create the potion?", 0);
         }
         else
         {
             mission.Alert("This isn't much of a potion...");
         }
     }
 }
Ejemplo n.º 4
0
    void CheckSpell()
    {
        if (shapeOrder[0] == ShapeType.Circle) //Summoning
        {
            if (shapeOrder[1] == ShapeType.Square)
            {
                if (shapeOrder[2] == ShapeType.Circle)
                {
                    if (shapeOrder[3] == ShapeType.Square)
                    {
                        ResetSpell();
                        mission.GetCurrentMission().GetComponent <MissionObj>().SpellCheck(0);
                        return;
                    }
                }
            }
        }

        else if (shapeOrder[0] == ShapeType.Pentagon) //Invisibility
        {
            if (shapeOrder[1] == ShapeType.Circle)
            {
                if (shapeOrder[2] == ShapeType.Square)
                {
                    if (shapeOrder[3] == ShapeType.Pentagon)
                    {
                        ResetSpell();
                        mission.GetCurrentMission().GetComponent <MissionObj>().SpellCheck(1);
                        return;
                    }
                }
            }
        }

        else if (shapeOrder[0] == ShapeType.Triangle) //Curse
        {
            if (shapeOrder[1] == ShapeType.Pentagon)
            {
                if (shapeOrder[2] == ShapeType.Square)
                {
                    if (shapeOrder[3] == ShapeType.Pentagon)
                    {
                        ResetSpell();
                        mission.GetCurrentMission().GetComponent <MissionObj>().SpellCheck(2);
                        return;
                    }
                }
            }
        }

        else if (shapeOrder[0] == ShapeType.Square) //Protection
        {
            if (shapeOrder[1] == ShapeType.Circle)
            {
                if (shapeOrder[2] == ShapeType.Square)
                {
                    if (shapeOrder[3] == ShapeType.Pentagon)
                    {
                        ResetSpell();
                        mission.GetCurrentMission().GetComponent <MissionObj>().SpellCheck(3);
                        return;
                    }
                }
            }
        }

        mission.Alert("That spell didn't seem to do anything");

        ResetSpell();
    }