protected Character(string name, ICombatAttributes combatAttributes, double experienceWorth = 0, double goldWorth = 0) { this.name = name; this.combatAttributes = combatAttributes; this.experienceWorth = experienceWorth; this.goldWorth = goldWorth; this.guid = GuidProvider.Instance.GetNewGuid(); this.possibleCharacterActions = new List <ICharacterAction>(); }
public PlayerCharacter(int playerIdentifier, int maxHp, ICombatAttributes attributes, ICharacterAction[] actions) : base(names[playerIdentifier], null) { this.playerIdentifier = playerIdentifier; base.combatAttributes = attributes; base.healthPoints = new HealthPoints(new WeakReference <ICharacter>(this), maxHp); possibleCharacterActions.AddRange(actions); SingletonProvider.MainEventPublisher.Subscribe(EventType.PlayerSelectedActionTarget, OnPlayerSelectedActionTarget); }
public virtual float CalculateHealCeilingWith(ICombatAttributes attributes) { return(affectedBySpellPower ? HealCeiling * attributes.SpellPower.Remap() : HealCeiling); }
public virtual float CalculateHealAmountWith(ICombatAttributes combatAttributes) { return(affectedBySpellPower ? HealAmount * combatAttributes.SpellPower.Remap() : HealAmount); }
public float CalculateAmount(ICombatAttributes attributeSystem) { CalculatedAmount = HealCalculator.Invoke(attributeSystem, BaseAmount); return(CalculatedAmount); }