LoginSignup
0
0

More than 5 years have passed since last update.

【誰得】バッチファイルでポケモンフラッシュを再現してみた

Last updated at Posted at 2019-04-02

ポケモンフラッシュとは

Wikipediaより

ポケモンショックとは、1997年12月16日にテレビ東京および系列局 (TXN) で放送されたテレビアニメ『ポケットモンスター』(ポケモン)の視聴者が光過敏性発作などを起こした事件である。事件の影響でポケモンの放送が4カ月の間休止された。

なお、「ポケモンショック」の名称は俗称であり、他にも「ポリゴンショック」「ポケモンパニック」「ポケモン(ポリゴン)事件」「ポケモン(ポリゴン)騒動」「ポケモン(ポリゴン)フラッシュ」などとも呼ばれる。

私も当時ポケモン見てましたが、この回はたまたま見てませんでした。

バッチで再現

colorコマンドを使うとコマンドプロンプトの文字色と背景色を変更できる。

引数が16進数なので、ランダムな数値を作って割当てて無限ループさせる。

pokemonFlash.bat
@echo off
title %~n0%~x0
setlocal

:loop

call :HEXRANNUM
set /a Foreground=Hex

call :HEXRANNUM
set /a Background=Hex

color %Foreground%%Background%

goto :loop
::------------------------------------------------
::ランダム16進数作成
::------------------------------------------------
:HEXRANNUM

    set /a Hex=%RANDOM%*16/32768
    if %Hex% equ 10 set Hex=A
    if %Hex% equ 11 set Hex=B
    if %Hex% equ 12 set Hex=C
    if %Hex% equ 13 set Hex=D
    if %Hex% equ 14 set Hex=E
    if %Hex% equ 15 set Hex=F

exit /b
::------------------------------------------------

実行結果

pokemonFlash.gif

気分悪くなるのであんま見ない方がいいです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0