コード例 #1
0
    public void TestAngriffBonus()
    {
        this.mCharacter.Spezies = Races.Elf;
        mCharacter.Gs           = UnityEngine.Random.Range(1, 101); //Zufallswert
        CharacterEngine.ComputeNaturGegebenI(this.mCharacter);

        Assert.LessOrEqual(mCharacter.AnB, _MAX_ANB);
        Assert.GreaterOrEqual(mCharacter.AnB, _MIN_ANB);
    }
コード例 #2
0
    public void TestZaubern()
    {
        this.mCharacter.Spezies  = Races.Mensch;        //Rasse gleichgültig
        this.mCharacter.Archetyp = AbenteuerTyp.As;

        for (int i = 0; i < 10; i++)
        {
            CharacterEngine.ComputeBasisZt(this.mCharacter);
            CharacterEngine.ComputeNaturGegebenI(this.mCharacter);
            Assert.AreEqual(_ZAUB_KÄMPFER, this.mCharacter.Zaubern);
        }
    }
コード例 #3
0
    public void TestAbwehr()
    {
        this.mCharacter.Spezies = Races.Mensch;         //Rasse gleichgültig

        for (int i = 0; i < 10; i++)
        {
            CharacterEngine.ComputeBasisGw(this.mCharacter);
            CharacterEngine.ComputeNaturGegebenI(this.mCharacter);
            Assert.LessOrEqual(this.mCharacter.Abwehr, _MAX_ABW);
            Assert.GreaterOrEqual(this.mCharacter.Abwehr, _MIN_ABW);
        }
    }
コード例 #4
0
    public void SetNaturCompute()
    {
        Toolbox globalVars = Toolbox.Instance;

        //Berechne-> und speicher in Charakter
        CharacterEngine.ComputeNaturGegebenI(globalVars.mCharacter);

        inAnB.text     = globalVars.mCharacter.AnB.ToString();
        inAbB.text     = globalVars.mCharacter.AbB.ToString();
        inZauB.text    = globalVars.mCharacter.ZauB.ToString();
        inZaubern.text = globalVars.mCharacter.Zaubern.ToString();
        inAbwehr.text  = globalVars.mCharacter.Abwehr.ToString();
        inRaufen.text  = globalVars.mCharacter.Raufen.ToString();

        Debug.Log(globalVars.mCharacter.ToString());
    }
コード例 #5
0
    public void TestRaufen()
    {
        this.mCharacter.Spezies = Races.Mensch;
        MidgardCharakter zwergChar = new MidgardCharakter();

        zwergChar.Spezies = Races.Zwerg;
        int Gs = UnityEngine.Random.Range(1, 101);
        int St = UnityEngine.Random.Range(61, 101);        //Min-Wert für Zwerg
        int Gw = UnityEngine.Random.Range(1, 81);          //Max-Wert für Zwerg

        //Gleich initialisieren
        mCharacter.Gs = Gs;
        mCharacter.St = St;
        mCharacter.Gw = Gw;
        zwergChar.Gs  = Gs;
        zwergChar.St  = St;
        zwergChar.Gw  = Gw;

        CharacterEngine.ComputeNaturGegebenI(this.mCharacter);
        CharacterEngine.ComputeNaturGegebenI(zwergChar);

        Assert.AreEqual(mCharacter.Raufen + 1, zwergChar.Raufen);
    }