87 ammo = let l = B.length ammoStr `div` 4; ((a, b), (c, d)) = (B.splitAt l . fst &&& B.splitAt l . snd) . B.splitAt (l * 2) $ ammoStr in |
87 ammo = let l = B.length ammoStr `div` 4; ((a, b), (c, d)) = (B.splitAt l . fst &&& B.splitAt l . snd) . B.splitAt (l * 2) $ ammoStr in |
88 (map (\(x, y) -> eml [x, " ", y]) $ zip ["eammloadt", "eammprob", "eammdelay", "eammreinf"] [a, b, c, d]) |
88 (map (\(x, y) -> eml [x, " ", y]) $ zip ["eammloadt", "eammprob", "eammdelay", "eammreinf"] [a, b, c, d]) |
89 ++ [em "eammstore" | scheme !! 14 == "true" || scheme !! 20 == "false"] |
89 ++ [em "eammstore" | scheme !! 14 == "true" || scheme !! 20 == "false"] |
90 initHealth = scheme !! 27 |
90 initHealth = scheme !! 27 |
91 teamSetup :: TeamInfo -> [B.ByteString] |
91 teamSetup :: TeamInfo -> [B.ByteString] |
92 teamSetup t = |
92 teamSetup t = (++) ammo $ |
93 eml ["eaddteam 20", teamcolor t, " ", teamowner t, " <hash>"] |
93 eml ["eaddteam <hash> ", showB $ (1 + (readInt_ $ teamcolor t) :: Int) * 1234, " ", teamname t] |
94 : em "erdriven" |
94 : em "erdriven" |
95 : eml ["efort ", teamfort t] |
95 : eml ["efort ", teamfort t] |
96 : replicate (hhnum t) (eml ["eaddhh 0 ", initHealth, " hedgehog"]) |
96 : replicate (hhnum t) (eml ["eaddhh 0 ", initHealth, " hedgehog"]) |
97 |
97 |
98 drawnMapData :: B.ByteString -> [B.ByteString] |
98 drawnMapData :: B.ByteString -> [B.ByteString] |