function unmakeAll(object)
    local claw = GetClaw()
    if object.X > claw.X - 450 and object.Y > claw.Y - 450  and object.X < claw.X + 450  and object.Y < claw.Y + 450 then
        if object.Logic == TigerGuard then
            object.HitFlags.MagicBullet = true
        end
    end
end

function magicInput()
    local magic = 2
    return GetInput"Magic" or (PlayerData().ActiveSecondWeapon == magic and GetInput"Projectile")
end

function main(self)
    local claw = GetClaw()

    if self.State == 0 then
		self.Flags.AlwaysActive, self.DrawFlags.NoDraw = true, true
        self.blockTime = 0
		self.State = 1
	end

	if self.State == 1 then
		if magicInput() and PlayerData().MagicAmmo > 0 and claw.State <= ClawStates.Climb then
			self.lastClawsState = claw.State
            claw.State = ClawStates.Freeze
            self.blockTime = GetTime() + 25
			self.State = 3
		end
	end

	if self.State == 3 and GetTime() > self.blockTime then
		self.burst = CreateObject{z=7000, name="ArtifactPower:AetherBurst"}
        LoopThroughObjects(unmakeAll)
		PlayerData().MagicAmmo = PlayerData().MagicAmmo - 1
		claw.State = self.lastClawsState
        self.State = 4
	end

    -- Check for not magic input:
    if self.State == 4 and not magicInput() then
        self.State = 1
    end
end
