Пример #1
0
        public void IncreaseStage(StatBoostType boost, int offset)
        {
            switch (boost)
            {
            case StatBoostType.Atk:
                _atkStage = CappedAdd(_atkStage, offset, "Attack");
                break;

            case StatBoostType.Def:
                _defStage = CappedAdd(_defStage, offset, "Defense");
                break;

            case StatBoostType.Special:
                _specialAtkStage = CappedAdd(_specialAtkStage, offset, "Special");
                break;

            case StatBoostType.SpAtk:
                _specialAtkStage = CappedAdd(_specialAtkStage, offset, "Special");
                break;

            case StatBoostType.SpDef:
                _specialDefStage = CappedAdd(_specialDefStage, offset, "Special");
                break;

            case StatBoostType.Speed:
                _speedStage = CappedAdd(_speedStage, offset, "Speed");
                break;

            case StatBoostType.Evasion:
                _evasionStage = CappedAdd(_evasionStage, offset, "Evasion");
                break;

            case StatBoostType.Accuracy:
                _accuracyStage = CappedAdd(_accuracyStage, offset, "Accuracy");
                break;
            }
        }
Пример #2
0
        private double StatBootNum(StatBoostType stat, int stage)
        {
            if (stat <= StatBoostType.SpAtk)
            {
                switch (stage)
                {
                case -6: return(0.25);

                case -5: return(0.285);

                case -4: return(0.33);

                case -3: return(0.4);

                case -2: return(0.5);

                case -1: return(0.66);

                case 6: return(4);

                case 5: return(3.5);

                case 4: return(3);

                case 3: return(2.5);

                case 2: return(2);

                case 1: return(1.5);

                default: return(1);
                }
            }


            if (stat > StatBoostType.SpAtk)
            {
                int mock = stage;

                if (stat == StatBoostType.Evasion)
                {
                    mock = -stage;
                }

                switch (stage)
                {
                case -6: return(0.33);

                case -5: return(0.375);

                case -4: return(0.428);

                case -3: return(0.5);

                case -2: return(0.6);

                case -1: return(0.75);

                case 6: return(3);

                case 5: return(2.66);

                case 4: return(2.33);

                case 3: return(2);

                case 2: return(1.66);

                case 1: return(1.33);

                default: return(1);
                }
            }
            return(1);
        }