示例#1
0
    public override void Interact(Entity actor)
    {
        if (!IsPlayer(actor))
        {
            return;
        }

        Character c = actor as Character;

        Choice[] choices = new Choice[5];
        choices[0] = new Choice("Offer 10", delegate()
        {
            Pray(10, c);
        });
        choices[1] = new Choice("Offer 50", delegate()
        {
            Pray(50, c);
        });
        choices[2] = new Choice("Offer 100", delegate()
        {
            Pray(100, c);
        });
        choices[3] = new Choice("Offer 500", delegate()
        {
            Pray(500, c);
        });

        choices[4] = new Choice("Go away", null);
        ChoiceWindow.Open("Sanctuary", "You are in front of a sanctuary. Try to donnate something and maybe gods will give you something back", choices);
    }
示例#2
0
    public override void Interact(Entity actor)
    {
        if (!IsPlayer(actor))
        {
            return;
        }

        Choice[] choices = new Choice[4];

        choices[0] = new Choice("Buy health potion (" + healthPotionCost + " gold)", delegate()
        {
            Inventory i = Player.Instance.GetCharacter().GetInventory();
            Item gold   = Player.Instance.GetCharacter().GetGold();
            if (gold.Get(healthPotionCost))
            {
                i.AddItem(new Item("Health potion", 1));
            }
            else
            {
                InformationWindow.ShowInformation("No money", "You are to poor to pay for health potion!", false);
            }
        });

        choices[1] = new Choice("Buy stamina potion (" + staminaPotionCost + " gold)", delegate()
        {
            Inventory i = Player.Instance.GetCharacter().GetInventory();
            Item gold   = Player.Instance.GetCharacter().GetGold();
            if (gold.Get(staminaPotionCost))
            {
                i.AddItem(new Item("Stamina potion", 1));
            }
            else
            {
                InformationWindow.ShowInformation("No money", "You are to poor to pay for stamina potion!", false);
            }
        });

        choices[2] = new Choice("Buy better equipment (" + equipmentCost + " gold)", delegate()
        {
            Item gold = Player.Instance.GetCharacter().GetGold();
            if (gold.Get(equipmentCost))
            {
                Attribute damage = Player.Instance.GetCharacter().GetDamage();
                damage.IncreaseMaxValue(equipmentQuality);
                damage.ResetValue();
            }
            else
            {
                InformationWindow.ShowInformation("No money", "You are to poor to pay for new equipment potion!", false);
            }
        });

        choices[3] = new Choice("Go away", null);

        ChoiceWindow.Open("City", "You are in the city of Patrunacs", choices);
    }
示例#3
0
    public override void Interact(Entity actor)
    {
        if (!IsPlayer(actor))
        {
            return;
        }

        Choice[] choices = new Choice[3];

        choices[0] = new Choice("Training (" + trainingGoldRequired + " gold)", delegate()
        {
            Player p  = Player.Instance;
            Item gold = p.GetCharacter().GetGold();

            if (gold.Get(trainingGoldRequired))
            {
                p.Training(1);
                trainingGoldRequired += 10;
            }
            else
            {
                InformationWindow.ShowInformation("No money", "You are to poor to pay for training!", false);
            }
        });

        choices[1] = new Choice("Rest (" + restGoldRequired + " gold)", delegate()
        {
            Player p  = Player.Instance;
            Item gold = p.GetCharacter().GetGold();

            if (gold.Get(restGoldRequired))
            {
                p.GetCharacter().GetHealth().ResetValue();
                p.GetCharacter().GetStamina().ResetValue();
            }
            else
            {
                InformationWindow.ShowInformation("No money", "You are to poor to pay for training!", false);
            }
        });

        choices[2] = new Choice("Go away", null);

        ChoiceWindow.Open("Castle", ToString(), choices);
    }