mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
[Combat] Updates to IMMUNE_MELEE_NONMAGICAL mechanics (#1616)
* pre remove debug * Update attack.cpp * Update attack.cpp * Update attack.cpp * Update attack.cpp * apply to temp pets * format fix * changed to just use one rule Merged into NPC's and Pet's into one rule.
This commit is contained in:
parent
c30dbf6628
commit
36d10462f7
@ -392,7 +392,8 @@ RULE_INT(Combat, ArcheryCritDifficulty, 3400, "Value against which is rolled to
|
|||||||
RULE_INT(Combat, ThrowingCritDifficulty, 1100, "Value against which is rolled to check if a throwing crit is triggered. Lower is easier")
|
RULE_INT(Combat, ThrowingCritDifficulty, 1100, "Value against which is rolled to check if a throwing crit is triggered. Lower is easier")
|
||||||
RULE_BOOL(Combat, NPCCanCrit, false, "Setting whether an NPC can land critical hits")
|
RULE_BOOL(Combat, NPCCanCrit, false, "Setting whether an NPC can land critical hits")
|
||||||
RULE_BOOL(Combat, UseIntervalAC, true, "Switch whether bonuses, armour class, multipliers, classes and caps should be considered in the calculation of damage values")
|
RULE_BOOL(Combat, UseIntervalAC, true, "Switch whether bonuses, armour class, multipliers, classes and caps should be considered in the calculation of damage values")
|
||||||
RULE_INT(Combat, PetAttackMagicLevel, 30, "Level at which pets can cause magic damage")
|
RULE_INT(Combat, PetAttackMagicLevel, 10, "Level at which pets can cause magic damage, no longer used")
|
||||||
|
RULE_INT(Combat, NPCAttackMagicLevel, 10, "Level at which NPC and pets can cause magic damage")
|
||||||
RULE_BOOL(Combat, EnableFearPathing, true, "Setting whether to use pathing during fear")
|
RULE_BOOL(Combat, EnableFearPathing, true, "Setting whether to use pathing during fear")
|
||||||
RULE_BOOL(Combat, FleeGray, true, "If true FleeGrayHPRatio will be used")
|
RULE_BOOL(Combat, FleeGray, true, "If true FleeGrayHPRatio will be used")
|
||||||
RULE_INT(Combat, FleeGrayHPRatio, 50, "HP percentage when a Gray NPC begins to flee")
|
RULE_INT(Combat, FleeGrayHPRatio, 50, "HP percentage when a Gray NPC begins to flee")
|
||||||
|
|||||||
@ -993,18 +993,22 @@ int Mob::GetWeaponDamage(Mob *against, const EQ::ItemData *weapon_item) {
|
|||||||
if (GetSpecialAbility(SPECATK_MAGICAL)) {
|
if (GetSpecialAbility(SPECATK_MAGICAL)) {
|
||||||
dmg = 1;
|
dmg = 1;
|
||||||
}
|
}
|
||||||
//On live this occurs for pets and charmed pet >= level 10
|
//On live this occurs for ALL NPC's >= 10
|
||||||
else if (GetOwner() && GetLevel() >= RuleI(Combat, PetAttackMagicLevel)) {
|
else if (IsNPC() && GetLevel() >= RuleI(Combat, NPCAttackMagicLevel)) {
|
||||||
//pets wouldn't actually use this but...
|
|
||||||
//it gives us an idea if we can hit due to the dual nature of this function
|
|
||||||
dmg = 1;
|
dmg = 1;
|
||||||
}
|
}
|
||||||
else if (weapon_item) {
|
else if (weapon_item) {
|
||||||
if (weapon_item->Magic) {
|
if (weapon_item->Magic) {
|
||||||
dmg = weapon_item->Damage;
|
if (weapon_item->Damage && (weapon_item->IsType1HWeapon() || weapon_item->IsType2HWeapon())) {
|
||||||
//this is more for non weapon items, ex: boots for kick
|
dmg = weapon_item->Damage;
|
||||||
//they don't have a dmg but we should be able to hit magical
|
}
|
||||||
dmg = dmg <= 0 ? 1 : dmg;
|
//Non weapon items, ie. boots for kick.
|
||||||
|
else if (weapon_item->ItemType == EQ::item::ItemTypeArmor) {
|
||||||
|
dmg = 1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user