


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

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

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



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





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

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

$npc6houkou=96
!if $100x<$132x
$npc6houkou=48
!endif


$npc6act=1
!picarea 132,256,$npc6houkou,64,48
!picarea 32,256,$npc6houkou,64,48
!godown #back
;-------------------------------------攻撃実行
#atcheck
!if $npc6act=1
!godown #atcft
!endif
!if $npc6act=2
$npc6act=3
!picarea 132,320,$npc6houkou,64,48
!picarea 32,320,$npc6houkou,64,48
!godown #back
!endif
!if $npc6act=3
$npc6act=4

!godown #back
!endif

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



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


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

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

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

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

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

!if $132x<$100x
$npc6houkou=96

!godown #mr
!godown #back
!endif
!if $132x>$100x
$npc6houkou=48

!godown #ml
!godown #back
!endif


!godown #back
#xy



!if $132y<$100y
$npc6houkou=0
!godown #md

!godown #back
!endif
!if $132y>$100y
$npc6houkou=144
!godown #mu

!godown #back
!endif

!godown #back



#ml
$132x-8

!godown #movego
#mr
$132x+8

!godown #movego
#mu
$132y-8

!godown #movego
#md
$132y+8

!godown #movego
;----------------------------
#movego
;
$npc6anime+$enpc6sx

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

!if $npc6anime>$rnd
$npc6anime=0
!picarea 132,$npc6anime,$npc6houkou,$enpc6sx,$enpc6sy
!picarea 32,$npc6anime,$npc6houkou,$enpc6sx,$enpc6sy
$npc6houkou=n

!godown #back
!endif
!picarea 132,$npc6anime,$npc6houkou,$enpc6sx,$enpc6sy
!picarea 32,$npc6anime,$npc6houkou,$enpc6sx,$enpc6sy
!picpos 132,$132x,$132y
!picpos 32,$132x,$132y
!picpos 33,$132x,$132y
;--------------------------------------------------------------
#back
!freturn2




































































