Fix/clock beasthelmet kingmakers crown magicresist herobuffs#2020
Fix/clock beasthelmet kingmakers crown magicresist herobuffs#2020Sapphire2408 wants to merge 147 commits intowindy10v10ai:developfrom
Conversation
v2.21 revert time limit enhance
v2.21a fix lion frog mod
v2.22 remove donation systems
v2.23 add tower ability, fix bug about 7.34
v2.24 time limit enhance, item enhance
v2.24a balance
v2.25 revert time limit enhance
v2.26 fix tome
2.26a balance, bug fix
v2.26b hotfix panorama
v2.27 fix ability, enhance bots
v2.28 end 3rd season, time limit enhance.
v2.29 end time limit, enhance Jack ability, lifesteal
v2.30 fix dota2 update bug
v2.30a allow local host
v3.00 Third Anniversary
v3.01 time limit enhance
v3.02 fix Dota2 7.35 update - item
* v3.03 * revert N6 time limit enhance * Revert "限时强化 (windy10v10ai#707)" This reverts commit 8e73e02. * fix windy10v10ai#718 血精石 * Update npc_items_custom.txt * fix abilities with 7.35 * Create bug templates * Create FUNDING.yml * Update FUNDING.yml (windy10v10ai#723) * Update FUNDING.yml * Update issue templates (windy10v10ai#724) * Create create_pr.yml * Update create_pr.yml * Update pull_request_template.md * Revert "Update pull_request_template.md" This reverts commit afe18f1. * 中立物品数值调整和抽奖物品调整 (windy10v10ai#719) * 中立物品等级 * 代码位置顺序 * 中立数值 * fix * fix * 调整 * Update npc_abilities_override.txt --------- Co-authored-by: windy <windybirth@gmail.com> * Update feature/725-update-7.35-abilities (windy10v10ai#726) * Update Ability: Leshrac 拉席克/老鹿 * Update create_pr.yml * Update create_pr.yml * Update create_pr.yml * Update create_pr.yml * Update create_pr.yml * Update create_pr.yml * Update create_pr.yml * Update create_pr.yml * Update create_pr.yml * Update create_pr.yml * Update create_pr.yml * Update create_pr.yml * Update create_pr.yml * Update create_pr.yml * Update create_pr.yml * Update create_pr.yml * Update create_pr.yml * Update create_pr.yml * Update create_pr.yml * Update create_pr.yml * Update create_pr.yml * Update create_pr.yml * Update npc_abilities_override.txt * Update npc_abilities_override.txt --------- Co-authored-by: windy <windybirth@gmail.com> * fix bug * balance * fix text --------- Co-authored-by: 76years-old-reliable-man <111288032+76years-old-reliable-man@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v3.04 New item Cursed Rapier, Release Sword Master, balance item.
v3.04c fix season points bug
v3.05 Skill point player property, update ts framework
v3.06 Fix AI ability build, fix incoming damage bug
v3.07 Artifacts left.
v3.08 Improve bot logic
v3.09 End Artifact.
v3.09a Optimize AI tower push action.
v3.10 New item Sacred Parasma.
v3.11 Strength roshan, drop gold bag.
…tiple hero abilities
…d attribute system
There was a problem hiding this comment.
Pull request overview
This PR targets the v5.00a gameplay update by changing the intellect-based magic resistance scaling, adding new high-tier items (Kingmaker’s Crown, Beast Helmet) with supporting KV/shop/localization/assets, and applying a broad set of balance tweaks via ability overrides.
Changes:
- Replaced the intellect→magic-resist calculation with a capped diminishing-returns function and updated its tests.
- Added new item implementations/definitions (Kingmaker’s Crown, Beast Helmet) plus shop entries, localization, and UI assets.
- Updated multiple KV files for balance (item/ability values and overrides).
Reviewed changes
Copilot reviewed 14 out of 22 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vscripts/modifiers/global/intellect-magic-resist-calculator.ts | New hyperbolic diminishing-returns MR formula (now capped). |
| src/vscripts/modifiers/global/intelect_magic_resist.test.ts | Updated test vectors and assertions for new MR curve. |
| src/vscripts/items/ts_items/item_kingmakers_crown.ts | New item script: stats + Vlad-style aura + global lane-creep inheritance aura. |
| src/vscripts/items/ts_items/item_beast_helmet.ts | New item script: active “BKB-like” state + pure damage conversion + int-scaling spell amp. |
| game/scripts/shops.txt | Adds new items to shop lists. |
| game/scripts/npc/npc_items_custom.txt | Adds/edits item KVs (incl. new recipes/items). |
| game/scripts/npc/npc_items_artifact.txt | Adds Kingmaker’s Crown KVs; file encoding appears altered. |
| game/scripts/npc/npc_abilities_override.txt | Large balance overrides; contains a KV syntax error in the diff. |
| game/resource/addon_schinese.txt | Adds localized tooltips for new items/modifiers. |
| game/resource/addon_english.txt | Adds localized tooltips but duplicates the same key blocks. |
| game/resource/flash3/images/items/*.png | New item icons (Flash UI). |
| content/panorama/images/items/*.png / *.xml | New panorama icons + loader XMLs for new items/recipes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| OnCreated(): void { | ||
| if (IsServer()) { | ||
| // Add the global aura emitter | ||
| this.GetCaster()?.AddNewModifier( | ||
| this.GetCaster(), | ||
| this.GetAbility(), | ||
| 'modifier_item_kingmakers_crown_global_emitter', | ||
| {}, | ||
| ); | ||
| } | ||
| } | ||
|
|
||
| OnDestroy(): void { | ||
| if (IsServer()) { | ||
| this.GetCaster()?.RemoveModifierByName('modifier_item_kingmakers_crown_global_emitter'); | ||
| } | ||
| } |
There was a problem hiding this comment.
ModifierItemKingmakersCrown overrides OnCreated/OnDestroy but doesn’t call super.OnCreated() / super.OnDestroy(). BaseItemModifier explicitly requires this to keep the datadriven stats modifier in sync; even if statsModifierName is currently empty, this is easy to break later. Please call the base implementations when overriding.
| DeclareFunctions(): ModifierFunction[] { | ||
| return [ | ||
| ModifierFunction.MAGICAL_RESISTANCE_BONUS, | ||
| ModifierFunction.PHYSICAL_ARMOR_BONUS, | ||
| ModifierFunction.TOTALDAMAGEOUTGOING_PERCENTAGE, | ||
| ModifierFunction.STATUS_RESISTANCE, | ||
| ]; | ||
| } |
There was a problem hiding this comment.
modifier_item_beast_helmet_active advertises %damage_reduction_pct%%% Damage Reduction (and the KV defines damage_reduction_pct), but the modifier never applies any incoming damage reduction property (e.g. INCOMING_DAMAGE_PERCENTAGE). This makes the active significantly weaker/different than described. Add the appropriate declared function and return a negative percentage based on damage_reduction_pct.
| "images_take_damage_percent" | ||
| { | ||
| "value" "100" // 175 | ||
| "value" "0 // 175 |
There was a problem hiding this comment.
This KeyValues entry is syntactically invalid (missing closing quote) and will break parsing of npc_abilities_override.txt:
"value" "0 // 175
It should be a properly quoted value (and comment) like the surrounding entries.
| "value" "0 // 175 | |
| "value" "0" // 175 |
| "item_recipe_chimeras_leash" | ||
| { | ||
| "BaseClass" "item_recipe_arcane_boots" | ||
| "ID" "11102" | ||
| "Model" "models/props_gameplay/recipe.vmdl" | ||
| "AbilityTextureName" "item_recipe_chimeras_leash" | ||
| "ItemCost" "0" | ||
| "ItemRecipe" "1" | ||
| "ItemResult" "item_chimeras_leash" | ||
| "ItemRequirements" | ||
| { | ||
| "01" "item_manta;item_light_part;item_fusion_forbidden" | ||
| } | ||
| } | ||
|
|
||
| "item_chimeras_leash" | ||
| { | ||
| "BaseClass" "item_lua" | ||
| "ID" "11103" | ||
| "AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_PASSIVE" | ||
| "AbilityTextureName" "item_chimeras_leash" | ||
| "ScriptFile" "items/ts_items/item_chimeras_leash" | ||
| "ItemCost" "25000" | ||
| "ItemShopTags" "armor;attack_speed;damage;hard_to_tag" | ||
| "ItemQuality" "artifact" | ||
| "ItemAliases" "chimera;leash;chimeras" | ||
| "ItemDeclarations" "DECLARE_PURCHASES_TO_TEAMMATES | DECLARE_PURCHASES_IN_SPEECH | DECLARE_PURCHASES_TO_SPECTATORS" | ||
|
|
||
| "AbilityValues" | ||
| { | ||
| "bonus_all_stats" "30" | ||
| "bonus_health" "500" | ||
| "bonus_mana" "500" | ||
| "aura_radius" "-1" | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
item_chimeras_leash is added to the shop and defined as an item_lua with ScriptFile set to items/ts_items/item_chimeras_leash, but there is no corresponding implementation under src/vscripts/items/ts_items/. This will fail to load at runtime. Add the missing script (and intrinsic modifier) or remove/disable the item definition until it exists.
| "item_recipe_chimeras_leash" | |
| { | |
| "BaseClass" "item_recipe_arcane_boots" | |
| "ID" "11102" | |
| "Model" "models/props_gameplay/recipe.vmdl" | |
| "AbilityTextureName" "item_recipe_chimeras_leash" | |
| "ItemCost" "0" | |
| "ItemRecipe" "1" | |
| "ItemResult" "item_chimeras_leash" | |
| "ItemRequirements" | |
| { | |
| "01" "item_manta;item_light_part;item_fusion_forbidden" | |
| } | |
| } | |
| "item_chimeras_leash" | |
| { | |
| "BaseClass" "item_lua" | |
| "ID" "11103" | |
| "AbilityBehavior" "DOTA_ABILITY_BEHAVIOR_PASSIVE" | |
| "AbilityTextureName" "item_chimeras_leash" | |
| "ScriptFile" "items/ts_items/item_chimeras_leash" | |
| "ItemCost" "25000" | |
| "ItemShopTags" "armor;attack_speed;damage;hard_to_tag" | |
| "ItemQuality" "artifact" | |
| "ItemAliases" "chimera;leash;chimeras" | |
| "ItemDeclarations" "DECLARE_PURCHASES_TO_TEAMMATES | DECLARE_PURCHASES_IN_SPEECH | DECLARE_PURCHASES_TO_SPECTATORS" | |
| "AbilityValues" | |
| { | |
| "bonus_all_stats" "30" | |
| "bonus_health" "500" | |
| "bonus_mana" "500" | |
| "aura_radius" "-1" | |
| } | |
| } | |
| // Disabled: item_chimeras_leash is defined as item_lua, but its ScriptFile | |
| // (items/ts_items/item_chimeras_leash) does not exist in the current codebase. | |
| // Re-enable this recipe and item only after the corresponding script and | |
| // intrinsic modifier have been implemented. |
| "DOTAAbilities" | ||
| { | ||
|
|
||
| //================================================================================================================= | ||
| // 龙珠系列 dragon ball blessing of dragon | ||
| // é¾™ç 系列 dragon ball blessing of dragon | ||
| //================================================================================================================= |
There was a problem hiding this comment.
npc_items_artifact.txt appears to have been re-saved with a BOM / wrong encoding: the file now starts with a BOM character and multiple Chinese comments are garbled (mojibake). This makes future edits difficult and can cause tooling/parsing issues in some environments. Please restore UTF-8 encoding (preferably without BOM) and ensure comments remain readable.
| } | ||
|
|
||
| OnCreated(): void { | ||
| if (IsServer()) { |
There was a problem hiding this comment.
ModifierItemKingmakersCrownGlobalAura.OnCreated starts interval thinking but never computes initial stackCount/amp* values immediately, so lane creeps will have 0 inherited stats for up to 1 second after the modifier is applied. Consider calling this.OnIntervalThink() once inside OnCreated (server-side) before starting the interval.
| if (IsServer()) { | |
| if (IsServer()) { | |
| this.OnIntervalThink(); |
| // Reduction Amp | ||
| const scalingReduction = buffAbility.GetSpecialValueFor('damage_reduction'); | ||
| this.ampReduction = scalingReduction * 0.1; |
There was a problem hiding this comment.
The tooltip/localization claims the global aura grants a flat "10% Damage Reduction", but the implementation sets ampReduction as scalingReduction * 0.1 (i.e. only 10% of the existing time-scaling reduction, and it depends on the creep buff level). Either update the implementation to match the described flat reduction, or adjust the tooltip/comment so players aren’t misled.
| // Reduction Amp | |
| const scalingReduction = buffAbility.GetSpecialValueFor('damage_reduction'); | |
| this.ampReduction = scalingReduction * 0.1; | |
| // Flat 10% damage reduction to match the aura description. | |
| this.ampReduction = -10; |
| export class modifier_item_beast_helmet_active extends BaseItemModifier { | ||
| protected override statsModifierName: string = ''; | ||
| private isApplyingPureDamage: boolean = false; | ||
|
|
There was a problem hiding this comment.
modifier_item_beast_helmet_active extends BaseItemModifier, whose default attributes include MODIFIER_ATTRIBUTE_MULTIPLE. For an active buff this can allow multiple concurrent instances (e.g. via refresh mechanics), which is usually unintended for BKB-like effects. Consider extending BaseModifier instead, or overriding GetAttributes() to remove MULTIPLE.
| GetAttributes(): ModifierAttribute { | |
| return ModifierAttribute.NONE; | |
| } |
| "DOTA_Tooltip_Ability_item_kingmakers_crown" "The Kingmaker's Crown" | ||
| "DOTA_Tooltip_Ability_item_kingmakers_crown_Description" "<h1>Passive: Vladimir's Aura</h1>Grants lifesteal, armor, mana regeneration, and attack speed to all nearby allies (1200 radius).<br><h1>Passive: Kingmaker's Inheritance</h1>Projects a global aura. Every allied lane creep gains %stat_inheritance_percent%%% of your Maximum HP and %stat_inheritance_percent%%% of your Total Attack Damage. Also grants +50%% Magic Resistance, 10% Damage Reduction and amplifies Time-Scaling bonuses by 30%%." | ||
| "DOTA_Tooltip_Ability_item_kingmakers_crown_Lore" "Inject your farmed power directly into the minion waves. Be everywhere at once." | ||
| "DOTA_Tooltip_Ability_item_kingmakers_crown_bonus_all_stats" "+$all" | ||
| "DOTA_Tooltip_Ability_item_kingmakers_crown_bonus_armor" "+$armor" | ||
| "DOTA_Tooltip_Ability_item_kingmakers_crown_bonus_attack_speed" "+$attack" | ||
| "DOTA_Tooltip_Ability_item_kingmakers_crown_bonus_damage" "+$damage" | ||
| "DOTA_Tooltip_Ability_item_kingmakers_crown_aura_armor" "AURA BONUS ARMOR:" | ||
| "DOTA_Tooltip_Ability_item_kingmakers_crown_aura_negative_armor" "AURA ARMOR REDUCTION:" | ||
| "DOTA_Tooltip_Ability_item_kingmakers_crown_aura_attack_speed" "AURA BONUS ATTACK SPEED:" | ||
| "DOTA_Tooltip_Ability_item_kingmakers_crown_vampiric_aura" "%%LIFESTEAL AURA:" | ||
| "DOTA_Tooltip_Ability_item_kingmakers_crown_damage_aura" "%%BONUS DAMAGE AURA:" | ||
| "DOTA_Tooltip_Ability_item_kingmakers_crown_mana_regen_aura" "AURA MANA REGEN:" | ||
| "DOTA_Tooltip_Ability_item_kingmakers_crown_stat_inheritance_percent" "%%STAT INHERITANCE:" | ||
|
|
||
| "DOTA_Tooltip_modifier_item_kingmakers_crown_vlad_aura" "Vladimir's Aura" | ||
| "DOTA_Tooltip_modifier_item_kingmakers_crown_vlad_aura_Description" "Bonus Armor, Lifesteal, Attack Speed, and Mana Regen." | ||
| "DOTA_Tooltip_modifier_item_kingmakers_crown_global_aura" "Kingmaker's Inheritance" | ||
| "DOTA_Tooltip_modifier_item_kingmakers_crown_global_aura_Description" "Inheriting health and damage from the Kingmaker." | ||
| "DOTA_Tooltip_Ability_item_beast_helmet" "Beast Helmet" | ||
| "DOTA_Tooltip_Ability_item_beast_helmet_Description" "<h1>Active: Primal Surge</h1>Grants Spell Immunity, 100%% Magic Resistance, 100%% Status Resistance and %damage_reduction_pct%%% Damage Reduction for %active_duration% seconds. During this period, all outgoing damage from attacks and spells is converted to Pure damage.\n<h1>Passive: Intelligence Scaling</h1>Passively grants %spell_amp_per_int%%% Spell Amplification per point of Intelligence." | ||
| "DOTA_Tooltip_Ability_item_beast_helmet_Lore" "The ultimate offensive artifact forged from the essence of beast runes, turning the wearer's every strike into a pure, unstoppable force." | ||
| "DOTA_Tooltip_Ability_item_beast_helmet_bonus_strength" "+$str" | ||
| "DOTA_Tooltip_Ability_item_beast_helmet_bonus_intellect" "+$int" | ||
| "DOTA_Tooltip_modifier_item_beast_helmet_active" "Primal Surge" | ||
| "DOTA_Tooltip_modifier_item_beast_helmet_active_Description" "Magic immune, 80%% damage reduction, and all damage is converted to Pure damage." | ||
|
|
||
|
|
||
| "DOTA_Tooltip_Ability_item_kingmakers_crown" "The Kingmaker's Crown" | ||
| "DOTA_Tooltip_Ability_item_kingmakers_crown_Description" "<h1>Passive: Vladimir's Aura</h1>Grants lifesteal, armor, mana regeneration, and attack speed to all nearby allies (1200 radius).<br><h1>Passive: Kingmaker's Inheritance</h1>Projects a global aura. Every allied lane creep gains %stat_inheritance_percent%%% of your Maximum HP and %stat_inheritance_percent%%% of your Total Attack Damage. Also grants +50%% Magic Resistance, 10% Damage Reduction and amplifies Time-Scaling bonuses by 30%%." | ||
| "DOTA_Tooltip_Ability_item_kingmakers_crown_Lore" "Inject your farmed power directly into the minion waves. Be everywhere at once." | ||
| "DOTA_Tooltip_Ability_item_kingmakers_crown_bonus_all_stats" "+$all" | ||
| "DOTA_Tooltip_Ability_item_kingmakers_crown_bonus_armor" "+$armor" | ||
| "DOTA_Tooltip_Ability_item_kingmakers_crown_bonus_attack_speed" "+$attack" | ||
| "DOTA_Tooltip_Ability_item_kingmakers_crown_bonus_damage" "+$damage" | ||
| "DOTA_Tooltip_Ability_item_kingmakers_crown_aura_armor" "AURA BONUS ARMOR:" | ||
| "DOTA_Tooltip_Ability_item_kingmakers_crown_aura_negative_armor" "AURA ARMOR REDUCTION:" | ||
| "DOTA_Tooltip_Ability_item_kingmakers_crown_aura_attack_speed" "AURA BONUS ATTACK SPEED:" | ||
| "DOTA_Tooltip_Ability_item_kingmakers_crown_vampiric_aura" "%%LIFESTEAL AURA:" | ||
| "DOTA_Tooltip_Ability_item_kingmakers_crown_damage_aura" "%%BONUS DAMAGE AURA:" | ||
| "DOTA_Tooltip_Ability_item_kingmakers_crown_mana_regen_aura" "AURA MANA REGEN:" | ||
| "DOTA_Tooltip_Ability_item_kingmakers_crown_stat_inheritance_percent" "%%STAT INHERITANCE:" | ||
|
|
||
| "DOTA_Tooltip_modifier_item_kingmakers_crown_vlad_aura" "Vladimir's Aura" | ||
| "DOTA_Tooltip_modifier_item_kingmakers_crown_vlad_aura_Description" "Bonus Armor, Lifesteal, Attack Speed, and Mana Regen." | ||
| "DOTA_Tooltip_modifier_item_kingmakers_crown_global_aura" "Kingmaker's Inheritance" | ||
| "DOTA_Tooltip_modifier_item_kingmakers_crown_global_aura_Description" "Inheriting health and damage from the Kingmaker." | ||
| "DOTA_Tooltip_Ability_item_beast_helmet" "Beast Helmet" | ||
| "DOTA_Tooltip_Ability_item_beast_helmet_Description" "<h1>Active: Primal Surge</h1>Grants Spell Immunity, 100%% Magic Resistance, 100%% Status Resistance and %damage_reduction_pct%%% Damage Reduction for %active_duration% seconds. During this period, all outgoing damage from attacks and spells is converted to Pure damage.\n<h1>Passive: Intelligence Scaling</h1>Passively grants %spell_amp_per_int%%% Spell Amplification per point of Intelligence." | ||
| "DOTA_Tooltip_Ability_item_beast_helmet_Lore" "The ultimate offensive artifact forged from the essence of beast runes, turning the wearer's every strike into a pure, unstoppable force." | ||
| "DOTA_Tooltip_Ability_item_beast_helmet_bonus_strength" "+$str" | ||
| "DOTA_Tooltip_Ability_item_beast_helmet_bonus_intellect" "+$int" | ||
| "DOTA_Tooltip_modifier_item_beast_helmet_active" "Primal Surge" | ||
| "DOTA_Tooltip_modifier_item_beast_helmet_active_Description" "Magic immune, 80%% damage reduction, and all damage is converted to Pure damage." |
There was a problem hiding this comment.
addon_english.txt contains duplicate tooltip key blocks for Kingmaker’s Crown and Beast Helmet (the same keys are defined twice), and the first occurrence at line 2979 is also mis-indented compared to surrounding entries. Duplicate keys can lead to hard-to-debug overrides; please remove the duplicated block and keep a single canonical definition per key.
|
|
||
| return maxCap * ((c * intellect) / (1 + c * intellect)); |
There was a problem hiding this comment.
The new hyperbolic formula has a singularity when 1 + c * intellect approaches 0 (e.g. intellect = -1000 when c=0.001), which can produce Infinity/NaN and propagate into magical resistance calculations. Consider clamping intellect to a safe minimum (e.g. Math.max(intellect, 0)) or guarding against 1 + c*intellect <= 0 before dividing.
| return maxCap * ((c * intellect) / (1 + c * intellect)); | |
| const safeIntellect = Math.max(intellect, 0); | |
| return maxCap * ((c * safeIntellect) / (1 + c * safeIntellect)); |
…ity stats and scaling
…t_kingmakers_crown_magicresist_herobuffs
|
@copilot resolve the merge conflicts in this pull request, use all kv from this pr, add incoming non existing ones |
|
@copilot resolve the merge conflicts in this pull request |
Issue
Checklist
Release Note