void SetVariantProperties(DFCareer.EnemyGroups targetGroup, int variantIndex)
        {
            string name = TextManager.Instance.GetText("ClassicEffects", subGroupTextKeys[variantIndex]);

            VariantProperties vp = new VariantProperties();

            vp.effectProperties                       = properties;
            vp.effectProperties.Key                   = string.Format("Pacify-{0}", name);
            vp.effectProperties.ClassicKey            = MakeClassicKey(33, (byte)variantIndex);
            vp.effectProperties.SubGroupName          = name;
            vp.effectProperties.SpellMakerDescription = DaggerfallUnity.Instance.TextProvider.GetRSCTokens(1585 + variantIndex);
            vp.effectProperties.SpellBookDescription  = DaggerfallUnity.Instance.TextProvider.GetRSCTokens(1285 + variantIndex);
            vp.targetGroup = targetGroup;

            if (targetGroup == DFCareer.EnemyGroups.Animals)
            {
                vp.effectProperties.ChanceCosts = MakeEffectCosts(60, 100, 160);
            }
            else if (targetGroup == DFCareer.EnemyGroups.Daedra)
            {
                vp.effectProperties.ChanceCosts = MakeEffectCosts(60, 120, 36);
            }
            else if (targetGroup == DFCareer.EnemyGroups.Humanoid || targetGroup == DFCareer.EnemyGroups.Undead)
            {
                vp.effectProperties.ChanceCosts = MakeEffectCosts(80, 140, 60);
            }

            variantProperties[variantIndex] = vp;
        }
Example #2
0
        bool IsGroupMatch(DaggerfallEntity entity)
        {
            // Validate entity
            if (entity == null || !(entity is EnemyEntity))
            {
                return(false);
            }

            // Check target match
            // Note: Pacify Humanoid only operates on humanoid monsters (not enemy classes)
            DFCareer.EnemyGroups enemyGroup = (entity as EnemyEntity).GetEnemyGroup();
            return(TargetGroup == enemyGroup);
        }
Example #3
0
        public NearbyObjectFlags GetEntityFlags(DaggerfallEntityBehaviour entity)
        {
            NearbyObjectFlags result = NearbyObjectFlags.None;

            if (!entity)
            {
                return(result);
            }

            if (entity.EntityType == EntityTypes.EnemyClass || entity.EntityType == EntityTypes.EnemyMonster)
            {
                result |= NearbyObjectFlags.Enemy;
                DFCareer.EnemyGroups enemyGroup = (entity.Entity as EnemyEntity).GetEnemyGroup();
                switch (enemyGroup)
                {
                case DFCareer.EnemyGroups.Undead:
                    result |= NearbyObjectFlags.Undead;
                    break;

                case DFCareer.EnemyGroups.Daedra:
                    result |= NearbyObjectFlags.Daedra;
                    break;

                case DFCareer.EnemyGroups.Humanoid:
                    result |= NearbyObjectFlags.Humanoid;
                    break;

                case DFCareer.EnemyGroups.Animals:
                    result |= NearbyObjectFlags.Animal;
                    break;
                }
            }
            else if (entity.EntityType == EntityTypes.CivilianNPC)
            {
                result |= NearbyObjectFlags.Humanoid;
            }

            // Set magic flag
            // Not completely sure what conditions should flag entity for "detect magic"
            // Currently just assuming entity has active effects
            EntityEffectManager manager = entity.GetComponent <EntityEffectManager>();

            if (manager && manager.EffectCount > 0)
            {
                result |= NearbyObjectFlags.Magic;
            }

            return(result);
        }
Example #4
0
        void SetVariantProperties(DFCareer.EnemyGroups targetGroup, int variantIndex)
        {
            VariantProperties vp = new VariantProperties();

            vp.effectProperties            = properties;
            vp.effectProperties.Key        = string.Format("Pacify-{0}", subGroupTextKeys[variantIndex]);
            vp.effectProperties.ClassicKey = MakeClassicKey(33, (byte)variantIndex);
            vp.targetGroup = targetGroup;

            if (targetGroup == DFCareer.EnemyGroups.Animals)
            {
                vp.effectProperties.ChanceCosts = MakeEffectCosts(60, 100, 160);
            }
            else if (targetGroup == DFCareer.EnemyGroups.Daedra)
            {
                vp.effectProperties.ChanceCosts = MakeEffectCosts(60, 120, 36);
            }
            else if (targetGroup == DFCareer.EnemyGroups.Humanoid || targetGroup == DFCareer.EnemyGroups.Undead)
            {
                vp.effectProperties.ChanceCosts = MakeEffectCosts(80, 140, 60);
            }

            variantProperties[variantIndex] = vp;
        }