Comments please
bom!
Para quem não sabe oque é critical, é um code para você dar hits maior que o normal ( somente quando você da critical ), a chance você poderá mudar no config.lua, quanto maior o seu skills, menor será seu damage de critical .
Funcionou 100% em todas as versões 7.9+ do evolution ( não testei em outra versão ainda )
em weapons.cpp procure por:
int32_t maxDamage = Weapons::getMaxWeaponDamage(attackSkill, attackValue);
em baixo adicione:
#ifdef __CRITICAL_HIT__ if(random_range(0,100) < g_config.getNumber(ConfigManager::CRITICAL_HIT)){ if(attackSkill > 60){ maxDamage *= 2; } else if(attackSkill > 30){ maxDamage *= 3; } else { maxDamage *= 4; } g_game.addAnimatedText(player->getPosition(), 906, "Critical!"); } #endif
procure por:
int32_t maxDamage = Weapons::getMaxWeaponDamage(attackSkill, attackValue);
em baixo adicione:
#ifdef __CRITICAL_HIT__ if(random_range(0,100) < g_config.getNumber(ConfigManager::CRITICAL_HIT)){ if(attackSkill > 60){ maxDamage *= 2; } else if(attackSkill > 30){ maxDamage *= 3; } else { maxDamage *= 4; } g_game.addAnimatedText(player->getPosition(), 906, "Critical!"); } #endif
procure por:
int32_t maxDamage = Weapons::getMaxWeaponDamage(attackSkill, ammuAttackValue);
em baixo adicione:
#ifdef __CRITICAL_HIT__ if(random_range(0,100) < g_config.getNumber(ConfigManager::CRITICAL_HIT)){ if(attackSkill > 60){ maxDamage *= 2; } else if(attackSkill > 30){ maxDamage *= 3; } else { maxDamage *= 4; } g_game.addAnimatedText(player->getPosition(), 906, "Critical!"); } #endif
Em CONFIGMANAGER.CPP adicione
#ifdef __CRITICAL_HIT__ m_confInteger[CRITICAL_HIT] = getGlobalNumber(L, "criticalhit", 10); #endif
Em CONFIGMANAGER.H adicione
#ifdef __CRITICAL_HIT__ CRITICAL_HIT, #endif
No config.lua Adicione
-- chance to make a critical hit (10 = 10%) criticalhit = 10
Em parâmetros, nas opções do projeto, adicione em Compilador C++: -D__CRITICAL_HIT__
Pronto, agora dê rebuild all
Esse comando faiz os paladins e os knights darem critico o damage eh você que ajusta
Créditos: Jackson Zani, Lews