Wednesday, December 17, 2008

RPG Math - Problem 3

Problem 3: Take Cover!

For this problem, we will say a line segment A crosses a line segment B if the following statements hold:

1. A and B are not parallel.
2. A intersects B.
3. The point at which A intersects B is not one of the endpoints of A.

---

In Dungeons & Dragons 3.5 edition, battle takes place on a square grid in which each character occupies one square. Some of the boundaries between squares are considered "walls" and cannot be seen through. A defender D is considered to be in the line of sight of attacker A if there exists a point in the attacker's square (including boundaries) and a point the defender's square (including boundaries) such that the line between those two points does not cross any wall. A defender D is considered to have cover from attacker A if for every corner of A's square, there exists a corner of D's square such that the line between those two points crosses a wall.

Now the questions:

3.1. Show that there exists a battlefield configuration such that A has line of sight to D and D does not have cover from A, but every line between an interior point of A's square and an interior point of D's square crosses a wall.

3.2. Suppose we remove condition (3) in the definition of crossing. (In fact, the D+D rule book is not clear on whether condition (3) should be in there.) Now show that there exists a battlefield configuration such that D has cover from A, but no line between an interior point of A's square and an interior point of D's square crosses a wall.

---

Now suppose we specify that instead of so-called "paper-thin" walls that just go along boundaries of squares, walls take up entire squares or contiguous groups of squares. Now we say a line segment A crosses a wall B if either of the following conditions hold:

1. The line segment A contains an interior point of B.
2. The line segment A crosses a boundary of B.

3.3. Solve problem 3.1 with these new conditions.
3.4. Solve problem 3.2 with these new conditions.

---

Solution to this problem is here.

1 comment:

Dan Mont said...

When you post the answer, a diagram may be helpful.