Exemplo n.º 1
0
        public static void Proc(ref Actor sActor, ref Actor dActor, ref Map.SkillArgs args)
        {
            ActorPC pc = (ActorPC)sActor;

            ActorEventHandlers.PC_EventHandler eh = (ActorEventHandlers.PC_EventHandler)pc.e;
            if (sActor.type == ActorType.PC)
            {
                if (!SkillHandler.CheckSkillSP(pc, args.skillID))
                {
                    SkillHandler.SetSkillFailed(ref args);
                    return;
                }
            }
            else//currently cannot be cast on player
            {
                SkillHandler.SetSkillFailed(ref args);
                return;
            }
            args.damage     = 0;
            args.isCritical = Map.SkillArgs.AttackResult.Nodamage; // This skill is not for attacking
            if (!pc.BattleStatus.Additions.ContainsKey("BayonetStance"))
            {
                SkillHandler.ApplyAddition(pc, new Additions.Global.DefaultStance(args.skillID, pc, "BayonetStance"));
                args.failed = true;
            }
            else
            {
                args.failed = false;
                SkillHandler.RemoveAddition(pc, pc.BattleStatus.Additions["BayonetStance"]);
            }
        }
Exemplo n.º 2
0
        public static void Proc(ref Actor sActor, ref Actor dActor, ref Map.SkillArgs args)
        {
            args.damage     = 0;
            args.isCritical = 0;
            bool ifActivate = (SagaDB.Items.WeaponFactory.GetActiveWeapon((ActorPC)sActor).type == 2);

            SkillHandler.ApplyAddition(dActor, new Additions.Global.DefaultPassiveSkill(args.skillID, dActor, "ArtOfWarrior", ifActivate));
        }
Exemplo n.º 3
0
        public static void Proc(ref Actor sActor, ref Actor dActor, ref Map.SkillArgs args)
        {
            ActorPC pc = (ActorPC)sActor;

            args.damage     = 0;
            args.isCritical = 0;
            SkillHandler.ApplyAddition(dActor, new Additions.Global.DefaultPassiveSkill(args.skillID, dActor, "StrongMind", true));
        }
Exemplo n.º 4
0
 public static void Proc(ref Actor sActor, ref Actor dActor, ref Map.SkillArgs args)
 {
     if (sActor.type == ActorType.PC)
     {
         if (!SkillHandler.CheckSkillSP((ActorPC)dActor, args.skillID))
         {
             SkillHandler.SetSkillFailed(ref args);
             return;
         }
         args.damage     = 0;
         args.isCritical = Map.SkillArgs.AttackResult.Nodamage;
         SkillHandler.ApplyAddition(dActor, new Additions.Global.DefaultBuff(args.skillID, dActor, "FatalContract", 240000, Addition.AdditionType.Buff));
     }
 }
Exemplo n.º 5
0
 public static void Proc(ref Actor sActor, ref Actor dActor, ref Map.SkillArgs args)
 {
     if (sActor.type == ActorType.PC)
     {
         if (!SkillHandler.CheckSkillSP((ActorPC)dActor, args.skillID))
         {
             SkillHandler.SetSkillFailed(ref args);
             return;
         }
         args.damage     = 0;
         args.isCritical = Map.SkillArgs.AttackResult.Nodamage;
         SkillHandler.ApplyAddition(dActor, new Additions.Thief.RapidRun(args.skillID, dActor));
     }
 }
Exemplo n.º 6
0
 public static void Proc(ref Actor sActor, ref Actor dActor, ref Map.SkillArgs args)
 {
     if (sActor.type == ActorType.PC)
     {
         ActorPC pc = (ActorPC)sActor;
         ActorEventHandlers.PC_EventHandler eh = (SagaMap.ActorEventHandlers.PC_EventHandler)pc.e;
         byte level = (byte)(args.skillID - baseID + 1);
         if (!SkillHandler.CheckSkillSP(pc, args.skillID))
         {
             SkillHandler.SetSkillFailed(ref args);
             return;
         }
         args.damage     = 0;
         args.isCritical = Map.SkillArgs.AttackResult.Nodamage;
         SkillHandler.ApplyAddition(dActor, new Additions.Global.DefaultBuff(args.skillID, dActor, "Tracking", 900000, Addition.AdditionType.Buff));
     }
 }
Exemplo n.º 7
0
        public static void Proc(ref Actor sActor, ref Actor dActor, ref Map.SkillArgs args)
        {
            ActorPC pc = (ActorPC)sActor;

            ActorEventHandlers.PC_EventHandler eh = (ActorEventHandlers.PC_EventHandler)pc.e;
            if (sActor.type == ActorType.PC)
            {
                if (!SkillHandler.CheckSkillSP(pc, args.skillID) || pc.LP < 3)
                {
                    SkillHandler.SetSkillFailed(ref args);
                    return;
                }
                pc.LP          -= 3;
                args.damage     = 0;
                args.isCritical = Map.SkillArgs.AttackResult.Nodamage;// This skill is not for attacking
                SkillHandler.ApplyAddition(dActor, new Additions.Global.DefaultBuff(args.skillID, dActor, "ShieldBlock", 300000, Addition.AdditionType.Buff));
            }
        }
Exemplo n.º 8
0
 public static void Proc(ref Actor sActor, ref Actor dActor, ref Map.SkillArgs args)
 {
     if (sActor.type == ActorType.PC)
     {
         ActorPC pc = (ActorPC)sActor;
         ActorEventHandlers.PC_EventHandler eh = (SagaMap.ActorEventHandlers.PC_EventHandler)pc.e;
         byte level = (byte)(args.skillID - baseID + 1);
         if (!SkillHandler.CheckSkillSP(pc, args.skillID))
         {
             SkillHandler.SetSkillFailed(ref args);
             return;
         }
         SkillHandler.GainLP(pc, args.skillID);
         args.damage     = 0;
         args.isCritical = Map.SkillArgs.AttackResult.Nodamage;
         SkillHandler.ApplyAddition(dActor, new Additions.Recruit.Designation(args.skillID, dActor));
     }
 }
Exemplo n.º 9
0
        public static void Proc(ref Actor sActor, ref Actor dActor, ref Map.SkillArgs args)
        {
            if (sActor.type == ActorType.PC)
            {
                ActorPC pc = (ActorPC)sActor;
                if (!SkillHandler.CheckSkillSP(pc, args.skillID))
                {
                    SkillHandler.SetSkillFailed(ref args);
                    return;
                }
                SkillHandler.GainLP(pc, args.skillID);
            }
            args.damage     = 0;
            args.isCritical = SkillHandler.CalcCrit(sActor, dActor, args, SkillHandler.AttackType.Ranged);
            byte level = (byte)(args.skillID - baseID + 1);

            if (args.isCritical != Map.SkillArgs.AttackResult.Miss && args.isCritical != Map.SkillArgs.AttackResult.Block)
            {
                ActorPC targetPC = (ActorPC)sActor;
                args.damage = CalcDamage(sActor, dActor, args);
                if (dActor.type == ActorType.NPC)//currently only can be casted on NPCs(Mob)
                {
                    ActorNPC npc = (ActorNPC)dActor;
                    Mob      mob = (Mob)dActor.e;
                    if (Global.Random.Next(0, 99) < 50)
                    {
                        SkillHandler.ApplyAddition(dActor, new Additions.Global.DefaultBuff(1004801, dActor, "LowerBodyParalysis", 5000, Addition.AdditionType.Debuff));
                    }
                }
            }
            if (args.damage <= 0)
            {
                args.damage = 1;
            }
            SkillHandler.PhysicalAttack(ref sActor, ref dActor, args.damage, SkillHandler.AttackElements.NEUTRAL, ref args);
        }
Exemplo n.º 10
0
 public static void Proc(ref Actor sActor, ref Actor dActor, ref Map.SkillArgs args)
 {
     if (sActor.type == ActorType.PC)
     {
         ActorPC pc = (ActorPC)sActor;
         if (!SkillHandler.CheckSkillSP(pc, args.skillID) || pc.LP < 1)
         {
             SkillHandler.SetSkillFailed(ref args);
             return;
         }
         pc.LP          -= 1;
         args.damage     = 0;
         args.isCritical = SkillHandler.CalcCrit(sActor, dActor, args, SkillHandler.AttackType.Physical);
         if (args.isCritical != Map.SkillArgs.AttackResult.Miss && args.isCritical != Map.SkillArgs.AttackResult.Block)
         {
             args.damage = CalcDamage(sActor, dActor, args);
             if (Global.Random.Next(0, 99) > 65)
             {
                 SkillHandler.ApplyAddition(dActor, new Additions.Global.DefaultBuff(1004901, dActor, "Frozen", 5000, Addition.AdditionType.Debuff));
             }
         }
     }
     SkillHandler.PhysicalAttack(ref sActor, ref dActor, args.damage, SkillHandler.AttackElements.NEUTRAL, ref args);
 }
Exemplo n.º 11
0
 public static void Proc(ref Actor sActor, ref Actor dActor, ref Map.SkillArgs args)
 {
     args.damage     = 0;
     args.isCritical = 0;
     SkillHandler.ApplyAddition(sActor, new Additions.Novice.ShortSwordMastery(args.skillID, sActor));
 }
Exemplo n.º 12
0
 public static void Proc(ref Actor sActor, ref Actor dActor, ref Map.SkillArgs args)
 {
     args.damage     = 0;
     args.isCritical = 0;
     SkillHandler.ApplyAddition(sActor, new Additions.Recruit.DampRifleMastery(args.skillID, sActor));
 }
Exemplo n.º 13
0
 public static void Proc(ref Actor sActor, ref Actor dActor, ref Map.SkillArgs args)
 {
     args.damage     = 0;
     args.isCritical = 0;
     SkillHandler.ApplyAddition(dActor, new Additions.Global.DefaultPassiveSkill(args.skillID, dActor, "DefenceMastery", true));
 }
Exemplo n.º 14
0
 public static void Proc(ref Actor sActor, ref Actor dActor, ref Map.SkillArgs args)
 {
     args.damage     = 0;
     args.isCritical = 0;
     SkillHandler.ApplyAddition(sActor, new Additions.Recruit.CloseOrderDrill(args.skillID, sActor));
 }