$ibent=0
$rnd6=0

$enemyturn=0
;---------------------------------------------------------------
#qwe

!picarea 21,$ehitar1x,$ehitar1,64,48
!picarea 23,$ehitar2x,$ehitar2,64,48
!picarea 26,$ehitar3x,$ehitar3,64,48
!picarea 28,$ehitar4x,$ehitar4,64,48
!picarea 31,$ehitar5x,$ehitar5,64,48
!picarea 33,$ehitar6x,$ehitar6,64,48
;!picarea 36,$ehitar7x,$ehitar7,64,48
$ehitar1+48
$ehitar2+48
$ehitar3+48
$ehitar4+48
$ehitar5+48
$ehitar6+48
;$ehitar7+48

!if $plshot>0
!fgosub2 $weaponsel
!endif

$enemyturn+1
$rnd=#eturn
!str $rnd+$enemyturn
!godown $rnd
;
;!if $enemyturn=1
;!godown #enemyturn2
;!endif
:
#enemyturn1
;
#eturn1
!fgosub2 $npc1
!godown #eturngo
#eturn2
!fgosub2 $npc2
!godown #eturngo
#eturn3
!fgosub2 $npc3
!godown #eturngo
;$enemyturn=1
!godown #eturngo
;
#enemyturn2
;
#eturn4
!fgosub2 $npc4
!godown #eturngo
#eturn5
!fgosub2 $npc5
!godown #eturngo
#eturn6
!fgosub2 $npc6
$enemyturn=0
!godown #eturngo
#eturngo
;-----------------------------------------------------pl1s
;-----------------------------------------------------------イベント

!fgosub2 btlibent1ibent.asdf

;-------------------------------------------

$200x-80
!if $200x<-1280
$200x+1280
!endif
!picpos 250,$200x,0

!picpos 5,$5x,$5y
!picarea 100,$plmanime,$plhoukou,32,48
!picarea 150,$plmanime,$plhoukou,32,48

;!picpos 2,$8x,$8y
;!picpos 8,$8x,$8y
;!picpos 198,$8x,$8y

;!picpos 120,$120x,$120y
;!picpos 20,$120x,$120y
;!picpos 125,$125x,$125y
;!picpos 25,$125x,$125y
;!picpos 130,$130x,$130y
;!picpos 30,$130x,$130y

!picpos 100,$100x,$100y
!picpos 150,$100x,$100y
!picpos 101,$101x,$101y
!picpos 102,$101x,$101y

!picpos 160,$101x,$101y
;-----------------------------------------------------スキャンｃ

*
!pause 1
!actcheck

!if $npc1houkou=dead
!if $npc2houkou=dead
!if $npc3houkou=dead
!if $npc4houkou=dead
!if $npc5houkou=dead
!if $npc6houkou=dead
!file btlibent1go.asdf
!stop
!endif

;!if $key=enter
;!file btlend.asdf
;!file btlgo.asdf
;!endif

!if $plbukiani>-96
!godown #plbuki
!endif

!if $plshot!0
!goto #qwe
!endif
;
!if $key3=z
!wav 21,0
!godown #plbuki
!endif


!if $key2!null
!godown #keyc
!endif
$plmanime=0


!goto #qwe
;
;---------------KEYc
#keyc
!if $key2=left
!godown #mleftc
!endif
!if $key2=right
!godown #mrightc
!endif
!if $key2=up
!godown #mupc
!endif
!if $key2=down
!godown #mdownc
!endif

!if $key2=leftup
!godown #mleftc
!endif
!if $key2=rightup
!godown #mrightc
!endif
!if $key2=leftdown
!godown #mleftc
!endif
!if $key2=rightdown
!godown #mrightc
!endif

!goto #qwe
;
;
;---------------------------------------------武器使用
#plbuki


!picoff 100
$plmanime=128

$plbukiani+96
;------------------------------たまぎれはんてい



;-----------------------------------------
#tamagrec
$plshot+1


!if $plbukiani>287
!wav 22,0
$plmanime=0
!picarea 101,0,$plbukihoukou,96,144
$plbukiani=-96
!picarea 102,$plbukiani,$plbukihoukou,96,144
!godown #bukiend1
!endif
!picarea 101,$plbukiani,$plbukihoukou,96,144
!picarea 102,$plbukiani,$plbukihoukou,96,144

!goto #qwe


#bukiend1

!goto #qwe
;
;------------------------------------------ひだり移動チェック
#mleftc
;!getpiccolorset 2

$plhoukou=48
$plbukihoukou=144

$100x-$pmove
$101x-$pmove

!if $100x<168
$100x=430
$101x=398
!endif


!godown #hokougosyori
----------------------------みぎ移動チェック
#mrightc
;!getpiccolorset 2

$plhoukou=96
$plbukihoukou=288

$100x+$pmove
$101x+$pmove

!if $100x>430
$100x=168
$101x=136
!endif

!godown #hokougosyori

;------------------------------------------うえ移動チェック
#mupc
;!getpiccolorset 2

$plhoukou=144
$plbukihoukou=432

$100y-$pmove
$101y-$pmove

!if $100y<30
$100y=424
$101y=376
!endif

!godown #hokougosyori

;------------------------------------------した移動チェック
#mdownc
;!getpiccolorset 2

$plhoukou=0
$plbukihoukou=0


$100y+$pmove
$101y+$pmove

!if $100y>424
$100y=30
$101y=-18
!endif

!godown #hokougosyori
;

;-----------------------------------------------------
#hokougosyori
!picon 100
!picarea 101,$plbukiani,$plbukihoukou,96,144

$plmanime+32
!if $plmanime>127
$plmanime=0
!endif

!goto #qwe

















































