Beispiel #1
0
 public void AddModifier(string modifier, Modifier handler)
 {
     if (!Modifiers.ContainsKey(modifier))
         Modifiers.Add(modifier, handler);
 }
Beispiel #2
0
 public static Dictionary<string, Skill> GenerateSkillTable()
 {
     var skillTable = new Dictionary<string, Skill>();
     var lumberJack = new Skill(HRK.LumberJack, "This skill allows you to gather wood faster. Each point gives you 10% more wood per hit.", 0, 20);
     var woodAndFleshModifier = new Modifier(HRK.GatherModifier, new List<object>(){10});
     lumberJack.AddModifier(HRK.GatherModifier, woodAndFleshModifier);
     skillTable.Add(HRK.LumberJack, lumberJack);
     var miner = new Skill(HRK.Miner, "This skill allows you to gather stones faster. Each point gives you 5% more stones per hit.", 0, 20);
     miner.AddModifier(HRK.GatherModifier, new Modifier(HRK.GatherModifier, new List<object>(){5}));
     skillTable.Add(HRK.Miner, miner);
     var hunter = new Skill(HRK.Hunter, "This skill allows you to gather resources faster from animals. Each point gives you 10% more resources per hit.", 0, 20);
     hunter.AddModifier(HRK.GatherModifier, woodAndFleshModifier);
     skillTable.Add(HRK.Hunter, hunter);
     var researcher = new Skill(HRK.Researcher, "This skill allows you to research items you have. Each level enables a type of type to be researched and decreases 2 minutes of cooldown. Table: Level 1 - Tools (10 min); Level 2 - Clothes (8 min); Level 3 - Construction and Resources (6 min); Level 4 - Ammunition and Medic (4 min); Level 5 - Weapons (2 min)", 30, 5);
     researcher.SkillpointsPerLevel = 7;
     researcher.Usage = "To research an item type \"/research \"Item Name\" \". In order to research an item, you must have it on your invetory, and have the required skill level for that item tier.";
     researcher.AddRequiredStat("int", (int) Math.Floor(researcher.RequiredLevel*2.5d));
     researcher.AddModifier(HRK.CooldownModifier, new Modifier(HRK.CooldownModifier, new List<object>() {10,2}));
     skillTable.Add(HRK.Researcher, researcher);
     var blacksmith = new Skill(HRK.Blacksmith, "This skill allows your furnaces to melt more resources each time. Each level gives increase the productivity by 1.",30, 5);
     blacksmith.SkillpointsPerLevel = 7;
     blacksmith.AddRequiredStat("str", (int)Math.Floor(blacksmith.RequiredLevel * 2.5d));
     skillTable.Add(HRK.Blacksmith, blacksmith);
     var blinkarrow = new Skill(HRK.BlinkArrow, "This skill allows you to blink to your arrow destination from time to time. Each level deacreases the cooldown in 2 minutes.", 70, 5);
     blinkarrow.Usage = "Just shoot an Arrow at desired blink location. To toogle this skill type \"/h ba\" . To change the auto toggle for this skill type \"/h aba\"";
     blinkarrow.AddModifier(HRK.CooldownModifier, new Modifier(HRK.CooldownModifier, new List<object>() {9, 2}));
     blinkarrow.SkillpointsPerLevel = 10;
     blinkarrow.AddRequiredStat("agi", (int)Math.Floor(blinkarrow.RequiredLevel * 2.5d));
     skillTable.Add(HRK.BlinkArrow, blinkarrow);
     return skillTable;
 }