{-# LANGUAGE TypeFamilies, QuasiQuotes, MultiParamTypeClasses, TemplateHaskell, OverloadedStrings #-} module Main where import Data.Time.Clock import Data.Time.Calendar import Data.List import Data.Maybe import Packs import State import Format import Timestamp import Preview import Yesod import Config data ProtocolSeven = ProtocolSeven io :: MonadIO io => IO a -> io a io = liftIO putStrLnIO :: MonadIO io => String -> io () putStrLnIO = io . putStrLn mkYesod "ProtocolSeven" [parseRoutes| / HomeR GET |] instance Yesod ProtocolSeven inBoth :: (Eq a) => [a] -> [a] -> [a] inBoth x y = filter (\n -> n `elem` y) x showMonth :: Int -> String showMonth 1 = "January" showMonth 2 = "February" showMonth 3 = "March" showMonth 4 = "April" showMonth 5 = "May" showMonth 6 = "June" showMonth 7 = "July" showMonth 8 = "August" showMonth 9 = "September" showMonth 10 = "October" showMonth 11 = "November" showMonth 12 = "December" getHomeR :: Handler Html getHomeR = defaultLayout $ do (year, month, day) <- io $ getCurrentTime >>= return . toGregorian . utctDay let nextMonth = (month + 1) `mod` 12 let ts = toTS (year, month, day) let ((i,o),b,r) = currentFormat ts let bx = (\(Bq x) -> x) let (_,ib,_) = initialRotation let bbout = map show $ catMaybes $ inBoth (bx ib) (tail $ bx b) let dpout = sort $ map show $ map (\(Ir n) -> n) i let pr = getPreview ts setTitle "Protocol Seven" toWidget [lucius| html { color: #FFFFFF; background-color: #222222; font-family: 'Inconsolata', monospace; margin: 0px; padding: 0px; text-size-adjust: none; } body { min-width: 400px; max-width: 600px; margin: auto; padding: 20px; text-align: left; border-left: 4px solid white; border-right: 4px solid white; } section { border-top: 4px solid white; padding: 5px; } header, footer { margin: 0px; padding: 5px; border-top: 4px solid white; } .subheading { text-align: center; padding: 5px; } h1 { text-align: center; margin: 0px; padding: 5px; } p,h2,h3 { margin: 0px; padding: 5px; } .flexboxcontainer { display: flex; flex-direction: row; flex-wrap: wrap; } ul { text-align: initial; margin: 10px; } .upcomingIn { color: #00DD00; background-color: inherit; } .upcomingOut { color: #DD0000; background-color: inherit; } |] addScriptRemote "https://fonts.googleapis.com/css?family=Inconsolata" toWidgetBody [hamlet|

Protocol Seven

Always Be Running

|] toWidgetBody [hamlet|

Format for #{showMonth month} #{year}:

Evergreen:
  • Revised Core Set x3

    Big Boxes:
      $forall bb <- bbout
    • #{bb}

      Data-packs:
        $forall dp <- dpout
      • #{dp}

        Upcoming Changes for #{showMonth nextMonth} #{year}:
        $maybe (pin, pout, pbin, pbout) <- pr

        In:
          $maybe pbbin <- pbin
        • + #{show pbbin} $forall indp <- pin
        • + #{show indp}

          Out:
            $maybe pbbout <- pbout
          • - #{show pbbout} $forall outdp <- pout
          • - #{show outdp} $nothing

            Coming soon! |] toWidgetBody [hamlet|

            What is Protocol Seven?
            "No matter where you go, everybody's connected." - Lain Iwakura

            For many of us, Fantasy Flight Games' Living Card Game Android: Netrunner was more than simply a card game. The term Lifestyle Game has been thrown around a lot, but is truer for no other community than that of ANR. Without the influx of things to discuss each month, it may seem likely that the community will die, however this is only true if we let it happen.

            With the cancellation of many players favourite game, and no real replacement anywhere on the horizon, all that's left is to create our own points of discussion. Many players are working on custom cycles to expand the card pool, however one Chris Hay of the small and oft ridiculed meta from Dunedin, New Zealand has come up with a solution; an everchanging format using the current completed card pool.

            How does it work?
            "One theory says that man is a neoteny and is no longer able to evolve. If this is true, then what an absurd creature mankind has evolved into." - Eiri Masami

            Protocol Seven is an attempt at a constantly evolving metagame. Rather than relying on an influx of new cards every month, Protocol Seven relies on a monthly rotation schedule. This allows discussion of a new metagame every month for the forseeable future.

            A month's format in Protocol Seven will at any time consist of the following:

            • 3x Revised Core Set
            • 18x Data Packs from the Lunar - Kitara cycles
            • 5-6x Deluxe Boxes (Including Terminal Directive)

              This website will automatically update with the latest format, as well as a preview of the next months changes. This allows discussion, an ever-changing metagame, whilst also keeping the card pool similar enough between months that decks can be altered rather than completely remade.

              The Protocol Seven Protocol
              "But a protocol is nothing more than a simple agreement." - Eiri Masami

              A comprehensive description of the Protocol Seven format

              • 3x Revised Core Sets will be legal at all times
              • The most recent FFG Most Wanted List will be active at all times
              • The Genesis and Spin cycles are not legal
              • Cards from the Original Core Set that are not in the Revised Core Set are not legal
              • 18x of the 36 Data Packs from Lunar cycle onwards will be legal at all times
              • Each rotation will remove the two Data Packs that have been in play the longest, and replace them with two, randomly chosen packs
              • Once rotated out, a Data Pack will not rotate in for at least three months
              • Each rotation, one Deluxe Box (Including Terminal Directive), in release order, will be chosen as illegal
              • Every 7th rotation, all Deluxes will be legal instead
              • The rotation will happen on the 1st of every month, New Zealand time
              • On the 20th of every month, a preview of the next months format will be shown
              • No matter what the currently legal packs are, Door to Door (Escalation #59) will always be legal |] toWidgetBody [hamlet|