Example #1
0
 protected override void ProcessSingleInteraction(Interaction interaction)
 {
     //Infesting is equivalent to adding an InfestationSpores Supplement to the target
     if (interaction.InteractionType == InteractionType.Infest)
     {
         var unit = this.GetUnit(interaction.TargetUnit.Id);
         unit.AddSupplement(new InfestationSpores());
     }
     else
     {
         base.ProcessSingleInteraction(interaction);
     }
 }
Example #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;
            }
        }