omni-lifedrain proc

Discussions on various DOL development features

Moderator: Support Team

omni-lifedrain proc

Postby Gothwaite » Tue Jul 03, 2007 4:15 am

Q: From the new tinctures added in 1.85b: What is an omni-drain spell and what does it do?


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;
}
}
}
}
ss from live http://img503.imageshack.us/my.php?imag ... 004vr5.jpg
Gothwaite
DOL Experienced
 
Posts: 171
Joined: Sun Jul 30, 2006 8:49 am

Postby Etaew » Tue Jul 03, 2007 10:20 am

I'll add it locally and commit it to SVN on my regular update, if you change anything let me know.

Thanks.
Retired DOL Enthusiast | Blog
User avatar
Etaew
Inactive Staff Member
 
Posts: 7602
Joined: Mon Oct 13, 2003 5:04 pm
Website: http://etaew.net
Location: England

Postby mico » Tue Jul 03, 2007 6:50 pm

Nice work Gothwaite :)
mico
Database Team
 
Posts: 200
Joined: Mon May 07, 2007 3:57 pm
Location: nowhere

Postby Gothwaite » Tue Jul 03, 2007 6:53 pm

:)
Gothwaite
DOL Experienced
 
Posts: 171
Joined: Sun Jul 30, 2006 8:49 am

Postby sio » Tue Jul 03, 2007 7:56 pm

And here are the recipes to craft that:

Reactive Draining Netherium Armor Tincture ( Value 75 )
1x Netherium Metal Bars
2x Concoctive Leeching Catalyst
1x Reactive Electrical Catalyst
1x Ancient Lich Tooth



Reactive Draining Arcanium Armor Tincture ( Value 100 )
2x Arcanium Metal Bars
1x Reactive Electrical Catalyst
1x Concoctive Leeching Catalyst
1x Ancient Lich Tooth
2x Volatile Shielding Catalyst
2x Earthen Distill
2x Watery Distill
2x Silvery Faerie Hair


Ancient Lich Tooth <--- This is a drop and it drops at:

Granite Giant Oracle [Dartmoor]
Granite Giant Stonelord [Dartmoor]
Granite Giant Elder [Dartmoor]
Cailleach Guard [Lyonesse]
Raven Wraiths [Bog of Cullen]
Siabra Guardians (Bog of Cullen)
Glimmer Deathshades [Sheeroe Hills]
Glimmer Gheists [Sheeroe Hills]
Glimmer Knight [Sheeroe Hills]
Drakulv Executioner [Malmohus]
Drakulv Soultrapper [Malmohus]
Drakulv Disciple [Malmohus]
Jotun Outcast [Vanern Swamp]

Thx to: http://apothecary.4t.com/ - the best Alchemy site ever !

sio
sio
Inactive Staff Member
 
Posts: 324
Joined: Sun Jan 08, 2006 12:25 pm
ICQ: 32810199
Website: http://talyn.de
Yahoo Messenger: sioding
Location: Kiel


Return to “%s” DOL Development Discussion

Who is online

Users browsing this forum: No registered users and 1 guest