Go binary/server for helping run/build sessions for the Maze Rats TTRPG
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

48 lines
1.4 KiB

package tables
import (
"mazeratsgen/internal/dice"
. "mazeratsgen/test/helpers"
"testing"
)
// TODO: Split out methods here
func TestGenMethods(t *testing.T) {
roller := dice.NewRoller(1)
table := MagicTable{Roller: roller}
table.PhysicalEffect(roller.TableRoll())
table.PhysicalElement(roller.TableRoll())
table.PhysicalForm(roller.TableRoll())
table.Element(roller.TableRoll()[0]) // Oh no an extra dice roll (/s)
table.EtherealEffect(roller.TableRoll())
table.EtherealElement(roller.TableRoll())
table.EtherealForm(roller.TableRoll())
table.Mutation(roller.TableRoll())
table.Insanity(roller.TableRoll())
table.Catastrophe(roller.TableRoll())
table.Spell(roller.TableRoll())
}
func TestExactMethods(t *testing.T) {
roller := dice.NewRoller(1)
table := MagicTable{Roller: roller}
ExactItem(table.EtherealForm([2]int{1, 3}), "Beam", t)
RegexItem(table.Mutation([2]int{1, 6}), ".*Arms$", t)
RegexItem(table.Mutation([2]int{2, 1}), ".*Eyes$", t)
RegexItem(table.Mutation([2]int{2, 2}), ".*Head$", t)
RegexItem(table.Mutation([2]int{2, 3}), ".*Legs$", t)
RegexItem(table.Mutation([2]int{2, 4}), ".*Mouth$", t)
RegexItem(table.Mutation([2]int{2, 5}), ".*Skin$", t)
RegexItem(table.Mutation([2]int{2, 6}), ".* Form$", t)
// TODO: Finish specific items
}
func TestGenSpell(t *testing.T) {
roller := dice.NewRoller(1)
table := MagicTable{Roller: roller}
for x := 1; x <= 5; x++ {
for y := 1; y <= 5; y++ {
table.Spell([2]int{x, y})
}
}
}