public void AddEXPWithoutLevelUp() { IceMage iceMage = gameObject.AddComponent <IceMage>(); iceMage.LoadAttr(); iceMage.LevelManager = new MageLeveling(iceMage, 1); iceMage.LevelManager.AddEXP(699); Assert.AreEqual(1, iceMage.LevelManager.Level); Assert.AreEqual(699f, iceMage.LevelManager.CurrentEXP); }
private IceMage getInstance() { if(instance == null) { instance = this; HeroPool.GetInstance().SetHero(this, CommonConfig.IceMage); LevelManager = new MageLeveling(this, IceMageConfig.Level); } return instance; }
public void AddEXP() { IceMage iceMage = gameObject.AddComponent <IceMage>(); iceMage.LevelManager = new MageLeveling(iceMage, 1); iceMage.ATK = new CharacterAttribute(); iceMage.LevelManager.AddEXP(700); //Debug.Log("EXP: " + iceMage.LevelManager.CurrentEXP); //Assert.AreEqual(700, iceMage.LevelManager.CurrentEXP); }
public void EXPToLevelUp() { IceMage iceMage = gameObject.AddComponent <IceMage>(); iceMage.LevelManager = new MageLeveling(iceMage, 1); Assert.AreEqual(700f, iceMage.LevelManager.TotalEXPToLevelUp(1)); Assert.AreEqual(750f, iceMage.LevelManager.TotalEXPToLevelUp(2)); Assert.AreEqual(850f, iceMage.LevelManager.TotalEXPToLevelUp(3)); Assert.AreEqual(1100f, iceMage.LevelManager.TotalEXPToLevelUp(4)); Assert.AreEqual(1650f, iceMage.LevelManager.TotalEXPToLevelUp(5)); }
public void GoLevel2() { IceMage iceMage = gameObject.AddComponent <IceMage>(); //TODO: MageLeveling will modify ATK, so iceMage needs to initilize ATK object first iceMage.ATK = new CharacterAttribute(); iceMage.LevelManager = new MageLeveling(iceMage, 1); iceMage.LevelManager.AddEXP(800); Debug.Log("Level: " + iceMage.LevelManager.Level); Assert.AreEqual(2, iceMage.LevelManager.Level); }
public void IceMageGoLevel2() { IceMage iceMage = gameObject.AddComponent <IceMage>(); iceMage.LoadAttr(); iceMage.LevelManager = new MageLeveling(iceMage, 1); iceMage.LevelManager.AddEXP(700); Assert.AreEqual(2, iceMage.LevelManager.Level); Assert.AreEqual(110f, iceMage.MaxHPValue); Assert.AreEqual(11f, iceMage.ATKValue); Assert.AreEqual(35f, iceMage.MATKValue); }
public void EquipmentATK() { IceMage iceMage = gameObject.AddComponent <IceMage>(); iceMage.ATK = new CharacterAttribute(); Assert.AreEqual(0f, iceMage.ATKValue); iceMage.ATK.AddModifier(new StatModifier(10f, StatModType.Flat)); Assert.AreEqual(10f, iceMage.ATKValue); iceMage.ATK.AddModifier(new StatModifier(0.5f, StatModType.PercentAdd, this)); Assert.AreEqual(15f, iceMage.ATKValue); iceMage.ATK.RemoveAllModifiersFromSource(this); Assert.AreEqual(10f, iceMage.ATKValue); }