Helliot1
Owner of Empire Online
- Joined
- Jul 26, 2017
- Messages
- 315
- Solutions
- 1
- Reaction score
- 60
Hello,
I have a doubt, in my server, the attacks are very unbalanced, with the skill 100, one hour you will attack 20 and another hour 400. Is there any way to make it hit approximate attacks?
The same occurs in ranged attacks. Is there anything to bring the attacks closer? Can be the defense formula?
Thanks
this is the Creature.cpp
Creature.cpp
I have a doubt, in my server, the attacks are very unbalanced, with the skill 100, one hour you will attack 20 and another hour 400. Is there any way to make it hit approximate attacks?
The same occurs in ranged attacks. Is there anything to bring the attacks closer? Can be the defense formula?
Thanks
this is the Creature.cpp
C++:
//players
int32_t Weapons::getMaxWeaponDamage(uint32_t level, int32_t attackSkill, int32_t attackValue, float attackFactor)
{
return static_cast<int32_t>((std::round(level / 0.8) + (attackSkill * 2.2) * (attackValue / 150)) * 1.2);
}
Creature.cpp
C++:
int32_t WeaponDistance::getWeaponDamage(const Player* player, const Creature* target, const Item* item, bool maxDamage /*= false*/) const
{
int32_t attackValue = item->getAttack();
if (item->getWeaponType() == WEAPON_AMMO) {
Item* weapon = player->getWeapon(true);
if (weapon) {
attackValue += weapon->getAttack();
}
}
int32_t attackSkill = player->getSkillLevel(SKILL_DISTANCE);
float attackFactor = player->getAttackFactor();
int32_t maxValue = static_cast<int32_t>(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor) * player->getVocation()->distDamageMultiplier);
if (maxDamage) {
return -maxValue;
}
int32_t minValue;
if (target) {
if (target->getPlayer()) {
minValue = static_cast<int32_t>((std::ceil(level / 0.8) + (attackSkill * 2.0) * (attackValue / 150)) * 5);
} else {
minValue = static_cast<int32_t>((std::ceil(level / 0.8) + (attackSkill * 2.2) * (attackValue / 150)) * 5);
}
} else {
minValue = 0;
}
return -normal_random(minValue, maxValue);
}