legalInForm :: Player -> Move -> Bool
legalInForm p m = case (form, m) of
  (_, ScanItem _ _) -> True
  (Spider, Wield _) -> False
  (Spider, Wear _) -> False
  (Spider, TakeOff _) -> False
  (Pig, Wield _) -> False
  (Pig, Wear _) -> False
  (Pig, TakeOff _) -> False
  (Wisp, Wield _) -> False
  (Wisp, Wear _) -> False
  (Wisp, TakeOff _) -> False
  (Tree, Attack _ _) -> True
  (Tree, Rest) -> True
  (Tree, LongRest) -> True
  (Tree, _) -> False
  (Fungus, Go _ _) -> False
  (Fungus, Wield _) -> False
  (Fungus, Wear _) -> False
  (Fungus, TakeOff _) -> False
  (_, _) -> True
  where form = maybe Normal snd $ find (\(light, _) -> light `H.member` _statuses p) badforms
        badforms = [("Tree", Tree), ("Fungus", Fungus), ("Spider", Spider), ("Pig", Pig), ("Wisp", Wisp)]
legalInForm :: Player -> Move -> Bool
legalInForm p m = case (form, m) of
  (_, ScanItem _ _) -> True
  (Spider, Wield _) -> False
  (Spider, Wear _) -> False
  (Spider, TakeOff _) -> False
  (Pig, Wield _) -> False
  (Pig, Wear _) -> False
  (Pig, TakeOff _) -> False
  (Wisp, Wield _) -> False
  (Wisp, Wear _) -> False
  (Wisp, TakeOff _) -> False
  (Tree, Attack _ _) -> True
  (Tree, Rest) -> True
  (Tree, LongRest) -> True
  (Tree, _) -> False
  (Fungus, Go _ _) -> False
  (Fungus, Wield _) -> False
  (Fungus, Wear _) -> False
  (Fungus, TakeOff _) -> False
  (_, _) -> True
  where form = maybe Normal snd $ find (\(light, _) -> light `H.member` _statuses p) badforms
        badforms = [("Tree", Tree), ("Fungus", Fungus), ("Spider", Spider), ("Pig", Pig), ("Wisp", Wisp)]
legalInForm p m = case (form, m) of
  (_, ScanItem _ _) -> True
  (Spider, Wield _) -> False
  (Spider, Wear _) -> False
  (Spider, TakeOff _) -> False
  (Pig, Wield _) -> False
  (Pig, Wear _) -> False
  (Pig, TakeOff _) -> False
  (Wisp, Wield _) -> False
  (Wisp, Wear _) -> False
  (Wisp, TakeOff _) -> False
  (Tree, Attack _ _) -> True
  (Tree, Rest) -> True
  (Tree, LongRest) -> True
  (Tree, _) -> False
  (Fungus, Go _ _) -> False
  (Fungus, Wield _) -> False
  (Fungus, Wear _) -> False
  (Fungus, TakeOff _) -> False
  (_, _) -> True
  where form = maybe Normal snd $ find (\(light, _) -> light `H.member` _statuses p) badforms
        badforms = [("Tree", Tree), ("Fungus", Fungus), ("Spider", Spider), ("Pig", Pig), ("Wisp", Wisp)]