_CenteringCheck 相手ユニットID
Font 12pt
Local C_X = _Get_WX(相手ユニットID)
Local C_Y = _Get_WY(相手ユニットID)
Local i
Local BMP_FILE = _GetBMPName(相手ユニットID)
Local BMP_FILE2 = _GetTileName(相手ユニットID)
Local BMP_FILE3 BMP_FILE4
Local X_P Y_P A_X A_Y PTN
Local STR = ふにふに
Local S_S = TextWidth(STR)
Local T_COL = _ColorTime()
Switch Status(戦闘アニメ変数[ID])
Case 出撃
Case Else
_UnSetBattleAnimeValue
EndSw
If ((戦闘アニメ変数[使用者座標X] != "") Or (戦闘アニメ変数[使用者座標X2] != "") Or (戦闘アニメ変数[非表示] != "")) Then
Set A_X WX(戦闘アニメ変数[ID])
Set A_Y WY(戦闘アニメ変数[ID])
Set BMP_FILE3 _GetBMPName(戦闘アニメ変数[ID])
Set BMP_FILE4 _GetTileName(戦闘アニメ変数[ID])
ChangeUnitBitmap 戦闘アニメ変数[ID] 非表示
EndIf
Local UID = _GetName(対象ユニットID,_GetIDFromArgs())
_CenteringCheck UID
Local BMP_FILE2 = _GetTileName(UID)
Local posX posY
Local ANG B_ANG
Local DST
Local i
Local R_X R_Y
Local S_X S_Y
Local UID2 = _GetName(相手ユニットID)
If (UID = UID2) Then
UID2 = _GetName(対象ユニットID)
Endif
If X(UID) > X(UID2) Then
If Y(UID) > Y(UID2) Then
Set R_X X(UID)
Set R_Y (Y(UID) + 2)
Set S_X WX(UID)
Set S_Y (WY(UID) + 64)
Else
Set R_X (X(UID) + 2)
Set R_Y Y(UID)
Set S_X (WX(UID) + 64)
Set S_Y WY(UID)
Endif
Else
If Y(UID) > Y(UID2) Then
Set R_X (X(UID) - 2)
Set R_Y Y(UID)
Set S_X (WX(UID) - 64)
Set S_Y WY(UID)
Else
Set R_X X(UID)
Set R_Y (Y(UID) - 2)
Set S_X WX(UID)
Set S_Y (WY(UID) - 64)
Endif
Endif
#発射物に関する変数
Local BMP_FILE = _GetBmpFromArgs()
Local G_S
Local C_X = WX(UID)
Local C_Y = WY(UID)
Local UDR
Local DRCT FL AFTER_IMAGE SLOW
Set ANG _GetAngle(UID)
Set G_S _GetPicSizeFromArgs()
Set posX ((X(UID) - R_X) * 32)
Set posY ((Y(UID) - R_Y) * 32)
Set DST (Abs(X(UID) - R_X) _
+ Abs(Y(UID) - R_Y))
Set B_ANG _CheckAngleFix(ANG)
Set DRCT _FlipVertical(ANG)
If (_IsLight() = 1) Then
Set FL 1
Else
Set FL ""
EndIf
#実弾の速度を遅くする?
If (_SearchOptionFromArgs("遅") != "") Then
Set SLOW 1
Set DST (2 * DST)
Set W_T 0.5
ElseIf (_SearchOptionFromArgs("速") != "") Then
Set SLOW 0
Set W_T 0.4
Else
Set W_T 0.6
Set SLOW 0
EndIf
# 弾の傾き方向
If (_SearchOptionFromArgs("逆") != "") Then
Incr B_ANG 90
Else
Incr B_ANG -90
EndIf
If DRCT = 上下反転 Then
Incr B_ANG 180
EndIf
# 左右反転
Set UDR ""
If (_SearchOptionFromArgs("左右反転") != "") Then
Set UDR 左右反転
EndIf
Wait Reset
_SelectSound Cannon.wav _GetWavFromArgs()
For i = 1 To (DST + 1)
ClearPicture
_PaintTile BMP_FILE2 C_X C_Y
PaintPicture BMP_FILE _
(C_X - (posX / (DST + 2)) * i) (C_Y - (posY / (DST + 2)) * i) _
G_S G_S 透過 _ColorTime(FL)
Refresh
Wait Until (W_T * i)
Next
PlaySound FightHit(1).wav
Refresh
Set posX ((R_X - _Get_X(UID2)) * 32)
Set posY ((R_Y - _Get_Y(UID2)) * 32)
Set DST (Abs(R_X - _Get_X(UID2)) _
+ Abs(R_Y - _Get_Y(UID2)))
Incr S_X (16 - (G_S \ 2))
Incr S_Y (16 - (G_S \ 2))
Set i 0
Wait Reset
For i = 1 To (DST + 1)
ClearPicture
_PaintTile BMP_FILE2 C_X C_Y
PaintPicture Anime\Hit\EFFECT_Hit01.bmp S_X S_Y 32 32 透過 _ColorTime(FL)
Local UID = _GetName(対象ユニットID,_GetIDFromArgs())
_CenteringCheck UID
Local GS_STR = _GetBoxSizeFromArgs(Args(2))
Local GS_STR2 = _GetBoxSizeFromArgs(Args(4))
Local G_SX = _GN(32,_SelectBmpSizeType(GS_STR,"X"))
Local G_SY = _GN(32,_SelectBmpSizeType(GS_STR,"Y"))
Local G_SX2 = _GN(32,_SelectBmpSizeType(GS_STR2,"X"))
Local G_SY2 = _GN(32,_SelectBmpSizeType(GS_STR2,"Y"))
Local h i j k
Local C_X = WX(UID)
LOcal C_Y = WY(UID)
Local G_X = (WX(UID) + 16)
LOcal G_Y = (WY(UID) + 16)
Local BMP_FILE = _GetBMPName(UID)
Local T_COL_F = _ColorTime(_IsLight())
Local W_T
Local B_FLG = _S_OPT_FA("背面")
Local DRCT = ""
Local DRCT2 = ""
Local POS = _GetDrawPosFromArgs()
Local T_COL = _ColorTime()
Local ANG = 0
# 画像反転判定
If ((X(対象ユニットID) < _Get_X(相手ユニットID)) And (_S_OPT_FA("方向判定") = "方向判定")) Then
Set DRCT 左右反転
Set DRCT2 左右反転
EndIf
Local UD_OPT = _S_OPT_FA("上下反転")
Local LR_OPT = _S_OPT_FA("左右反転")
If ((DRCT != "") And (LR_OPT != "")) Then
Set DRCT ""
ElseIf (LR_OPT != "") Then
Set DRCT LR_OPT
EndIf
Local UD_OPT2 = ""
If (_SearchOptionFromArgs("上下反転2") != "") Then
UD_OPT2 = "上下反転"
EndIf
Local LR_OPT2 = ""
If (_SearchOptionFromArgs("左右反転2") != "") Then
LR_OPT2 = "左右反転"
Endif
If ((DRCT2 != "") And (LR_OPT2 != "")) Then
Set DRCT2 ""
ElseIf (LR_OPT != "") Then
Set DRCT2 LR_OPT2
EndIf
Local UID = _GetName(対象ユニットID,_GetIDFromArgs())
_CenteringCheck UID
Local C_X = WX(UID)
Local C_Y = WY(UID)
Local i L_NUM
Local BMP_FILE = _GetBMPName(UID)
Local BMP_FILE2 = _GetTileName(UID)
Local BMP_FILE3
Local WP_FILE = _GetBmpFromArgs()
Local WP_FILE2
Local G_S = _GetPicSizeFromArgs()
Local X_P Y_P
Local ANG = _GetAngle(UID)
Local TYPE = Args(1)
Local X_F
Local Y_F
Local DRCT DRCT2 DRCT3 DRCT4 DRCT5 DRCT6 RV RV2 RV3
Local W_T
Local UDR
Local FJ
Local R_S
Local UPE
_UnSetBattleAnimeValue
Set X_P (16 - (G_S \ 2))
Set Y_P (32 - G_S)
Set L_NUM 5
Set X_F _GetCircumference(ANG,X)
Set Y_F 1
If (X(UID) < _Get_X(相手ユニットID)) Then
Set DRCT 左右反転
Set DRCT2 左右反転
Set DRCT3 左右反転
Set DRCT4 ""
Set DRCT5 ""
Set DRCT6 ""
Set RV -1
Set RV2 -1
Set RV3 -1
Set ANG 270
Else
Set DRCT ""
Set DRCT2 ""
Set DRCT3 ""
Set DRCT4 左右反転
Set DRCT5 左右反転
Set DRCT6 左右反転
Set RV 1
Set RV2 1
Set RV3 1
Set ANG 90
EndIf
If (WP_FILE != "") Then
Else
Set WP_FILE -.bmp
EndIf
If (_SearchOptionFromArgs("二刀流") != "") Then
Set WP_FILE2 WP_FILE
Else
Set WP_FILE2 -.bmp
EndIf
If (_SearchOptionFromArgs("垂直") != "") Then
Set X_F 0
EndIf
Set W_T 1
If (_SearchOptionFromArgs("速") != "") Then
Set W_T 0.5
ElseIf (_SearchOptionFromArgs("遅") != "") Then
Set W_T 1.5
EndIf
Set UDR ""
If (_SearchOptionFromArgs("上下反転") != "") Then
Set UDR 上下反転
EndIf
# 方向判定
Set FJ 1
If (_SearchOptionFromArgs("正") != "") Then
Set FJ -1
EndIf
If (_SearchOptionFromArgs("小移動") != "") Then
FJ = (FJ * 0.5)
EndIf
If (_SearchOptionFromArgs("高") != "") Then
Y_F = (Y_F * 2)
EndIf
If (_SearchOptionFromArgs("回転") != "") Then
If DRCT2 = 左右反転 Then
Set DRCT2 ""
Set DRCT3 ""
Set DRCT5 左右反転
Set DRCT6 左右反転
Set RV2 1
Set RV3 1
Else
Set DRCT2 左右反転
Set DRCT3 左右反転
Set DRCT5 ""
Set DRCT6 ""
Set RV2 -1
Set RV3 -1
EndIf
EndIf
If (_SearchOptionFromArgs("昇龍") != "") Then
If DRCT3 = 左右反転 Then
Set DRCT3 ""
Set DRCT6 左右反転
Set RV3 1
Else
Set DRCT3 左右反転
Set DRCT6 ""
Set RV3 -1
EndIf
EndIf
# アッパー・振り下ろしエフェクト指定
Set BMP_FILE3 "-"
Set UPE ""
If (_SearchOptionFromArgs("アッパー") != "") Then
Set BMP_FILE3 "Attack\EFFECT_Swing0"
Set UPE 上下反転
ElseIf (_SearchOptionFromArgs("振り下ろし") != "") Then
Set BMP_FILE3 "Attack\EFFECT_Swing0"
EndIf
Wait Start
ChangeUnitBitmap UID 非表示
For i = 1 To L_NUM
ClearPicture
_PaintTile BMP_FILE2 C_X C_Y
Local UID = _GetName(対象ユニットID,_GetIDFromArgs())
_CenteringCheck UID
Local posX posY
Local ANG B_ANG
Local DST
Local i
Local UID2 = _GetName(相手ユニットID)
If (UID = UID2) Then
UID2 = _GetName(対象ユニットID)
Endif
#発射物に関する変数
Local BMP_FILE = _GetBmpFromArgs()
Local G_S
Local C_X = WX(UID)
Local C_Y = WY(UID)
Local UDR
Local DRCT FL SLOW
Local W_T
If ((IsNumeric(Args(1)) = 1) And (IsNumeric(Args(2)) = 1)) Then
Set ANG _GetAngle(X(UID),Y(UID),Args(1),Args(2))
Set G_S _GetPicSizeFromArgs(Args(3),Args(4),Args(5),Args(6),Args(7),Args(8))
Set posX ((X(UID) - Args(1)) * 32)
Set posY ((Y(UID) - Args(2)) * 32)
Set DST (Abs(X(UID) - Args(1)) + Abs(Y(UID) - Args(2)))
Else
Set ANG _GetAngle(UID)
Set G_S _GetPicSizeFromArgs()
Set posX ((X(UID) - _Get_X(UID2)) * 32)
Set posY ((Y(UID) - _Get_Y(UID2)) * 32)
Set DST (Abs(X(UID) - _Get_X(UID2)) _
+ Abs(Y(UID) - _Get_Y(UID2)))
EndIf
Set B_ANG _CheckAngleFix(ANG)
Set DRCT _FlipVertical(ANG)
If (_IsLight() = 1) Then
Set FL 1
Else
Set FL ""
EndIf
#実弾の速度を遅くする?
If (_SearchOptionFromArgs("遅") != "") Then
Set SLOW 1
Set DST (2 * DST)
Set W_T 0.5
ElseIf (_SearchOptionFromArgs("速") != "") Then
Set SLOW 0
Set W_T 0.4
Else
Set W_T 0.6
Set SLOW 0
EndIf
# 弾の傾き変更
If (_SearchOptionFromArgs("角度固定") != "") Then
Set B_ANG 0
EndIf
If DRCT = 上下反転 Then
Incr B_ANG 180
EndIf
# 左右反転
Set UDR ""
If (_SearchOptionFromArgs("左右反転") != "") Then
Set UDR 左右反転
EndIf
Wait Reset
_SelectSound Missile.wav _GetWavFromArgs()
For i = 1 To (DST + 1)
If (SLOW = 0 And i > 1) Then
PaintPicture BMP_FILE _
(C_X - (posX / (DST + 2)) * (i - 1)) (C_Y - (posY / (DST + 2)) * (i - 1 ) ) _
G_S G_S 透過 セピア 右回転 B_ANG DRCT UDR _ColorTime(FL)
EndIf