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); } }
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; } }