


!if $npc5houkou=dead
!godown #back
!endif
;

;---------------------------------
!if $npc5act>0
!godown #atcheck
!endif
;-----------------------------------

;
!if $npc5houkou=48
!godown #ml
!endif
!if $npc5houkou=96
!godown #mr
!endif
!if $npc5houkou=144
!godown #mu
!endif
!if $npc5houkou=0
!godown #md
!endif
;
;



;---------------------------------攻撃待機





;!getpiccolorset 160
$rnd=$130x
$rnd2=$130y
$rnd+16
$rnd2+24
!getpiccolorr $rnd,$rnd2
!if $rval<100
!godown #emukic
!endif
!godown #movec

;-------------------------------------------
#emukic

$npc5houkou=96
!if $100x<$130x
$npc5houkou=48
!endif


$npc5act=1
!picarea 130,256,$npc5houkou,64,48
!picarea 30,256,$npc5houkou,64,48
!godown #back
;-------------------------------------攻撃実行
#atcheck
!if $npc5act=1
!godown #atcft
!endif
!if $npc5act=2
$npc5act=3
!picarea 130,320,$npc5houkou,64,48
!picarea 30,320,$npc5houkou,64,48
!godown #back
!endif
!if $npc5act=3
$npc5act=4

!godown #back
!endif

$rnd=$130x
$rnd2=$130y
$rnd+16
$rnd2+24
!getpiccolorr $rnd,$rnd2
!if $rval<100
!picoff 30
!picoff 130
!file gameover.asdf,#ushi
!stop
!endif
$npc5act=0
!godown #back
;
;-----------------------------------------------
#atcft
$npc5act=2
!rnd $rnd,3
!if $rnd=0
!wavset 35,ushiat1.wav
!endif
!if $rnd=1
!wavset 35,ushiat2.wav
!endif
!if $rnd=2
!wavset 35,ushiat3.wav
!endif
!wav 35,0
!godown #back
;---------------------------------------
;
;------------------------
#movec
;!if $npc5xy=0
;$npc5xy=1
;!godown #xy
;!endif
;$npc5xy=0



!if $130x=$100x
!if $130y<$100y
$npc5houkou=0
!godown #md
!godown #back
!endif
!if $130x=$100x
!if $130y>$100y
$npc5houkou=144
!godown #mu
!godown #back
!endif


!if $130y=$100y
!if $130x<$100x
$npc5houkou=96
!godown #mr
!godown #back
!endif
!if $130y=$100y
!if $130x>$100x
$npc5houkou=48
!godown #ml
!godown #back
!endif

;-------------------------------距離計測
!if $130x<$100x
$rnd=$100x
$rnd-$130x
!godown #xgo
!endif
!if $130x>$100x
$rnd=$130x
$rnd-$100x
!godown #xgo
!endif

#xgo
!if $130y<$100y
$rnd2=$100y
$rnd2-$130y
!godown #ygo
!endif
!if $130y>$100y
$rnd2=$130y
$rnd2-$100y
!godown #ygo
!endif

#ygo
!if $rnd>$rnd2
!godown #yx
!endif
!if $rnd<$rnd2
!godown #xy
!endif

;!godown #back
;------------------------------------
#yx

!if $130x<$100x
$npc5houkou=96

!godown #mr
!godown #back
!endif
!if $130x>$100x
$npc5houkou=48

!godown #ml
!godown #back
!endif


!godown #back
#xy



!if $130y<$100y
$npc5houkou=0
!godown #md

!godown #back
!endif
!if $130y>$100y
$npc5houkou=144
!godown #mu

!godown #back
!endif

!godown #back



#ml
$130x-8

!godown #movego
#mr
$130x+8

!godown #movego
#mu
$130y-8

!godown #movego
#md
$130y+8

!godown #movego
;----------------------------
#movego
;
$npc5anime+$enpc5sx

$rnd=$enpc5sx
$rnd*3
;$rnd-1

!if $npc5anime>$rnd
$npc5anime=0
!picarea 130,$npc5anime,$npc5houkou,$enpc5sx,$enpc5sy
!picarea 30,$npc5anime,$npc5houkou,$enpc5sx,$enpc5sy
$npc5houkou=n

!godown #back
!endif
!picarea 130,$npc5anime,$npc5houkou,$enpc5sx,$enpc5sy
!picarea 30,$npc5anime,$npc5houkou,$enpc5sx,$enpc5sy
!picpos 130,$130x,$130y
!picpos 30,$130x,$130y
!picpos 31,$130x,$130y
;--------------------------------------------------------------
#back
!freturn2




































































