Tweak twisting when aiming
This commit is contained in:
@@ -82,15 +82,14 @@ itemsMultisets = map mconcat . mapM itemMultisets
|
||||
-- "individual" items can produce multiple multisets if they are in fact
|
||||
-- a stack of more than one item
|
||||
itemMultisets :: (Int,Item) -> [([Int],M.Map CombineType Int)]
|
||||
itemMultisets (i,it) = case it ^? itConsumption . itAmount' of
|
||||
itemMultisets (i,it) = case it ^? itConsumption . itAmount of
|
||||
Nothing -> [ ([i], M.singleton thetype 1 ) ]
|
||||
Just n -> map (\k -> (replicate k i, M.singleton thetype k)) [1..n]
|
||||
where
|
||||
thetype = _itType it
|
||||
|
||||
|
||||
itemTypeAmounts :: Item -> [[CombineType]]
|
||||
itemTypeAmounts it = case it ^? itConsumption . itAmount' of
|
||||
itemTypeAmounts it = case it ^? itConsumption . itAmount of
|
||||
Nothing -> [[thetype]]
|
||||
Just i -> map (`replicate` thetype) [1 .. i]
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user