public override bool CheckFizzle() { int mana = ScaleMana(RequiredMana); if (Caster.Skills[CastSkill].Value < RequiredSkill) { Caster.SendLocalizedMessage(1063352, RequiredSkill.ToString("F1")); // You need ~1_SKILL_REQUIREMENT~ Ninjitsu skill to perform that attack! return(false); } if (Caster.Mana < mana) { Caster.SendLocalizedMessage(1060174, mana.ToString()); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability. return(false); } if (!base.CheckFizzle()) { return(false); } Caster.Mana -= mana; return(true); }
public override bool CanAugment(Mobile from, object target) { if (from == null) { return(false); } if (target is BaseDoor || target is LockableContainer) { Item d = target as Item; if (RequiredSkillLevel > 0 && from.Skills[RequiredSkill].Value < RequiredSkillLevel) { from.SendMessage("You lack the {0} skill to use this", RequiredSkill.ToString()); return(false); } if ((d is BaseDoor && ((BaseDoor)d).KeyValue == KeyValue) || (d is LockableContainer && ((LockableContainer)d).KeyValue == KeyValue)) { return(true); } } return(false); }
public override bool CheckCast() { int mana = ScaleMana(RequiredMana); if (!base.CheckCast()) { return(false); } if (!CheckExpansion(Caster)) { Caster.SendLocalizedMessage(1063456); // You must upgrade to Samurai Empire in order to use that ability. return(false); } if (Caster.Skills[CastSkill].Value < RequiredSkill) { string args = $"{RequiredSkill.ToString("F1")}\t{CastSkill.ToString()}\t "; Caster.SendLocalizedMessage(1063013, args); // You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability. return(false); } if (Caster.Mana < mana) { Caster.SendLocalizedMessage(1060174, mana.ToString()); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability. return(false); } return(true); }
public override bool CheckCast() { if (!base.CheckCast()) { return(false); } if (!CheckExpansion(Caster)) { Caster.SendLocalizedMessage(1072176); // You must upgrade to the Mondain's Legacy Expansion Pack before using that ability return(false); } //TODO: Spellweaving quest completion int mana = ScaleMana(RequiredMana); if (Caster.Mana < mana) { Caster.SendLocalizedMessage(1060174, mana.ToString()); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability. return(false); } else if (Caster.Skills[CastSkill].Value < RequiredSkill) { Caster.SendLocalizedMessage(1063013, String.Format("{0}\t{1}", RequiredSkill.ToString("F1"), "#1044114")); // You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability. return(false); } return(true); }
public override bool CheckCast() { if (!base.CheckCast()) { return(false); } int mana = ScaleMana(RequiredMana); if (Caster.Mana < mana) { Caster.SendLocalizedMessage(1060174, mana.ToString()); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability. return(false); } if (Caster.Skills[CastSkill].Value < RequiredSkill) { Caster.SendLocalizedMessage(1063013, $"{RequiredSkill.ToString("F1")}\t{CastSkill.ToString()}\t "); // You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability. return(false); } return(true); }
public override bool CheckCast() { if (!base.CheckCast()) { return(false); } if (Caster.Skills[SkillName.Chivalry].Value < RequiredSkill) { Caster.SendLocalizedMessage(1060172, RequiredSkill.ToString("F1")); // You must have at least ~1_SKILL_REQUIREMENT~ Chivalry to use this ability, return(false); } else if (Caster.TithingPoints < RequiredTithing) { Caster.SendLocalizedMessage(1060173, RequiredTithing.ToString()); // You must have at least ~1_TITHE_REQUIREMENT~ Tithing Points to use this ability, return(false); } else if (Caster.Mana < ScaleMana(RequiredMana)) { Caster.SendLocalizedMessage(1060174, RequiredMana.ToString()); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability. return(false); } return(true); }
public void canGetRequiredSkillJobID() { RequiredSkill r1 = new RequiredSkill(); r1.JobID = 1; Assert.True(r1.JobID == 1); }
public void cansetRequiredSkillSkillID() { RequiredSkill r1 = new RequiredSkill(); r1.SkillID = 1; r1.SkillID = 4; Assert.True(r1.SkillID == 4); }
public void Insert(RequiredSkill obj) { using (JobMatchEntities context = new JobMatchEntities()) { context.RequiredSkill.Add(obj); context.SaveChanges(); } }
public void canGetRequiredSkill() { RequiredSkill r1 = new RequiredSkill(); Skill s = new Skill(); s.SkillName = "Java"; r1.Skill = s; Assert.True(r1.Skill.SkillName == "Java"); }
public void canGetRequiredSkillJob() { RequiredSkill r1 = new RequiredSkill(); Job job = new Job(); job.JobTitle = "QA tester"; r1.Job = job; Assert.True(job.JobTitle == "QA tester"); }
public virtual bool CheckSkills(Mobile m) { if (m.Skills[MoveSkill].Value < RequiredSkill) { string args = String.Format("{0}\t{1}\t ", RequiredSkill.ToString("F1"), MoveSkill.ToString()); m.SendLocalizedMessage(1063013, args); // You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability. return(false); } return(true); }
protected override bool?DetermineSuccess() { var potentialTargets = ParentEvent.GetTargets(TargetTag).Where(e => e is Character).Select(e => e as Character); if (ProbabilityBased) { return(potentialTargets.Any(chr => chr.GetSkillLevel(RequiredSkill?.ToLowerInvariant()) / RequiredLevel > Rand.Range(0.0f, 1.0f, Rand.RandSync.Unsynced))); } else { return(potentialTargets.Any(chr => chr.GetSkillLevel(RequiredSkill?.ToLowerInvariant()) >= RequiredLevel)); } }
public override string ToDebugString() { string subActionStr = ""; if (succeeded.HasValue) { subActionStr = $"\n Sub action: {(succeeded.Value ? Success : Failure)?.CurrentSubAction.ColorizeObject()}"; } return($"{ToolBox.GetDebugSymbol(DetermineFinished())} {nameof(SkillCheckAction)} -> (TargetTag: {TargetTag.ColorizeObject()}, " + $"Required skill: {RequiredSkill.ColorizeObject()}, Required level: {RequiredLevel.ColorizeObject()}, " + $"Succeeded: {(succeeded.HasValue ? succeeded.Value.ToString() : "not determined").ColorizeObject()})" + subActionStr); }
public void Delete(int job_id, string skill) { RequiredSkill obj = null; using (JobMatchEntities context = new JobMatchEntities()) { obj = context.RequiredSkill.SingleOrDefault(x => x.Job_Id == job_id && x.Skill == skill); if (obj != null) { context.RequiredSkill.Remove(obj); context.SaveChanges(); } } }
public void SkillCanGetRequredSkill() { Skill s = new Skill(); List <RequiredSkill> list = new List <RequiredSkill>(); RequiredSkill r1 = new RequiredSkill(); r1.SkillID = 1; RequiredSkill r2 = new RequiredSkill(); r2.SkillID = 2; list.Add(r1); list.Add(r2); s.RequiredSkills = list; Assert.True(s.RequiredSkills.Count == 2); }
public void CangetJobRequiredSkills() { Job j1 = new Job(); RequiredSkill r1 = new RequiredSkill(); r1.SkillID = 1; RequiredSkill r2 = new RequiredSkill(); r2.SkillID = 2; List <RequiredSkill> list = new List <RequiredSkill>(); list.Add(r1); list.Add(r2); j1.RequiredSkills = list; Assert.True(j1.RequiredSkills.Contains(r1)); Assert.True(j1.RequiredSkills.Contains(r2)); }
public void CansetJobRequiredSkills() { Job j1 = new Job(); RequiredSkill r1 = new RequiredSkill(); r1.SkillID = 1; RequiredSkill r2 = new RequiredSkill(); r2.SkillID = 2; List <RequiredSkill> list = new List <RequiredSkill>(); list.Add(r1); list.Add(r2); j1.RequiredSkills = list; list.ToArray()[0].SkillID = 4; Assert.True(j1.RequiredSkills.ToArray()[0].SkillID == 4); }
public override bool CheckCast() { if (!base.CheckCast()) { return(false); } if (!CheckExpansion(Caster)) { Caster.SendLocalizedMessage(1072176); // You must upgrade to the Mondain's Legacy Expansion Pack before using that ability return(false); } if (!MondainsLegacy.Spellweaving) { Caster.SendLocalizedMessage(1042753, "Spellweaving"); // ~1_SOMETHING~ has been temporarily disabled. return(false); } if (Caster is PlayerMobile && !((PlayerMobile)Caster).Spellweaving) { Caster.SendLocalizedMessage(1073220); // You must have completed the epic arcanist quest to use this ability. return(false); } int mana = ScaleMana(RequiredMana); if (Caster.Mana < mana) { Caster.SendLocalizedMessage(1060174, mana.ToString(CultureInfo.InvariantCulture)); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability. return(false); } if (Caster.Skills[CastSkill].Value < RequiredSkill) { Caster.SendLocalizedMessage(1063013, String.Format("{0}\t{1}", RequiredSkill.ToString("F1"), "#1044114")); // You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability. return(false); } return(true); }
public async void canSearchQuery() { DbContextOptions <GitHiredApiDbContext> options = new DbContextOptionsBuilder <GitHiredApiDbContext>() .UseInMemoryDatabase(databaseName: "Cangetjobs").Options; using (GitHiredApiDbContext context3 = new GitHiredApiDbContext(options)) { //Arrange Company co = new Company(); co.Name = "cocacola"; Job job1 = new Job(); job1.ID = 1; // List<RequiredSkill> list1 = new List<RequiredSkill>(); Skill s1 = new Skill(); s1.SkillName = "Javatest"; Skill s2 = new Skill(); s2.SkillName = "C#test"; RequiredSkill rr1 = new RequiredSkill(); rr1.Skill = s1; RequiredSkill rr2 = new RequiredSkill(); rr2.Skill = s2; // list1.Add(rr1); // list1.Add(rr2); context3.Companies.Add(co); context3.SaveChanges(); context3.Jobs.Add(job1); context3.SaveChanges(); context3.Skills.Add(s1); context3.SaveChanges(); context3.Skills.Add(s2); context3.SaveChanges(); context3.RequiredSkills.Add(rr1); context3.SaveChanges(); context3.RequiredSkills.Add(rr2); context3.SaveChanges(); var _controller = new GetJobsController(context3); var result = await _controller.Search("cocacola") as OkObjectResult; Assert.Equal(200, result.StatusCode); } }
public override bool CheckCast() { if (!base.CheckCast()) { return(false); } Mobile caster = Caster; if (!CheckExpansion(caster)) { caster.SendLocalizedMessage(1072176); // You must upgrade to the Mondain's Legacy Expansion Pack before using that ability return(false); } if (caster is PlayerMobile) { MLQuestContext context = MLQuestSystem.GetContext((PlayerMobile)caster); if (context == null || !context.Spellweaving) { caster.SendLocalizedMessage(1073220); // You must have completed the epic arcanist quest to use this ability. return(false); } } int mana = ScaleMana(RequiredMana); if (caster.Mana < mana) { caster.SendLocalizedMessage(1060174, mana.ToString()); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability. return(false); } else if (caster.Skills[CastSkill].Value < RequiredSkill) { caster.SendLocalizedMessage(1063013, string.Format("{0}\t{1}", RequiredSkill.ToString("F1"), "#1044114")); // You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability. return(false); } return(true); }
public override bool CheckCast() { if (!base.CheckCast()) { return(false); } if (Caster.Skills[SkillName.Bushido].Value < RequiredSkill) { string args = String.Format("{0}\t{1}\t ", RequiredSkill.ToString("F1"), CastSkill.ToString()); Caster.SendLocalizedMessage(1063013, args); // You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability. return(false); } else if (Caster.Mana < ScaleMana(RequiredMana)) { Caster.SendLocalizedMessage(1060174, RequiredMana.ToString()); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability. return(false); } return(true); }
public override bool CheckCast() { if (!base.CheckCast()) { return(false); } if (Caster is PlayerMobile) { if (!CheckExpansion(Caster)) { Caster.SendLocalizedMessage(1072176); // You must upgrade to the Mondain's Legacy Expansion Pack before using that ability return(false); } PlayerMobile pm = Caster as PlayerMobile; if (!pm.Arcanist) { pm.SendLocalizedMessage(1073220); // You must have completed the epic arcanist quest to use this ability. return(false); } } int mana = ScaleMana(RequiredMana); if (Caster.Mana < mana) { Caster.SendLocalizedMessage(1060174, mana.ToString()); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability. return(false); } if (Caster.Skills[CastSkill].Value < RequiredSkill) { Caster.SendLocalizedMessage(1063013, String.Format("{0}\t{1}\t ", RequiredSkill.ToString("F1"), CastSkill.ToString())); // You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability. return(false); } return(true); }
public async void cangetSkillsData() { DbContextOptions <GitHiredApiDbContext> options = new DbContextOptionsBuilder <GitHiredApiDbContext>() .UseInMemoryDatabase(databaseName: "CanGetCompany").Options; using (GitHiredApiDbContext context2 = new GitHiredApiDbContext(options)) { //Ararnge Job j1 = new Job(); j1.ID = 1; j1.JobTitle = "Jr Dev"; Skill skill1 = new Skill(); skill1.ID = 1; skill1.SkillName = "aspNetCore"; Skill skill2 = new Skill(); skill2.ID = 2; skill2.SkillName = "c++"; RequiredSkill rs1 = new RequiredSkill(); rs1.Skill = skill1; RequiredSkill rs2 = new RequiredSkill(); rs2.Skill = skill2; context2.Jobs.Add(j1); context2.SaveChanges(); context2.Skills.Add(skill1); context2.SaveChanges(); context2.Skills.Add(skill2); context2.SaveChanges(); context2.RequiredSkills.Add(rs1); context2.SaveChanges(); context2.RequiredSkills.Add(rs2); context2.SaveChanges(); var _controller = new SkillsController(context2); var result = await _controller.SkillsData() as OkObjectResult; Assert.Equal(200, result.StatusCode); } }
public override bool CheckFizzle() { int requiredTithing = this.RequiredTithing; if (AosAttributes.GetValue(Caster, AosAttribute.LowerRegCost) > Utility.Random(100)) { requiredTithing = 0; } int mana = ScaleMana(RequiredMana); if (Caster.Skills[SkillName.Chivalry].Value < RequiredSkill) { Caster.SendLocalizedMessage(1060172, RequiredSkill.ToString("F1")); // You must have at least ~1_SKILL_REQUIREMENT~ Chivalry to use this ability, return(false); } else if (Caster.TithingPoints < requiredTithing) { Caster.SendLocalizedMessage(1060173, RequiredTithing.ToString()); // You must have at least ~1_TITHE_REQUIREMENT~ Tithing Points to use this ability, return(false); } else if (Caster.Mana < mana) { Caster.SendLocalizedMessage(1060174, RequiredMana.ToString()); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability. return(false); } Caster.TithingPoints -= requiredTithing; if (!base.CheckFizzle()) { return(false); } Caster.Mana -= mana; return(true); }
public override string ToDebugString() { return($"{ToolBox.GetDebugSymbol(HasBeenDetermined())} {nameof(SkillCheckAction)} -> (Target: {TargetTag.ColorizeObject()}, " + $"Skill: {RequiredSkill.ColorizeObject()}, Level: {RequiredLevel.ColorizeObject()}, " + $"Succeeded: {succeeded.ColorizeObject()})"); }
public override bool CheckCast() { if (!base.CheckCast()) { return(false); } if (!SamuraiSpell.CheckExpansion(Caster)) { Caster.SendLocalizedMessage(1063456); // You must upgrade to Samurai Empire in order to use that ability. return(false); } if (Caster.Skills[SkillName.Ninjitsu].Value < RequiredSkill) { string args = String.Format("{0}\t{1}\t ", RequiredSkill.ToString("F1"), CastSkill.ToString()); Caster.SendLocalizedMessage(1063013, args); // You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability. return(false); } else if (Caster.Mana < ScaleMana(RequiredMana)) { Caster.SendLocalizedMessage(1060174, RequiredMana.ToString()); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability. return(false); } if (FocusAttack.UnderEffect(Caster) || DeathStrike.UnderEffect(Caster) || SurpriseAttack.UnderEffect(Caster) || Backstab.UnderEffect(Caster) || KiAttack.UnderEffect(Caster)) { return(true); } if (AnimalForm.UnderEffect(Caster)) { if (this is FocusAttack || this is DeathStrike || this is KiAttack || this is SurpriseAttack || this is Backstab) { Caster.SendLocalizedMessage(1063024); // You cannot perform this special move right now. return(false); } } WeaponAbility ability = WeaponAbility.GetCurrentAbility(Caster); if (ability != null) { WeaponAbility.ClearCurrentAbility(Caster); } if (HonorableExecution.UnderEffect(Caster)) { Caster.Send(new SetNewSpell(0x91, 0)); HonorableExecution.m_Table.Remove(Caster); } if (LightningStrike.UnderEffect(Caster)) { Caster.Send(new SetNewSpell(0x95, 0)); LightningStrike.m_Table.Remove(Caster); } if (MomentumStrike.UnderEffect(Caster)) { Caster.Send(new SetNewSpell(0x96, 0)); MomentumStrike.m_Table.Remove(Caster); } return(true); }
/// <summary> /// Seeds the given database with Opportunities/RequiredSkills/Tags if needed. /// </summary> /// <param name="context">The context (database) to be used.</param> public static void Initialize(URC_Context context) { // Look for any opportunities. if (context.Opportunities.Any()) { return; // DB has been seeded } var opportunities = new Opportunity[] { new Opportunity { ProjectName = "Artificial Muscle Polymer Experiments", ProfessorName = "professor", ProjectDescription = "Twisted coiled polymer actuators (TCPAs) are an emergent type of thermomotive artificial muscle that have recently biome-chanically surpassed human skeletal muscles (HSM). This all results in tensile contraction (TC) and Tensile Stress (TS). We are trying to optimize the polymer material properties to improve action.", ProjectImage = "uofu.jpg", ProjectMentor = "John Smith", BeginDate = DateTime.Parse("2021-03-03"), EndDate = DateTime.Parse("2021-06-03"), Pay = 20, Filled = false }, new Opportunity { ProjectName = "City Climate Change Research Assistant", ProfessorName = "professor_mary", ProjectDescription = "I am analyzing city climate action plans across the world and trying to find key themes, characteristics, and patterns of these climate action plans. Specifically, I will be focusing on Ho Chi Minh City, Buenos Aires, Seoul, and Mexico City, but will also be looking at other city environmental actions as needed for this project.", ProjectImage = "uofu.jpg", ProjectMentor = "Suzy Smith", BeginDate = DateTime.Parse("2021-05-10"), EndDate = DateTime.Parse("2021-10-10"), Pay = 25, Filled = false }, new Opportunity { ProjectName = "Multiple Computational Research Positions", ProfessorName = "Larry Longbottom", ProjectDescription = "We are looking for motivated candidates to join the Utah Waves and Architected Materials Group.", ProjectImage = "uofu.jpg", ProjectMentor = "Larry Longbottom", BeginDate = DateTime.Parse("2021-08-21"), EndDate = DateTime.Parse("2021-12-03"), Pay = 30, Filled = false }, new Opportunity { ProjectName = "Undergraduate Research Assistant", ProfessorName = "Oliver Olson", ProjectDescription = "Patient with acute ischemic stroke within the last 7 days will have a small blood pressure on their finger for 15 minutes.We will also use the NeurOptics NPi - 200 Pupillometer to measure each enrolled participants pupil reactivity prior to the finger blood pressure measurement.", ProjectImage = "uofu.jpg", ProjectMentor = "Bobby Joe Hill", BeginDate = DateTime.Parse("2020-12-04"), EndDate = DateTime.Parse("2021-04-03"), Pay = 10, Filled = false }, new Opportunity { ProjectName = "Undergrad Research Scholars - Wynne Laboratory", ProfessorName = "Jerry Wynne", ProjectDescription = "Our laboratory researches hypertension, and in particular, salt-sensitive hypertension. We investigate this from a cell/molecular basis using cell culture, microscopy and whole animal experiments. We are interested in the renal and cardiovascular physiology during hypertension, with an emphasis on inflammation.", ProjectImage = "uofu.jpg", ProjectMentor = "Bobby Joe Hill", BeginDate = DateTime.Parse("2021-04-08"), EndDate = DateTime.Parse("2021-08-04"), Pay = 20, Filled = false }, new Opportunity { ProjectName = "Part Time - Studying Genetic Diseases", ProfessorName = "Joe Montgomery", ProjectDescription = "I would like to mentor motivated students. Projects will depend on the previous experience of students.", ProjectImage = "uofu.jpg", ProjectMentor = "Joe Montgomery", BeginDate = DateTime.Parse("2021-06-03"), EndDate = DateTime.Parse("2021-09-03"), Pay = 10, Filled = false }, new Opportunity { ProjectName = "Machine Learning Based Lensless Cameras", ProfessorName = "Susan Donald", ProjectDescription = "By exploiting recent advances in machine learning, you will work in a small team to develop several uncoventional cameras. One example of a such a camera is a lensless camera that is extremely thin lightweight, yet able to perform high resolution imaging. Important applications in autonomous driving, drones, security, etc. will be explored.", ProjectImage = "uofu.jpg", ProjectMentor = "Susan Donald", BeginDate = DateTime.Parse("2021-03-03"), EndDate = DateTime.Parse("2021-06-03"), Pay = 20, Filled = false }, new Opportunity { ProjectName = "Wildlife Conservation Research", ProfessorName = "Jeniffer Jacobs", ProjectDescription = "The Wasatch Mountains (WM) are a stronghold for wildlife but contain the most highly recreated National Forests in the country. There is a lack of research into how wildlife are affected by human recreation, and this hampers conservation action, especially in the WM’s.", ProjectImage = "uofu.jpg", ProjectMentor = "Jeniffer Jacobs", BeginDate = DateTime.Parse("2021-03-03"), EndDate = DateTime.Parse("2021-06-03"), Pay = 20, Filled = false } }; context.Opportunities.AddRange(opportunities); context.SaveChanges(); var requiredSkills = new RequiredSkill[] { new RequiredSkill { SkillName = "C#", OpportunityID = 1 }, new RequiredSkill { SkillName = "ASP.NET Core", OpportunityID = 1 }, new RequiredSkill { SkillName = "Entity Framework", OpportunityID = 1 }, new RequiredSkill { SkillName = "Javascript", OpportunityID = 1 }, new RequiredSkill { SkillName = "Java", OpportunityID = 2 }, new RequiredSkill { SkillName = "Bootstrap", OpportunityID = 2 }, new RequiredSkill { SkillName = "MongoDB", OpportunityID = 2 }, new RequiredSkill { SkillName = "ElasticSearch", OpportunityID = 2 }, new RequiredSkill { SkillName = "Python", OpportunityID = 3 }, new RequiredSkill { SkillName = "PDB", OpportunityID = 3 }, new RequiredSkill { SkillName = "Flask", OpportunityID = 3 }, new RequiredSkill { SkillName = "Splunk", OpportunityID = 3 }, new RequiredSkill { SkillName = "SQL", OpportunityID = 4 }, new RequiredSkill { SkillName = "C", OpportunityID = 4 }, new RequiredSkill { SkillName = "GCC", OpportunityID = 4 }, new RequiredSkill { SkillName = "GDB", OpportunityID = 4 }, new RequiredSkill { SkillName = "SpringBoot", OpportunityID = 5 }, new RequiredSkill { SkillName = "Prometheus", OpportunityID = 5 }, new RequiredSkill { SkillName = "Grafana", OpportunityID = 5 }, new RequiredSkill { SkillName = "Alertmanager", OpportunityID = 5 }, new RequiredSkill { SkillName = "Docker", OpportunityID = 6 }, new RequiredSkill { SkillName = "Docker Swarm", OpportunityID = 6 }, new RequiredSkill { SkillName = "Linux CLI", OpportunityID = 6 }, new RequiredSkill { SkillName = "BASH", OpportunityID = 6 }, new RequiredSkill { SkillName = "Javascript", OpportunityID = 7 }, new RequiredSkill { SkillName = "CSS", OpportunityID = 7 }, new RequiredSkill { SkillName = "HTML5", OpportunityID = 7 }, new RequiredSkill { SkillName = "C#", OpportunityID = 7 }, new RequiredSkill { SkillName = "HTML", OpportunityID = 8 }, new RequiredSkill { SkillName = "Java", OpportunityID = 8 }, new RequiredSkill { SkillName = "Kubernetes", OpportunityID = 8 }, new RequiredSkill { SkillName = "Docker", OpportunityID = 8 } }; context.RequiredSkills.AddRange(requiredSkills); context.SaveChanges(); // Seed Popular Student Skills foreach (var s in requiredSkills) { context.PopularRequiredSkills.Add(new PopularRequiredSkill { name = s.SkillName.ToUpper(), count = 1 }); } var tags = new Tag[] { new Tag { TagName = "Computer Science", OpportunityID = 1 }, new Tag { TagName = "Biology", OpportunityID = 1 }, new Tag { TagName = "Ecology", OpportunityID = 2 }, new Tag { TagName = "Computer Science", OpportunityID = 3 }, new Tag { TagName = "Information Systems", OpportunityID = 3 }, new Tag { TagName = "Biochemistry", OpportunityID = 4 }, new Tag { TagName = "Computer Networking", OpportunityID = 5 }, new Tag { TagName = "Computer Science", OpportunityID = 5 }, new Tag { TagName = "Biology", OpportunityID = 6 }, new Tag { TagName = "Genetics", OpportunityID = 6 }, new Tag { TagName = "Machine Learning", OpportunityID = 7 }, new Tag { TagName = "Computer Science", OpportunityID = 7 }, new Tag { TagName = "Biology", OpportunityID = 8 }, new Tag { TagName = "Ecology", OpportunityID = 8 } }; context.Tags.AddRange(tags); context.SaveChanges(); }
protected override bool?DetermineSuccess() { var potentialTargets = ParentEvent.GetTargets(TargetTag).Where(e => e is Character).Select(e => e as Character); return(potentialTargets.Any(chr => chr.GetSkillLevel(RequiredSkill?.ToLowerInvariant()) >= RequiredLevel)); }
public override bool CheckCast() { if (!base.CheckCast()) { return(false); } if (!CheckExpansion(Caster)) { Caster.SendLocalizedMessage(1063456); // You must upgrade to Samurai Empire in order to use that ability. return(false); } if (Caster.Skills[SkillName.Bushido].Value < RequiredSkill) { string args = String.Format("{0}\t{1}\t ", RequiredSkill.ToString("F1"), CastSkill.ToString()); Caster.SendLocalizedMessage(1063013, args); // You need at least ~1_SKILL_REQUIREMENT~ ~2_SKILL_NAME~ skill to use that ability. return(false); } else if (Caster.Mana < ScaleMana(RequiredMana)) { Caster.SendLocalizedMessage(1060174, RequiredMana.ToString()); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability. return(false); } if (HonorableExecution.UnderEffect(Caster) || LightningStrike.UnderEffect(Caster) || MomentumStrike.UnderEffect(Caster)) { return(true); } WeaponAbility ability = WeaponAbility.GetCurrentAbility(Caster); if (ability != null) { WeaponAbility.ClearCurrentAbility(Caster); } if (AnimalForm.UnderEffect(Caster)) { if (this is HonorableExecution || this is LightningStrike || this is MomentumStrike) { Caster.SendLocalizedMessage(1063024); // You cannot perform this special move right now. return(false); } } if (FocusAttack.UnderEffect(Caster)) { Caster.Send(new SetNewSpell(0xF5, 0)); FocusAttack.m_Table.Remove(Caster); BaseWeapon weapon = Caster.Weapon as BaseWeapon; if (weapon != null) { FocusAttack.RemoveBonus(weapon); } } if (DeathStrike.UnderEffect(Caster)) { Caster.Send(new SetNewSpell(0xF6, 0)); DeathStrike.m_Table.Remove(Caster); } if (KiAttack.UnderEffect(Caster)) { Caster.Send(new SetNewSpell(0xF8, 0)); KiAttack.m_Table.Remove(Caster); } if (SurpriseAttack.UnderEffect(Caster)) { Caster.Send(new SetNewSpell(0xF9, 0)); SurpriseAttack.m_Table.Remove(Caster); } if (Backstab.UnderEffect(Caster)) { Caster.Send(new SetNewSpell(0xFA, 0)); Backstab.m_Table.Remove(Caster); } return(true); }