A: Trade Goddess: An omni-drain spell is one that damages the target and returns hit points, power points, and endurance points to the caster of the spell (or user of the tincture). The return is a percentage of the damage dealt and is *different* for each pool.
In the case of the spells being used for the tinctures, the return rates for each pool are:
* 100% of the damage dealt is returned as hit points.
* 60% of the damage dealt is returned as power points.
* 40% of the damage dealt is returned as endurance points.
As an example I’ll use the level 49 tincture’s spell, which has a delve of 100:
You hit the Target for 102 damage.
You steal 107 hit points.
You steal 64 power points.
You steal 42 endurance points.
(Variance and bonuses affect the damage and return amounts)
i was assuming/hoping no1 had done this one yet

from the description above it appears its not a life/power/endo drain, but just damages the enemy and restores ones health/power/endo.
i tested it a bit, everything seems to work fine. it is unaffected by any stats (as procs should be, i assume)
let me know if anything isnt working

- Code: Select all
/*
* DAWN OF LIGHT - The first free open source DAoC server emulator
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
using System;
using System.Collections;
using DOL.GS.PacketHandler;
namespace DOL.GS.Spells
{
/// <summary>
///
/// </summary>
[SpellHandlerAttribute("Omni")]
public class OmniSpellHandler : DirectDamageSpellHandler
{
/// <summary>
/// execute direct effect
/// </summary>
/// <param>target that gets the damage</param>
/// <param>factor from 0..1 (0%-100%)</param>
public override void OnDirectEffect(GameLiving target, double effectiveness)
{
if (target == null) return;
if (!target.IsAlive || target.ObjectState != GameLiving.eObjectState.Active) return;
// calc damage and healing
AttackData ad = CalculateDamageToTarget(target, effectiveness);
SendDamageMessages(ad);
DamageTarget(ad, true);
StealLife(ad);
StealEndo(ad);
StealPower(ad);
target.StartInterruptTimer(SPELL_INTERRUPT_DURATION, ad.AttackType, Caster);
}
/// <summary>
/// Uses percent of damage to heal the caster
/// </summary>
public virtual void StealLife(AttackData ad)
{
if (ad == null) return;
if (!m_caster.IsAlive) return;
int heal = (ad.Damage + ad.CriticalDamage);
if (m_caster.IsDiseased)
{
MessageToCaster("You are diseased!", eChatType.CT_SpellResisted);
heal >>= 1;
}
if (heal <0> 0)
{
MessageToCaster("You steal " + heal + " hit point" + (heal == 1 ? "." : "s."), eChatType.CT_Spell);
}
else
{
MessageToCaster("You cannot absorb any more life.", eChatType.CT_SpellResisted);
}
}
/// <summary>
/// Uses percent of damage to renew endurance
/// </summary>
public virtual void StealEndo(AttackData ad)
{
if (ad == null) return;
if (!m_caster.IsAlive) return;
int renew = (ad.Damage + ad.CriticalDamage) * 4/10; //40% endo return
if (renew <0> 0)
{
MessageToCaster("You steal " + renew + " endurance.", eChatType.CT_Spell);
}
else
{
MessageToCaster("You cannot steal any more endurance.", eChatType.CT_SpellResisted);
}
}
/// <summary>
/// Uses percent of damage to replenish power
/// </summary>
public virtual void StealPower(AttackData ad)
{
if (ad == null) return;
if (!m_caster.IsAlive) return;
int replenish = (ad.Damage + ad.CriticalDamage) * 6/10; //60% power return
if (replenish <0> 0)
{
MessageToCaster("You steal " + replenish + " power.", eChatType.CT_Spell);
}
else
{
MessageToCaster("Your power is already full.", eChatType.CT_SpellResisted);
}
}
/// <summary>
/// Calculates the base 100% spell damage which is then modified by damage variance factors
/// </summary>
/// <returns></returns>
public override double CalculateDamageBase()
{
double spellDamage = Spell.Damage;
return spellDamage;
}
// constructor
public OmniSpellHandler(GameLiving caster, Spell spell, SpellLine line) : base(caster, spell, line) { }
public override IList DelveInfo
{
get
{
ArrayList list = new ArrayList();
//Name
list.Add("omni-lifedrain \n");
//Description
list.Add("Damages the target. A portion of damage is returned to the caster as health, power, and endurance.\n");
list.Add("Damage: " + Spell.Damage);
list.Add("Health returned: 100% of damage dealt \n Power returned: 60% of damage dealt \n Endurance returned: 40% of damage dealt");
list.Add("Target: " + Spell.Target);
if (Spell.Range != 0) list.Add("Range: " + Spell.Range);
list.Add("Casting time: " + (Spell.CastTime * 0.001).ToString("0.0## sec;-0.0## sec;'instant'"));
if (Spell.DamageType != eDamageType.Natural)
list.Add("Damage: " + GlobalConstants.DamageTypeToName(Spell.DamageType));
return list;
}
}
}
}