Example #1
0
    public Critter(double baseHp, double dmgBase, double speedBase, double defBase, string critName,
                   afinity afinityType, Sprite msprite)
    {
        mSprite = msprite;
        //Verificar el daño entr 10 y 100
        if (dmgBase > 100)
        {
            this.DmgBase = 100;
        }
        else if (dmgBase < 10)
        {
            this.DmgBase = 10;
        }
        else
        {
            this.DmgBase = dmgBase;
        }

        //verificar defensa entre 10 y 100
        if (defBase > 100)
        {
            this.baseDefense = 100;
        }
        else if (defBase < 10)
        {
            this.baseDefense = 10;
        }
        else
        {
            this.baseDefense = defBase;
        }

        //verificar si la velocidad 1 y 50
        if (speedBase > 50)
        {
            this.baseSpeed = 50;
        }
        else if (speedBase < 1)
        {
            this.baseSpeed = 1;
        }
        else
        {
            this.baseSpeed = speedBase;
        }

        this.baseHP      = baseHp;
        this.critName    = critName;
        this.afinityType = afinityType;

        actualHP      = this.baseHP;
        actualAttack  = this.baseAttack;
        actualDefence = this.baseDefense;
    }
Example #2
0
        public Critter(double hpBase, double dmgBase, double speedBase, double defBase, string critName, afinity afinityType, List <Skill> Moveset)
        {
            //Verificar el daño entr 10 y 100
            if (dmgBase > 100)
            {
                this.DmgBase = 100;
            }
            else if (dmgBase < 10)
            {
                this.DmgBase = 10;
            }
            else
            {
                this.DmgBase = dmgBase;
            }
            //verificar defensa entre 10 y 100
            if (defBase > 100)
            {
                this.defBase = 100;
            }
            else if (defBase < 10)
            {
                this.defBase = 10;
            }
            else
            {
                this.defBase = defBase;
            }
            //verificar si la velocidad 1 y 50
            if (speedBase > 50)
            {
                this.speedBase = 50;
            }
            else if (speedBase < 1)
            {
                this.speedBase = 1;
            }
            else
            {
                this.speedBase = speedBase;
            }

            this.hpBase      = hpBase;
            this.critName    = critName;
            this.afinityType = afinityType;

            hpActual  = this.hpBase;
            dmgActual = this.dmgBase;
            defActual = this.defBase;

            this.Moveset = Moveset;
        }
Example #3
0
    public AtackSkill(double skillPower, afinity afinity, string name)
    {
        if (skillPower <= 0)
        {
            this.skillPower = 1;
        }
        else
        {
            this.skillPower = skillPower;
        }

        base.afinity = afinity;
        base.name    = name;
    }
Example #4
0
        public static double CalculateAffinity(afinity afinityAttack, afinity afinityTerget)
        {
            double dmg = 0;

            //Tabla de valores de la afinidad
            switch (afinityAttack)
            {
            case afinity.Dark:
                switch (afinityTerget)
                {
                case afinity.Dark:
                    dmg = 0.5;
                    break;

                case afinity.Ligth:
                    dmg = 2;
                    break;

                case afinity.Fire:
                    dmg = 1;
                    break;

                case afinity.Water:
                    dmg = 1;
                    break;

                case afinity.Wind:
                    dmg = 1;
                    break;

                case afinity.Earth:
                    dmg = 1;
                    break;

                default:
                    dmg = 1;
                    break;
                }
                break;

            case afinity.Ligth:
                switch (afinityTerget)
                {
                case afinity.Dark:
                    dmg = 2;
                    break;

                case afinity.Ligth:
                    dmg = 0.5;
                    break;

                case afinity.Fire:
                    dmg = 1;
                    break;

                case afinity.Water:
                    dmg = 1;
                    break;

                case afinity.Wind:
                    dmg = 1;
                    break;

                case afinity.Earth:
                    dmg = 1;
                    break;

                default:
                    dmg = 1;
                    break;
                }
                break;

            case afinity.Fire:
                switch (afinityTerget)
                {
                case afinity.Dark:
                    dmg = 1;
                    break;

                case afinity.Ligth:
                    dmg = 1;
                    break;

                case afinity.Fire:
                    dmg = 0.5;
                    break;

                case afinity.Water:
                    dmg = 2;
                    break;

                case afinity.Wind:
                    dmg = 1;
                    break;

                case afinity.Earth:
                    dmg = 0;
                    break;

                default:
                    dmg = 1;
                    break;
                }
                break;

            case afinity.Water:
                switch (afinityTerget)
                {
                case afinity.Dark:
                    dmg = 1;
                    break;

                case afinity.Ligth:
                    dmg = 1;
                    break;

                case afinity.Fire:
                    dmg = 0.5;
                    break;

                case afinity.Water:
                    dmg = 0.5;
                    break;

                case afinity.Wind:
                    dmg = 2;
                    break;

                case afinity.Earth:
                    dmg = 1;
                    break;

                default:
                    dmg = 1;
                    break;
                }
                break;

            case afinity.Wind:
                switch (afinityTerget)
                {
                case afinity.Dark:
                    dmg = 1;
                    break;

                case afinity.Ligth:
                    dmg = 1;
                    break;

                case afinity.Fire:
                    dmg = 1;
                    break;

                case afinity.Water:
                    dmg = 0.5;
                    break;

                case afinity.Wind:
                    dmg = 0.5;
                    break;

                case afinity.Earth:
                    dmg = 0.5;
                    break;

                default:
                    dmg = 1;
                    break;
                }
                break;

            case afinity.Earth:
                switch (afinityTerget)
                {
                case afinity.Dark:
                    dmg = 1;
                    break;

                case afinity.Ligth:
                    dmg = 1;
                    break;

                case afinity.Fire:
                    dmg = 1;
                    break;

                case afinity.Water:
                    dmg = 1;
                    break;

                case afinity.Wind:
                    dmg = 2;
                    break;

                case afinity.Earth:
                    dmg = 0.5;
                    break;

                default:
                    dmg = 1;
                    break;
                }
                break;

            default:
                dmg = 1;
                break;
            }

            return(dmg);
        }
Example #5
0
 public AtackSkill(double skillPower, afinity afinity, string nombre)
 {
     this.skillPower = skillPower;
     base.afinity    = afinity;
     base.nombre     = nombre;
 }