Ejemplo n.º 1
0
        protected override IMove GetMove(HtmlNodeCollection cells, WebCharacter character)
        {
            var move = default(IMove);

            if (!string.IsNullOrEmpty(cells[0].InnerText) && cells.Count > 1)
            {
                string name    = GetStatName(cells[0]);
                string faf     = cells[2].InnerText;
                string angle   = cells[4].InnerText;
                string bkbwbkb = cells[5].InnerText;
                string kbg     = cells[6].InnerText;

                string landingLag = cells[7].InnerText;

                var autocancel = new CommonAutocancelParameterResolver().Resolve(cells[8]);

                move = ScrapingServices.CreateMove();

                move = new CommonMoveParameterResolver(character.Game).Resolve(cells, move);

                move.Name  = name;
                move.Angle = angle;
                move.BaseKnockBackSetKnockback = bkbwbkb;
                move.FirstActionableFrame      = faf;
                move.KnockbackGrowth           = kbg;
                move.LandingLag = landingLag;
                move.AutoCancel = autocancel;
                move.MoveType   = MoveType.Aerial.GetEnumDescription();
                move.Owner      = character.Name;
                move.OwnerId    = character.OwnerId;
            }

            return(move);
        }
Ejemplo n.º 2
0
        protected override IMove GetMove(HtmlNodeCollection cells, WebCharacter character)
        {
            var move = default(IMove);

            if (!string.IsNullOrEmpty(cells[0].InnerText) && cells.Count > 1)
            {
                string name = GetStatName(cells[0]);
                //string hitboxActive = cells[1].InnerText;
                string faf = cells[2].InnerText;

                //string basedmg = cells[3].InnerText;

                string angle   = cells[4].InnerText;
                string bkbwbkb = cells[5].InnerText;
                string kbg     = cells[6].InnerText;

                move = ScrapingServices.CreateMove();

                move = new CommonMoveParameterResolver(character.Game).Resolve(cells, move);

                move.Name  = name;
                move.Angle = angle;
                //move.BaseDamage = basedmg;
                move.BaseKnockBackSetKnockback = bkbwbkb;
                move.FirstActionableFrame      = faf;
                //move.HitboxActive = hitboxActive;
                move.KnockbackGrowth = kbg;
                move.MoveType        = MoveType.Special.GetEnumDescription();
                move.Owner           = character.Name;
                move.OwnerId         = character.OwnerId;
                //move.Game = character.SourceUrl.Contains("Ultimate") ? Games.Ultimate : Games.Smash4;
            }

            return(move);
        }
Ejemplo n.º 3
0
        protected override IMove GetMove(HtmlNodeCollection cells, WebCharacter character)
        {
            if (!string.IsNullOrEmpty(cells[0].InnerText) && cells.Count > 1)
            {
                string name = GetStatName(cells[0]);

                IMove move = ScrapingServices.CreateMove();

                move.Name     = name;
                move.Owner    = character.Name;
                move.OwnerId  = character.OwnerId;
                move.MoveType = MoveType.Throw.GetEnumDescription();

                if (name.IndexOf(ScrapingConstants.CommonMoveNames.Throw, StringComparison.OrdinalIgnoreCase) >= 0)
                {
                    if (character.SourceUrl.Contains("Smash4")) //this value isn't present in Ultimate values on kh site yet.
                    {
                        bool isWeightDependent = TranslateYesNoToBool(cells[1].InnerText);
                        move.IsWeightDependent = isWeightDependent;

                        string baseDamage = new Smash4BaseDamageResolver().GetRawValue(cells[2]);
                        move.BaseDamage = baseDamage;

                        string angle = cells[3].InnerText;
                        string baseKnockbackSetKnockback = cells[4].InnerText;
                        string knockbackGrowth           = cells[5].InnerText;

                        move.Angle = angle;
                        move.BaseKnockBackSetKnockback = baseKnockbackSetKnockback;
                        move.KnockbackGrowth           = knockbackGrowth;
                    }
                    else if (character.SourceUrl.Contains("Ultimate"))
                    {
                        string baseDamage = new UltimateBaseDamageResolver().GetRawValue(cells[1]);
                        move.BaseDamage = baseDamage;

                        string angle = cells[2].InnerText;
                        string baseKnockbackSetKnockback = cells[3].InnerText;
                        string knockbackGrowth           = cells[4].InnerText;

                        move.Angle = angle;
                        move.BaseKnockBackSetKnockback = baseKnockbackSetKnockback;
                        move.KnockbackGrowth           = knockbackGrowth;

                        move.Game = character.Game;
                    }

                    return(move);
                }
                else
                {
                    return(default(IMove));
                }
            }
            else
            {
                return(default(IMove));
            }
        }
Ejemplo n.º 4
0
        protected override IMove GetMove(HtmlNodeCollection cells, WebCharacter character)
        {
            var move = default(IMove);

            string name = GetStatName(cells[0]);

            //a throw move is not a ground move
            if (name.IndexOf(ScrapingConstants.CommonMoveNames.Throw, StringComparison.OrdinalIgnoreCase) >= 0)
            {
                return(default(IMove));
            }

            if (!string.IsNullOrEmpty(cells[0].InnerText) && cells.Count > 1)
            {
                move = ScrapingServices.CreateMove();
                move = new CommonMoveParameterResolver(character.Game).Resolve(cells, move);

                string faf = cells[2].InnerText;

                string angle   = cells[4].InnerText;
                string bkbwbkb = cells[5].InnerText;
                string kbg     = cells[6].InnerText;

                move.Name = name;

                move.Angle = angle;
                move.BaseKnockBackSetKnockback = bkbwbkb;
                move.FirstActionableFrame      = faf;
                move.KnockbackGrowth           = kbg;
                move.MoveType = MoveType.Ground.GetEnumDescription();
                move.Owner    = character.Name;
                move.OwnerId  = character.OwnerId;
            }

            return(move);
        }