Esempio n. 1
0
        private static ReturnTypes ConditionThirsty(PlayerInstance ch, int conditionValue)
        {
            var retcode = ReturnTypes.None;

            if (ch.Level >= LevelConstants.AvatarLevel || ch.CurrentClass == ClassTypes.Vampire)
            {
                return(retcode);
            }

            ch.SetColor(ATTypes.AT_THIRSTY);
            var attrib = ConditionTypes.Thirsty.GetAttribute <DescriptorAttribute>();

            ch.SendTo(attrib.Messages.ToList()[conditionValue * 2]);
            if (conditionValue >= 2)
            {
                return(retcode);
            }

            comm.act(ATTypes.AT_THIRSTY, attrib.Messages.ToList()[conditionValue * 2 + 1], ch, null, null, ToTypes.Room);
            if (conditionValue == 0)
            {
                ch.WorsenMentalState(ch.IsPKill() ? 1 : 2);
                retcode = ch.CauseDamageTo(ch, 2, (int)SkillNumberTypes.Undefined);
            }
            else
            {
                ch.WorsenMentalState(1);
            }

            return(retcode);
        }
Esempio n. 2
0
        private static ReturnTypes ConditionBloodthirsty(PlayerInstance ch, int conditionValue)
        {
            var retcode = ReturnTypes.None;

            if (ch.Level >= LevelConstants.AvatarLevel)
            {
                return(retcode);
            }

            ch.SetColor(ATTypes.AT_BLOOD);
            var attrib = ConditionTypes.Bloodthirsty.GetAttribute <DescriptorAttribute>();

            ch.SendTo(attrib.Messages.ToList()[conditionValue * 2]);
            if (conditionValue >= 2)
            {
                return(retcode);
            }

            comm.act(ATTypes.AT_HUNGRY, attrib.Messages.ToList()[conditionValue * 2 + 1], ch, null, null, ToTypes.Room);
            if (conditionValue == 0)
            {
                ch.WorsenMentalState(2);
                retcode = ch.CauseDamageTo(ch, ch.MaximumHealth / 20, (int)SkillNumberTypes.Undefined);
            }
            else
            {
                ch.WorsenMentalState(1);
            }

            return(retcode);
        }