Triangular battleships (A computational geometry problem)
Python 3, 252 bytes

This is certainly the most variables I've ever used in code golf. :^P

from math import*;A=atan2
def h(a,b,c,d,e,f,g,h,i,j,R):
 r=R;_=0
 while r&gt;0:Q=A(j-h,i-g);k,l=g+r*cos(Q),h+r*sin(Q);D=A(d-b,c-a);E=A(f-b,e-a);F=A(l-b,k-a);G=A(b-d,a-c);H=A(f-d,e-c);I=A(l-d,k-c);_=_ or(D&lt;F&lt;E or E&lt;F&lt;D)and(G&lt;I&lt;H or H&lt;I&lt;G);r-=.001
 return _


Slightly ungolfed, with comments:

from math import*
# Parameters:
#  (a,b) (c,d) (e,f) - vertices of the triangle
#  (g,h) - location of cannon
#  (i,j) - aim of cannon
#  R - range of cannon
# Variables within function:
#  _ - was this shot a hit?
#  r - distance 0 &lt; r &lt;= R that we're testing
#  Q - angle between cannon source and destination
#  (k,l) - point that we're testing
#  D,E,F - angles between point 1 and 2,3,test
#  G,H,I - angles between point 2 and 1,3,test
def h(a,b,c,d,e,f,g,h,i,j,R):
    r=R;_=0
    while r&gt;0:
        Q=atan2(j-h,i-g)
        k,l=g+r*cos(Q),h+r*sin(Q)
        D=atan2(d-b,c-a)
        E=atan2(f-b,e-a)
        F=atan2(l-b,k-a)
        G=atan2(b-d,a-c)
        H=atan2(f-d,e-c)
        I=atan2(l-d,k-c)
        _=_ or(D&lt;F&lt;E or E&lt;F&lt;D)and(G&lt;I&lt;H or H&lt;I&lt;G)
        r-=.001
    return _


How it works:


Calculate the endpoint of the shot.
Test lots of points along the line from the endpoint to the cannon's location:

Calculate angles from vertex 1 to other two vertices and to test point;
Calculate angles from vertex 2 to other two vertices and to test point;
If the test point angle is between the other two angles, in both cases, then the test point is within the triangle and the ship has been hit.



Sample runs:

&gt;&gt;&gt; h(0,0,0,1,1,0,1,1,0,0,2)
True
&gt;&gt;&gt; h(0,0,1,2,3,0,-4,0,0,0,8)
False
&gt;&gt;&gt; h(0,0,-1,3,4,-1,-3,-4,3,4,5)
False
&gt;&gt;&gt; h(-2,-3,-3,6,7,-2,-6,2,1,-4,7)
True