diff --git a/system/db/features.txt b/system/db/features.txt index 64203cfb9..4cd66335d 100644 --- a/system/db/features.txt +++ b/system/db/features.txt @@ -60,6 +60,9 @@ // Lowers ability costs { name: "AbilityCostRevamp", enabled: true }, + + // Simplifies attribute bonuses + { name: "AttributeBonusRevamp", enabled: true }, ]}, // Miscellaneous changes that don't belong to a specific update or are yet diff --git a/system/scripts/core/calc_combat.cs b/system/scripts/core/calc_combat.cs index 66a5d7ae7..b3a0a4e01 100644 --- a/system/scripts/core/calc_combat.cs +++ b/system/scripts/core/calc_combat.cs @@ -7,6 +7,7 @@ using System; using Melia.Shared.Data.Database; using Melia.Shared.Tos.Const; +using Melia.Zone; using Melia.Zone.Scripting; using Melia.Zone.Skills; using Melia.Zone.Skills.Combat; @@ -178,49 +179,89 @@ public float SCR_AttributeMultiplier(ICombatEntity attacker, ICombatEntity targe var attackerAttr = skill.Data.Attribute; var targetAttr = target.Attribute; - if (attackerAttr == SkillAttribute.Fire) + if (!Feature.IsEnabled("AttributeBonusRevamp")) { - if (targetAttr == AttributeType.Fire) return 0.75f; - if (targetAttr == AttributeType.Earth) return 1.5f; + if (attackerAttr == SkillAttribute.Fire) + { + if (targetAttr == AttributeType.Fire) return 0.75f; + if (targetAttr == AttributeType.Earth) return 1.5f; + } + else if (attackerAttr == SkillAttribute.Ice) + { + if (targetAttr == AttributeType.Fire) return 1.5f; + if (targetAttr == AttributeType.Ice) return 0.75f; + } + else if (attackerAttr == SkillAttribute.Lightning) + { + if (targetAttr == AttributeType.Ice) return 1.5f; + if (targetAttr == AttributeType.Lightning) return 0.75f; + } + else if (attackerAttr == SkillAttribute.Earth) + { + if (targetAttr == AttributeType.Lightning) return 1.5f; + if (targetAttr == AttributeType.Earth) return 0.75f; + } + else if (attackerAttr == SkillAttribute.Poison) + { + if (targetAttr == AttributeType.Fire) return 1.125f; + if (targetAttr == AttributeType.Ice) return 1.125f; + if (targetAttr == AttributeType.Lightning) return 1.125f; + if (targetAttr == AttributeType.Earth) return 1.125f; + if (targetAttr == AttributeType.Poison) return 0.75f; + } + else if (attackerAttr == SkillAttribute.Holy) + { + if (targetAttr == AttributeType.Holy) return 0.75f; + if (targetAttr == AttributeType.Dark) return 1.5f; + } + else if (attackerAttr == SkillAttribute.Dark) + { + if (targetAttr == AttributeType.Holy) return 1.5f; + if (targetAttr == AttributeType.Dark) return 0.75f; + } + else if (attackerAttr == SkillAttribute.Soul) + { + if (targetAttr == AttributeType.Holy) return 1.25f; + if (targetAttr == AttributeType.Dark) return 1.25f; + if (targetAttr == AttributeType.Soul) return 1.5f; + } } - else if (attackerAttr == SkillAttribute.Ice) - { - if (targetAttr == AttributeType.Fire) return 1.5f; - if (targetAttr == AttributeType.Ice) return 0.75f; - } - else if (attackerAttr == SkillAttribute.Lightning) - { - if (targetAttr == AttributeType.Ice) return 1.5f; - if (targetAttr == AttributeType.Lightning) return 0.75f; - } - else if (attackerAttr == SkillAttribute.Earth) - { - if (targetAttr == AttributeType.Lightning) return 1.5f; - if (targetAttr == AttributeType.Earth) return 0.75f; - } - else if (attackerAttr == SkillAttribute.Poison) - { - if (targetAttr == AttributeType.Fire) return 1.125f; - if (targetAttr == AttributeType.Ice) return 1.125f; - if (targetAttr == AttributeType.Lightning) return 1.125f; - if (targetAttr == AttributeType.Earth) return 1.125f; - if (targetAttr == AttributeType.Poison) return 0.75f; - } - else if (attackerAttr == SkillAttribute.Holy) - { - if (targetAttr == AttributeType.Holy) return 0.75f; - if (targetAttr == AttributeType.Dark) return 1.5f; - } - else if (attackerAttr == SkillAttribute.Dark) - { - if (targetAttr == AttributeType.Holy) return 1.5f; - if (targetAttr == AttributeType.Dark) return 0.75f; - } - else if (attackerAttr == SkillAttribute.Soul) + else { - if (targetAttr == AttributeType.Holy) return 1.25f; - if (targetAttr == AttributeType.Dark) return 1.25f; - if (targetAttr == AttributeType.Soul) return 1.5f; + if (attackerAttr == SkillAttribute.Fire) + { + if (targetAttr == AttributeType.Fire) return 0.5f; + if (targetAttr == AttributeType.Earth) return 1.5f; + } + else if (attackerAttr == SkillAttribute.Ice) + { + if (targetAttr == AttributeType.Fire) return 1.5f; + if (targetAttr == AttributeType.Ice) return 0.5f; + } + else if (attackerAttr == SkillAttribute.Lightning) + { + if (targetAttr == AttributeType.Ice) return 2f; + if (targetAttr == AttributeType.Lightning) return 0.5f; + if (targetAttr == AttributeType.Earth) return 0.5f; + } + else if (attackerAttr == SkillAttribute.Earth) + { + if (targetAttr == AttributeType.Lightning) return 1.5f; + if (targetAttr == AttributeType.Earth) return 0.5f; + } + else if (attackerAttr == SkillAttribute.Poison) + { + if (targetAttr == AttributeType.Earth) return 1.5f; + if (targetAttr == AttributeType.Poison) return 0.5f; + } + else if (attackerAttr == SkillAttribute.Holy) + { + if (targetAttr == AttributeType.Dark) return 2f; + } + else if (attackerAttr == SkillAttribute.Dark) + { + if (targetAttr == AttributeType.Holy) return 2f; + } } return 1;