Ejemplo n.º 1
0
        public void testGetCreatureStatsWithMods()
        {
            List <Pair <StatName, StatModifier> > mods = new List <Pair <StatName, StatModifier> >();

            mods.Add(new Pair <StatName, StatModifier>(StatName.STR, new StatModifier(10, 1)));
            mods.Add(new Pair <StatName, StatModifier>(StatName.STR, new StatModifier(30, 2)));
            mods.Add(new Pair <StatName, StatModifier>(StatName.ARM, new StatModifier(0, 3)));
            mods.Add(new Pair <StatName, StatModifier>(StatName.SPD, new StatModifier(10, 0.5)));
            mods.Add(new Pair <StatName, StatModifier>(StatName.SPD, new StatModifier(-20, 0.25)));

            CreatureStats result = testBase.getStatsWithMods(mods);

            Assert.That(result.getStat(StatName.HP) == 100);
            Assert.That(result.getStat(StatName.STR) == 280);
            Assert.That(result.getStat(StatName.ARM) == 300);
            Assert.That(result.getStat(StatName.SPD) == (int)(90 * 0.5 * 0.25));
        }
Ejemplo n.º 2
0
 public CreatureStats getStats()
 {
     return(baseStats.getStatsWithMods(currentForm.statMods));
 }