()
boss1 = do
  setName "回転弾"
  
  e <- use self
  zoom _1 $ motionCommon 100 Stay
  when (e^.counter == 130) $ effs $ return $ effEnemyStart (e^.pos)
  when (e^.counter == 200) $ do
    mapM_ enemyEffect $ [
      effEnemyAttack 0 (e^.pos),
      effEnemyAttack 1 (e^.pos),
      effEnemyAttack 2 (e^.pos)]
  
  let def' = def & pos .~ e^.pos & ang .~ (fromIntegral $ e^.counter)/30
  when ((e^.counter) >= 200 && (e^.counter) `mod` 15 == 0 && e^.statePiece == Attack) $ do
    shots $ (flip map) [1..4] $ \i -> 
      makeBullet Oval Red def'
        & speed .~ 3.15 & ang +~ 2*pi*i/4
        & runAuto %~ (go 190 300 >>)
    shots $ (flip map) [1..4] $ \i ->
      makeBullet Oval Yellow def'
        & speed .~ 3 & ang +~ 2*pi*i/4
        & runAuto %~ (go 135 290 >>)
    shots $ (flip map) [1..4] $ \i ->
      makeBullet Oval Green def'
        & speed .~ 2.5 & ang +~ 2*pi*i/4
        & runAuto %~ (go 120 280 >>)
    shots $ (flip map) [1..4] $ \i ->
      makeBullet Oval Blue def'
        & speed .~ 2.2 & ang +~ 2*pi*i/4
        & runAuto %~ (go 100 270 >>)

  where
    go t1 t2 = zoom _1 $ do
      cnt <- use counter
      when (30 < cnt && cnt < 200) $ do
        ang %= (+ pi/t1)
        speed %= (subtract (7.0/t2))
      when (cnt == 170) $ id %= makeBullet BallTiny Purple

boss2 :: (Given Resource, HasChara c, HasPiece c, HasObject c) => Danmaku c ()
b
boss1 :: (Given Resource, HasChara c, HasPiece c, HasObject c) => Danmaku c ()
boss1 = do
  setName "回転弾"
  
  e <- use self
  zoom _1 $ motionCommon 100 Stay
  when (e^.counter == 130) $ effs $ return $ effEnemyStart (e^.pos)
  when (e^.counter == 200) $ do
    mapM_ enemyEffect $ [
      effEnemyAttack 0 (e^.pos),
      effEnemyAttack 1 (e^.pos),
      effEnemyAttack 2 (e^.pos)]
  
  let def' = def & pos .~ e^.pos & ang .~ (fromIntegral $ e^.counter)/30
  when ((e^.counter) >= 200 && (e^.counter) `mod` 15 == 0 && e^.statePiece == Attack) $ do
    shots $ (flip map) [1..4] $ \i -> 
      makeBullet Oval Red def'
        & speed .~ 3.15 & ang +~ 2*pi*i/4
        & runAuto %~ (go 190 300 >>)
    shots $ (flip map) [1..4] $ \i ->
      makeBullet Oval Yellow def'
        & speed .~ 3 & ang +~ 2*pi*i/4
        & runAuto %~ (go 135 290 >>)
    shots $ (flip map) [1..4] $ \i ->
      makeBullet Oval Green def'
        & speed .~ 2.5 & ang +~ 2*pi*i/4
        & runAuto %~ (go 120 280 >>)
    shots $ (flip map) [1..4] $ \i ->
      makeBullet Oval Blue def'
        & speed .~ 2.2 & ang +~ 2*pi*i/4
        & runAuto %~ (go 100 270 >>)

  where
    go t1 t2 = zoom _1 $ do
      cnt <- use counter
      when (30 < cnt && cnt < 200) $ do
        ang %= (+ pi/t1)
        speed %= (subtract (7.0/t2))
      when (cnt == 170) $ id %= makeBullet BallTiny Purple
boss1 = do
  setName "回転弾"
  
  e <- use self
  zoom _1 $ motionCommon 100 Stay
  when (e^.counter == 130) $ effs $ return $ effEnemyStart (e^.pos)
  when (e^.counter == 200) $ do
    mapM_ enemyEffect $ [
      effEnemyAttack 0 (e^.pos),
      effEnemyAttack 1 (e^.pos),
      effEnemyAttack 2 (e^.pos)]
  
  let def' = def & pos .~ e^.pos & ang .~ (fromIntegral $ e^.counter)/30
  when ((e^.counter) >= 200 && (e^.counter) `mod` 15 == 0 && e^.statePiece == Attack) $ do
    shots $ (flip map) [1..4] $ \i -> 
      makeBullet Oval Red def'
        & speed .~ 3.15 & ang +~ 2*pi*i/4
        & runAuto %~ (go 190 300 >>)
    shots $ (flip map) [1..4] $ \i ->
      makeBullet Oval Yellow def'
        & speed .~ 3 & ang +~ 2*pi*i/4
        & runAuto %~ (go 135 290 >>)
    shots $ (flip map) [1..4] $ \i ->
      makeBullet Oval Green def'
        & speed .~ 2.5 & ang +~ 2*pi*i/4
        & runAuto %~ (go 120 280 >>)
    shots $ (flip map) [1..4] $ \i ->
      makeBullet Oval Blue def'
        & speed .~ 2.2 & ang +~ 2*pi*i/4
        & runAuto %~ (go 100 270 >>)

  where
    go t1 t2 = zoom _1 $ do
      cnt <- use counter
      when (30 < cnt && cnt < 200) $ do
        ang %= (+ pi/t1)
        speed %= (subtract (7.0/t2))
      when (cnt == 170) $ id %= makeBullet BallTiny Purple