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; } }
private void GetInfest(Unit targetUnit) { if (true) { var infestationSpores = new InfestationSpores(); targetUnit.AddSupplement(infestationSpores); } }
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; } }
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; }