protected override void ProcessSingleInteraction(Interaction interaction)
        {
            try
            {
                switch (interaction.InteractionType)
                {
                case InteractionType.Attack:
                    Unit targetUnit = this.GetUnit(interaction.TargetUnit);
                    targetUnit.DecreaseBaseHealth(interaction.SourceUnit.Power);
                    break;

                case InteractionType.Infest:
                    Unit targetUnit1 = this.GetUnit(interaction.TargetUnit);
                    if (InfestationRequirements.RequiredClassificationToInfest(targetUnit1.UnitClassification) == interaction.SourceUnit.UnitClassification)
                    {
                        targetUnit1.AddSupplement(new InfestationSpores());
                    }
                    break;

                default:
                    break;
                }
            }
            catch
            {
            }
        }
Пример #2
0
        protected virtual void ProcessSingleInteraction(Interaction interaction)
        {
            switch (interaction.InteractionType)
            {
            case InteractionType.Attack:
                Unit targetUnit = this.GetUnit(interaction.TargetUnit);
                targetUnit.DecreaseBaseHealth(interaction.SourceUnit.Power);
                break;

            default:
                break;
            }
        }
Пример #3
0
 protected virtual void ProcessSingleInteraction(Interaction interaction)
 {
     Unit targetUnit = this.GetUnit(interaction.TargetUnit);
     switch (interaction.InteractionType)
     {
         case InteractionType.Attack:
             targetUnit.DecreaseBaseHealth(interaction.SourceUnit.Power);
             break;
         case InteractionType.Infest:
                 targetUnit.AddSupplement(new InfestationSpores());
             break;
         default:
             break;
     }
 }