Esempio n. 1
0
        public void SetDefaultTemplate(MonsterTemplate template)
        {
            OldTemplate = template;

            MaxHp             = OldTemplate.MaxHp;
            HpLevelScale      = OldTemplate.HpLevelScale;
            CriticalRate      = OldTemplate.CriticalRate;
            CriticalDamageMul = OldTemplate.CriticalDamageMul;
            Shield            = OldTemplate.Shield;

            MaxMp    = OldTemplate.MaxMp;
            MaxSpeed = OldTemplate.MaxSpeed;

            IsAggressive        = OldTemplate.IsAggressive;
            AggressionRange     = OldTemplate.AggressionRange;
            RambleAround        = OldTemplate.RambleAround;
            RambleAroundMaxDist = OldTemplate.RambleAroundMaxDist;
            AlertsAllies        = OldTemplate.AlertsAllies;

            XpReward   = OldTemplate.XpReward;
            XpLevelMul = OldTemplate.XpLevelMul;

            MeleeSkill = OldTemplate.MeleeSkill;

            foreach (Skill sk in OldTemplate.TemplateSkills)
            {
                TemplateSkills.Add(sk);
            }
        }
Esempio n. 2
0
        public override void AddSkillsToTemplate()
        {
            // no skills
            SetMeleeAttackSkill((ActiveSkill)SkillTable.Instance.GetSkill(SkillId.MeleeAttack));

            TemplateSkills.Add(SkillTable.Instance.GetSkill(SkillId.Projectile));             // the projectile test skill
        }
Esempio n. 3
0
        protected override void AddSkillsToTemplate()
        {
            TemplateSkills.Add(SkillTable.Instance.GetSkill(SkillId.Projectile));            // the projectile test skill
            TemplateSkills.Add(SkillTable.Instance.GetSkill(SkillId.ProjectileTriple));      // the projectile test skill triple
            TemplateSkills.Add(SkillTable.Instance.GetSkill(SkillId.ProjectileAllAround));   // aura
            TemplateSkills.Add(SkillTable.Instance.GetSkill(SkillId.JumpShort));             // jump
            TemplateSkills.Add(SkillTable.Instance.GetSkill(SkillId.ChainSkill));            // chain skill
            TemplateSkills.Add(SkillTable.Instance.GetSkill(SkillId.SkillAreaExplode));      // bomb skill
            TemplateSkills.Add(SkillTable.Instance.GetSkill(SkillId.MissileProjectile));     // missile projectile
            TemplateSkills.Add(SkillTable.Instance.GetSkill(SkillId.ChainedProjectile));     // chained projectile

            SetMeleeAttackSkill((ActiveSkill)SkillTable.Instance.GetSkill(SkillId.MeleeAttack));
        }
Esempio n. 4
0
        public void InitCustomSkillsOnTemplate()
        {
            if (NewSkills != null)
            {
                foreach (SkillId id in NewSkills)
                {
                    bool contains = false;
                    foreach (Skill sk in TemplateSkills)
                    {
                        if (sk.GetSkillId() == id)
                        {
                            contains = true;
                            break;
                        }
                    }

                    if (!contains)
                    {
                        TemplateSkills.Add(SkillTable.Instance.GetSkill(id));
                    }
                }
            }

            if (NewAutoattack != SkillId.SkillTemplate)
            {
                if (NewAutoattack == SkillId.CustomRemove)
                {
                    SetMeleeAttackSkill(null);
                }
                else
                {
                    SetMeleeAttackSkill((ActiveSkill)SkillTable.Instance.GetSkill(NewAutoattack));
                }
            }

            if (SkillsToRemove != null && SkillsToRemove.Count > 0)
            {
                foreach (Skill sk in TemplateSkills.ToArray())
                {
                    if (SkillsToRemove.Contains(sk.GetSkillId()))
                    {
                        TemplateSkills.Remove(sk);
                    }
                }
            }
        }
Esempio n. 5
0
 public override void AddSkillsToTemplate()
 {
     TemplateSkills.Add(SkillTable.Instance.GetSkill(SkillId.PushBeam));
 }
Esempio n. 6
0
 public override void AddSkillsToTemplate()
 {
     TemplateSkills.Add(SkillTable.Instance.GetSkill(SkillId.SwarmSkill));
 }
Esempio n. 7
0
 public override void AddSkillsToTemplate()
 {
     SetMeleeAttackSkill((ActiveSkill)SkillTable.Instance.GetSkill(SkillId.MeleeAttack));
     TemplateSkills.Add(SkillTable.Instance.GetSkill(SkillId.Teleport));
 }
Esempio n. 8
0
 public override void AddSkillsToTemplate()
 {
     TemplateSkills.Add(SkillTable.Instance.GetSkill(SkillId.CollisionDamageAttack));
 }
Esempio n. 9
0
 public override void AddSkillsToTemplate()
 {
     TemplateSkills.Add(SkillTable.Instance.GetSkill(SkillId.Projectile));
 }
Esempio n. 10
0
        protected override void OnAccept(GumpButton button)
        {
            base.OnAccept(button);

            if (LockMode)
            {
                Close();
                return;
            }

            if (String.IsNullOrWhiteSpace(TemplateName))
            {
                Send(
                    new NoticeDialogGump(User, Hide(true))
                {
                    Title         = "Choose a Template Name",
                    Html          = "Your template must have a name!",
                    AcceptHandler = b => Refresh(true)
                });
                return;
            }

            if (TemplateSkills.Length < 7)
            {
                Send(
                    new NoticeDialogGump(User, Hide(true))
                {
                    Title         = "Choose 7 Skills",
                    Html          = "You must choose 7 unique skills to create a template.",
                    AcceptHandler = b => Refresh(true)
                });
                return;
            }

            if (TemplateStr <= 0 || TemplateDex <= 0 || TemplateInt <= 0)
            {
                Send(
                    new NoticeDialogGump(User, Hide(true))
                {
                    Title         = "Choose 3 Stats",
                    Html          = "You must specify your three character stats.",
                    AcceptHandler = b => Refresh(true)
                });
                return;
            }

            if (TemplateStr + TemplateDex + TemplateInt > 225)
            {
                Send(
                    new NoticeDialogGump(User, Hide(true))
                {
                    Title = "Stat Failure",
                    Html  =
                        "Either one of your stats is above the 100 limit, " +
                        "or you have exceeded the overall limit of 225 stat points with your current allocation.",
                    AcceptHandler = b => Refresh(true)
                });
                return;
            }

            Dictionary <SkillName, double> skills = Profile.Owner.Skills.Not(sk => sk == null)
                                                    .ToDictionary(sk => sk.SkillName, sk => TemplateSkills.Contains(sk.SkillName) ? 100.0 : 0.0);
            var stats = new Dictionary <StatType, int>
            {
                {
                    StatType.Str, TemplateStr
                },
                {
                    StatType.Dex, TemplateDex
                },
                {
                    StatType.Int, TemplateInt
                }
            };

            if (EditMode)
            {
                Template.Name   = TemplateName;
                Template.Notes  = TemplateNotes;
                Template.Skills = skills;
                Template.Stats  = stats;

                Profile.Add(Template);
            }
            else
            {
                Template = Profile.Create(TemplateName, TemplateNotes, skills, stats);
                if (Profile.Selected == null)
                {
                    Profile.Select(Template);
                }
            }
            Close();
        }
Esempio n. 11
0
 public override void AddSkillsToTemplate()
 {
     TemplateSkills.Add(SkillTable.Instance.GetSkill(SkillId.ProjectileAllAround));
     TemplateSkills.Add(SkillTable.Instance.GetSkill(SkillId.CollisionDamageAttack));
     TemplateSkills.Add(SkillTable.Instance.GetSkill(SkillId.JumpShort));
 }
Esempio n. 12
0
 public IEnumerable <ISkillRecord> GetSkills()
 {
     return(TemplateSkills.Cast <ISkillRecord>().Concat(CustomSkills).ToList());
 }
Esempio n. 13
0
 public override void AddSkillsToTemplate()
 {
     TemplateSkills.Add(SkillTable.Instance.GetSkill(SkillId.NeutrophileProjectile));
     //TemplateSkills.Add(SkillTable.Instance.GetSkill(SkillId.CreateCoverMob));
 }