mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-29 00:18:18 +00:00
Dungeon Crawl custom code merge
Added numerous modding hooks. Added rules: Character:KeepLevelOverMax - Don't delevel a character if they are found to be over max level rule. Spells:UseCHAScribeHack - Optionally omit spells with CHA in effect12 when using scribespells and traindiscs Combat:MonkACBonusWeight - Adjust the weight threshold for monk AC bonus Combat:ClientStunLevel - Adjust the level clients kicks and bashes start to roll for stuns Combat;QuiverWRHasteDiv - Adjust the divisor applied to weight reduction for haste calcs Combat:UseArcheryBonusRoll - Make archery stationary bonus a roll Combat:ArcheryBonusChance - Archery stationary bonus chance Added account flags and associated perl wrappers Added EVENT_ITEM_TICK for interactive items Added EVENT_DUEL_WIN and EVENT_DUEL_LOSE, which exports $enemyname and $enemyid Added timer and interval to console worldshutdown command Added EQW interface for worldshutdown and server-wide messages
This commit is contained in:
@@ -48,6 +48,9 @@ int Mob::GetKickDamage() {
|
||||
int32 mindmg = 1;
|
||||
ApplySpecialAttackMod(KICK, dmg,mindmg);
|
||||
|
||||
//DCBOOKMARK
|
||||
dmg = mod_kick_damage(dmg);
|
||||
|
||||
return(dmg);
|
||||
}
|
||||
|
||||
@@ -67,6 +70,9 @@ int Mob::GetBashDamage() {
|
||||
int32 mindmg = 1;
|
||||
ApplySpecialAttackMod(BASH, dmg, mindmg);
|
||||
|
||||
//DCBOOKMARK
|
||||
dmg = mod_bash_damage(dmg);
|
||||
|
||||
return(dmg);
|
||||
}
|
||||
|
||||
@@ -281,6 +287,9 @@ void Client::OPCombatAbility(const EQApplicationPacket *app) {
|
||||
int32 min_dmg = 0;
|
||||
DoAnim(anim2HSlashing);
|
||||
|
||||
//DCBOOKMARK
|
||||
max_dmg = mod_frenzy_damage(max_dmg);
|
||||
|
||||
if (GetLevel() < 51)
|
||||
min_dmg = 1;
|
||||
else
|
||||
@@ -490,7 +499,10 @@ int Mob::MonkSpecialAttack(Mob* other, uint8 unchecked_type)
|
||||
ht = max_dmg;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//DCBOOKMARK -- This can potentially stack with changes to kick damage
|
||||
ht = ndamage = mod_monk_special_damage(ndamage, skill_type);
|
||||
|
||||
DoSpecialAttackDamage(other, skill_type, ndamage, min_dmg, ht, reuse);
|
||||
|
||||
return(reuse);
|
||||
@@ -663,6 +675,9 @@ void Mob::RogueBackstab(Mob* other, bool min_damage, int ReuseTime)
|
||||
ndamage = -5;
|
||||
}
|
||||
|
||||
//DCBOOKMARK
|
||||
ndamage = mod_backstab_damage(ndamage);
|
||||
|
||||
DoSpecialAttackDamage(other, BACKSTAB, ndamage, min_hit, hate, ReuseTime);
|
||||
DoAnim(animPiercing);
|
||||
}
|
||||
@@ -879,22 +894,35 @@ void Mob::DoArcheryAttackDmg(Mob* other, const ItemInst* RangeWeapon, const Item
|
||||
|
||||
mlog(COMBAT__RANGED, "Bow DMG %d, Arrow DMG %d, Max Damage %d.", WDmg, ADmg, MaxDmg);
|
||||
|
||||
bool dobonus = false;
|
||||
if(GetClass() == RANGER && GetLevel() > 50)
|
||||
{
|
||||
if(RuleB(Combat, ArcheryBonusRequiresStationary))
|
||||
//DCBOOKMARK
|
||||
int bonuschance = RuleI(Combat, ArcheryBonusChance);
|
||||
|
||||
bonuschance = mod_archery_bonus_chance(bonuschance, RangeWeapon);
|
||||
|
||||
if( !RuleB(Combat, UseArcheryBonusRoll) || (MakeRandomInt(1, 100) < bonuschance) )
|
||||
{
|
||||
if(other->IsNPC() && !other->IsMoving() && !other->IsRooted())
|
||||
if(RuleB(Combat, ArcheryBonusRequiresStationary))
|
||||
{
|
||||
MaxDmg *= (float)2;
|
||||
hate *= (float)2;
|
||||
mlog(COMBAT__RANGED, "Ranger. Double damage success roll, doubling damage to %d", MaxDmg);
|
||||
Message_StringID(MT_CritMelee, BOW_DOUBLE_DAMAGE);
|
||||
if(other->IsNPC() && !other->IsMoving() && !other->IsRooted())
|
||||
{
|
||||
dobonus = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dobonus = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
if(dobonus)
|
||||
{
|
||||
MaxDmg *= (float)2;
|
||||
hate *= (float)2;
|
||||
MaxDmg = mod_archery_bonus_damage(MaxDmg);
|
||||
|
||||
mlog(COMBAT__RANGED, "Ranger. Double damage success roll, doubling damage to %d", MaxDmg);
|
||||
Message_StringID(MT_CritMelee, BOW_DOUBLE_DAMAGE);
|
||||
}
|
||||
@@ -925,6 +953,10 @@ void Mob::DoArcheryAttackDmg(Mob* other, const ItemInst* RangeWeapon, const Item
|
||||
ApplyMeleeDamageBonus(ARCHERY, TotalDmg);
|
||||
TotalDmg += other->GetAdditionalDamage(this, 0, true, ARCHERY);
|
||||
TotalDmg += (itembonuses.HeroicDEX / 10) + (TotalDmg * other->GetSkillDmgTaken(ARCHERY) / 100) + GetSkillDmgAmt(ARCHERY);
|
||||
|
||||
//DCBOOKMARK
|
||||
TotalDmg = mod_archery_damage(TotalDmg, dobonus);
|
||||
|
||||
TryCriticalHit(other, ARCHERY, TotalDmg);
|
||||
other->AddToHateList(this, hate, 0, false);
|
||||
}
|
||||
@@ -941,6 +973,12 @@ void Mob::DoArcheryAttackDmg(Mob* other, const ItemInst* RangeWeapon, const Item
|
||||
{
|
||||
TryWeaponProc(RangeWeapon, other, 11);
|
||||
}
|
||||
|
||||
//DCBOOKMARK - Arrow procs because why not?
|
||||
if((Ammo != NULL) && GetTarget() && other && (other->GetHP() > -10))
|
||||
{
|
||||
TryWeaponProc(Ammo, other, 11);
|
||||
}
|
||||
}
|
||||
|
||||
void NPC::RangedAttack(Mob* other)
|
||||
@@ -1088,6 +1126,9 @@ uint16 Mob::GetThrownDamage(int16 wDmg, int32& TotalDmg, int& minDmg)
|
||||
if(MaxDmg < minDmg)
|
||||
MaxDmg = minDmg;
|
||||
|
||||
//DCBOOKMARK
|
||||
MaxDmg = mod_throwing_damage(MaxDmg);
|
||||
|
||||
return MaxDmg;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user