Пример #1
0
        private void CheckLevelIncreases(IMessageChannel battleChannel)
        {
            var nextLevel = NinjaLevel.Levels[Level.Number + 1];

            if (ExpLevel < nextLevel.ExpRequirements)
            {
                return;
            }
            ExpLevel = 0; Level = nextLevel;
            var loc            = Skills.AddNewSkill();
            var levelUpMessage = "<@!" + UserId + "> has leveled up to a " + Level.Name + ".";

            if (loc != -1)
            {
                var skill = Skills[loc];
                if (skill.Level == 1)
                {
                    levelUpMessage += " Obtained new skill **" + skill.BaseSkill.Name + "**!";
                }
                else
                {
                    levelUpMessage += " Upgraded skill to **" + skill.BaseSkill.Name + " " + skill.GetLevelText() + "**!";
                }
            }
            battleChannel?.SendMessageAsync(levelUpMessage);
        }
Пример #2
0
        public int Prestige()
        {
            if (Level.Number == 0)
            {
                return(0);
            }

            // Create Tokens
            var tokensEarned = Level.Number;

            Tokens += tokensEarned;

            // Reset Everything
            ExpLevel       = 0;
            Level          = NinjaLevel.Levels[0];
            MaxHP          = 30;
            CurrentHP      = 30;
            MaxStamina     = 10;
            CurrentStamina = 10;
            HitMinimum     = 2;
            HitMaximum     = 5;
            Speed          = 2.5;

            return(tokensEarned);
        }
Пример #3
0
 public NinjaSaveProfile(
     ulong userId, int maxHP, int cHP, int stamina, int hitMin, int hitMax, double speed,
     IEnumerable <NinjaSkill> skills, int expLevel, NinjaLevel level, string challengeMessage)
 {
     UserId           = userId;
     MaxHP            = maxHP;
     CurrentHP        = cHP;
     MaxStamina       = stamina;
     HitMinimum       = hitMin;
     HitMaximum       = hitMax;
     Speed            = speed;
     ExpLevel         = expLevel;
     LevelIndex       = level.Number;
     ChallengeMessage = challengeMessage;
     foreach (var skill in skills)
     {
         Skills.Add(skill.CreateSaveSkill());
     }
 }
Пример #4
0
 public NinjaProfile(ulong userId)
 {
     UserId = userId;
     Level  = NinjaLevel.Levels[0];
     IncreaseStats(10);
 }