Example #1
0
 public Character(Characterclass c, string name, int lvl = 0)
 {
     life      = stats[0];
     maxLife   = life;
     this.c    = c;
     this.lvl  = lvl;
     this.name = name;
 }
Example #2
0
    public Character(Characterclass c, string name, int lvl = 0)
    {
        inventory = new Items[4];
        switch (c)
        {
        case Character.Characterclass.COUNT:
            stats = new int[] { 20, 20, 35, 20, 35, 10 };
            Calc c = new Calc("TI 83+");
            inventory[0] = c;
            break;

        case Character.Characterclass.GUARD:
            stats = new int[] { 45, 15, 45, 0, 15, 10 };
            Stick st = new Stick("Basic stick");
            inventory[0] = st;
            break;

        case Character.Characterclass.ING:
            stats = new int[] { 25, 15, 5, 40, 35, 35 };
            Computer co = new Computer("Raspberry Pi 0");
            break;

        case Character.Characterclass.INTER:
            stats = new int[] { 15, 15, 15, 15, 15, 15 };
            break;

        case Character.Characterclass.MAN:
            stats = new int[] { 10, 35, 10, 35, 10, 20 };
            Money m = new Money("just a little bit");
            inventory[0] = m;
            break;

        case Character.Characterclass.PDG:
            stats = new int[] { 10, 5, 10, 5, 10, 10 };
            Money m = new Money("just a little bit");
            inventory[0] = m;
            break;

        case Character.Characterclass.SEC:
            stats = new int[] { 10, 10, 10, 10, 10, 40 };
            Stapler s = new Stapler("Stapler of doom", 0, 5);
            inventory[0] = s;
            break;

        case Character.Characterclass.STAG:
            stats = new int[] { 20, 20, 20, 20, 20, 20 };
            Coffee cof = new Coffee("Nespresso");
            inventory[0] = cof;
            break;

        case Character.Characterclass.TECH:
            stats = new int[] { 15, 45, 5, 0, 20, 45 };
            Broom b = new Broom("Nimbus 2000");
            inventory[0] = b;
            break;

        default:
            stats = new int[] { 25, 25, 25, 25, 25, 25 };
            break;
        }
        for (int i = 0; i < 6; i++)
        {
            stats[i] += Random.Range(-2, 2);
            if (stats[i] < 0)
            {
                stats[i] = 0;
            }
        }
        life     = stats[0];
        maxLife  = life;
        this.lvl = 1;
        atk      = stats[1];
        def      = stats[2];
        matk     = stats[3];
        mdef     = stats[4];
        spd      = stats[5];



        life       = Life;
        maxLife    = life;
        this.c     = c;
        this.lvl   = lvl;
        this.cname = name;
    }
Example #3
0
    public Character(Characterclass c, string name, int lvl = 1)
    {
        inventory = new List <Items>(4);
        switch (c)
        {
        case Character.Characterclass.COUNT:
            stats  = new int[] { 30, 30, 40, 30, 40, 100 };
            step   = new float[] { 1.3f, 1.4f, 1.2f, 1.3f, 1.4f, 1.3f };
            salary = 2500;
            // Calc cal = new Calc("TI 83+");
            //  inventory[0] = cal;
            break;

        case Character.Characterclass.GUARD:
            stats  = new int[] { 50, 20, 50, 0, 30, 100 };
            step   = new float[] { 1.3f, 2.1f, 2.1f, 0, 1.3f, 1.2f };
            salary = 1500;
            //  Stick st = new Stick("Basic stick");
            //  inventory[0] = st;
            break;

        case Character.Characterclass.ING:
            salary = 1800;
            stats  = new int[] { 30, 10, 30, 50, 40, 80 };
            step   = new float[] { 1.1f, 1.3f, 1.3f, 1.8f, 1.5f, 1.5f };
            // Computer co = new Computer("Raspberry Pi 0");
            break;

        case Character.Characterclass.INTER:
            salary = 1000;
            stats  = new int[] { 20, 20, 20, 20, 20, 100 };
            step   = new float[] { 1.3f, 1.3f, 1.3f, 1.3f, 1.3f, 1.3f };
            break;

        case Character.Characterclass.MAN:
            salary = 1800;
            stats  = new int[] { 20, 40, 20, 40, 20, 110 };
            step   = new float[] { 1.8f, 1.4f, 1.4f, 1.7f, 1.4f, 1.5f };
            // Money m = new Money("just a little bit");
            // inventory[0] = m;
            break;

        case Character.Characterclass.PDG:
            salary = 0;
            stats  = new int[] { 20, 10, 20, 10, 20, 120 };
            step   = new float[] { 1.3f, 1.4f, 1.4f, 1.3f, 1.4f, 1.5f };
            // Money m2 = new Money("just a little bit");
            // inventory[0] = m2;
            break;

        case Character.Characterclass.SEC:
            salary = 1200;
            stats  = new int[] { 30, 30, 30, 30, 30, 110 };
            step   = new float[] { 1.2f, 1.2f, 1.2f, 1.2f, 1.2f, 1.3f };
            //  Stapler s = new Stapler("Stapler of doom", 0, 5);
            //  inventory[0] = s;
            break;

        case Character.Characterclass.STAG:
            salary = 800;
            stats  = new int[] { 20, 20, 20, 20, 20, 90 };
            step   = new float[] { 1.3f, 1.3f, 1.3f, 1.3f, 1.3f, 1.2f };
            //  Coffee cof = new Coffee("Nespresso");
            //  inventory[0] = cof;
            break;

        case Character.Characterclass.TECH:
            salary = 1200;
            stats  = new int[] { 20, 50, 10, 0, 10, 80 };
            step   = new float[] { 2.2f, 1.1f, 1.2f, 0, 1.1f, 1.6f };
            //  Broom b = new Broom("Nimbus 2000");
            //  inventory[0] = b;
            break;

        default:
            stats = new int[] { 25, 25, 25, 25, 25, 25 };
            break;
        }
        for (int i = 0; i < 6; i++)
        {
            stats[i] += Random.Range(-2, 2);
            for (int j = 1; j < lvl; j++)
            {
                life += (int)((step[0] + 1) * Life);
                atk   = (int)((step[1] + 1) * Atk);
                def   = (int)((step[2] + 1) * Def);
                matk  = (int)((step[3] + 1) * Matk);
                mdef  = (int)((step[4] + 1) * Mdef);
                spd   = (int)((step[5] + 1) * Spd);
            }
            if (stats[i] < 0)
            {
                stats[i] = 0;
            }
        }
        salary += Random.Range(-200, +150);
        salary *= lvl;
        if (salary < 0)
        {
            salary = 0;
        }
        life     = stats[0];
        maxLife  = life;
        this.lvl = 1;
        atk      = stats[1];
        def      = stats[2];
        matk     = stats[3];
        mdef     = stats[4];
        spd      = stats[5];

        this.c     = c;
        this.lvl   = lvl;
        this.cname = name;
        interstats = stats;
    }