Advertisement
spacechase0

Cooking skill

Aug 7th, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.92 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace CookingSkill
  8. {
  9.     public class Skill : SpaceCore.Skills.Skill
  10.     {
  11.         public Skill()
  12.         :   base( "spacechase0.Cooking" )
  13.         {
  14.             Name = "Cooking";
  15.             Icon = null; // TODO
  16.  
  17.             ExperienceCurve = new int[] { 100, 380, 770, 1300, 2150, 3300, 4800, 6900, 10000, 15000 }; ;
  18.  
  19.             ExperienceBarColor = new Microsoft.Xna.Framework.Color(196, 76, 255);
  20.  
  21.             // Level 5
  22.             Profession profSellPrice = new Profession(this, "SellPrice");
  23.             profSellPrice.Icon = null; // TODO
  24.             profSellPrice.Name = "Gourmet";
  25.             profSellPrice.Description = "+20% sell price";
  26.             Professions.Add(profSellPrice);
  27.  
  28.             Profession profBuffTime = new Profession(this, "BuffTime");
  29.             profBuffTime.Icon = null; // TODO
  30.             profBuffTime.Name = "Satisfying";
  31.             profBuffTime.Description = "+25% buff duration once eaten";
  32.             Professions.Add(profBuffTime);
  33.  
  34.             ProfessionsForLevels.Add(new ProfessionPair(5, profSellPrice, profBuffTime));
  35.            
  36.             // Level 10 - track A
  37.             Profession profConservation = new Profession(this, "Conservation");
  38.             profConservation.Icon = null; // TODO
  39.             profConservation.Name = "Efficient";
  40.             profConservation.Description = "15% chance to not consume ingredients";
  41.             Professions.Add(profSellPrice);
  42.  
  43.             Profession profSilver = new Profession(this, "Silver");
  44.             profSilver.Icon = null; // TODO
  45.             profSilver.Name = "Professional Chef";
  46.             profSilver.Description = "Home-cooked meals are always at least silver";
  47.             Professions.Add(profSilver);
  48.  
  49.             ProfessionsForLevels.Add(new ProfessionPair(10, profConservation, profSilver, profSellPrice));
  50.  
  51.             // Level 10 - track B
  52.             Profession profBuffLevel = new Profession(this, "BuffLevel");
  53.             profBuffLevel.Icon = null; // TODO
  54.             profBuffLevel.Name = "Intense Flavors";
  55.             profBuffLevel.Description = "Food buffs are one level stronger once eaten\n(+20% for max energy or magnetism)";
  56.             Professions.Add(profBuffLevel);
  57.  
  58.             Profession profBuffPlain = new Profession(this, "BuffPlain");
  59.             profBuffPlain.Icon = null; // TODO
  60.             profBuffPlain.Name = "Secret Spices";
  61.             profBuffPlain.Description = "Provides a few random buffs when eating unbuffed food";
  62.             Professions.Add(profBuffPlain);
  63.  
  64.             ProfessionsForLevels.Add(new ProfessionPair(10, profBuffLevel, profBuffPlain, profBuffTime));
  65.         }
  66.     }
  67. }
  68.  
  69.  
  70. // Usage
  71. var skill = new Skill();
  72. Skills.RegisterSkill( skill );
  73. int level = farmer.GetCustomSkillLevel( skill );
  74. farmer.AddCustomSkillExperience( skill, 10 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement