{"action":"created","comment":{"url":"https://api.github.com/repos/aura-project/aura/pulls/comments/71990824","id":71990824,"diff_hunk":"@@ -0,0 +1,496 @@\n+﻿// Copyright (c) Aura development team - Licensed under GNU GPL\n+// For more information, see license file in the main folder\n+\n+using Aura.Channel.Network.Sending;\n+using Aura.Channel.Skills.Base;\n+using Aura.Channel.Skills.Magic;\n+using Aura.Channel.Skills.Combat;\n+using Aura.Channel.World;\n+using Aura.Channel.World.Entities;\n+using Aura.Data.Database;\n+using Aura.Mabi.Const;\n+using Aura.Mabi.Network;\n+using Aura.Shared.Network;\n+using Aura.Shared.Util;\n+using System.Drawing;\n+using System;\n+using System.Collections.Generic;\n+using System.Linq;\n+using System.Text;\n+using System.Threading.Tasks;\n+\n+namespace Aura.Channel.Skills.Guns\n+{\n+\t/// <summary>\n+\t/// Bullet Storm skill handler\n+\t/// </summary>\n+\t/// Var1: Initial Bullet Use\n+\t/// Var2: Damage Per Shot\n+\t/// Var5: Max Targets\n+\t/// Var6: Attack Spread (Width)\n+\t/// Var7: Attack Range (Length)\n+\t/// Var8: Maximum Damage\n+\t[Skill(SkillId.BulletStorm)]\n+\tpublic class BulletStorm : ISkillHandler, IPreparable, IReadyable, IUseable, ICancelable, IInitiableSkillHandler\n+\t{\n+\t\t/// <summary>\n+\t\t/// Bullet Count Tag for Gun\n+\t\t/// </summary>\n+\t\tprivate const string BulletCountTag = \"GVBC\";\n+\n+\t\t/// <summary>\n+\t\t/// Max Bullets for Gun\n+\t\t/// </summary>\n+\t\tprivate const string BulletsMaxTag = \"BulletsMax\";\n+\n+\t\t/// <summary>\n+\t\t/// Attacker's stun upon using the skill\n+\t\t/// </summary>\n+\t\tprivate const int AttackerStun = 0;\n+\n+\t\t/// <summary>\n+\t\t/// Target's stun after getting hit\n+\t\t/// </summary>\n+\t\tprivate const int TargetStun = 4000;\n+\n+\t\t/// <summary>\n+\t\t/// Distance target gets knocked back\n+\t\t/// </summary>\n+\t\tprivate const int KnockbackDistance = 200;\n+\n+\t\t/// <summary>\n+\t\t/// Target's stability reduction\n+\t\t/// </summary>\n+\t\tprivate const int StabilityReduction = 10;\n+\n+\t\t/// <summary>\n+\t\t/// Subscribes handlers to events required for training.\n+\t\t/// </summary>\n+\t\tpublic void Init()\n+\t\t{\n+\t\t\tChannelServer.Instance.Events.CreatureAttackedByPlayer += this.OnCreatureAttackedByPlayer;\n+\t\t\tChannelServer.Instance.Events.CreatureAttacks += this.OnCreatureAttacks;\n+\t\t}\n+\n+\t\t/// <summary>\n+\t\t/// Prepares the skill\n+\t\t/// </summary>\n+\t\t/// <param name=\"creature\"></param>\n+\t\t/// <param name=\"skill\"></param>\n+\t\t/// <param name=\"packet\"></param>\n+\t\t/// <returns></returns>\n+\t\tpublic bool Prepare(Creature creature, Skill skill, Packet packet)\n+\t\t{\n+\t\t\tif (creature.RightHand == null)\n+\t\t\t\tSend.SkillPrepareSilentCancel(creature, skill.Info.Id);\n+\n+\t\t\t// Set Bullet Count Tag if it doesn't exist\n+\t\t\tif (!creature.RightHand.MetaData1.Has(BulletCountTag))\n+\t\t\t{\n+\t\t\t\tcreature.RightHand.MetaData1.SetShort(BulletCountTag, 0);\n+\t\t\t\tSend.ItemUpdate(creature, creature.RightHand);\n+\t\t\t}\n+\n+\t\t\t// Check Bullet Count\n+\t\t\tvar bulletCount = creature.RightHand.MetaData1.GetShort(BulletCountTag);\n+\t\t\tif (bulletCount < skill.RankData.Var1 && !creature.Conditions.Has(ConditionsD.WayOfTheGun))\n+\t\t\t\tSend.SkillPrepareSilentCancel(creature, skill.Info.Id);\n+\n+\t\t\tcreature.StopMove();\n+\n+\t\t\tSend.UseMotion(creature, 131, 2, false, false);\n+\n+\t\t\tSend.SkillPrepare(creature, skill.Info.Id, skill.GetCastTime());\n+\n+\t\t\treturn true;\n+\t\t}\n+\n+\t\t/// <summary>\n+\t\t/// Readies the skill\n+\t\t/// </summary>\n+\t\t/// <param name=\"creature\"></param>\n+\t\t/// <param name=\"skill\"></param>\n+\t\t/// <param name=\"packet\"></param>\n+\t\t/// <returns></returns>\n+\t\tpublic bool Ready(Creature creature, Skill skill, Packet packet)\n+\t\t{\n+\t\t\tskill.Stacks = 1;\n+\t\t\tSend.SkillReady(creature, skill.Info.Id);\n+\n+\t\t\treturn true;\n+\t\t}\n+\n+\t\t/// <summary>\n+\t\t/// Uses the skill\n+\t\t/// </summary>\n+\t\t/// <param name=\"creature\"></param>\n+\t\t/// <param name=\"skill\"></param>\n+\t\t/// <param name=\"packet\"></param>\n+\t\tpublic void Use(Creature attacker, Skill skill, Packet packet)\n+\t\t{\n+\t\t\tvar targetAreaId = packet.GetLong();\n+\t\t\tvar targetAreaLoc = new Location(targetAreaId);\n+\t\t\tvar targetAreaPos = new Position(targetAreaLoc.X, targetAreaLoc.Y);\n+\n+\t\t\tattacker.StopMove(); // Unnecessary at the moment, but who knows.\n+\t\t\tattacker.Lock(Locks.Walk | Locks.Run);\n+\n+\t\t\tvar attackerPos = attacker.GetPosition();\n+\n+\t\t\tSend.SkillUse(attacker, skill.Info.Id, targetAreaId, 0, 1);\n+\t\t\tskill.Stacks = 0;\n+\n+\t\t\t// Distance & Radius\n+\t\t\tvar distance = skill.RankData.Var7;\n+\t\t\tvar radius = skill.RankData.Var6;\n+\n+\t\t\tvar attackerToTargetPointDist = attackerPos.GetDistance(targetAreaPos);\n+\t\t\tvar newTargetPosition = attackerPos.GetRelative(targetAreaPos, (int)(distance - attackerToTargetPointDist)); // Get position for use of true rectangle distance\n+\n+\t\t\t// Center Points Calculation\n+\t\t\tvar attackerPoint = new Point(attackerPos.X, attackerPos.Y);\n+\t\t\tvar targetPoint = new Point(newTargetPosition.X, newTargetPosition.Y);\n+\n+\t\t\tvar pointDist = Math.Sqrt((distance * distance) + (radius * radius)); // Pythagorean Theorem - Distance between point and opposite side's center.\n+\t\t\tvar rotationAngle = Math.Asin(radius / pointDist);\n+\n+\t\t\t// Calculate Points 1 & 2\n+\t\t\tvar posTemp1 = attackerPos.GetRelative(newTargetPosition, (int)(pointDist - distance));\n+\t\t\tvar pointTemp1 = new Point(posTemp1.X, posTemp1.Y);\n+\t\t\tvar p1 = this.RotatePoint(pointTemp1, attackerPoint, rotationAngle);\n+\t\t\tvar p2 = this.RotatePoint(pointTemp1, attackerPoint, (rotationAngle * -1));\n+\n+\t\t\t// Calculate Points 3 & 4\n+\t\t\tvar posTemp2 = newTargetPosition.GetRelative(attackerPos, (int)(pointDist - distance));\n+\t\t\tvar pointTemp2 = new Point(posTemp2.X, posTemp2.Y);\n+\t\t\tvar p3 = this.RotatePoint(pointTemp2, targetPoint, rotationAngle);\n+\t\t\tvar p4 = this.RotatePoint(pointTemp2, targetPoint, (rotationAngle * -1));\n+\n+\t\t\t// Prepare attacker action\n+\t\t\tvar cap = new CombatActionPack(attacker, skill.Info.Id);\n+\n+\t\t\tvar aAction = new AttackerAction(CombatActionType.SpecialHit, attacker, targetAreaId);\n+\t\t\taAction.Set(AttackerOptions.UseEffect | AttackerOptions.KnockBackHit1);\n+\t\t\tcap.Add(aAction);\n+\n+\t\t\taAction.Stun = AttackerStun;\n+\n+\t\t\t// Get targets in descending order for effect packet using bulletDist\n+\t\t\tvar targets = attacker.Region.GetCreaturesInPolygon(p1, p2, p3, p4).Where(x => attacker.CanTarget(x) && !attacker.Region.Collisions.Any(attackerPos, x.GetPosition())).OrderByDescending(x => x.GetPosition().GetDistance(attackerPos)).Reverse().ToList();\n+\n+\t\t\t// Filter by max targets [var5] and bullet count\n+\t\t\tvar bulletCount = attacker.RightHand.MetaData1.GetShort(BulletCountTag);\n+\n+\t\t\tif (attacker.Conditions.Has(ConditionsD.WayOfTheGun))\n+\t\t\t\tbulletCount = attacker.RightHand.MetaData1.GetShort(BulletsMaxTag);\n+\n+\t\t\tvar maxTargetsBulletCount = (int)Math.Floor((decimal)(bulletCount / 4));\n+\n+\t\t\tif (maxTargetsBulletCount < skill.RankData.Var5)\n+\t\t\t{\n+\t\t\t\ttargets = targets.Take(maxTargetsBulletCount).ToList();\n+\t\t\t}\n+\t\t\telse if (maxTargetsBulletCount >= skill.RankData.Var5)\n+\t\t\t{\n+\t\t\t\ttargets = targets.Take((int)skill.RankData.Var5).ToList();\n+\t\t\t}\n+\n+\t\t\t// Effects & Etc\n+\t\t\tvar shootEffect = new Packet(Op.Effect, attacker.EntityId);\n+\t\t\tshootEffect.PutInt(Effect.BulletTrail).PutShort((short)skill.Info.Id).PutInt(95).PutShort((short)targets.Count);\n+\t\t\tvar bulletDist = -380;\n+\t\t\tvar totalDelay = 0;\n+\n+\t\t\t// Following the pattern of effect ids, may be bullet storm motion... But it doesn't work?\n+\t\t\t// Also changed parameter count between two logs of bullet storm. Is this because of the target count?\n+\t\t\tSend.Effect(attacker, 335, (byte)1, (byte)1, (short)131, (short)3, 1140, (byte)2, (short)433, (short)1133); // ?\n+\n+\t\t\tSend.UseMotion(attacker, 131, 3, true, false); // Bullet Storm shooting motion\n+\n+\t\t\tvar rnd = RandomProvider.Get();\n+\n+\t\t\t// Check crit\n+\t\t\tvar crit = false;\n+\t\t\tif (attacker.Skills.Has(SkillId.CriticalHit, SkillRank.RF))\n+\t\t\t{\n+\t\t\t\tvar dgm = attacker.Skills.Get(SkillId.DualGunMastery);\n+\t\t\t\tvar extraCritChance = (dgm == null ? 0 : dgm.RankData.Var6);\n+\t\t\t\tvar critChance = attacker.GetRightCritChance(0) + extraCritChance;\n+\t\t\t\tcrit = (rnd.Next(100) < critChance);\n+\t\t\t}\n+\n+\t\t\t// Prepare target actions\n+\t\t\tforeach (var target in targets)\n+\t\t\t{\n+\t\t\t\tvar tAction = new TargetAction(CombatActionType.TakeHit, target, attacker, SkillId.CombatMastery);\n+\t\t\t\ttAction.Set(TargetOptions.Result | TargetOptions.MultiHit);\n+\t\t\t\ttAction.AttackerSkillId = skill.Info.Id;\n+\t\t\t\ttAction.MultiHitCount = 4;\n+\t\t\t\ttAction.MultiHitInterval = 95;\n+\t\t\t\ttAction.MultiHitUnk1 = 0; // Explicitly set until MultiHit options are fully understood.\n+\t\t\t\ttAction.MultiHitUnk2 = 421075482; // Explicitly set until MultiHit options are fully understood.\n+\t\t\t\tcap.Add(tAction);\n+\n+\t\t\t\t/// Damage is calculated as (Skill Rank Damage per Target [var2 (for 4 bullets?)] * Number of Targets)\n+\t\t\t\t/// However, if the target count >= 5, damage is set to max damage [var8].\n+\t\t\t\tvar damage = 0f;\n+\t\t\t\tif (targets.Count >= 5)\n+\t\t\t\t{\n+\t\t\t\t\tdamage = (attacker.GetRndDualGunDamage() * (skill.RankData.Var8 / 100f));\n+\t\t\t\t}\n+\t\t\t\telse\n+\t\t\t\t{\n+\t\t\t\t\tdamage = (attacker.GetRndDualGunDamage() * (skill.RankData.Var2 / 100f)) * targets.Count; // Is 4 bullets needed? Damage Per Shot can be taken in many ways...\n+\t\t\t\t}\n+\n+\t\t\t\t// Master Title\n+\t\t\t\tif (attacker.Titles.SelectedTitle == skill.Data.MasterTitle)\n+\t\t\t\t{\n+\t\t\t\t\tif (targets.Count >= 5)\n+\t\t\t\t\t\tdamage = (attacker.GetRndDualGunDamage() * ((skill.RankData.Var8 + 15) / 100f)); // +15% Max Damage\n+\t\t\t\t}\n+\n+\t\t\t\t// Critical Hit\n+\t\t\t\tif (crit)\n+\t\t\t\t\tCriticalHit.Handle(attacker, 100, ref damage, tAction);\n+\n+\t\t\t\t// Defense and Prot\n+\t\t\t\tSkillHelper.HandleDefenseProtection(target, ref damage);\n+\n+\t\t\t\t// Defense (Skill)\n+\t\t\t\tDefense.Handle(aAction, tAction, ref damage);\n+\n+\t\t\t\t// Natural Shield\n+\t\t\t\tNaturalShield.Handle(attacker, target, ref damage, tAction);\n+\n+\t\t\t\t// Mana Shield\n+\t\t\t\tManaShield.Handle(target, ref damage, tAction);\n+\n+\t\t\t\t// Apply Damage\n+\t\t\t\ttarget.TakeDamage(tAction.Damage = damage, attacker);\n+\n+\t\t\t\t// Aggro\n+\t\t\t\ttarget.Aggro(attacker);\n+\n+\t\t\t\t// Stun Time\n+\t\t\t\ttAction.Stun = TargetStun;\n+\n+\t\t\t\t// Death or Knockback\n+\t\t\t\tif (target.IsDead)\n+\t\t\t\t{\n+\t\t\t\t\ttAction.Set(TargetOptions.FinishingKnockDown);\n+\t\t\t\t\tattacker.Shove(target, KnockbackDistance);\n+\t\t\t\t}\n+\t\t\t\telse\n+\t\t\t\t{\n+\t\t\t\t\t// Reduce Stability if not knocked down\n+\t\t\t\t\tif (!target.IsKnockedDown)\n+\t\t\t\t\t{\n+\t\t\t\t\t\ttarget.Stability -= StabilityReduction;\n+\t\t\t\t\t}\n+\n+\t\t\t\t\t// Knock down if needed\n+\t\t\t\t\tif (target.IsUnstable)\n+\t\t\t\t\t{\n+\t\t\t\t\t\tif (target.Is(RaceStands.KnockDownable))\n+\t\t\t\t\t\t{\n+\t\t\t\t\t\t\ttAction.Set(TargetOptions.KnockDown);\n+\t\t\t\t\t\t\tattacker.Shove(target, KnockbackDistance);\n+\t\t\t\t\t\t}\n+\t\t\t\t\t}\n+\t\t\t\t\telse if (target.Is(RaceStands.KnockBackable)) // Always knock back\n+\t\t\t\t\t{\n+\t\t\t\t\t\ttAction.Set(TargetOptions.KnockBack);\n+\t\t\t\t\t\tattacker.Shove(target, KnockbackDistance);\n+\t\t\t\t\t}\n+\t\t\t\t\ttAction.Creature.Stun = tAction.Stun;\n+\t\t\t\t}\n+\n+\t\t\t\tbulletDist += 380;\n+\t\t\t\ttotalDelay += 380;\n+\t\t\t\ttAction.Delay = bulletDist;\n+\t\t\t\tshootEffect.PutInt(bulletDist).PutLong(target.EntityId);\n+\n+\t\t\t\tTask.Delay(bulletDist).ContinueWith(_ =>\n+\t\t\t\t{\n+\t\t\t\t\tattacker.TurnTo(target.GetPosition());\n+\t\t\t\t});\n+\t\t\t}\n+\t\t\taAction.Creature.Stun = aAction.Stun;\n+\t\t\tcap.Handle();\n+\n+\t\t\tattacker.Region.Broadcast(shootEffect, attacker);\n+\n+\t\t\t// Item Update excluding Way Of The Gun\n+\t\t\tif (!attacker.Conditions.Has(ConditionsD.WayOfTheGun))\n+\t\t\t{\n+\t\t\t\tbulletCount -= (short)(targets.Count * 4);\n+\t\t\t\tattacker.RightHand.MetaData1.SetShort(BulletCountTag, bulletCount);\n+\t\t\t\tSend.ItemUpdate(attacker, attacker.RightHand);\n+\t\t\t}\n+\n+\t\t\tTask.Delay(totalDelay).ContinueWith(__ =>\n+\t\t\t{\n+\t\t\t\tSend.UseMotion(attacker, 131, 4, false, false); // Bullet Storm ending motion\n+\t\t\t});\n+\n+\t\t\tthis.Complete(attacker, skill, packet);\n+\t\t}\n+\n+\t\t/// <summary>\n+\t\t/// Completes the skill\n+\t\t/// </summary>\n+\t\t/// <param name=\"creature\"></param>\n+\t\t/// <param name=\"skill\"></param>\n+\t\t/// <param name=\"packet\"></param>\n+\t\tpublic void Complete(Creature creature, Skill skill, Packet packet)\n+\t\t{\n+\t\t\tSend.SkillComplete(creature, skill.Info.Id);\n+\t\t\tcreature.Skills.ActiveSkill = null;\n+\n+\t\t\t// Unlock Leftover Locks\n+\t\t\tcreature.Unlock(Locks.Walk | Locks.Run | Locks.PickUpAndDrop | Locks.TalkToNpc);\n+\t\t}\n+\n+\t\t/// <summary>\n+\t\t/// Cancels the skill\n+\t\t/// </summary>\n+\t\t/// <param name=\"creature\"></param>\n+\t\t/// <param name=\"skill\"></param>\n+\t\tpublic void Cancel(Creature creature, Skill skill)\n+\t\t{\n+\t\t\tSend.MotionCancel2(creature, 0);\n+\t\t}\n+\n+\t\t/// <summary>\n+\t\t/// Training, called when someone attacks something.\n+\t\t/// </summary>\n+\t\t/// <param name=\"action\"></param>\n+\t\tpublic void OnCreatureAttackedByPlayer(TargetAction action)\n+\t\t{\n+\t\t\t// Guns use Combat Mastery as TargetAction skill, so check for AttackerAction skill\n+\t\t\tif (action.AttackerSkillId != SkillId.BulletStorm)\n+\t\t\t\treturn;\n+\n+\t\t\t// Get skill\n+\t\t\tvar attackerSkill = action.Attacker.Skills.Get(SkillId.BulletStorm);\n+\t\t\tif (attackerSkill == null) return; // Should be impossible.\n+\n+\t\t\t// Get targets\n+\t\t\tvar targets = action.Pack.GetTargets();\n+\n+\t\t\t// Learning by attacking\n+\t\t\tswitch (attackerSkill.Info.Rank)\n+\t\t\t{\n+\t\t\t\tcase SkillRank.RF:\n+\t\t\t\t\tattackerSkill.Train(1); // Attack an enemy\n+\t\t\t\t\tif (action.Creature.IsDead) attackerSkill.Train(2); // Finishing Blow\n+\t\t\t\t\tbreak;\n+\n+\t\t\t\tcase SkillRank.RE:\n+\t\t\t\tcase SkillRank.RD:\n+\t\t\t\tcase SkillRank.RC:\n+\t\t\t\tcase SkillRank.RB:\n+\t\t\t\tcase SkillRank.RA:\n+\t\t\t\tcase SkillRank.R9:\n+\t\t\t\tcase SkillRank.R8:\n+\t\t\t\tcase SkillRank.R7:\n+\t\t\t\tcase SkillRank.R6:\n+\t\t\t\tcase SkillRank.R5:\n+\t\t\t\tcase SkillRank.R4:\n+\t\t\t\tcase SkillRank.R3:\n+\t\t\t\tcase SkillRank.R2:\n+\t\t\t\tcase SkillRank.R1:\n+\t\t\t\t\tattackerSkill.Train(1); // Attack an enemy\n+\t\t\t\t\tif (action.Creature.IsDead) attackerSkill.Train(2); // Finishing Blow\n+\t\t\t\t\tif (action.Has(TargetOptions.Critical)) attackerSkill.Train(3); // Critical Hit\n+\t\t\t\t\tbreak;\n+\t\t\t}\n+\t\t}\n+\n+\t\t/// <summary>\n+\t\t/// Training, called when a creature attacks another creature(s)\n+\t\t/// </summary>\n+\t\t/// <param name=\"aAction\"></param>\n+\t\tpublic void OnCreatureAttacks(AttackerAction aAction)\n+\t\t{\n+\t\t\t// Guns use Combat Mastery as TargetAction skill, so check for AttackerAction skill\n+\t\t\tif (aAction.SkillId != SkillId.BulletStorm)\n+\t\t\t\treturn;\n+\n+\t\t\t// Get skill\n+\t\t\tvar attackerSkill = aAction.Creature.Skills.Get(SkillId.BulletStorm);\n+\t\t\tif (attackerSkill == null) return; // Should be impossible.\n+\n+\t\t\t// Get targets\n+\t\t\tvar targets = aAction.Pack.GetTargets();\n+\n+\t\t\t// Learning by attacking\n+\t\t\tswitch (attackerSkill.Info.Rank)\n+\t\t\t{\n+\t\t\t\tcase SkillRank.RF:\n+\t\t\t\t\tbreak;\n+\n+\t\t\t\tcase SkillRank.RE:\n+\t\t\t\t\tbreak;\n+\n+\t\t\t\tcase SkillRank.RD:\n+\t\t\t\t\tif (targets.Length >= 3) attackerSkill.Train(4); // 3 or more enemies\n+\t\t\t\t\tbreak;\n+\n+\t\t\t\tcase SkillRank.RC:\n+\t\t\t\tcase SkillRank.RB:\n+\t\t\t\t\tif (targets.Length >= 4) attackerSkill.Train(4); // 4 or more enemies\n+\t\t\t\t\tbreak;\n+\n+\t\t\t\tcase SkillRank.RA:\n+\t\t\t\t\tif (targets.Length >= 5) attackerSkill.Train(4); // 5 or more enemies\n+\t\t\t\t\tbreak;\n+\n+\t\t\t\tcase SkillRank.R9:\n+\t\t\t\tcase SkillRank.R8:\n+\t\t\t\t\tif (targets.Length >= 5) attackerSkill.Train(4); // 5 or more enemies\n+\t\t\t\t\tif (targets.Length >= 6) attackerSkill.Train(5); // 6 more more enemies\n+\t\t\t\t\tbreak;\n+\n+\t\t\t\tcase SkillRank.R7:\n+\t\t\t\t\tif (targets.Length >= 5) attackerSkill.Train(4); // 5 or more enemies\n+\t\t\t\t\tif (targets.Length >= 7) attackerSkill.Train(5); // 7 or mroe enemies\n+\t\t\t\t\tbreak;\n+\n+\t\t\t\tcase SkillRank.R6:\n+\t\t\t\t\tif (targets.Length >= 6) attackerSkill.Train(4); // 6 or more enemies\n+\t\t\t\t\tif (targets.Length >= 7) attackerSkill.Train(5); // 7 ore more enemies\n+\t\t\t\t\tbreak;\n+\n+\t\t\t\tcase SkillRank.R5:\n+\t\t\t\tcase SkillRank.R4:\n+\t\t\t\t\tif (targets.Length >= 6) attackerSkill.Train(4); // 6 or more enemies\n+\t\t\t\t\tif (targets.Length >= 8) attackerSkill.Train(5); // 8 or more enemies\n+\t\t\t\t\tbreak;\n+\n+\t\t\t\tcase SkillRank.R3:\n+\t\t\t\tcase SkillRank.R2:\n+\t\t\t\t\tif (targets.Length >= 6) attackerSkill.Train(4); // 6 or more enemies\n+\t\t\t\t\tif (targets.Length >= 9) attackerSkill.Train(5); // 9 or more enemies\n+\t\t\t\t\tbreak;\n+\n+\t\t\t\tcase SkillRank.R1:\n+\t\t\t\t\tif (targets.Length >= 6) attackerSkill.Train(4); // 6 or more enemies\n+\t\t\t\t\tif (targets.Length >= 10) attackerSkill.Train(5); // 10 or more enemies\n+\t\t\t\t\tbreak;\n+\t\t\t}\n+\t\t}\n+\n+\t\tprivate Point RotatePoint(Point point, Point pivot, double radians)","path":"src/ChannelServer/Skills/Guns/BulletStorm.cs","position":485,"original_position":485,"commit_id":"af8510ad6937ff99292b02751ea0632c0cfdc130","original_commit_id":"af8510ad6937ff99292b02751ea0632c0cfdc130","user":{"login":"exectails","id":5593920,"avatar_url":"https://avatars.githubusercontent.com/u/5593920?v=3","gravatar_id":"","url":"https://api.github.com/users/exectails","html_url":"https://github.com/exectails","followers_url":"https://api.github.com/users/exectails/followers","following_url":"https://api.github.com/users/exectails/following{/other_user}","gists_url":"https://api.github.com/users/exectails/gists{/gist_id}","starred_url":"https://api.github.com/users/exectails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exectails/subscriptions","organizations_url":"https://api.github.com/users/exectails/orgs","repos_url":"https://api.github.com/users/exectails/repos","events_url":"https://api.github.com/users/exectails/events{/privacy}","received_events_url":"https://api.github.com/users/exectails/received_events","type":"User","site_admin":false},"body":"We're already using this method in two skills in the core, we should probably move it somewhere for skills to use.","created_at":"2016-07-24T15:46:57Z","updated_at":"2016-07-24T15:46:57Z","html_url":"https://github.com/aura-project/aura/pull/333#discussion_r71990824","pull_request_url":"https://api.github.com/repos/aura-project/aura/pulls/333","_links":{"self":{"href":"https://api.github.com/repos/aura-project/aura/pulls/comments/71990824"},"html":{"href":"https://github.com/aura-project/aura/pull/333#discussion_r71990824"},"pull_request":{"href":"https://api.github.com/repos/aura-project/aura/pulls/333"}}},"pull_request":{"url":"https://api.github.com/repos/aura-project/aura/pulls/333","id":75585764,"html_url":"https://github.com/aura-project/aura/pull/333","diff_url":"https://github.com/aura-project/aura/pull/333.diff","patch_url":"https://github.com/aura-project/aura/pull/333.patch","issue_url":"https://api.github.com/repos/aura-project/aura/issues/333","number":333,"state":"open","locked":false,"title":"Dual Gun Skills added","user":{"login":"xeroplz","id":8395686,"avatar_url":"https://avatars.githubusercontent.com/u/8395686?v=3","gravatar_id":"","url":"https://api.github.com/users/xeroplz","html_url":"https://github.com/xeroplz","followers_url":"https://api.github.com/users/xeroplz/followers","following_url":"https://api.github.com/users/xeroplz/following{/other_user}","gists_url":"https://api.github.com/users/xeroplz/gists{/gist_id}","starred_url":"https://api.github.com/users/xeroplz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xeroplz/subscriptions","organizations_url":"https://api.github.com/users/xeroplz/orgs","repos_url":"https://api.github.com/users/xeroplz/repos","events_url":"https://api.github.com/users/xeroplz/events{/privacy}","received_events_url":"https://api.github.com/users/xeroplz/received_events","type":"User","site_admin":false},"body":"- Adds all Dual Gun skills\r\n- Adds bulletsMax entries in the item database for guns\r\n- Adds partial support for MultiHit TargetOptions","created_at":"2016-06-29T04:08:30Z","updated_at":"2016-07-24T15:46:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1a6f60ae1f161dfcc6825ff796dff9c75f1acf62","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/aura-project/aura/pulls/333/commits","review_comments_url":"https://api.github.com/repos/aura-project/aura/pulls/333/comments","review_comment_url":"https://api.github.com/repos/aura-project/aura/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aura-project/aura/issues/333/comments","statuses_url":"https://api.github.com/repos/aura-project/aura/statuses/af8510ad6937ff99292b02751ea0632c0cfdc130","head":{"label":"xeroplz:gunner_skills_pr","ref":"gunner_skills_pr","sha":"af8510ad6937ff99292b02751ea0632c0cfdc130","user":{"login":"xeroplz","id":8395686,"avatar_url":"https://avatars.githubusercontent.com/u/8395686?v=3","gravatar_id":"","url":"https://api.github.com/users/xeroplz","html_url":"https://github.com/xeroplz","followers_url":"https://api.github.com/users/xeroplz/followers","following_url":"https://api.github.com/users/xeroplz/following{/other_user}","gists_url":"https://api.github.com/users/xeroplz/gists{/gist_id}","starred_url":"https://api.github.com/users/xeroplz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xeroplz/subscriptions","organizations_url":"https://api.github.com/users/xeroplz/orgs","repos_url":"https://api.github.com/users/xeroplz/repos","events_url":"https://api.github.com/users/xeroplz/events{/privacy}","received_events_url":"https://api.github.com/users/xeroplz/received_events","type":"User","site_admin":false},"repo":{"id":42081201,"name":"aura","full_name":"xeroplz/aura","owner":{"login":"xeroplz","id":8395686,"avatar_url":"https://avatars.githubusercontent.com/u/8395686?v=3","gravatar_id":"","url":"https://api.github.com/users/xeroplz","html_url":"https://github.com/xeroplz","followers_url":"https://api.github.com/users/xeroplz/followers","following_url":"https://api.github.com/users/xeroplz/following{/other_user}","gists_url":"https://api.github.com/users/xeroplz/gists{/gist_id}","starred_url":"https://api.github.com/users/xeroplz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xeroplz/subscriptions","organizations_url":"https://api.github.com/users/xeroplz/orgs","repos_url":"https://api.github.com/users/xeroplz/repos","events_url":"https://api.github.com/users/xeroplz/events{/privacy}","received_events_url":"https://api.github.com/users/xeroplz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xeroplz/aura","description":"Open-source server emulator","fork":true,"url":"https://api.github.com/repos/xeroplz/aura","forks_url":"https://api.github.com/repos/xeroplz/aura/forks","keys_url":"https://api.github.com/repos/xeroplz/aura/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xeroplz/aura/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xeroplz/aura/teams","hooks_url":"https://api.github.com/repos/xeroplz/aura/hooks","issue_events_url":"https://api.github.com/repos/xeroplz/aura/issues/events{/number}","events_url":"https://api.github.com/repos/xeroplz/aura/events","assignees_url":"https://api.github.com/repos/xeroplz/aura/assignees{/user}","branches_url":"https://api.github.com/repos/xeroplz/aura/branches{/branch}","tags_url":"https://api.github.com/repos/xeroplz/aura/tags","blobs_url":"https://api.github.com/repos/xeroplz/aura/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xeroplz/aura/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xeroplz/aura/git/refs{/sha}","trees_url":"https://api.github.com/repos/xeroplz/aura/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xeroplz/aura/statuses/{sha}","languages_url":"https://api.github.com/repos/xeroplz/aura/languages","stargazers_url":"https://api.github.com/repos/xeroplz/aura/stargazers","contributors_url":"https://api.github.com/repos/xeroplz/aura/contributors","subscribers_url":"https://api.github.com/repos/xeroplz/aura/subscribers","subscription_url":"https://api.github.com/repos/xeroplz/aura/subscription","commits_url":"https://api.github.com/repos/xeroplz/aura/commits{/sha}","git_commits_url":"https://api.github.com/repos/xeroplz/aura/git/commits{/sha}","comments_url":"https://api.github.com/repos/xeroplz/aura/comments{/number}","issue_comment_url":"https://api.github.com/repos/xeroplz/aura/issues/comments{/number}","contents_url":"https://api.github.com/repos/xeroplz/aura/contents/{+path}","compare_url":"https://api.github.com/repos/xeroplz/aura/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xeroplz/aura/merges","archive_url":"https://api.github.com/repos/xeroplz/aura/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xeroplz/aura/downloads","issues_url":"https://api.github.com/repos/xeroplz/aura/issues{/number}","pulls_url":"https://api.github.com/repos/xeroplz/aura/pulls{/number}","milestones_url":"https://api.github.com/repos/xeroplz/aura/milestones{/number}","notifications_url":"https://api.github.com/repos/xeroplz/aura/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xeroplz/aura/labels{/name}","releases_url":"https://api.github.com/repos/xeroplz/aura/releases{/id}","deployments_url":"https://api.github.com/repos/xeroplz/aura/deployments","created_at":"2015-09-08T00:42:17Z","updated_at":"2016-02-21T19:10:56Z","pushed_at":"2016-07-18T01:34:18Z","git_url":"git://github.com/xeroplz/aura.git","ssh_url":"git@github.com:xeroplz/aura.git","clone_url":"https://github.com/xeroplz/aura.git","svn_url":"https://github.com/xeroplz/aura","homepage":"http://aura-project.org","size":114112,"stargazers_count":1,"watchers_count":1,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":0,"forks":3,"open_issues":0,"watchers":1,"default_branch":"master_new"}},"base":{"label":"aura-project:master","ref":"master","sha":"00dff4d456fc75f4d9c8acaa874b0a5a62127962","user":{"login":"aura-project","id":5599478,"avatar_url":"https://avatars.githubusercontent.com/u/5599478?v=3","gravatar_id":"","url":"https://api.github.com/users/aura-project","html_url":"https://github.com/aura-project","followers_url":"https://api.github.com/users/aura-project/followers","following_url":"https://api.github.com/users/aura-project/following{/other_user}","gists_url":"https://api.github.com/users/aura-project/gists{/gist_id}","starred_url":"https://api.github.com/users/aura-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aura-project/subscriptions","organizations_url":"https://api.github.com/users/aura-project/orgs","repos_url":"https://api.github.com/users/aura-project/repos","events_url":"https://api.github.com/users/aura-project/events{/privacy}","received_events_url":"https://api.github.com/users/aura-project/received_events","type":"Organization","site_admin":false},"repo":{"id":41106906,"name":"aura","full_name":"aura-project/aura","owner":{"login":"aura-project","id":5599478,"avatar_url":"https://avatars.githubusercontent.com/u/5599478?v=3","gravatar_id":"","url":"https://api.github.com/users/aura-project","html_url":"https://github.com/aura-project","followers_url":"https://api.github.com/users/aura-project/followers","following_url":"https://api.github.com/users/aura-project/following{/other_user}","gists_url":"https://api.github.com/users/aura-project/gists{/gist_id}","starred_url":"https://api.github.com/users/aura-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aura-project/subscriptions","organizations_url":"https://api.github.com/users/aura-project/orgs","repos_url":"https://api.github.com/users/aura-project/repos","events_url":"https://api.github.com/users/aura-project/events{/privacy}","received_events_url":"https://api.github.com/users/aura-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aura-project/aura","description":"Open-source MMORPG server emulator","fork":false,"url":"https://api.github.com/repos/aura-project/aura","forks_url":"https://api.github.com/repos/aura-project/aura/forks","keys_url":"https://api.github.com/repos/aura-project/aura/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aura-project/aura/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aura-project/aura/teams","hooks_url":"https://api.github.com/repos/aura-project/aura/hooks","issue_events_url":"https://api.github.com/repos/aura-project/aura/issues/events{/number}","events_url":"https://api.github.com/repos/aura-project/aura/events","assignees_url":"https://api.github.com/repos/aura-project/aura/assignees{/user}","branches_url":"https://api.github.com/repos/aura-project/aura/branches{/branch}","tags_url":"https://api.github.com/repos/aura-project/aura/tags","blobs_url":"https://api.github.com/repos/aura-project/aura/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aura-project/aura/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aura-project/aura/git/refs{/sha}","trees_url":"https://api.github.com/repos/aura-project/aura/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aura-project/aura/statuses/{sha}","languages_url":"https://api.github.com/repos/aura-project/aura/languages","stargazers_url":"https://api.github.com/repos/aura-project/aura/stargazers","contributors_url":"https://api.github.com/repos/aura-project/aura/contributors","subscribers_url":"https://api.github.com/repos/aura-project/aura/subscribers","subscription_url":"https://api.github.com/repos/aura-project/aura/subscription","commits_url":"https://api.github.com/repos/aura-project/aura/commits{/sha}","git_commits_url":"https://api.github.com/repos/aura-project/aura/git/commits{/sha}","comments_url":"https://api.github.com/repos/aura-project/aura/comments{/number}","issue_comment_url":"https://api.github.com/repos/aura-project/aura/issues/comments{/number}","contents_url":"https://api.github.com/repos/aura-project/aura/contents/{+path}","compare_url":"https://api.github.com/repos/aura-project/aura/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aura-project/aura/merges","archive_url":"https://api.github.com/repos/aura-project/aura/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aura-project/aura/downloads","issues_url":"https://api.github.com/repos/aura-project/aura/issues{/number}","pulls_url":"https://api.github.com/repos/aura-project/aura/pulls{/number}","milestones_url":"https://api.github.com/repos/aura-project/aura/milestones{/number}","notifications_url":"https://api.github.com/repos/aura-project/aura/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aura-project/aura/labels{/name}","releases_url":"https://api.github.com/repos/aura-project/aura/releases{/id}","deployments_url":"https://api.github.com/repos/aura-project/aura/deployments","created_at":"2015-08-20T16:32:57Z","updated_at":"2016-07-20T05:55:50Z","pushed_at":"2016-07-24T13:48:13Z","git_url":"git://github.com/aura-project/aura.git","ssh_url":"git@github.com:aura-project/aura.git","clone_url":"https://github.com/aura-project/aura.git","svn_url":"https://github.com/aura-project/aura","homepage":"http://aura-project.org","size":115367,"stargazers_count":67,"watchers_count":67,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":54,"mirror_url":null,"open_issues_count":33,"forks":54,"open_issues":33,"watchers":67,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aura-project/aura/pulls/333"},"html":{"href":"https://github.com/aura-project/aura/pull/333"},"issue":{"href":"https://api.github.com/repos/aura-project/aura/issues/333"},"comments":{"href":"https://api.github.com/repos/aura-project/aura/issues/333/comments"},"review_comments":{"href":"https://api.github.com/repos/aura-project/aura/pulls/333/comments"},"review_comment":{"href":"https://api.github.com/repos/aura-project/aura/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aura-project/aura/pulls/333/commits"},"statuses":{"href":"https://api.github.com/repos/aura-project/aura/statuses/af8510ad6937ff99292b02751ea0632c0cfdc130"}}}}
{"actor":{"display_login":"exectails"}}