/// <summary>
        /// Received when the combat controller receives a heal.
        /// </summary>
        /// <param name="e"></param>
        void OnHealEvent(Combat.HealEvent e)
        {
            this.OnHeal(e.value);

            // Announce that health has been modified
            this.gameObject.Dispatch <HealthModifiedEvent>(new HealthModifiedEvent(this));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Restores this character's health and removes all negative effects
        /// </summary>
        protected override void OnRestore()
        {
            float heal      = this.health.maximum;
            var   healEvent = new Combat.HealEvent();

            healEvent.value = heal;
            this.gameObject.Dispatch <Combat.HealEvent>(healEvent);
            this.onRestore();
        }
        //------------------------------------------------------------------------/
        // Methods
        //------------------------------------------------------------------------/
        protected override void OnApply(CombatController caster, CombatController target)
        {
            float heal = (this.percentage / 100.0f) * QueryPotency(target, PotencyQuery.HealingDealt); // target.health.maximum;
            //Trace.Script("Sending heal event with value of " + heal);
            var healEvent = new Combat.HealEvent();

            healEvent.value = heal;
            target.gameObject.Dispatch <Combat.HealEvent>(healEvent);
        }
Exemplo n.º 4
0
        protected override void OnApply(CombatController source, CombatController target)
        {
            // Calculate healing to apply
            int damage = (int)((this.potency / 100) * QueryPotency(source, PotencyQuery.HealingDealt));
            // Send a damage event to the target
            var healEvent = new Combat.HealEvent();

            healEvent.value = damage;
            target.gameObject.Dispatch <Combat.HealEvent>(healEvent);
        }