Commit 8cc9f04
committed
Simplify logic of determining illegal level change in Gehennom
Furey was confused when reading through this logic. It was confusing
to write, so I don't blame them. They correctly pointed out that part of
the conditional was redundant and it didn't need to involve an at_stairs
check. The reason it bothered checking at_stairs was the original intent
of this block was to catch a downwards levelport in addition to other
illegal moves, and there were some convolutions to capture the idea of
"if the downward level change is happening off-stairs, it's illegal
UNLESS they are falling AND did not anticipate the fall".
As a comment notes, though, downwards levelport is already handled
elsewhere, so this block doesn't need to take care of it.1 parent 140bd97 commit 8cc9f04
1 file changed
+11
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1471 | 1471 | | |
1472 | 1472 | | |
1473 | 1473 | | |
1474 | | - | |
1475 | | - | |
1476 | | - | |
1477 | | - | |
1478 | | - | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
1479 | 1484 | | |
1480 | 1485 | | |
1481 | | - | |
1482 | | - | |
1483 | | - | |
| 1486 | + | |
1484 | 1487 | | |
1485 | 1488 | | |
1486 | 1489 | | |
| |||
0 commit comments