Skip to content

Commit f5a7c75

Browse files
LocalIdentityLocalIdentity
andauthored
Fix Payload support "Grendade active a second time" not working (#1308)
The mod had a stat map but it was not hooked up to any DPS calcs Changed the way the tree node works so that both stats are additive and cap out at 100% chance Co-authored-by: LocalIdentity <localidentity2@gmail.com>
1 parent 14e1b1e commit f5a7c75

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

src/Data/SkillStatMap.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2449,7 +2449,7 @@ return {
24492449
},
24502450
-- Grenade
24512451
["grenade_skill_%_chance_to_explode_twice"] = {
2452-
mod("GrenadeExplodeTwice", "INC", nil),
2452+
mod("GrenadeActivateTwice", "BASE", nil),
24532453
},
24542454
["support_grenade_damage_+%_final"] = {
24552455
mod("Damage", "MORE", nil),

src/Modules/CalcOffence.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,6 +1023,11 @@ function calcs.offence(env, actor, activeSkill)
10231023
skillData.boltCount = ammoStats.boltCount
10241024
skillData.reloadTime = ammoStats.reloadTime
10251025
end
1026+
1027+
if activeSkill.skillTypes[SkillType.Grenade] then
1028+
local detonateTwice = m_min(skillModList:Sum("BASE", skillCfg, "GrenadeActivateTwice"), 100)
1029+
modDB:NewMod("DPS", "MORE", detonateTwice, "Grenade Activate Twice")
1030+
end
10261031

10271032
if skillModList:Flag(nil, "HasSeals") and activeSkill.skillTypes[SkillType.Unleashable] and not skillModList:Flag(nil, "NoRepeatBonuses") then
10281033
-- Applies DPS multiplier based on seals count

src/Modules/ModParser.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4342,7 +4342,7 @@ local specialModList = {
43424342
["loads? an additional bolt"] = { mod("CrossbowBoltCount", "BASE", 1, nil, ModFlag.Crossbow, { type = "SkillType", skillType = SkillType.CrossbowSkill }) },
43434343
["loads? (%d+) additional bolts?"] = function(num) return { mod("CrossbowBoltCount", "BASE", num, nil, ModFlag.Crossbow, { type = "SkillType", skillType = SkillType.CrossbowSkill }) } end,
43444344
["grenade skills fire an additional projectile"] = { mod("ProjectileCount", "BASE", 1, nil, ModFlag.Projectile, { type = "SkillType", skillType = SkillType.Grenade })},
4345-
["grenades have (%d+)%% chance to activate a second time"] = function(num) return { mod("DPS", "MORE", num, nil, ModFlag.Projectile, { type = "SkillType", skillType = SkillType.Grenade })} end,
4345+
["grenades have (%d+)%% chance to activate a second time"] = function(num) return { mod("GrenadeActivateTwice", "BASE", num, { type = "SkillType", skillType = SkillType.Grenade })} end,
43464346
["skills fire an additional projectile"] = { mod("ProjectileCount", "BASE", 1) },
43474347
["spells [hf][ai][vr]e an additional projectile"] = { mod("ProjectileCount", "BASE", 1, nil, ModFlag.Spell) },
43484348
["attacks fire an additional projectile"] = { mod("ProjectileCount", "BASE", 1, nil, ModFlag.Attack) },

0 commit comments

Comments
 (0)