Example #1
0
            public Effect_SoulLink(Entity_Impling imp, StatsPackage package)
                : base(package, 0)
            {
                EffectName        = "Soul Link - Impling";
                EffectDescription = "You have an impling serving by your side.  He will sacrifice himself to save his master.";

                EffectType      = EffectTypes.Magical;
                IsImmuneToPurge = true;
                IsHarmful       = false;

                impling = imp;
            }
Example #2
0
            public override void CastAbilityGround(StatsPackage caster, int x0, int y0, int radius, Level level)
            {
                if (CanCastAbility(caster, x0, y0) && !caster.HasEffect(typeof(Effect_SoulLink)))
                {
                    Entity_Impling imp = new Entity_Impling(caster.ParentEntity, level)
                    {
                        X = x0, Y = y0
                    };
                    level.Entities.Add(imp);

                    caster.ApplyEffect(new Effect_SoulLink(imp, caster));
                }
            }
Example #3
0
            public override void OnMove()
            {
                //If the impling is not on the same level as the player
                if (impling.ParentLevel != parent.ParentEntity.ParentLevel)
                {
                    impling.DoPurge = true;

                    impling   = new Entity_Impling(parent.ParentEntity, parent.ParentEntity.ParentLevel);
                    impling.X = Parent.ParentEntity.X + 1;
                    impling.Y = Parent.ParentEntity.Y;

                    parent.ParentEntity.ParentLevel.Entities.Add(impling);
                }

                base.OnMove();
            }