


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

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

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



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





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

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

$npc3houkou=96
!if $100x<$125x
$npc3houkou=48
!endif


$npc3act=1
!picarea 125,256,$npc3houkou,64,48
!picarea 25,256,$npc3houkou,64,48
!godown #back
;-------------------------------------攻撃実行
#atcheck
!if $npc3act=1
!godown #atcft
!endif
!if $npc3act=2
$npc3act=3
!picarea 125,320,$npc3houkou,64,48
!picarea 25,320,$npc3houkou,64,48
!godown #back
!endif
!if $npc3act=3
$npc3act=4

!godown #back
!endif

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



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


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

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

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

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

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

!if $125x<$100x
$npc3houkou=96

!godown #mr
!godown #back
!endif
!if $125x>$100x
$npc3houkou=48

!godown #ml
!godown #back
!endif


!godown #back
#xy



!if $125y<$100y
$npc3houkou=0
!godown #md

!godown #back
!endif
!if $125y>$100y
$npc3houkou=144
!godown #mu

!godown #back
!endif

!godown #back


#ml
$125x-8

!godown #movego
#mr
$125x+8

!godown #movego
#mu
$125y-8

!godown #movego
#md
$125y+8

!godown #movego
;----------------------------
#movego
;
$npc3anime+$enpc3sx

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

!if $npc3anime>$rnd
$npc3anime=0
!picarea 125,$npc3anime,$npc3houkou,$enpc3sx,$enpc3sy
!picarea 25,$npc3anime,$npc3houkou,$enpc3sx,$enpc3sy
$npc3houkou=n

!godown #back
!endif
!picarea 125,$npc3anime,$npc3houkou,$enpc3sx,$enpc3sy
!picarea 25,$npc3anime,$npc3houkou,$enpc3sx,$enpc3sy
!picpos 125,$125x,$125y
!picpos 25,$125x,$125y
!picpos 26,$125x,$125y
;--------------------------------------------------------------
#back
!freturn2




































































