protected float GetAttackUnit(AbstractUnit target) { Effect effect = target.GetEffect(1); //defense //EquipmentEffect equipmentEffect = body.GetEquipmentEffect(1); int bonusLevel = effect.IdEffect == -1 ? 1 : effect.LevelEffect + 1; //int bonusEquipmentLevel = equipmentEffect.IdEffect == -1 ? 1 : equipmentEffect.LevelEffect; return(basisAttack / (bonusLevel * target.brain.basisDefense));// + bonusEquipmentLevel; }
protected float GetVitessUnit() { float baseVitess = basisSpeed; Effect effect = body.GetEffect(0); //EquipmentEffect equipmentEffect = body.GetEquipmentEffect(0); int bonusLevel = effect.IdEffect == -1 ? 0 : effect.LevelEffect; // int bonusEquipmentLevel = equipmentEffect.IdEffect == -1 ? 0 : equipmentEffect.LevelEffect; return(baseVitess + bonusLevel * 0.5f); }