Beispiel #1
0
    public void GenMonsterStrength(int targetStrength)   // pass in a level value for more controll.
    {
        int multiplyer = targetStrength - baseLevel;

        if (multiplyer > 0)   //zero use base stats. shouldnt be negative but if it is use base stats.
        {
            name = RandomEnum.IndexOf <MonsterStrength>(multiplyer).ToString() + " " + name;
            multiplyer++; // max level = 8 min level is 0 therefor a rat can have a 9x multiplyer...
            health    *= multiplyer;
            minDamage *= multiplyer;
            maxDamage *= multiplyer;
            //accuracy - constant?
            //attackSpeed *= multiplyer;
            armor *= multiplyer;
            //difficultyToHit - constant?
        }
    }
Beispiel #2
0
    public virtual void GenerateQuality(int value)
    {
        if (value > 7)
        {
            value = 7;
        }
        if (material == Material.Metal)
        {
            MetalMaterial randomMaterial = RandomEnum.IndexOf <MetalMaterial>(value);

            name            = randomMaterial.ToString() + " " + name;
            levelMultiplyer = (int)randomMaterial + 1;//starts at zero
        }
        else if (material == Material.Wood)
        {
            WoodMaterial randomMaterial = RandomEnum.IndexOf <WoodMaterial>(value);

            name            = randomMaterial.ToString() + " " + name;
            levelMultiplyer = (int)randomMaterial + 1;//starts at zero
        }
        else if (material == Material.Cloth)
        {
            LightMaterial randomMaterial = RandomEnum.IndexOf <LightMaterial>(value);

            name            = randomMaterial.ToString() + " " + name;
            levelMultiplyer = (int)randomMaterial + 1;//starts at zero
        }
        else if (material == Material.Leather)
        {
            LeatherMaterial randomMaterial = RandomEnum.IndexOf <LeatherMaterial>(value);

            name            = randomMaterial.ToString() + " " + name;
            levelMultiplyer = (int)randomMaterial + 1;//starts at zero
        }
        else if (material == Material.Gem)
        {
            GemMaterial randomMaterial = RandomEnum.IndexOf <GemMaterial>(value);

            name            = randomMaterial.ToString() + " " + name;
            levelMultiplyer = (int)randomMaterial + 1;//starts at zero
        }


        //change values based on material quality;
        defence *= levelMultiplyer;
    }