[committed] Nightshade Nuke ( live like patch)

A place to submit .patch fixes for the DOL SVN

Moderator: Developer Team

[committed] Nightshade Nuke ( live like patch)

Postby -Shawn- » Sun Aug 08, 2010 1:55 am

Code: Select all
using System;
using DOL.GS;
using DOL.GS.PacketHandler;
using DOL.GS.Effects;
using DOL.Events;
using DOL.AI.Brain;

using System.Collections;
using System.Collections.Generic;
using System.Reflection;

namespace DOL.GS.Spells
{
    [SpellHandler("NightshadeNuke")]
    public class NightshadeNuke : DirectDamageSpellHandler
    {
        /// <summary>
        /// Calculates min damage variance %
        /// </summary>
        /// <param name="target">spell target</param>
        /// <param name="min">returns min variance</param>
        /// <param name="max">returns max variance</param>
        public override void CalculateDamageVariance(GameLiving target, out double min, out double max)
        {
            int speclevel = 1;
            if (m_caster is GamePlayer)
            {
                speclevel = ((GamePlayer)m_caster).GetModifiedSpecLevel(Specs.Stealth);
            }

            min = 1.25;
            max = 1.25;

            if (target.Level > 0)
            {
                min = 0.75 + (speclevel - 1) / (double)target.Level * 0.5;
            }

            if (speclevel - 1 > target.Level)
            {
                double overspecBonus = (speclevel - 1 - target.Level) * 0.005;
                min += overspecBonus;
                max += overspecBonus;
            }

            if (min > max) min = max;
            if (min < 0) min = 0;
        }
        /// <summary>
        /// Calculates the base 100% spell damage which is then modified by damage variance factors
        /// </summary>
        /// <returns></returns>
        public override double CalculateDamageBase(GameLiving target)
        {
            double spellDamage = Spell.Damage;
            GamePlayer player = Caster as GamePlayer;

            if (player != null)
            {
                int dexValue = player.GetModified((eProperty)player.Dexterity);
                spellDamage *= (dexValue + 300) / 275.0;
            }

            if (spellDamage < 0)
                spellDamage = 0;

            return spellDamage;
        }
        public NightshadeNuke(GameLiving caster, Spell spell, SpellLine line) : base(caster, spell, line) { }
    }
}



http://www.camelotherald.com/patches.php?mode=live

scroll down to Dark Age of Camelot

Version 1.103 Release Notes

General Changes

May 18, 2010

Class Changes and Fixes

Nightshades

# All Nightshade magical abilities will now base their damage and variance off of the Stealth skill.

queries to update spells

Code: Select all
SELECT * FROM `spell`;
UPDATE spell set type = "NightshadeNuke" WHERE Name = "Arrow of Night";
UPDATE spell set type = "NightshadeNuke" WHERE Name = "Stiletto of Night";
UPDATE spell set type = "NightshadeNuke" WHERE Name = "Dart of Night";
UPDATE spell set type = "NightshadeNuke" WHERE Name = "Knife of Night";
UPDATE spell set type = "NightshadeNuke" WHERE Name = "Spear of Night";
UPDATE spell set type = "NightshadeNuke" WHERE Name = "Rapier of Night";
UPDATE spell set type = "NightshadeNuke" WHERE Name = "Dagger of Night";
UPDATE spell set type = "NightshadeNuke" WHERE Name = "Lance of Night";


Code: Select all
SELECT * FROM `spell`;
UPDATE spell set type = "NightshadeNuke" WHERE Name = "Lesser Dusk Strike";
UPDATE spell set type = "NightshadeNuke" WHERE Name = "Dusk Strike";
UPDATE spell set type = "NightshadeNuke" WHERE Name = "Lesser Twilight Strike";
UPDATE spell set type = "NightshadeNuke" WHERE Name = "Twilight Strike";
UPDATE spell set type = "NightshadeNuke" WHERE Name = "Lesser Gloaming Strike";
UPDATE spell set type = "NightshadeNuke" WHERE Name = "Gloaming Strike";
UPDATE spell set type = "NightshadeNuke" WHERE Name = "Lesser Nocturnal Strike";
UPDATE spell set type = "NightshadeNuke" WHERE Name = "Nocturnal Strike";
UPDATE spell set type = "NightshadeNuke" WHERE Name = "Lesser Midnight Strike";
UPDATE spell set type = "NightshadeNuke" WHERE Name = "Midnight Strike";
viewtopic.php?f=6&t=14984

Sky is the limit.
-Shawn-
DOL Devotee
 
Posts: 305
Joined: Tue Nov 24, 2009 1:47 am
Location: New York

Re: Nightshade Nuke ( live like patch)

Postby -Shawn- » Sun Aug 08, 2010 3:53 am

patch file
Attachments
nsnuke.patch
(3.69 KiB) Downloaded 12 times
viewtopic.php?f=6&t=14984

Sky is the limit.
-Shawn-
DOL Devotee
 
Posts: 305
Joined: Tue Nov 24, 2009 1:47 am
Location: New York

Re: Nightshade Nuke ( live like patch)

Postby Trick » Sun Aug 08, 2010 4:42 am

gracias!
Code: Select all
If at first you don't succeed, then you are mediocre ;)

Trick
DOL Novice
 
Posts: 88
Joined: Sun Jan 18, 2009 1:51 am

Re: Nightshade Nuke ( live like patch)

Postby Graveen » Sun Aug 08, 2010 8:27 am

Thank you for all your contribs.
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: Nightshade Nuke ( live like patch)

Postby stephenxpimentel » Sun Aug 08, 2010 2:24 pm

it looks ok but u should change m_caster to Caster, and i don't think that it should calculate over 50 composite spec.. also what exactly is the dex based dmg? it should always be called from the actual class eStat, not hard-coded.
Lets have some fun.
stephenxpimentel
Contributor
 
Posts: 1300
Joined: Wed Sep 19, 2007 5:09 pm

Re: Nightshade Nuke ( live like patch)

Postby Tinantiol » Mon Aug 09, 2010 8:21 pm

Graveen wrote:Thank you for all your contribs.

WTB Shawn into contributors team :p
Drydruid Druid 10l4 (Deira off)
Driwyth Shadowblade 9l6 (Deira Off)
Dryinfiwyth Infiltrator 5l6 (Deira off)

Drywyth Cleric 11l7 (Eden)
Dryywyth Druid 11l7 (Eden)
Dryywyyth Bard 11l7 (Eden)
Dryywyith Shaman 11l7 (Eden)
http://genesis-daoc.forums-free.com/
Tinantiol
DOL Devotee
 
Posts: 380
Joined: Sat May 09, 2009 10:33 am
Website: http://genesis-daoc.forums-free.com/
Location: Gaeta, Italy

Re: Nightshade Nuke ( live like patch)

Postby Yemla » Mon Aug 09, 2010 9:00 pm

Tinantiol wrote:
Graveen wrote:Thank you for all your contribs.

WTB Shawn into contributors team :p

Agree'd x}}
Yemla
Contributor
 
Posts: 215
Joined: Sat Feb 02, 2008 3:21 am
Website: http://www.facebook.com/J.D.Snelling
Location: California

Re: Nightshade Nuke ( live like patch)

Postby -Shawn- » Mon Aug 09, 2010 10:44 pm

Code: Select all
using System;
using DOL.GS;
using DOL.GS.PacketHandler;
using DOL.GS.Effects;
using DOL.Events;
using DOL.AI.Brain;

using System.Collections;
using System.Collections.Generic;
using System.Reflection;

namespace DOL.GS.Spells
{
    [SpellHandler("NightshadeNuke")]
    public class NightshadeNuke : DirectDamageSpellHandler
    {
        /// <summary>
        /// Calculates min damage variance %
        /// </summary>
        /// <param name="target">spell target</param>
        /// <param name="min">returns min variance</param>
        /// <param name="max">returns max variance</param>
        public override void CalculateDamageVariance(GameLiving target, out double min, out double max)
        {
            int speclevel = 1;
            if (Caster is GamePlayer)
            {
                speclevel = ((GamePlayer)Caster).GetModifiedSpecLevel(Specs.Stealth);
                if (speclevel > ((GamePlayer)Caster).Level)
                    speclevel = ((GamePlayer)Caster).Level;
            }

            min = 1.25;
            max = 1.25;

            if (target.Level > 0)
            {
                min = 0.75 + (speclevel - 1) / (double)target.Level * 0.5;
            }

            if (speclevel - 1 > target.Level)
            {
                double overspecBonus = (speclevel - 1 - target.Level) * 0.005;
                min += overspecBonus;
                max += overspecBonus;
            }

            if (min > max) min = max;
            if (min < 0) min = 0;
        }
        /// <summary>
        /// Calculates the base 100% spell damage which is then modified by damage variance factors
        /// </summary>
        /// <returns></returns>
        public override double CalculateDamageBase(GameLiving target)
        {
            double spellDamage = Spell.Damage;
            GamePlayer player = Caster as GamePlayer;

            if (player != null)
            {
                int dexValue = player.GetModified((eProperty)player.Dexterity);
                spellDamage *= (dexValue + 300) / 275.0;
            }

            if (spellDamage < 0)
                spellDamage = 0;

            return spellDamage;
        }
        public NightshadeNuke(GameLiving caster, Spell spell, SpellLine line) : base(caster, spell, line) { }
    }
}


any better?
Attachments
nspatch2.patch
(3.42 KiB) Downloaded 14 times
viewtopic.php?f=6&t=14984

Sky is the limit.
-Shawn-
DOL Devotee
 
Posts: 305
Joined: Tue Nov 24, 2009 1:47 am
Location: New York

Re: Nightshade Nuke ( live like patch)

Postby Sand » Tue Aug 10, 2010 9:45 am

I don't recall nightshade nuke damage being dex dependant, I was fairly sure it was str but my memory could be faulty on the subject. I think I may have actually tested this at one point and/or says so in mythic's documentation.

For some nightshades basing it off stealth is not a good change but guess good that you can affect the damage. Part of me thinks otherwise as bonus to having night shade magic is suppose to balance that inf get more spec points so thinking it should be independant of spec but we aim to be livelike so we should update.
Sand
Server Team
 
Posts: 1375
Joined: Sat May 17, 2008 2:05 am

Re: Nightshade Nuke ( live like patch)

Postby -Shawn- » Tue Aug 10, 2010 4:20 pm

Sand wrote:I don't recall nightshade nuke damage being dex dependant, I was fairly sure it was str but my memory could be faulty on the subject. I think I may have actually tested this at one point and/or says so in mythic's documentation.

For some nightshades basing it off stealth is not a good change but guess good that you can affect the damage. Part of me thinks otherwise as bonus to having night shade magic is suppose to balance that inf get more spec points so thinking it should be independant of spec but we aim to be livelike so we should update.



meh u should see ns's on live lol 10% spell dmg with 10% spell piercing and mom 5 hit for like 650 + (the high rr ones) decent rr ones hit for like 400-500 its ridiculous
viewtopic.php?f=6&t=14984

Sky is the limit.
-Shawn-
DOL Devotee
 
Posts: 305
Joined: Tue Nov 24, 2009 1:47 am
Location: New York

Re: Nightshade Nuke ( live like patch)

Postby Graveen » Tue Aug 10, 2010 8:43 pm

wow 650 ?
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: Nightshade Nuke ( live like patch)

Postby -Shawn- » Tue Aug 10, 2010 8:45 pm

yeah, nightshades would just pop out of stealth after they would switch out for their caster gear and start to cast on people. Then in meele range switch back to meele gear and have their poisons hit for like 100 + after that. I think mythic might have nerfed delves since then but i would have to check.
viewtopic.php?f=6&t=14984

Sky is the limit.
-Shawn-
DOL Devotee
 
Posts: 305
Joined: Tue Nov 24, 2009 1:47 am
Location: New York

Re: Nightshade Nuke ( live like patch)

Postby Sand » Tue Aug 10, 2010 10:22 pm

Was thinking more for non rvr ish nightshades the rare folks that don't spec high stealth, mostly thinking of ones on gaheris or if there are some out there that don't rvr so don't worry much about stealth and now do. :)

For most though yes I see it increasing damage.

Anyway that wasn't the most important point of my post, it was that I thought nuke damage stat was str rather than dex but been unable to confirm so would ask if someone maybe had some data to tell one way or other.

I didn't think they nerfed the delves on those spells at all let alone having delves high enough to allow 650 damage considering, current delves are 100 and 73.5 according to char plan, thus 375 would be cap damage with 10% magic damage and mom5.
Sand
Server Team
 
Posts: 1375
Joined: Sat May 17, 2008 2:05 am

Re: Nightshade Nuke ( live like patch)

Postby stephenxpimentel » Wed Aug 11, 2010 1:11 am

Sand wrote:I didn't think they nerfed the delves on those spells at all let alone having delves high enough to allow 650 damage considering, current delves are 100 and 73.5 according to char plan, thus 375 would be cap damage with 10% magic damage and mom5.


u have to put into account for Resist Pierce and Crits i think, its definitely do-able, depending on who the NS is attackings gear.. i just think its rare for an NS to use their points in such an odd way.
Lets have some fun.
stephenxpimentel
Contributor
 
Posts: 1300
Joined: Wed Sep 19, 2007 5:09 pm

Re: Nightshade Nuke ( live like patch)

Postby Sand » Wed Aug 11, 2010 9:20 am

Spell piercing affects resists does not allow you to go above cap which is why I quoted cap values (3 times delve plus spell damage and mom). At least that is my understanding of ability as the reason it didn't work in pve was that it only reduces resists from items and mobs don't have items.

I wasn't taking into account crit, I thought they were talking about a single shot, but still for rvr crit is 50% of main damage so still not getting over 600 for one spell.

So if maybe they were talking 650 for two spells, now that is doable and maybe that is what they were talking about, firing off the castable and the insta for a combined damage of 650ish.
Sand
Server Team
 
Posts: 1375
Joined: Sat May 17, 2008 2:05 am


Return to “%s” DOL Code Contributions

Who is online

Users browsing this forum: No registered users and 1 guest