mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
[Commands] #tune command rewrite (#1677)
* tune updates * Update tune.cpp * tune update * updates * updates * less zero * update * up * u * Update tune.cpp * Update tune.cpp * avoidance working * accuracy * save1 * Update tune.cpp * override * Removed Old Tune Code * cleanup1 * up * finished v1 * Update command.cpp * Update command.cpp * spellfix * Update command.cpp * remove test command * added SYNC comments Hopefully if anyone changes these functions they will change the corresponding tune * Tune_ to Tune Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
+14
-7
@@ -59,6 +59,7 @@ extern FastMath g_Math;
|
||||
extern EntityList entity_list;
|
||||
extern Zone* zone;
|
||||
|
||||
//SYNC WITH: tune.cpp, mob.h TuneAttackAnimation
|
||||
EQ::skills::SkillType Mob::AttackAnimation(int Hand, const EQ::ItemInstance* weapon, EQ::skills::SkillType skillinuse)
|
||||
{
|
||||
// Determine animation
|
||||
@@ -163,7 +164,7 @@ EQ::skills::SkillType Mob::AttackAnimation(int Hand, const EQ::ItemInstance* wea
|
||||
|
||||
return skillinuse;
|
||||
}
|
||||
|
||||
//SYNC WITH: tune.cpp, mob.h Tunecompute_tohit
|
||||
int Mob::compute_tohit(EQ::skills::SkillType skillinuse)
|
||||
{
|
||||
int tohit = GetSkill(EQ::skills::SkillOffense) + 7;
|
||||
@@ -184,6 +185,7 @@ int Mob::compute_tohit(EQ::skills::SkillType skillinuse)
|
||||
}
|
||||
|
||||
// return -1 in cases that always hit
|
||||
//SYNC WITH: tune.cpp, mob.h TuneGetTotalToHit
|
||||
int Mob::GetTotalToHit(EQ::skills::SkillType skill, int chance_mod)
|
||||
{
|
||||
if (chance_mod >= 10000) // override for stuff like SE_SkillAttack
|
||||
@@ -247,6 +249,7 @@ int Mob::GetTotalToHit(EQ::skills::SkillType skill, int chance_mod)
|
||||
|
||||
// based on dev quotes
|
||||
// the AGI bonus has actually drastically changed from classic
|
||||
//SYNC WITH: tune.cpp, mob.h Tunecompute_defense
|
||||
int Mob::compute_defense()
|
||||
{
|
||||
int defense = GetSkill(EQ::skills::SkillDefense) * 400 / 225;
|
||||
@@ -275,6 +278,7 @@ int Mob::compute_defense()
|
||||
}
|
||||
|
||||
// return -1 in cases that always miss
|
||||
// SYNC WITH : tune.cpp, mob.h TuneGetTotalDefense()
|
||||
int Mob::GetTotalDefense()
|
||||
{
|
||||
auto avoidance = compute_defense() + 10; // add 10 in case the NPC's stats are fucked
|
||||
@@ -302,6 +306,7 @@ int Mob::GetTotalDefense()
|
||||
|
||||
// called when a mob is attacked, does the checks to see if it's a hit
|
||||
// and does other mitigation checks. 'this' is the mob being attacked.
|
||||
// SYNC WITH : tune.cpp, mob.h TuneCheckHitChance()
|
||||
bool Mob::CheckHitChance(Mob* other, DamageHitInfo &hit)
|
||||
{
|
||||
#ifdef LUA_EQEMU
|
||||
@@ -834,7 +839,7 @@ int Mob::GetClassRaceACBonus()
|
||||
|
||||
return ac_bonus;
|
||||
}
|
||||
|
||||
//SYNC WITH: tune.cpp, mob.h TuneACSum
|
||||
int Mob::ACSum(bool skip_caps)
|
||||
{
|
||||
int ac = 0; // this should be base AC whenever shrouds come around
|
||||
@@ -909,7 +914,7 @@ int Mob::ACSum(bool skip_caps)
|
||||
}
|
||||
|
||||
int Mob::GetBestMeleeSkill()
|
||||
{
|
||||
{
|
||||
int bestSkill=0;
|
||||
|
||||
EQ::skills::SkillType meleeSkills[]=
|
||||
@@ -931,8 +936,8 @@ int Mob::GetBestMeleeSkill()
|
||||
}
|
||||
|
||||
return bestSkill;
|
||||
}
|
||||
|
||||
}
|
||||
//SYNC WITH: tune.cpp, mob.h Tuneoffense
|
||||
int Mob::offense(EQ::skills::SkillType skill)
|
||||
{
|
||||
int offense = GetSkill(skill);
|
||||
@@ -987,7 +992,7 @@ double Mob::RollD20(int offense, int mitigation)
|
||||
|
||||
return mods[index];
|
||||
}
|
||||
|
||||
//SYNC WITH: tune.cpp, mob.h TuneMeleeMitigation
|
||||
void Mob::MeleeMitigation(Mob *attacker, DamageHitInfo &hit, ExtraAttackOptions *opts)
|
||||
{
|
||||
#ifdef LUA_EQEMU
|
||||
@@ -1363,6 +1368,7 @@ int Client::DoDamageCaps(int base_damage)
|
||||
}
|
||||
|
||||
// other is the defender, this is the attacker
|
||||
//SYNC WITH: tune.cpp, mob.h TuneDoAttack
|
||||
void Mob::DoAttack(Mob *other, DamageHitInfo &hit, ExtraAttackOptions *opts)
|
||||
{
|
||||
if (!other)
|
||||
@@ -1420,6 +1426,7 @@ void Mob::DoAttack(Mob *other, DamageHitInfo &hit, ExtraAttackOptions *opts)
|
||||
//note: throughout this method, setting `damage` to a negative is a way to
|
||||
//stop the attack calculations
|
||||
// IsFromSpell added to allow spell effects to use Attack. (Mainly for the Rampage AA right now.)
|
||||
//SYNC WITH: tune.cpp, mob.h TuneClientAttack
|
||||
bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool IsFromSpell, ExtraAttackOptions *opts)
|
||||
{
|
||||
if (!other) {
|
||||
@@ -1989,7 +1996,7 @@ bool Client::Death(Mob* killerMob, int32 damage, uint16 spell, EQ::skills::Skill
|
||||
parse->EventPlayer(EVENT_DEATH_COMPLETE, this, export_string, 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
//SYNC WITH: tune.cpp, mob.h TuneNPCAttack
|
||||
bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool IsFromSpell, ExtraAttackOptions *opts)
|
||||
{
|
||||
if (!other) {
|
||||
|
||||
Reference in New Issue
Block a user