Refactor, add bullet modules and weapon effect modifiers

This commit is contained in:
2021-05-27 02:50:33 +02:00
parent 0187ae6001
commit 346c426b43
13 changed files with 395 additions and 144 deletions
+35
View File
@@ -0,0 +1,35 @@
module Dodge.Combine
where
--import Dodge.Data
import Dodge.Combine.Data
--import qualified Data.IntMap.Strict as IM
--import qualified Data.IntSet as IS
import qualified Data.Map.Strict as M
--combineList :: IM.IntMap Item -> [(Item , IS.IntSet)]
--combineList
invert :: (Ord a) => M.Map b a -> M.Map a [b]
invert = M.foldrWithKey (\k val -> M.insertWith (++) val [k]) M.empty
combineList :: [([ItemType], ItemType)]
combineList =
[ ( [ Pistol, Pipe, Hardware ] , Rifle )
, ( [ Rifle, Hardware ] , Pistol )
, ( [ Pistol, Pistol, Hardware ] , SpreadGun 2 )
, ( [ SpreadGun 2, Pistol, Hardware ] , SpreadGun 3 )
, ( [ SpreadGun 3, Pistol, Hardware ] , SpreadGun 4 )
, ( [ SpreadGun 4, Pistol, Hardware ] , SpreadGun 5 )
, ( [ Pistol, AutoGun, Hardware ] , LtAutoGun )
, ( [ LtAutoGun, Pipe, Hardware ] , AutoGun )
, ( [ Rifle, Rifle, Hardware ] , MultGun 2 )
, ( [ MultGun 2, Rifle, Hardware ] , MultGun 3 )
, ( [ MultGun 3, Rifle, Hardware ] , MultGun 4 )
, ( [ MultGun 4, Rifle, Hardware ] , MultGun 5 )
, ( [ LtAutoGun, Pipe, Hardware ] , AutoGun )
, ( [ Pistol, BigTube, Hardware] , Launcher 1 )
, ( [ Launcher 1, BigTube, Pistol, Hardware] , Launcher 2)
, ( [ Launcher 2, BigTube, Pistol, Hardware] , Launcher 3)
]