Example #1
0
 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>();
 }
Example #2
0
 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);
 }
Example #3
0
 public virtual float CalculateHealCeilingWith(ICombatAttributes attributes)
 {
     return(affectedBySpellPower
                         ? HealCeiling * attributes.SpellPower.Remap()
                         : HealCeiling);
 }
Example #4
0
 public virtual float CalculateHealAmountWith(ICombatAttributes combatAttributes)
 {
     return(affectedBySpellPower
                         ? HealAmount * combatAttributes.SpellPower.Remap()
                         : HealAmount);
 }
Example #5
0
 public float CalculateAmount(ICombatAttributes attributeSystem)
 {
     CalculatedAmount = HealCalculator.Invoke(attributeSystem, BaseAmount);
     return(CalculatedAmount);
 }