public IActionResult DeleteProffesion([FromForm] Professions icons) { var data = _saveData.DeleteProffesion(icons.Id); var _listofproffesions = _saveData.GetAllProfessions(); return(PartialView("_proffesionsList", _listofproffesions)); }
public async Task LoadAdditionals() { if (Program.botType == Program.BotType.Live) { Professions_Tier1 = new Professions(); } }
private static void DisplaySelectProfession() { GUILayout.BeginHorizontal(); GUILayout.Label(SMUtils.Localize("#smloc_roster_005"), GUILayout.Width(85)); // "Profession:" bool isPilot = GUILayout.Toggle(KerbalProfession == Professions.Pilot, SMUtils.Localize("#smloc_roster_006"), GUILayout.Width(90)); // "Pilot" if (isPilot) { KerbalProfession = Professions.Pilot; } bool isEngineer = GUILayout.Toggle(KerbalProfession == Professions.Engineer, SMUtils.Localize("#smloc_roster_007"), GUILayout.Width(90)); // "Engineer" if (isEngineer) { KerbalProfession = Professions.Engineer; } bool isScientist = GUILayout.Toggle(KerbalProfession == Professions.Scientist, SMUtils.Localize("#smloc_roster_008"), GUILayout.Width(90)); // "Scientist" if (isScientist) { KerbalProfession = Professions.Scientist; } GUILayout.EndHorizontal(); }
/* * Author: Dr Nexus * * On learning professions. * * Parameter c Character to learn profession on. * Paramter level Profession level. * Return learn profession or default code. */ public bool OnLearnProfession(Character c, ProfessionLevels level, Professions type) { if (level == ProfessionLevels.Apprentice) { if (type == Professions.Miner) { c.LearnSpell(2580); c.LearnSpell(2577); c.LearnSpell(2657); c.LearnSpell(2656); c.Copper -= 100; return(false); // do not add the default learning list } if (type == Professions.Herborist) { c.LearnSpell(3570); return(false); // do not add the default learning list } if (type == Professions.Blacksmith) { c.LearnSpell(2738); // copper axe c.LearnSpell(2739); // copper sword c.LearnSpell(2737); // copper mace c.LearnSpell(3293); // copper battle axe c.LearnSpell(3292); // copper heavy broadsword return(false); // do not add the default learning list } if (type == Professions.LeatherWorker) { return(false); // do not add the default learning list } } return(true); // execute the default code }
public Character(string nickname, int level, Races race, Professions profession) { this.Nickname = nickname; this.Race = race; this.Profession = profession; this.Level = level; }
public IActionResult createORUpdateProffesion([FromForm] Professions icons) { var data = _saveData.createORUpdateProffesion(icons.Id, icons.Name); var _listofproffesions = _saveData.GetAllProfessions(); return(PartialView("_proffesionsList", _listofproffesions)); }
public IActionResult OnPost() { Professions prof = db.Professions.Find(Profession.ProfessionId); try { db.Professions.Remove(prof); db.SaveChanges(); TempData["Message"] = "Profession Deleted Succesfully"; return(RedirectToPage("/ListProf")); } catch (DbUpdateException ex1) { Message = ex1.Message; if (ex1.InnerException != null) { Message += " : " + ex1.InnerException.Message; } } catch (Exception ex2) { Message = ex2.Message; } return(Page()); }
/// <summary>Iterate over known professions and award ones player does not have yet.</summary> private void AwardProfessions() { foreach (int profession in Config.Professions) { if (!Game1.player.professions.Contains(profession) && (profession % 6 > 1 || Game1.player.getEffectiveSkillLevel(Professions.GetSkillForProfession(profession)) >= 10 || Professions.HasAllProfessionsForSkill(Game1.player, Professions.GetSkillForProfession(profession)))) // only award first professions after second, due to UI limitations { Game1.player.professions.Add(profession); // hardcode... technically, this is from LevelUpMenu.getImmediateProfessionPerk if (profession == Farmer.fighter) { Game1.player.maxHealth += 15; } if (profession == Farmer.defender) { Game1.player.maxHealth += 25; } Game1.player.health = Game1.player.maxHealth; Monitor.Log("NG+: Awarding profession: " + profession, LogLevel.Info); } } }
public static async void SearchMails() { List <string> Urls = new List <string>(); string city = Cities.GetRandomCity(); string profession = Professions.GetRandomProfession(); string mailType = MailTypes.GetRandomMailType(); string q = "דרוש/ה " + profession + " ב" + city + " " + mailType; q = q.Replace(" ", "+"); for (int i = 10; i > 1; i--) { string query = string.Format("http://search.walla.co.il/?q={0}&type=text&page={1}", q, i); string g = getPageSource(query); List <string> urls = GetUrls(g); foreach (string u in urls) { Urls.Add(u); } } foreach (string u in Urls) { if (!string.IsNullOrEmpty(u)) { GetMails(u); } } }
internal void SetStats(Attributes attributes, Professions professions) { if (!entityStats) { return; } entityStats.SetStats(attributes, professions); }
internal Abilities() { _attributes = new AbilityAttributes(); _availableSkills = new AbilityAvailableSkills(); _availableProfessions = new AbilityAvailableProfessions(); _profession = new Professions(Declarations.Profession.Warrior, Declarations.Profession.None); _freeAttributePoints = 0; }
public BaseEmployee(string Name, string SurName, int Age, Professions Prof, int Exp) { this.Name = Name; this.SurName = SurName; this.Age = Age; this.Experience = Exp; this.Profession = Prof; }
//constructor for starting HP public HealthScript(int toughness, int heroLevel, Professions profession) { if (profession == Professions.Villager) { maxHP = 5 + ((toughness / 2) - 5); currentHP = maxHP; } }
public static void getProfessions() { //creates a callback function to return professions when it is finished Action <Professions> callback = delegate(Professions p) { professionsReady(p); }; //the constructor on Professions with automatically populate itself Professions professions = new Professions(callback); }
public Character(int raceID, int professionId) { Race = new Race(raceID); Professions.Add(new Profession(professionId)); rerollCharateristics(); Race.Characteristics.OnCharacteristicChange += recalculate; CharacteristicsFromRolls.OnCharacteristicChange += recalculate; }
public Player(int i, string n, Professions p, int x, int y) { Id = i; Name = n; Prof = p; Stats = new Stats(); Gold = 100; States[x, y] = FieldState.Player; }
public List <IGrouping <Section, IEntityCommonInfo> >[] GetProfessions() { var sections = Professions.Select(x => Grouping.New(x.Entity, x.List)).ToList(); var result = Rotate(sections); return(result); }
public static ProfessionDTO professionToDTO(Professions profession) { return(new ProfessionDTO() { ProfessionId = profession.ProfessionId, ProfessionName = profession.ProfessionName, BaseProfessionId = profession.baseprofessionId, ProfessionBaseName = profession.Professions2.ProfessionName//להגדיר שיכול להיותNULL????? }); }
public bool AddUserProfessions(int userID, int professionID) { bool confirmation = false; Professions professionManager = new Professions(); confirmation = professionManager.AddUserProfession(userID, professionID); return(confirmation); }
public NPCNeeds(Professions profession, Stats stats) { hunger = Random.Range(50.0f, 95.0f); thirst = Random.Range(50.0f, 95.0f); social = Random.Range(50.0f, 95.0f); fun = Random.Range(50.0f, 95.0f); work = Random.Range(50.0f, 95.0f); decayRates.AddRange(new float[] { 0.25f, 0.25f, 0.25f, 0.25f, 0.25f }); }
public bool UpdateProfession(string UpdatedProfessionDescription, int ProfessionID) { bool confirmation = false; Professions professionManager = new Professions(); confirmation = professionManager.UpdateProfession(UpdatedProfessionDescription, ProfessionID); return(confirmation); }
public Profession[] GetProfessions() { Profession[] professions; Professions professionManager = new Professions(); professions = professionManager.GetProfessions(); return(professions); }
public GameViewModel ToViewModel() { return(new GameViewModel { Name = Name, jobs = Professions.Select(p => p.Name).ToList(), species = SpeciesList.Select(s => s.Name).ToList(), rules = Rules }); }
protected Creature() { Morale = 100; Level = 1; Health = new CreatureHealth(this); Energy = new CreatureEnergy(this); Buffs = new CreatureBuffs(this); Professions = new Professions(Profession.Warrior, Profession.None); Inventory = new Inventory(); }
/// <returns>Zwraca odmieniony zawod</returns> public static string ProffesionsToPolishVariantString(this Professions profession) { return(profession switch { Professions.Nurse => "pielegniarzy/pielegniarek", Professions.Doctor => "doktorow/doktorek", Professions.Administrator => "administratorow/administratorek", Professions.Unknown => "nieznanych", _ => "nieznanych", });
public bool AddProfession(string professiondescription) { bool confirmation = false; Professions professionManager = new Professions(); confirmation = professionManager.AddProfession(professiondescription); return(confirmation); }
public PersonVm(Model.Person model) { _model = model; Name = model.Name; Age = model.Age; foreach (var professionModel in model.Professions) { Professions.Add(new ProfessionVm(professionModel)); } }
private void AddButton_Click(object sender, RoutedEventArgs e) { string nickname = this.NickTextBox.Text; int lvl = int.Parse(this.LevelTextBox.Text); Races race = (Races)Enum.Parse(typeof(Races), this.RaceComboBox.Text); Professions profession = (Professions)Enum.Parse(typeof(Professions), this.ProfessionComboBox.Text); Character character = new Character(nickname, lvl, race, profession); CharacterList.Add(character); }
public Skill() : base("spacechase0.Cooking") { Icon = Mod.instance.Helper.Content.Load <Texture2D>("assets/iconA.png"); SkillsPageIcon = Mod.instance.Helper.Content.Load <Texture2D>("assets/iconB.png"); ExperienceCurve = new int[] { 100, 380, 770, 1300, 2150, 3300, 4800, 6900, 10000, 15000 };; ExperienceBarColor = new Microsoft.Xna.Framework.Color(196, 76, 255); // Level 5 ProfessionSellPrice = new GenericProfession(this, "SellPrice"); ProfessionSellPrice.Icon = null; // TODO ProfessionSellPrice.Name = "Gourmet"; ProfessionSellPrice.Description = "+20% sell price"; Professions.Add(ProfessionSellPrice); ProfessionBuffTime = new GenericProfession(this, "BuffTime"); ProfessionBuffTime.Icon = null; // TODO ProfessionBuffTime.Name = "Satisfying"; ProfessionBuffTime.Description = "+25% buff duration once eaten"; Professions.Add(ProfessionBuffTime); ProfessionsForLevels.Add(new ProfessionPair(5, ProfessionSellPrice, ProfessionBuffTime)); // Level 10 - track A ProfessionConservation = new GenericProfession(this, "Conservation"); ProfessionConservation.Icon = null; // TODO ProfessionConservation.Name = "Efficient"; ProfessionConservation.Description = "15% chance to not consume ingredients"; Professions.Add(ProfessionConservation); ProfessionSilver = new GenericProfession(this, "Silver"); ProfessionSilver.Icon = null; // TODO ProfessionSilver.Name = "Professional Chef"; ProfessionSilver.Description = "Home-cooked meals are always at least silver"; Professions.Add(ProfessionSilver); ProfessionsForLevels.Add(new ProfessionPair(10, ProfessionConservation, ProfessionSilver, ProfessionSellPrice)); // Level 10 - track B ProfessionBuffLevel = new GenericProfession(this, "BuffLevel"); ProfessionBuffLevel.Icon = null; // TODO ProfessionBuffLevel.Name = "Intense Flavors"; ProfessionBuffLevel.Description = "Food buffs are one level stronger once eaten\n(+20% for max energy or magnetism)"; Professions.Add(ProfessionBuffLevel); ProfessionBuffPlain = new GenericProfession(this, "BuffPlain"); ProfessionBuffPlain.Icon = null; // TODO ProfessionBuffPlain.Name = "Secret Spices"; ProfessionBuffPlain.Description = "Provides a few random buffs when eating unbuffed food"; Professions.Add(ProfessionBuffPlain); ProfessionsForLevels.Add(new ProfessionPair(10, ProfessionBuffLevel, ProfessionBuffPlain, ProfessionBuffTime)); }
public Skill() : base("spacechase0.Magic") { Icon = Mod.instance.Helper.Content.Load <Texture2D>("assets/interface/magicexpicon.png"); SkillsPageIcon = null; // TODO: Make an icon for this ExperienceCurve = new int[] { 100, 380, 770, 1300, 2150, 3300, 4800, 6900, 10000, 15000 }; ExperienceBarColor = new Microsoft.Xna.Framework.Color(0, 66, 255); // Level 5 ProfessionUpgradePoint1 = new UpgradePointProfession(this, "UpgradePoints1"); ProfessionUpgradePoint1.Icon = null; // TODO ProfessionUpgradePoint1.Name = "Potential"; ProfessionUpgradePoint1.Description = "+2 spell upgrade points"; Professions.Add(ProfessionUpgradePoint1); ProfessionManaRegen1 = new GenericProfession(this, "ManaRegen1"); ProfessionManaRegen1.Icon = null; // TODO ProfessionManaRegen1.Name = "Mana Regen I"; ProfessionManaRegen1.Description = "+0.5 mana regen per level"; Professions.Add(ProfessionManaRegen1); ProfessionsForLevels.Add(new ProfessionPair(5, ProfessionUpgradePoint1, ProfessionManaRegen1)); // Level 10 - track A ProfessionUpgradePoint2 = new UpgradePointProfession(this, "UpgradePoints2"); ProfessionUpgradePoint2.Icon = null; // TODO ProfessionUpgradePoint2.Name = "Prodigy"; ProfessionUpgradePoint2.Description = "+2 spell upgrade points"; Professions.Add(ProfessionUpgradePoint2); ProfessionFifthSpellSlot = new GenericProfession(this, "FifthSpellSlot"); ProfessionFifthSpellSlot.Icon = null; // TODO ProfessionFifthSpellSlot.Name = "Memory"; ProfessionFifthSpellSlot.Description = "Adds a fifth spell per spell set."; Professions.Add(ProfessionFifthSpellSlot); ProfessionsForLevels.Add(new ProfessionPair(10, ProfessionUpgradePoint2, ProfessionFifthSpellSlot, ProfessionUpgradePoint1)); // Level 10 - track B ProfessionManaRegen2 = new GenericProfession(this, "ManaRegen2"); ProfessionManaRegen2.Icon = null; // TODO ProfessionManaRegen2.Name = "Mana Regen II"; ProfessionManaRegen2.Description = "+1 mana regen per level"; Professions.Add(ProfessionManaRegen2); ProfessionManaCap = new ManaCapProfession(this, "ManaCap"); ProfessionManaCap.Icon = null; // TODO ProfessionManaCap.Name = "Mana Reserve"; ProfessionManaCap.Description = "+500 max mana"; Professions.Add(ProfessionManaCap); ProfessionsForLevels.Add(new ProfessionPair(10, ProfessionManaRegen2, ProfessionManaCap, ProfessionManaRegen1)); }
static void Main(string[] args) { int jobPositions = int.Parse(Console.ReadLine()); Professions[] positions = new Professions[jobPositions]; for (int i = 0; i < jobPositions; i++) { positions[i] = new Professions(); String temp = Console.ReadLine(); String[] parsed = temp.Split('-'); parsed[0] = parsed[0].Substring(0, parsed[0].Length - 1); positions[i].name = parsed[0]; positions[i].rating = Convert.ToInt32(parsed[1]); } int totalEmployees = int.Parse(Console.ReadLine()); Employee[] allEmployees = new Employee[totalEmployees]; for (int i = 0; i < totalEmployees; i++) { allEmployees[i] = new Employee(); String temp = Console.ReadLine(); String[] parsed = temp.Split('-'); String[] names = parsed[0].Split(); parsed[1] = parsed[1].Substring(1, parsed[1].Length - 1); // String[] parsed = Regex.Split(temp, "(.*) (.*) - (.*)"); allEmployees[i].firstName = names[0]; allEmployees[i].secondName = names[1]; allEmployees[i].rating = positions.First(x => x.name == parsed[1]).rating; } allEmployees = allEmployees.OrderByDescending(x=>x.rating).ThenBy(x=>x.secondName).ThenBy(x=>x.firstName).ToArray(); foreach (var item in allEmployees) { Console.Write("{0} {1}\n", item.firstName, item.secondName); } }
/// <summary> /// 切换角色模型 /// </summary> void ShowRoleModel(Professions profession, Sex sex) { if (this.profession == profession && this.sex == sex) { return; } this.profession = profession; this.sex = sex; roleAnimation.End -= roleAnimation_End; roleAnimation.Dispose(roleAnimation, null); switch (profession) { case Professions.Warrior: description.Text = GlobalMethod.GetParagraphText(GetLanguagePackContent(34), '|', "\r\t\t"); if (sex == Sex.male) { roleAnimation = new AnimationBase() { Code = 73, Loop = true, Z = 1, }; maleModel.Content = roleAnimation; roleAnimation.HeartStart(); maleModel.IsHitTestVisible = false; femaleModel.Content = new Image() { Source = GlobalMethod.GetImage("UI/11.png", UriType.Web), Stretch = Stretch.None }; Canvas.SetZIndex(femaleModel, 2); femaleModel.IsHitTestVisible = true; } else { maleModel.Content = new Image() { Source = GlobalMethod.GetImage("UI/10.png", UriType.Web), Stretch = Stretch.None }; Canvas.SetZIndex(maleModel, 2); maleModel.IsHitTestVisible = true; roleAnimation = new AnimationBase() { Code = 74, Loop = true, Z = 1, }; femaleModel.Content = roleAnimation; roleAnimation.HeartStart(); femaleModel.IsHitTestVisible = false; } break; case Professions.Assassin: description.Text = GlobalMethod.GetParagraphText(GetLanguagePackContent(35), '|', "\r\t\t"); if (sex == Sex.male) { roleAnimation = new AnimationBase() { Code = 75, Loop = true, Z = 1, }; maleModel.Content = roleAnimation; roleAnimation.HeartStart(); maleModel.IsHitTestVisible = false; femaleModel.Content = new Image() { Source = GlobalMethod.GetImage("UI/13.png", UriType.Web), Stretch = Stretch.None }; Canvas.SetZIndex(femaleModel, 2); femaleModel.IsHitTestVisible = true; } else { maleModel.Content = new Image() { Source = GlobalMethod.GetImage("UI/12.png", UriType.Web), Stretch = Stretch.None }; Canvas.SetZIndex(maleModel, 2); maleModel.IsHitTestVisible = true; roleAnimation = new AnimationBase() { Code = 76, Loop = true, Z = 1, }; femaleModel.Content = roleAnimation; roleAnimation.HeartStart(); femaleModel.IsHitTestVisible = false; } break; case Professions.Archer: description.Text = GlobalMethod.GetParagraphText(GetLanguagePackContent(36), '|', "\r\t\t"); if (sex == Sex.male) { roleAnimation = new AnimationBase() { Code = 77, Loop = true, Z = 1, }; maleModel.Content = roleAnimation; roleAnimation.HeartStart(); maleModel.IsHitTestVisible = false; femaleModel.Content = new Image() { Source = GlobalMethod.GetImage("UI/15.png", UriType.Web), Stretch = Stretch.None }; Canvas.SetZIndex(femaleModel, 2); femaleModel.IsHitTestVisible = true; } else { maleModel.Content = new Image() { Source = GlobalMethod.GetImage("UI/14.png", UriType.Web), Stretch = Stretch.None }; Canvas.SetZIndex(maleModel, 2); maleModel.IsHitTestVisible = true; roleAnimation = new AnimationBase() { Code = 78, Loop = true, Z = 1, }; femaleModel.Content = roleAnimation; roleAnimation.HeartStart(); femaleModel.IsHitTestVisible = false; } break; case Professions.Taoist: description.Text = GlobalMethod.GetParagraphText(GetLanguagePackContent(37), '|', "\r\t\t"); if (sex == Sex.male) { roleAnimation = new AnimationBase() { Code = 79, Loop = true, Z = 1, }; maleModel.Content = roleAnimation; roleAnimation.HeartStart(); maleModel.IsHitTestVisible = false; femaleModel.Content = new Image() { Source = GlobalMethod.GetImage("UI/17.png", UriType.Web), Stretch = Stretch.None }; Canvas.SetZIndex(femaleModel, 2); femaleModel.IsHitTestVisible = true; } else { maleModel.Content = new Image() { Source = GlobalMethod.GetImage("UI/16.png", UriType.Web), Stretch = Stretch.None }; Canvas.SetZIndex(maleModel, 2); maleModel.IsHitTestVisible = true; roleAnimation = new AnimationBase() { Code = 80, Loop = true, Z = 1, }; femaleModel.Content = roleAnimation; roleAnimation.HeartStart(); femaleModel.IsHitTestVisible = false; } break; } roleAnimation.End += new System.EventHandler(roleAnimation_End); }
private static void DisplaySelectProfession() { GUILayout.BeginHorizontal(); GUILayout.Label("Profession:", GUILayout.Width(85)); bool isPilot = GUILayout.Toggle(KerbalProfession == Professions.Pilot, "Pilot", GUILayout.Width(90)); if (isPilot) KerbalProfession = Professions.Pilot; bool isEngineer = GUILayout.Toggle(KerbalProfession == Professions.Engineer, "Engineer", GUILayout.Width(90)); if (isEngineer) KerbalProfession = Professions.Engineer; bool isScientist = GUILayout.Toggle(KerbalProfession == Professions.Scientist, "Scientist", GUILayout.Width(90)); if (isScientist) KerbalProfession = Professions.Scientist; GUILayout.EndHorizontal(); }
private static void SetProfessionFlag() { switch (SelectedKerbal.Trait) { case "Pilot": KerbalProfession = Professions.Pilot; break; case "Engineer": KerbalProfession = Professions.Engineer; break; case "Scientist": KerbalProfession = Professions.Scientist; break; default: KerbalProfession = Professions.Tourist; break; } }
/// <summary> /// 获取职业名称 /// </summary> /// <param name="profession"></param> /// <returns></returns> string ProfessionName(Professions profession) { switch (profession) { case Professions.Warrior: return GetLanguagePackContent(26); case Professions.Taoist: return GetLanguagePackContent(27); case Professions.Archer: return GetLanguagePackContent(28); case Professions.Assassin: return GetLanguagePackContent(29); default: return GetLanguagePackContent(56); } }