s2 = do
  setName "分裂弾"
  
  e <- use self
  zoom _1 $ motionCommon 100 Stay
  ang' <- anglePlayer
  when (e^.counter == 150) $
    mapM_ enemyEffect $ [
      effEnemyAttack 0 (e^.pos),
      effEnemyAttack 1 (e^.pos),
      effEnemyAttack 2 (e^.pos)]
  
  when (e^.counter `mod` 50 == 0 && e^.statePiece == Attack) $
    shots $ (flip map) [0..5] $ \i ->
      makeBullet BallMedium (toEnum $ i*2 `mod` 8) def
        & pos .~ e^.pos & speed .~ 2
        & ang .~ ang' + fromIntegral i*2*pi/5 & runAuto %~ (go >>)
  when (e^.counter `mod` 100 == 0 && e^.statePiece == Attack) $
    shots $ return $ makeBullet BallLarge Purple def
      & pos .~ e^.pos & speed .~ 1.5 & ang .~ ang'
  
  where
    go = do
      b <- use self
      let t = pi/3
      let time = 50
      when ((b^.counter) < 200 && (b^.counter) `mod` time == 0) $
        shots $ return $ def & auto .~ b & ang +~ t
      
      zoom _1 $ do
        cnt <- use counter
        when (cnt < 200 && cnt `mod` time == 0) $ do
          speed += 1.5
          ang -= t
        when (cnt < 200) $ speed -= (fromIntegral $ time - cnt `mod` time)/1000

boss3 :: (Given Resource, HasChara c, HasPiece c, HasObject c) => Danmaku c ()
boss3 =
boss2 :: (Given Resource, HasChara c, HasPiece c, HasObject c) => Danmaku c ()
boss2 = do
  setName "分裂弾"
  
  e <- use self
  zoom _1 $ motionCommon 100 Stay
  ang' <- anglePlayer
  when (e^.counter == 150) $
    mapM_ enemyEffect $ [
      effEnemyAttack 0 (e^.pos),
      effEnemyAttack 1 (e^.pos),
      effEnemyAttack 2 (e^.pos)]
  
  when (e^.counter `mod` 50 == 0 && e^.statePiece == Attack) $
    shots $ (flip map) [0..5] $ \i ->
      makeBullet BallMedium (toEnum $ i*2 `mod` 8) def
        & pos .~ e^.pos & speed .~ 2
        & ang .~ ang' + fromIntegral i*2*pi/5 & runAuto %~ (go >>)
  when (e^.counter `mod` 100 == 0 && e^.statePiece == Attack) $
    shots $ return $ makeBullet BallLarge Purple def
      & pos .~ e^.pos & speed .~ 1.5 & ang .~ ang'
  
  where
    go = do
      b <- use self
      let t = pi/3
      let time = 50
      when ((b^.counter) < 200 && (b^.counter) `mod` time == 0) $
        shots $ return $ def & auto .~ b & ang +~ t
      
      zoom _1 $ do
        cnt <- use counter
        when (cnt < 200 && cnt `mod` time == 0) $ do
          speed += 1.5
          ang -= t
        when (cnt < 200) $ speed -= (fromIntegral $ time - cnt `mod` time)/1000
boss2 = do
  setName "分裂弾"
  
  e <- use self
  zoom _1 $ motionCommon 100 Stay
  ang' <- anglePlayer
  when (e^.counter == 150) $
    mapM_ enemyEffect $ [
      effEnemyAttack 0 (e^.pos),
      effEnemyAttack 1 (e^.pos),
      effEnemyAttack 2 (e^.pos)]
  
  when (e^.counter `mod` 50 == 0 && e^.statePiece == Attack) $
    shots $ (flip map) [0..5] $ \i ->
      makeBullet BallMedium (toEnum $ i*2 `mod` 8) def
        & pos .~ e^.pos & speed .~ 2
        & ang .~ ang' + fromIntegral i*2*pi/5 & runAuto %~ (go >>)
  when (e^.counter `mod` 100 == 0 && e^.statePiece == Attack) $
    shots $ return $ makeBullet BallLarge Purple def
      & pos .~ e^.pos & speed .~ 1.5 & ang .~ ang'
  
  where
    go = do
      b <- use self
      let t = pi/3
      let time = 50
      when ((b^.counter) < 200 && (b^.counter) `mod` time == 0) $
        shots $ return $ def & auto .~ b & ang +~ t
      
      zoom _1 $ do
        cnt <- use counter
        when (cnt < 200 && cnt `mod` time == 0) $ do
          speed += 1.5
          ang -= t
        when (cnt < 200) $ speed -= (fromIntegral $ time - cnt `mod` time)/1000