/// <summary> /// Removes a specialist effect from the specailist /// </summary> /// <param name="effect">The specialist effect to remove.</param> public void RemoveSpecialistEffect(ISpecialistEffect effect) { if (_specialistEffects.Contains(effect)) { _specialistEffects.Remove(effect); } }
public Specialist SpawnSpecialist(string specialistName, Player player) { if (_specialistPool.ContainsKey(specialistName)) { SpecialistConfiguration configuration = _specialistPool[specialistName]; Specialist spawnedSpecialist = new Specialist(specialistName, (int)configuration.Priority, player); // Create the specialist effects. SpecialistEffectFactory effectFactory = new SpecialistEffectFactory(); foreach (var effectConfiguration in configuration.SpecialistEffects.ToList()) { ISpecialistEffect effect = effectFactory.CreateSpecialistEffect(effectConfiguration); spawnedSpecialist.AddSpecialistEffect(effect); } return(spawnedSpecialist); } return(null); }
/// <summary> /// Adds a specialist effect to the specialist /// </summary> /// <param name="effect">The effect to add.</param> public void AddSpecialistEffect(ISpecialistEffect effect) { _specialistEffects.Add(effect); }
/// <summary> /// Gets a textual description of a specialist effect. /// </summary> /// <param name="effect">The specialist effect to textualize</param> /// <returns>Player friendly text that explains the result of this effect.</returns> public abstract string GetEffectAsText(ISpecialistEffect effect);
/// <summary> /// Returns nothing. /// </summary> /// <param name="effect">The effect to get text of</param> /// <returns>Nothing</returns> public override string GetEffectAsText(ISpecialistEffect effect) { return(null); }