public void Rest()
    {
        ExeptionTracker.IsAlive(this);

        var increase = this.BaseHealth * this.RestHealMultiplier;

        this.Health += increase;
    }
Exemple #2
0
    public void Heal(Character character)
    {
        ExeptionTracker.IsAlive(this, character);

        ExeptionTracker.IsEnemyHealing(this, character);

        character.Health += this.AbilityPoints;
    }
Exemple #3
0
    public void Attack(Character character)
    {
        ExeptionTracker.IsAlive(this, character);

        ExeptionTracker.IsSelfAttack(this, character);

        ExeptionTracker.IsFriendlyFire(this, character);

        character.TakeDamage(this.AbilityPoints);
    }
    public void TakeDamage(double hitPoints)
    {
        ExeptionTracker.IsAlive(this);

        var leftHitPoints = this.Armor - hitPoints;

        this.Armor -= hitPoints;

        if (leftHitPoints < 0)
        {
            this.Health -= Math.Abs(leftHitPoints);
        }
    }
    public void ReceiveItem(Item item)
    {
        ExeptionTracker.IsAlive(this);

        this.Bag.AddItem(item);
    }
    public void GiveCharacterItem(Item item, Character character)
    {
        ExeptionTracker.IsAlive(this, character);

        character.Bag.AddItem(item);
    }
    public void UseItemOn(Item item, Character character)
    {
        ExeptionTracker.IsAlive(this, character);

        item.AffectCharacter(character);
    }
    public void UseItem(Item item)
    {
        ExeptionTracker.IsAlive(this);

        item.AffectCharacter(this);
    }
Exemple #9
0
 public virtual void AffectCharacter(Character character)
 {
     ExeptionTracker.IsAlive(character);
 }