[Accepted] Shield Swipe !.!

A place to submit .patch fixes for the DOL SVN

Moderator: Developer Team

Re: Shield Swipe !.!

Postby Yemla » Mon Feb 08, 2010 10:39 pm

sounds like MoBlocking 5 and MoPain 5 sounds like fun..so basicly ML5 offensive proc would be very sexii to use in this case on a lurikeen hero xo? def. def. checking this on pendragon by pulling massive greens just to test it, like 30greens/blues and check if it hit all, if it did then imma be a believer xP hehe
Yemla
Contributor
 
Posts: 215
Joined: Sat Feb 02, 2008 3:21 am
Website: http://www.facebook.com/J.D.Snelling
Location: California

Re: Shield Swipe !.!

Postby Crazys » Tue Feb 09, 2010 9:29 pm

Luri/kobis/
15 dex on creation ;) 10 str (for dmaamge on mainhand


But actually
Mob5 + Moparry = no dammage intake ;)
+10% pve block
Crazys
Contributor
 
Posts: 346
Joined: Tue Nov 07, 2006 10:18 pm

Re: Shield Swipe !.!

Postby Crazys » Thu Jun 03, 2010 1:08 pm

What is the Status of This?

Is Shield Swipe / Savage Muti Hit working properly in the DoL Core?

Thanks,
Crazys
Crazys
Contributor
 
Posts: 346
Joined: Tue Nov 07, 2006 10:18 pm

Re: Shield Swipe !.!

Postby Tired » Thu Jun 03, 2010 7:40 pm

Negative....
Database problem? Yea I can fix that.
User avatar
Tired
Server Team
 
Posts: 518
Joined: Thu Apr 20, 2006 5:29 am
Location: United States

Re: Shield Swipe !.!

Postby Yemla » Sat Nov 20, 2010 11:44 pm

Bump!!!

Crazys wrote:most i've had was about 200ish on live...

Shield hits target
weapon hits all others with standswing
which is why Omnis swords from dragons or crafted are awsome for the LT/endo heal
or DF diamond hammers for the AE dd proc off the weapon
Its amazing... Lets do this... You have 101 mobs on you. You swing and hit target with shield. so thats 100 mainhand swings... you hit 80 with your wep that has a 5% proc rate thats 4 ae procs
So your 70-125 dammge per mob from swing +
4x 75-100 proc damamge
you just did 400-500 damage per mob per swing!

Code: Select all
switch (ad.AttackResult)
            {
                case eAttackResult.Blocked:
                case eAttackResult.Fumbled:
                case eAttackResult.HitStyle:
                case eAttackResult.HitUnstyled:
                case eAttackResult.Missed:
                case eAttackResult.Parried:
                    //Condition percent can reach 70%
                    //durability percent can reach zero
                    // if item durability reachs 0, item is useless and become broken item

                    if (weapon != null && weapon is GameInventoryItem)
                    {
                        (weapon as GameInventoryItem).OnStrikeTarget(this, target);
                    }
                    //Camouflage
                    if (target is GamePlayer && HasAbility(Abilities.Camouflage))
                    {
                        CamouflageEffect camouflage = (CamouflageEffect)EffectList.GetOfType(typeof(CamouflageEffect));
                        if (camouflage != null)
                        {
                            DisableSkill(SkillBase.GetAbility(Abilities.Camouflage), CamouflageSpecHandler.DISABLE_DURATION);
                            camouflage.Cancel(false);
                        }
                    }
                    //Savagery targets
                    if (ad.AttackResult == eAttackResult.HitStyle)
                    {
                        byte targetToHit = 0;
                        int random;
                        IList targets = new ArrayList(1);
                        IList list = new ArrayList(1);
                        InventoryItem attackWeapon = AttackWeapon;
                        InventoryItem leftWeapon = (Inventory == null) ? null : Inventory.GetItem(eInventorySlot.LeftHandWeapon);
                        switch (style.ID)
                        {
                            case 374: targetToHit = 1; break; //Tribal Assault:   Hits 2 targets
                            case 377: targetToHit = 1; break; //Clan's Might:      Hits 2 targets
                            case 379: targetToHit = 2; break; //Totemic Wrath:      Hits 3 targets
                            case 384: targetToHit = 3; break; //Totemic Sacrifice:   Hits 4 targets
                            case 600: targetToHit = 100; break; //Shield Swipe: No Cap on Targets
                            default: targetToHit = 0; break; //For others;
                        }
                        if (targetToHit > 0)
                        {
                            if (style.ID != 600)
                            {
                                foreach (GamePlayer pl in GetPlayersInRadius(false, (ushort)AttackRange))
                                {
                                    if (pl == null) continue;
                                    if (GameServer.ServerRules.IsAllowedToAttack(this, pl, true))
                                    {
                                        list.Add(pl);
                                    }
                                }
                                foreach (GameNPC npc in GetNPCsInRadius(false, (ushort)AttackRange))
                                {
                                    if (GameServer.ServerRules.IsAllowedToAttack(this, npc, true))
                                    {
                                        list.Add(npc);
                                    }
                                }
                                list.Remove(target);
                                if (list.Count > 1)
                                    while (targets.Count < targetToHit)
                                    {
                                        random = Util.Random(list.Count - 1);
                                        if (!targets.Contains(list[random]))
                                            targets.Add(list[random] as GameObject);
                                    }
                                foreach (GameObject obj in targets)
                                {
                                    if (obj is GamePlayer && ((GamePlayer)obj).IsSitting)
                                    {
                                        effectiveness *= 2;
                                    }
                                    new WeaponOnTargetAction(this, obj as GameObject, attackWeapon, leftWeapon, CalculateLeftHandSwingCount(), effectiveness, AttackSpeed(attackWeapon), null).Start(1);  // really start the attack
                                }
                            }
                            else
                            {
                                foreach (GameNPC npc in GetNPCsInRadius(false, (ushort)AttackRange))
                                {
                                    if (GameServer.ServerRules.IsAllowedToAttack(this, npc, true))
                                    {
                                        list.Add(npc);
                                    }
                                }
                                list.Remove(target);
                                if (list.Count > 1)
                                    while (targets.Count < targetToHit)
                                    {
                                        random = Util.Random(list.Count - 1);
                                        if (!targets.Contains(list[random]))
                                            targets.Add(list[random] as GameObject);
                                    }
                                foreach (GameNPC obj in targets)
                                {
                                    if (obj != ad.Target)
                                        this.MakeAttack(obj, attackWeapon, null, 1, ServerProperties.Properties.SPELL_INTERRUPT_DURATION, false, false);
                                }
                            }
                        }
                    }
                    break;
            }
            return ad;
        }




As far as i've heard...Shield Swipe just does damage with your ActiveMainhand weapon to anything in radius (i made it 100cap atm) but it only Targets GameNPCs
Yemla
Contributor
 
Posts: 215
Joined: Sat Feb 02, 2008 3:21 am
Website: http://www.facebook.com/J.D.Snelling
Location: California

Re: Shield Swipe !.!

Postby Graveen » Sun Nov 21, 2010 1:41 pm

TY Mate, can you make us a patch ?

/bow

edit: or commit the changes yourself.
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: Shield Swipe !.!

Postby Yemla » Sun Nov 21, 2010 5:42 pm

i have like 1000s and 1000s of custom code in GamePlayer now so i had to patch it, it looks clean as far as i can tell but if it doesn't look perfect i can just make a Commition only folder if you'd like and svn commit?



Don't forget you have to remove in StylexSpell,

StyleXSpell_ID | SpellID |ClassID | SpellID | Chance
shieldswipe | 49990 | 0 | 600 | 100


otherwise it will stick have a DD proc which is a no-no
Attachments
ShieldSwipe.patch
(9.84 KiB) Downloaded 28 times
Yemla
Contributor
 
Posts: 215
Joined: Sat Feb 02, 2008 3:21 am
Website: http://www.facebook.com/J.D.Snelling
Location: California

Re: Shield Swipe !.!

Postby stephenxpimentel » Thu Nov 25, 2010 4:21 pm

another thing - when testing code to put into the SVN - make sure that it works in an up-to-date ONLY svn, custom code could bork its effects. like u said, an svn commit only source.
Lets have some fun.
stephenxpimentel
Contributor
 
Posts: 1300
Joined: Wed Sep 19, 2007 5:09 pm

Re: Shield Swipe !.!

Postby Graveen » Mon Dec 06, 2010 8:15 pm

Accepted, Thank you, soon in SVN !
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: [Accepted] Shield Swipe !.!

Postby -Shawn- » Tue Dec 07, 2010 12:53 pm

Graveen, I tested this code don't accept it... timers go crazy and freezes server when shield swipe is used on an npc
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: [Accepted] Shield Swipe !.!

Postby geshi » Tue Dec 07, 2010 1:02 pm

Code: Select all
                          if (list.Count > 1)
                                    while (targets.Count < targetToHit)
                                    {
                                        random = Util.Random(list.Count - 1);
                                        if (!targets.Contains(list[random]))
                                            targets.Add(list[random] as GameObject);
                                    }



This is bad.....

targetToHit = 100 (because it's Shield Swipe), but if there is not >100 targets in AttackRange then the while loop will go round and round and round and round and round till it goes B0000000M :twisted:
geshi
Contributor
 
Posts: 1826
Joined: Tue Oct 21, 2008 9:16 pm

Re: [Accepted] Shield Swipe !.!

Postby Graveen » Tue Dec 07, 2010 1:17 pm

Thanks guys, obviously i missed the point in Yemla's code
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: [Accepted] Shield Swipe !.!

Postby Tolakram » Tue Dec 07, 2010 1:29 pm

Untested fix just committed. Someone test.


My god this code sucks.
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: [Accepted] Shield Swipe !.!

Postby Graveen » Tue Dec 07, 2010 3:01 pm

Question: if you quad hit (or triple hit, or double hit):

- you hit for the same damages as base hit ?
- you hit at the same location or you can hit base hit head, additional torso ?
- you can critical each additional hit, or you can only critical the base hit ?
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


Return to “%s” DOL Code Contributions

Who is online

Users browsing this forum: No registered users and 1 guest