private void PostConstruction(CharacterLevelSheet levelSheet, EquipmentItemSetEffectSheet equipmentItemSetEffectSheet) { AttackCountMax = AttackCountHelper.GetCountMax(Level); characterLevelSheet = levelSheet; UpdateExp(); Equip(Inventory.Items, equipmentItemSetEffectSheet); }
public EnemyPlayer(EnemyPlayerDigest enemyPlayerDigest, CharacterSheet characterSheet, CharacterLevelSheet levelSheet, EquipmentItemSetEffectSheet equipmentItemSetEffectSheet ) : base( enemyPlayerDigest.Level, characterSheet, levelSheet, equipmentItemSetEffectSheet) { NameWithHash = enemyPlayerDigest.NameWithHash; weapon = null; armor = null; belt = null; necklace = null; ring = null; monsterMap = new CollectionMap(); eventMap = new CollectionMap(); hairIndex = enemyPlayerDigest.HairIndex; lensIndex = enemyPlayerDigest.LensIndex; earIndex = enemyPlayerDigest.EarIndex; tailIndex = enemyPlayerDigest.TailIndex; equipments = enemyPlayerDigest.Equipments as List <Equipment>; costumes = enemyPlayerDigest.Costumes as List <Costume>; characterLevelSheet = levelSheet; AttackCountMax = AttackCountHelper.GetCountMax(Level); SetEquipmentStat(equipmentItemSetEffectSheet); }
private void PostConstruction(TableSheets sheets) { AttackCountMax = AttackCountHelper.GetCountMax(Level); characterLevelSheet = sheets.CharacterLevelSheet; UpdateExp(); Equip(Inventory.Items, sheets.EquipmentItemSetEffectSheet); }
public void GetCountMax() { var level = 1; Assert.AreEqual(AttackCountHelper.CountMaxLowerLimit, AttackCountHelper.GetCountMax(level)); level = 20; Assert.AreEqual(AttackCountHelper.CountMaxLowerLimit + 1, AttackCountHelper.GetCountMax(level)); level = 100; Assert.AreEqual(AttackCountHelper.CountMaxLowerLimit + 2, AttackCountHelper.GetCountMax(level)); level = 250; Assert.AreEqual(AttackCountHelper.CountMaxLowerLimit + 3, AttackCountHelper.GetCountMax(level)); level = 999; Assert.AreEqual(AttackCountHelper.CountMaxUpperLimit, AttackCountHelper.GetCountMax(level)); }
public void GetAdditionalCriticalChance() { for (var i = 0; i < 2; i++) { var level = i == 0 ? 1 : 999; var attackCount = 0; var attackCountMax = AttackCountHelper.GetCountMax(level); switch (level) { case 1: Assert.AreEqual(AttackCountHelper.CountMaxLowerLimit, attackCountMax); break; case 999: Assert.AreEqual(AttackCountHelper.CountMaxUpperLimit, attackCountMax); break; } for (var j = 0; j < attackCountMax + 1; j++) { attackCount++; if (attackCount <= attackCountMax) { var info = AttackCountHelper.CachedInfo[attackCountMax][attackCount]; Assert.AreEqual(info.AdditionalCriticalChance, AttackCountHelper.GetAdditionalCriticalChance(attackCount, attackCountMax)); continue; } Assert.Throws <ArgumentOutOfRangeException>(() => AttackCountHelper.GetAdditionalCriticalChance(attackCount, attackCountMax)); } } }