Jump to content

Sporeshot Shockwave does self-harm even if the clip is almost empty


HeatAndRun
  • Branch: Live Branch Version: Windows Pending

Strangely, deployed proximity mines are considered as not launched. It means if you didn't use light or heavy attacks, no matter how many proximity mines you deployed you'll get self-damage when you perform Shockwave. It's definitely strange because in my lore-wise perspective, the self-damage is due to overloaded cannonballs inside your cannon.

Video :


Steps to Reproduce

1. Deploy any numbers of proximity mines while wearing the Sporeshot.

2. Perform Shockwave (Space + light attack)

  • Like 1



User Feedback


Pretty sure this is a feature? It occurs when you stand ontop of a specific amount of mines, atleast when I messed around with it.

Share this comment


Link to comment
Share on other sites

17 minutes ago, MrMyther said:

Pretty sure this is a feature? It occurs when you stand ontop of a specific amount of mines, atleast when I messed around with it.

From my experience, all of the Dodge->Input attacks (Mortar, Shockwave, and the backwards dash) misfire when used with the Sporeshot if the ammo left in the cannon is close to the maximum amount of ammo not counting the mines, which doesn't seem right because the focus hits count the mines as missing ammo.

You can easily try it by doing the Shockwave as demonstrated in the video after walking away from the mines.

Share this comment


Link to comment
Share on other sites

Ah that IS why, I must've fired out the ammo then.
Retested it and does what you said, no idea why how I came to the conclusion it was based on standing over them before, woops.

Share this comment


Link to comment
Share on other sites

This is because the thresholds of Mortar, Shockwave, and Backfire (The official name for the Dodge ▶ Skill attack) depend on the percentage of remaining ammo (out of maximum ammo), while each Proximity Mine existing in the room will reduce the maximum ammo by 1.

If the remaining ammo>=80%, these attacks will be strong; if the remaining ammo>=50%, these attacks will be medium; if the remaining ammo<50%, these attacks will be weak. 

Some parts of the associated code (EA REV. 654458):

Spoiler

sg_player_cannon.lua, line 2670~2683, line 3085~3098, and line 3658~3671:

Spoiler
			local nextstate
			-- 6/6 ammo = strong
			-- 5/6 ammo = strong
			-- 4/6 ammo = medium
			-- 3/6 ammo = medium
			-- 2/6 ammo = weak
			-- 1/6 ammo = weak
			if ammo >= 0.8 then
				nextstate = "mortar_shoot_strong"
			elseif ammo >= 0.5 then
				nextstate = "mortar_shoot_medium"
			else
				nextstate = "mortar_shoot_weak"
			end

 

			local nextstate
			-- 6/6 ammo = strong
			-- 5/6 ammo = strong
			-- 4/6 ammo = medium
			-- 3/6 ammo = medium
			-- 2/6 ammo = weak
			-- 1/6 ammo = weak
			if ammo >= 0.8 then
				nextstate = "shockwave_shoot_strong"
			elseif ammo >= 0.5 then
				nextstate = "shockwave_shoot_medium"
			else
				nextstate = "shockwave_shoot_weak"
			end

 

			local nextstate
			-- 6/6 ammo = strong
			-- 5/6 ammo = strong
			-- 4/6 ammo = medium
			-- 3/6 ammo = medium
			-- 2/6 ammo = weak
			-- 1/6 ammo = weak
			if ammo >= 0.8 then
				nextstate = "backfire_shoot_strong"
			elseif ammo >= 0.5 then
				nextstate = "backfire_shoot_medium"
			else
				nextstate = "backfire_shoot_weak"
			end

sg_player_cannon_skill_proximitymine.lua, line 10~56:

Spoiler
local function TryCreateMine(inst)
	if not inst.sg.mem.ammo or inst.sg.mem.ammo < 1 then
		return
	else
		local focus = inst.sg.mem.focus_sequence and inst.sg.mem.focus_sequence[inst.sg.mem.ammo] or false

		local dist_variance = math.random(-1, 1) -- add some variance to where they're placed so they don't all just stack up
		dist_variance = dist_variance / 10

		local mine = SGCommon.Fns.SpawnAtDist(inst, focus and "player_cannon_mine_focus" or "player_cannon_mine", 0.5 + dist_variance)
		if mine then
			mine:Setup(
				{
					owner = inst,
					damage_mod = focus and 7.25 or 5.25,
					attack_id = "skill",
				})

			local power = inst.components.powermanager:GetPower(skill_def)
			if not power then
				return
			end

			if power and not power.mem.mines then
				power.mem.mines = {}
			end

			table.insert(power.mem.mines, mine)

			SGPlayerCommon.Fns.Cannon_UpdateAmmo(inst, 1)

			mine:DoTaskInAnimFrames(3, function(mine)
				if SGCommon.Fns.SanitizeTarget(mine) then
					mine.arm_sound = soundutil.PlayCodeSound(mine, fmodtable.Event.Cannon_ProximityMine_Arm, {
						max_count = 1,
						is_autostop = true,
						fmodparams = {
							isFocusAttack = focus,
						}
					})
				end
			end)

			inst.sg.mem.ammo_max = math.max(0, inst.sg.mem.ammo_max - 1)
		end
	end
end

skillpowers.lua, line 851~872:

Spoiler
		["mine_removed"] = function(pow, inst, mine)
			if pow.mem.mines then
				local remove_id = nil
				for i,storedmine in ipairs(pow.mem.mines) do
					if mine == storedmine then
						remove_id = i
						break
					end
				end

				if remove_id then
					table.remove(pow.mem.mines, remove_id)
				end
			end

			-- A mine is exploded, make the ammo available again.
			local ammo_max = inst.sg.mem.ammo_max
			ammo_max = math.min(inst.sg.mem.original_ammo_max, ammo_max + 1)
			inst.sg.mem.ammo_max = ammo_max

			inst:PushEvent("cannon_update_ammo")
		end,

 

 

On 2/11/2025 at 8:40 AM, Electroely said:

which doesn't seem right because the focus hits count the mines as missing ammo.

The Focus Hits depend on the number of remaining ammo.

Some parts of the associated code (EA REV. 654458), from cannons.lua, line 169~197:

Spoiler
			focus_sequence =
			{
				-- Of a given clip, which shots are FOCUS shots and which are NORMAL shots?
				[1] = true,
				[2] = true,
				[3] = true,
				[4] = true,
				[5] = true,

				[6] = false,
				[7] = false,
				[8] = false,
				[9] = false,
				[10] = false,
			},
			mortar_focus_sequence =
			{
				[1] = true,
				[2] = true,
				[3] = true,
				[4] = true,
				[5] = true,

				[6] = false,
				[7] = false,
				[8] = false,
				[9] = false,
				[10] = false,
			},

 

 

The following is a table for the conditions corresponding to the different numbers of existing mine and remaining ammo:

2025_02_19.png.840f67f6a4716f75aadb0c92a2f61c9b.png

  • Thanks 1

Share this comment


Link to comment
Share on other sites

6 hours ago, cniumunto said:

This is because the thresholds of Mortar, Shockwave, and Backfire (The official name for the Dodge ▶ Skill attack) depend on the percentage of remaining ammo (out of maximum ammo), while each Proximity Mine existing in the room will reduce the maximum ammo by 1.

If the remaining ammo>=80%, these attacks will be strong; if the remaining ammo>=50%, these attacks will be medium; if the remaining ammo<50%, these attacks will be weak. 

The following is a table for the conditions corresponding to the different numbers of existing mine and remaining ammo:

2025_02_19.png.840f67f6a4716f75aadb0c92a2f61c9b.png

Oh that's.. Very informative indeed.

Share this comment


Link to comment
Share on other sites


×
  • Create New...