Exemple #1
0
 /// <summary>
 /// Constructor for Addition: Short Sword Mastery
 /// </summary>
 /// <param name="id">Skill ID</param>
 /// <param name="actor">Actor, which this addition get attached to</param>
 public DefaultPassiveSkill(SkillIDs id, Actor actor, string name, bool ifActivate)
 {
     this.Name          = name;
     this.skillID       = id;
     this.AttachedActor = actor;
     this.activate      = ifActivate;
 }
Exemple #2
0
 private static void AddSub(SkillIDs baseskill, int levels, SkillCommand func)
 {
     for (int i = 0; i < levels; i++)
     {
         SkillCommands.Add((SkillIDs)((int)baseskill + i), func);
     }
 }
 /// <summary>
 /// Constructor for Addition: Short Sword Mastery
 /// </summary>
 /// <param name="id">Skill ID</param>
 /// <param name="actor">Actor, which this addition get attached to</param>
 public DefaultPassiveSkill(SkillIDs id, Actor actor,string name, bool ifActivate)
 {
     this.Name = name;
     this.skillID = id;
     this.AttachedActor = actor;
     this.activate = ifActivate;
 }
Exemple #4
0
 public DefaultBuff(SkillIDs id, Actor actor, string name, int lifetime, Addition.AdditionType type)
 {
     this.Name          = name;
     this.skillID       = id;
     this.AttachedActor = actor;
     this.lifeTime      = lifetime;
     this.MyType        = type;
 }
Exemple #5
0
 public DefaultBuff(SkillIDs id, Actor actor, string name,int lifetime, Addition.AdditionType type)
 {
     this.Name = name;
     this.skillID = id;
     this.AttachedActor = actor;
     this.lifeTime = lifetime;
     this.MyType = type;
 }
Exemple #6
0
        /// <summary>
        /// Check if the player has enough sp to cast skill, and decrease SP by the required amount
        /// </summary>
        /// <param name="pc">Player</param>
        /// <param name="skillid">Skill ID</param>
        /// <returns></returns>
        public static bool CheckSkillSP(ActorPC pc, SkillIDs skillid)
        {
            ActorEventHandlers.PC_EventHandler eh = (ActorEventHandlers.PC_EventHandler)pc.e;
            Skill skill = SkillFactory.GetSkill((uint)skillid);

            if (pc.SP < skill.sp)
            {
                return(false);
            }
            pc.SP -= (ushort)skill.sp;
            eh.C.SendCharStatus(0);
            return(true);
        }
Exemple #7
0
        public static int GetSkillMAtkBonus(SkillIDs id)
        {
            Actor tmpActor = new Actor();

            tmpActor.BattleStatus = new BattleStatus();
            Bonus.BonusHandler.Instance.SkillAddAddition(tmpActor, (uint)id, false);
            int tmpBonus = 0;

            if (tmpActor.BattleStatus.matkmaxbonus > tmpActor.BattleStatus.matkminbonus)
            {
                tmpBonus = Global.Random.Next(tmpActor.BattleStatus.matkminbonus, tmpActor.BattleStatus.matkmaxbonus);
            }
            return(tmpActor.BattleStatus.matkbonus + tmpActor.BattleStatus.matkskill + tmpBonus);
        }
Exemple #8
0
 /// <summary>
 /// Increase Players LP
 /// </summary>
 /// <param name="pc">Player</param>
 /// <param name="skillID">ID of the skill that caused the increasement of LP</param>
 /// <param name="point">Amount</param>
 public static void GainLP(ActorPC pc, SkillIDs skillID, byte point)
 {
     ActorEventHandlers.PC_EventHandler eh = (ActorEventHandlers.PC_EventHandler)pc.e;
     pc.LP += point;
     if (pc.LP > 5)
     {
         pc.LP = 5;
     }
     else
     {
         eh.C.SendSkillEffect(SkillFactory.GetSkill((uint)skillID).addition, SkillEffects.LP, point);
     }
     eh.C.SendCharStatus(0);
 }
        public HeroItem Clone()
        {
            HeroItem item = new HeroItem();

            item.Name         = Name;
            item.Title        = (Description)Title.Clone();
            item.Description  = (Description)Description.Clone();
            item.IconPath     = IconPath;
            item.DropCriteria = (DropCriteria)DropCriteria?.Clone();
            item.AttackType   = AttackType;
            item.WeaponType   = WeaponType;
            item.Category     = Category;
            item.SkillIDs     = SkillIDs?.Clone();
            item.Descriptors  = Descriptors?.Clone();
            return(item);
        }
Exemple #10
0
 /// <summary>
 /// Constructor for Addition: RapidRun
 /// </summary>
 /// <param name="id">Skill ID</param>
 /// <param name="actor">Actor, which this addition get attached to</param>
 public RapidRun(SkillIDs id, Actor actor)
 {
     this.Name          = "RapidRun";
     this.skillID       = id;
     this.AttachedActor = actor;
 }
Exemple #11
0
 /// <summary>
 /// Constructor for Addition: Short Sword Mastery
 /// </summary>
 /// <param name="id">Skill ID</param>
 /// <param name="actor">Actor, which this addition get attached to</param>
 public Integritas(SkillIDs id, Actor actor)
 {
     this.Name          = "Integritas";
     this.skillID       = id;
     this.AttachedActor = actor;
 }
Exemple #12
0
 /// <summary>
 /// Constructor for Addition: Short Sword Mastery
 /// </summary>
 /// <param name="id">Skill ID</param>
 /// <param name="actor">Actor, which this addition get attached to</param>
 public CloseOrderDrill(SkillIDs id, Actor actor)
 {
     this.Name          = "CloseOrderDrill";
     this.skillID       = id;
     this.AttachedActor = actor;
 }
Exemple #13
0
 /// <summary>
 /// Constructor for Addition: Short Sword Mastery
 /// </summary>
 /// <param name="id">Skill ID</param>
 /// <param name="actor">Actor, which this addition get attached to</param>
 public DampRifleMastery(SkillIDs id, Actor actor)
 {
     this.Name          = "DampRifleMastery";
     this.skillID       = id;
     this.AttachedActor = actor;
 }
Exemple #14
0
 /// <summary>
 /// Constructor for Addition: RapidRun
 /// </summary>
 /// <param name="id">Skill ID</param>
 /// <param name="actor">Actor, which this addition get attached to</param>
 public Designation(SkillIDs id, Actor actor)
 {
     this.Name          = "Designation";
     this.skillID       = id;
     this.AttachedActor = actor;
 }
Exemple #15
0
 /// <summary>
 /// Increase Players LP
 /// </summary>
 /// <param name="pc">Player</param>
 /// <param name="skillID">ID of the skill that caused the increasement of LP</param>
 /// <param name="point">Amount</param>
 public static void GainLP(ActorPC pc, SkillIDs skillID, byte point)
 {
     ActorEventHandlers.PC_EventHandler eh = (ActorEventHandlers.PC_EventHandler)pc.e;
     pc.LP += point;
     if (pc.LP > 5) pc.LP = 5;
     else
         eh.C.SendSkillEffect(SkillFactory.GetSkill((uint)skillID).addition, SkillEffects.LP, point);
     eh.C.SendCharStatus(0);
 }
Exemple #16
0
 public static int GetSkillRAtkBonus(SkillIDs id)
 {
     Actor tmpActor = new Actor();
     tmpActor.BattleStatus = new BattleStatus();
     Bonus.BonusHandler.Instance.SkillAddAddition(tmpActor, (uint)id, false);
     int tmpBonus = 0;
     if(tmpActor.BattleStatus.ratkmaxbonus > tmpActor.BattleStatus.ratkminbonus)
     {
         tmpBonus = Global.Random.Next(tmpActor.BattleStatus.ratkminbonus, tmpActor.BattleStatus.ratkmaxbonus);
     }
     return tmpActor.BattleStatus.ratkbonus + tmpActor.BattleStatus.ratkskill + tmpBonus;
 }
Exemple #17
0
 /// <summary>
 /// Constructor for Addition: RapidRun
 /// </summary>
 /// <param name="id">Skill ID</param>
 /// <param name="actor">Actor, which this addition get attached to</param>
 public Designation(SkillIDs id, Actor actor)
 {
     this.Name = "Designation";
     this.skillID = id;
     this.AttachedActor = actor;
 }
Exemple #18
0
 public DefaultStance(SkillIDs id, Actor actor,string name)
 {
     this.Name = name;
     this.skillID = id;
     this.AttachedActor = actor;
 }
Exemple #19
0
 public DefaultStance(SkillIDs id, Actor actor, string name)
 {
     this.Name          = name;
     this.skillID       = id;
     this.AttachedActor = actor;
 }
Exemple #20
0
 public StarverSkill this[SkillIDs id] => this[(int)id];
Exemple #21
0
 /// <summary>
 /// Constructor for Addition: RapidRun
 /// </summary>
 /// <param name="id">Skill ID</param>
 /// <param name="actor">Actor, which this addition get attached to</param>
 public RapidRun(SkillIDs id, Actor actor)
 {
     this.Name = "RapidRun";
     this.skillID = id;
     this.AttachedActor = actor;
 }
Exemple #22
0
 /// <summary>
 /// Constructor for Addition: Short Sword Mastery
 /// </summary>
 /// <param name="id">Skill ID</param>
 /// <param name="actor">Actor, which this addition get attached to</param>
 public ShortSwordMastery(SkillIDs id, Actor actor)
 {
     this.Name          = "ShortSwordMastery";
     this.skillID       = id;
     this.AttachedActor = actor;
 }
Exemple #23
0
 /// <summary>
 /// Constructor for Addition: Short Sword Mastery
 /// </summary>
 /// <param name="id">Skill ID</param>
 /// <param name="actor">Actor, which this addition get attached to</param>
 public Integritas(SkillIDs id, Actor actor)
 {
     this.Name = "Integritas";
     this.skillID = id;
     this.AttachedActor = actor;
 }
Exemple #24
0
 /// <summary>
 /// Constructor for Addition: Short Sword Mastery
 /// </summary>
 /// <param name="id">Skill ID</param>
 /// <param name="actor">Actor, which this addition get attached to</param>
 public ShortSwordMastery(SkillIDs id, Actor actor)
 {
     this.Name = "ShortSwordMastery";
     this.skillID = id;
     this.AttachedActor = actor;
 }
Exemple #25
0
 /// <summary>
 /// Check if the player has enough sp to cast skill, and decrease SP by the required amount
 /// </summary>
 /// <param name="pc">Player</param>
 /// <param name="skillid">Skill ID</param>
 /// <returns></returns>
 public static bool CheckSkillSP(ActorPC pc, SkillIDs skillid)
 {
     ActorEventHandlers.PC_EventHandler eh = (ActorEventHandlers.PC_EventHandler)pc.e;
     Skill skill = SkillFactory.GetSkill((uint)skillid);
     if (pc.SP < skill.sp) return false;
     pc.SP -= (ushort)skill.sp;
     eh.C.SendCharStatus(0);
     return true;
 }