protected override void ProcessSingleInteraction(Interaction interaction)
        {
            switch (interaction.InteractionType)
            {
                case InteractionType.Infest:
                    {
                        Unit targetUnit = this.GetUnit(interaction.TargetUnit);
                        Unit unit = this.GetUnit(interaction.SourceUnit);

                        var infestor = unit as Parasite;

                        if (infestor != null)
                        {
                            var infestationSpores = new InfestationSpores();
                            targetUnit.AddSupplement(infestationSpores);
                        }

                        //targetUnit.DecreaseBaseHealth(interaction.SourceUnit.Power);
                        break;
                    }
                default:
                    base.ProcessSingleInteraction(interaction);
                    break;
            }
        }
        protected override void ProcessSingleInteraction(Interaction interaction)
        {
            switch (interaction.InteractionType)
            {
            case InteractionType.Infest:
            {
                Unit targetUnit = this.GetUnit(interaction.TargetUnit);
                Unit unit       = this.GetUnit(interaction.SourceUnit);

                var infestor = unit as Parasite;

                if (infestor != null)
                {
                    var infestationSpores = new InfestationSpores();
                    targetUnit.AddSupplement(infestationSpores);
                }

                //targetUnit.DecreaseBaseHealth(interaction.SourceUnit.Power);
                break;
            }

            default:
                base.ProcessSingleInteraction(interaction);
                break;
            }
        }
示例#3
0
 private void GetInfest(Unit targetUnit)
 {
     if (true)
     {
         var infestationSpores = new InfestationSpores();
         targetUnit.AddSupplement(infestationSpores);
     }
 }
示例#4
0
        protected override void ProcessSingleInteraction(Interaction interaction)
        {
            switch (interaction.InteractionType)
            {
            case InteractionType.Infest:
                Unit       targetUnit = GetUnit(interaction.TargetUnit);
                Supplement spores     = new InfestationSpores();
                targetUnit.AddSupplement(spores);
                break;

            default: base.ProcessSingleInteraction(interaction);
                break;
            }
        }
示例#5
0
        protected override void ProcessSingleInteraction(Interaction interaction)
        {
            switch (interaction.InteractionType)
            {
                case InteractionType.Infest:
                    Unit targetUnit = this.GetUnit(interaction.TargetUnit);
                    Unit sourceUnit = this.GetUnit(interaction.SourceUnit);
                    if (sourceUnit.UnitClassification == InfestationRequirements.RequiredClassificationToInfest(targetUnit.UnitClassification))
                    {
                        var infestationSpore = new InfestationSpores();
                        targetUnit.AddSupplement(infestationSpore);
                    }

                    break;
                default:
                    base.ProcessSingleInteraction(interaction);
                    break;
            }
        }
示例#6
0
        protected override void ProcessSingleInteraction(Interaction interaction)
        {
            switch (interaction.InteractionType)
            {
            case InteractionType.Infest:
                Unit targetUnit = this.GetUnit(interaction.TargetUnit);
                Unit sourceUnit = this.GetUnit(interaction.SourceUnit);
                if (sourceUnit.UnitClassification == InfestationRequirements.RequiredClassificationToInfest(targetUnit.UnitClassification))
                {
                    var infestationSpore = new InfestationSpores();
                    targetUnit.AddSupplement(infestationSpore);
                }

                break;

            default:
                base.ProcessSingleInteraction(interaction);
                break;
            }
        }
 public Queen(string id)
     : base(id, UnitClassification.Psionic, Queen.queenHealth, Queen.queenPower, Queen.queenAggression)
 {
     InfestationSpores infestationSpores = new InfestationSpores();
     this.attackedOnce = false;
 }
 public Parasite(string id)
     : base(id, UnitClassification.Biological, Parasite.parasiteHealth, Parasite.parasitePower, Parasite.parasiteAggression)
 {
     InfestationSpores infestationSpores = new InfestationSpores();
     this.attackedOnce = false;
 }