mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Implemented deadly strikes and increase rogue throwing crit rate
New rules: Combat:RogueCritThrowingChance, Combat:RogueDeadlyStrikeChance, Combat:RogueDeadlyStrikeMod Rogue throwing crit rate is rather ridiculous. These rules might need tweaking but they gave me fairly live-like results, even with AA added
This commit is contained in:
@@ -160,6 +160,7 @@
|
||||
#define ASSASSINATES 1016 //%1 ASSASSINATES their victim!!
|
||||
#define CRIPPLING_BLOW 1021 //%1 lands a Crippling Blow!(%2)
|
||||
#define CRITICAL_HIT 1023 //%1 scores a critical hit! (%2)
|
||||
#define DEADLY_STRIKE 1024 //%1 scores a Deadly Strike!(%2)
|
||||
#define RESISTS_URGE 1025 //%1 resists their urge to flee.
|
||||
#define BERSERK_START 1027 //%1 goes into a berserker frenzy!
|
||||
#define DEATH_PACT 1028 //%1's death pact has been benevolently fulfilled!
|
||||
|
||||
+19
-2
@@ -4333,11 +4333,16 @@ void Mob::TryCriticalHit(Mob *defender, uint16 skill, int32 &damage, ExtraAttack
|
||||
}
|
||||
}
|
||||
|
||||
int deadlyChance = 0;
|
||||
int deadlyMod = 0;
|
||||
if(skill == SkillArchery && GetClass() == RANGER && GetSkill(SkillArchery) >= 65)
|
||||
critChance += 6;
|
||||
|
||||
if(skill == SkillThrowing && GetClass() == ROGUE && GetSkill(SkillThrowing) >= 65)
|
||||
critChance += 6;
|
||||
if (skill == SkillThrowing && GetClass() == ROGUE && GetSkill(SkillThrowing) >= 65) {
|
||||
critChance += RuleI(Combat, RogueCritThrowingChance);
|
||||
deadlyChance = RuleI(Combat, RogueDeadlyStrikeChance);
|
||||
deadlyMod = RuleI(Combat, RogueDeadlyStrikeMod);
|
||||
}
|
||||
|
||||
int CritChanceBonus = GetCriticalChanceBonus(skill);
|
||||
|
||||
@@ -4383,6 +4388,14 @@ void Mob::TryCriticalHit(Mob *defender, uint16 skill, int32 &damage, ExtraAttack
|
||||
critMod += GetCritDmgMob(skill) * 2; // To account for base crit mod being 200 not 100
|
||||
damage = damage * critMod / 100;
|
||||
|
||||
bool deadlySuccess = false;
|
||||
if (deadlyChance && MakeRandomFloat(0, 1) < static_cast<float>(deadlyChance) / 100.0f) {
|
||||
if (BehindMob(defender, GetX(), GetY())) {
|
||||
damage *= deadlyMod;
|
||||
deadlySuccess = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (crip_success) {
|
||||
entity_list.FilteredMessageClose_StringID(this, false, 200,
|
||||
MT_CritMelee, FilterMeleeCrits, CRIPPLING_BLOW,
|
||||
@@ -4393,6 +4406,10 @@ void Mob::TryCriticalHit(Mob *defender, uint16 skill, int32 &damage, ExtraAttack
|
||||
defender->Emote("staggers.");
|
||||
defender->Stun(0);
|
||||
}
|
||||
} else if (deadlySuccess) {
|
||||
entity_list.FilteredMessageClose_StringID(this, false, 200,
|
||||
MT_CritMelee, FilterMeleeCrits, DEADLY_STRIKE,
|
||||
GetCleanName(), itoa(damage));
|
||||
} else {
|
||||
entity_list.FilteredMessageClose_StringID(this, false, 200,
|
||||
MT_CritMelee, FilterMeleeCrits, CRITICAL_HIT,
|
||||
|
||||
Reference in New Issue
Block a user