Rename combat methods; -1 status codes become named bool results
Refactor step 5, combat: rollEm→rollAttacks; attack, moveMonster, and chaseStep return (removed bool) instead of the C -1/0 int codes. Behavior unchanged; suite green.
This commit is contained in:
@@ -32,7 +32,7 @@ func TestRollEmParsesMultiAttackDice(t *testing.T) {
|
||||
// With attacker level 20 vs armor 10, swing always hits
|
||||
// (rnd(20)+wplus >= (20-20)-10 is always true), so three attacks of
|
||||
// 1x4 + str bonus 1 each must deal between 6 and 15 damage.
|
||||
if !g.rollEm(att, def, nil, false) {
|
||||
if !g.rollAttacks(att, def, nil, false) {
|
||||
t.Fatal("attack with guaranteed swing missed")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user