################################################################################## #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/反射レーザー_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/# ################################################################################## #ソース的にはビームを自分のユニットの周囲2マスに架空のターゲット1を作ってそれに向かって発射、 #ターゲット1から相手ユニットの周囲にマスに架空ターゲット2を作ってそれに向かって反射、 #最後にターゲット2から相手に向かって反射というもの #オプション 色 効果音 戦闘アニメ_反射レーザー準備: Local UID = _GetName(対象ユニットID,_GetIDFromArgs()) _CenteringCheck UID Local i j r Local CR1 CG1 CB1 CR2 CG2 CB2 Local C_X = (WX(UID) + 16) Local C_Y = (WY(UID) + 16) _UnSetBattleAnimeValue Set CR1 250 Set CR2 200 Set CG1 250 Set CG2 200 Set CB1 100 Set CB2 0 Switch _GetColorFromArgs() Case "レッド" "赤" "赤色" "Red" "red" "RED" "Red" "red" "RED" Set CR1 250 Set CR2 200 Set CG1 100 Set CG2 0 Set CB1 100 Set CB2 0 Case "ブルー" "青" "青色" "Blue" "blue" "BLUE" "Blue" "blue" "BLUE" Set CR1 100 Set CR2 0 Set CG1 100 Set CG2 0 Set CB1 250 Set CB2 200 Case "イエロー" "黄" "黄色" "Yellow" "yellow" "YELLOW" "Yellow" "yellow" "YELLOW" Set CR1 250 Set CR2 200 Set CG1 250 Set CG2 200 Set CB1 100 Set CB2 0 Case "グリーン" "緑" "緑色" "Green" "green" "GREEN" "Green" "green" "GREEN" Set CR1 100 Set CR2 0 Set CG1 250 Set CG2 200 Set CB1 100 Set CB2 0 Case "ピンク" "桃" "桃色" "Pink" "pink" "PINK" "Pink" "pink" "PINK" Set CR1 250 Set CR2 200 Set CG1 100 Set CG2 0 Set CB1 200 Set CB2 100 Case "ブラック" "黒" "Black" "black" "BLACK" "Black" "black" "BLACK" Set CR1 100 Set CR2 0 Set CG1 100 Set CG2 0 Set CB1 100 Set CB2 0 Case "パープル" "紫" "紫色" "Purple" "purple" "PURPLE" "Purple" "purple" "PURPLE" Set CR1 200 Set CR2 100 Set CG1 100 Set CG2 0 Set CB1 250 Set CB2 200 Case "ホワイト" "白" "白色" "White" "white" "WHITE" "White" "white" "WHITE" Set CR1 250 Set CR2 200 Set CG1 250 Set CG2 200 Set CB1 250 Set CB2 200 Case "オレンジ" "橙" "橙色" "だいだい" "だいだい色" "Orange" "orange" "ORANGE" "Orange" "orange" "ORANGE" Set CR1 250 Set CR2 150 Set CG1 150 Set CG2 50 Set CB1 100 Set CB2 0 Case "ライトブルー" "水色" "Lightblue" "lightblue" "LIGHTBLUE" "Lightblue" "lightblue" "LIGHTBLUE" Set CR1 100 Set CR2 0 Set CG1 250 Set CG2 200 Set CB1 250 Set CB2 200 EndSw _SelectSound "Charge.wav" _GetWavFromArgs() FillStyle 塗りつぶし For j = 1 To 8 For i = 1 To 2 ClearPicture Switch i Case 1 Set r 0 Case 2 Set r 5 EndSw DrawWidth 2 Color RGB(CR1,CG1,CB1) FillColor RGB(CR1,CG1,CB1) Oval (C_X + j * 10) C_Y 20 0.5 Oval (C_X - j * 10) C_Y 20 0.5 Oval C_X (C_Y + j * 10) 20 2 Oval C_X (C_Y - j * 10) 20 2 DrawWidth 3 Color RGB(CR2,CG2,CB2) FillColor RGB(CR2,CG2,CB2) Oval C_X C_Y ((j * 3) + r) 0.5 Oval C_X C_Y ((j * 3) + r) 2 DrawWidth 1 Color RGB(CR1,CG1,CB1) FillColor RGB(CR1,CG1,CB1) Oval C_X C_Y ((j * 3) + r) 0.5 Oval C_X C_Y ((j * 3) + r) 2 Refresh Wait 0.2 Next Next For j = 1 To 8 For i = 1 To 2 ClearPicture Switch i Case 1 Set r 0 Case 2 Set r 5 EndSw DrawWidth 3 Color RGB(CR2,CG2,CB2) FillColor RGB(CR2,CG2,CB2) Oval C_X C_Y ((24 - (j * 2)) + r) 0.5 Oval C_X C_Y ((24 - (j * 2)) + r) 2 DrawWidth 1 Color RGB(CR1,CG1,CB1) FillColor RGB(CR1,CG1,CB1) Oval C_X C_Y ((24 - (j * 2)) + r) 0.5 Oval C_X C_Y ((24 - (j * 2)) + r) 2 Refresh Wait 0.2 Next Next Return "Keep" ################################################## 戦闘アニメ_反射レーザー攻撃: _CenteringCheck 相手ユニットID Local UID = _GetName(対象ユニットID,_GetIDFromArgs()) Local AID = _GetName(相手ユニットID,_GetIDFromArgs()) Local i j r Local CR1 CG1 CB1 CR2 CG2 CB2 Local ANG = _GetAngle(UID) Local C_X = (WX(UID) + 16) Local C_Y = (WY(UID) + 16) Local A_X = (WX(AID) + 16) Local A_Y = (WY(AID) + 16) Local X_1 = X(UID) Local Y_1 = Y(UID) Local X_4 = X(AID) Local Y_4 = Y(AID) Local X_F = _GetCircumference(ANG,X) Local Y_F = _GetCircumference(ANG,Y) Local T_K = (3.141592 * ANG / 180) Local ANG2 Local T_K2 Local C_X2 Local C_Y2 Local X_2 Local Y_2 Local X_F2 Local Y_F2 Local ANG3 Local T_K3 Local C_X3 Local C_Y3 Local X_F3 Local Y_F3 Local ANG4 Local T_K4 Local X_F4 Local Y_F4 Local RDM Set CR1 250 Set CR2 200 Set CG1 250 Set CG2 200 Set CB1 100 Set CB2 0 Switch _GetColorFromArgs() Case "レッド" "赤" "赤色" "Red" "red" "RED" "Red" "red" "RED" Set CR1 250 Set CR2 200 Set CG1 100 Set CG2 0 Set CB1 100 Set CB2 0 Case "ブルー" "青" "青色" "Blue" "blue" "BLUE" "Blue" "blue" "BLUE" Set CR1 100 Set CR2 0 Set CG1 100 Set CG2 0 Set CB1 250 Set CB2 200 Case "イエロー" "黄" "黄色" "Yellow" "yellow" "YELLOW" "Yellow" "yellow" "YELLOW" Set CR1 250 Set CR2 200 Set CG1 250 Set CG2 200 Set CB1 100 Set CB2 0 Case "グリーン" "緑" "緑色" "Green" "green" "GREEN" "Green" "green" "GREEN" Set CR1 100 Set CR2 0 Set CG1 250 Set CG2 200 Set CB1 100 Set CB2 0 Case "ピンク" "桃" "桃色" "Pink" "pink" "PINK" "Pink" "pink" "PINK" Set CR1 250 Set CR2 200 Set CG1 100 Set CG2 0 Set CB1 200 Set CB2 100 Case "ブラック" "黒" "Black" "black" "BLACK" "Black" "black" "BLACK" Set CR1 100 Set CR2 0 Set CG1 100 Set CG2 0 Set CB1 100 Set CB2 0 Case "パープル" "紫" "紫色" "Purple" "purple" "PURPLE" "Purple" "purple" "PURPLE" Set CR1 200 Set CR2 100 Set CG1 100 Set CG2 0 Set CB1 250 Set CB2 200 Case "ホワイト" "白" "白色" "White" "white" "WHITE" "White" "white" "WHITE" Set CR1 250 Set CR2 200 Set CG1 250 Set CG2 200 Set CB1 250 Set CB2 200 Case "オレンジ" "橙" "橙色" "だいだい" "だいだい色" "Orange" "orange" "ORANGE" "Orange" "orange" "ORANGE" Set CR1 250 Set CR2 150 Set CG1 150 Set CG2 50 Set CB1 100 Set CB2 0 Case "ライトブルー" "水色" "Lightblue" "lightblue" "LIGHTBLUE" "Lightblue" "lightblue" "LIGHTBLUE" Set CR1 100 Set CR2 0 Set CG1 250 Set CG2 200 Set CB1 250 Set CB2 200 EndSw Set RDM ((0 - 2) + Random(4)) Set C_X2 (C_X + RDM * 32) Set X_2 (X(UID) + RDM) Set RDM ((0 - 2) + Random(4)) Set C_Y2 (C_Y + RDM * 32) Set Y_2 (Y(UID) + RDM) Set RDM ((0 - 2) + Random(4)) Set C_X3 (A_X + RDM * 32) Set X_3 (X(AID) + RDM) Set RDM ((0 - 2) + Random(4)) Set C_Y3 (A_Y + RDM * 32) Set Y_3 (Y(AID) + RDM) Set ANG2 _GetAngle(X_1,Y_1,X_2,Y_2) Set T_K2 (3.141592 * ANG2 / 180) Set X_F2 _GetCircumference(ANG2,X) Set Y_F2 _GetCircumference(ANG2,Y) Set ANG3 _GetAngle(X_2,Y_2,X_3,Y_3) Set T_K3 (3.141592 * ANG3 / 180) Set X_F3 _GetCircumference(ANG3,X) Set Y_F3 _GetCircumference(ANG3,Y) Set ANG4 _GetAngle(X_3,Y_3,X_4,Y_4) Set T_K4 (3.141592 * ANG4 / 180) Set X_F4 _GetCircumference(ANG4,X) Set Y_F4 _GetCircumference(ANG4,Y) _SelectSound "AntiAirMissile.wav" _GetWavFromArgs() FillStyle 塗りつぶし For i = 1 To 6 Switch i Case 1 3 5 Set r 5 Case 2 4 6 Set r 0 EndSw ClearPicture Color RGB(CR2,CG2,CB2) FillColor RGB(CR2,CG2,CB2) DrawWidth 3 Oval C_X C_Y (10 + r) 1 Polygon (C_X + (5 + r) * Sin(T_K2)) (C_Y - (5 + r) * Cos(T_K2)) (C_X2 + (5 + r) * Sin(T_K2)) (C_Y2 - (5 + r) * Cos(T_K2)) (C_X2 - (5 + r) * Sin(T_K2)) (C_Y2 + (5 + r) * Cos(T_K2)) (C_X - (5 + r) * Sin(T_K2)) (C_Y + (5 + r) * Cos(T_K2)) Polygon (C_X2 + (5 + r) * Sin(T_K2)) (C_Y2 - (5 + r) * Cos(T_K2)) (C_X2 + (5 + r) * Sin(T_K3)) (C_Y2 - (5 + r) * Cos(T_K3)) (C_X2 - (5 + r) * Sin(T_K3)) (C_Y2 + (5 + r) * Cos(T_K3)) (C_X2 - (5 + r) * Sin(T_K2)) (C_Y2 + (5 + r) * Cos(T_K2)) Polygon (C_X2 + (5 + r) * Sin(T_K3)) (C_Y2 - (5 + r) * Cos(T_K3)) (C_X3 + (5 + r) * Sin(T_K3)) (C_Y3 - (5 + r) * Cos(T_K3)) (C_X3 - (5 + r) * Sin(T_K3)) (C_Y3 + (5 + r) * Cos(T_K3)) (C_X2 - (5 + r) * Sin(T_K3)) (C_Y2 + (5 + r) * Cos(T_K3)) Polygon (C_X3 + (5 + r) * Sin(T_K3)) (C_Y3 - (5 + r) * Cos(T_K3)) (C_X3 + (5 + r) * Sin(T_K4)) (C_Y3 - (5 + r) * Cos(T_K4)) (C_X3 - (5 + r) * Sin(T_K4)) (C_Y3 + (5 + r) * Cos(T_K4)) (C_X3 - (5 + r) * Sin(T_K3)) (C_Y3 + (5 + r) * Cos(T_K3)) Polygon (C_X3 + (5 + r) * Sin(T_K4)) (C_Y3 - (5 + r) * Cos(T_K4)) ((C_X3 + (5 + r) * Sin(T_K4)) + (X_F4 * 480)) ((C_Y3 - (5 + r) * Cos(T_K4)) + (Y_F4 * 480)) ((C_X3 - (5 + r) * Sin(T_K4)) + (X_F4 * 480)) ((C_Y3 + (5 + r) * Cos(T_K4)) + (Y_F4 * 480)) (C_X3 - (5 + r) * Sin(T_K4)) (C_Y3 + (5 + r) * Cos(T_K4)) Color RGB(CR1,CG1,CB1) FillColor RGB(CR1,CG1,CB1) DrawWidth 1 Oval C_X C_Y (10 + r) 1 Polygon (C_X + (5 + r) * Sin(T_K2)) (C_Y - (5 + r) * Cos(T_K2)) (C_X2 + (5 + r) * Sin(T_K2)) (C_Y2 - (5 + r) * Cos(T_K2)) (C_X2 - (5 + r) * Sin(T_K2)) (C_Y2 + (5 + r) * Cos(T_K2)) (C_X - (5 + r) * Sin(T_K2)) (C_Y + (5 + r) * Cos(T_K2)) Polygon (C_X2 + (5 + r) * Sin(T_K2)) (C_Y2 - (5 + r) * Cos(T_K2)) (C_X2 + (5 + r) * Sin(T_K3)) (C_Y2 - (5 + r) * Cos(T_K3)) (C_X2 - (5 + r) * Sin(T_K3)) (C_Y2 + (5 + r) * Cos(T_K3)) (C_X2 - (5 + r) * Sin(T_K2)) (C_Y2 + (5 + r) * Cos(T_K2)) Polygon (C_X2 + (5 + r) * Sin(T_K3)) (C_Y2 - (5 + r) * Cos(T_K3)) (C_X3 + (5 + r) * Sin(T_K3)) (C_Y3 - (5 + r) * Cos(T_K3)) (C_X3 - (5 + r) * Sin(T_K3)) (C_Y3 + (5 + r) * Cos(T_K3)) (C_X2 - (5 + r) * Sin(T_K3)) (C_Y2 + (5 + r) * Cos(T_K3)) Polygon (C_X3 + (5 + r) * Sin(T_K3)) (C_Y3 - (5 + r) * Cos(T_K3)) (C_X3 + (5 + r) * Sin(T_K4)) (C_Y3 - (5 + r) * Cos(T_K4)) (C_X3 - (5 + r) * Sin(T_K4)) (C_Y3 + (5 + r) * Cos(T_K4)) (C_X3 - (5 + r) * Sin(T_K3)) (C_Y3 + (5 + r) * Cos(T_K3)) Polygon (C_X3 + (5 + r) * Sin(T_K4)) (C_Y3 - (5 + r) * Cos(T_K4)) ((C_X3 + (5 + r) * Sin(T_K4)) + (X_F4 * 480)) ((C_Y3 - (5 + r) * Cos(T_K4)) + (Y_F4 * 480)) ((C_X3 - (5 + r) * Sin(T_K4)) + (X_F4 * 480)) ((C_Y3 + (5 + r) * Cos(T_K4)) + (Y_F4 * 480)) (C_X3 - (5 + r) * Sin(T_K4)) (C_Y3 + (5 + r) * Cos(T_K4)) Wait 0.5 Refresh Next ClearPicture Refresh Return ################################################## 戦闘アニメ_反射レーザー命中: Local i Local CR1 CG1 CB1 CR2 CG2 CB2 Local BMP_FILE Local BMP_FILE2 Local UID Local ANG Local C_X Local C_Y Local BMP_FILE Local BMP_FILE2 Set BMP_FILE _GetBMPName(相手ユニットID) Set BMP_FILE2 _GetTileName(相手ユニットID) _CenteringCheck 相手ユニットID Set C_X WX(相手ユニットID) Set C_Y WY(相手ユニットID) ChangeUnitBitmap 相手ユニットID 非表示 Set CR1 250 Set CR2 200 Set CG1 250 Set CG2 200 Set CB1 100 Set CB2 0 Switch _GetColorFromArgs() Case "レッド" "赤" "赤色" "Red" "red" "RED" "Red" "red" "RED" Set CR1 250 Set CR2 200 Set CG1 100 Set CG2 0 Set CB1 100 Set CB2 0 Case "ブルー" "青" "青色" "Blue" "blue" "BLUE" "Blue" "blue" "BLUE" Set CR1 100 Set CR2 0 Set CG1 100 Set CG2 0 Set CB1 250 Set CB2 200 Case "イエロー" "黄" "黄色" "Yellow" "yellow" "YELLOW" "Yellow" "yellow" "YELLOW" Set CR1 250 Set CR2 200 Set CG1 250 Set CG2 200 Set CB1 100 Set CB2 0 Case "グリーン" "緑" "緑色" "Green" "green" "GREEN" "Green" "green" "GREEN" Set CR1 100 Set CR2 0 Set CG1 250 Set CG2 200 Set CB1 100 Set CB2 0 Case "ピンク" "桃" "桃色" "Pink" "pink" "PINK" "Pink" "pink" "PINK" Set CR1 250 Set CR2 200 Set CG1 100 Set CG2 0 Set CB1 200 Set CB2 100 Case "ブラック" "黒" "Black" "black" "BLACK" "Black" "black" "BLACK" Set CR1 100 Set CR2 0 Set CG1 100 Set CG2 0 Set CB1 100 Set CB2 0 Case "パープル" "紫" "紫色" "Purple" "purple" "PURPLE" "Purple" "purple" "PURPLE" Set CR1 200 Set CR2 100 Set CG1 100 Set CG2 0 Set CB1 250 Set CB2 200 Case "ホワイト" "白" "白色" "White" "white" "WHITE" "White" "white" "WHITE" Set CR1 250 Set CR2 200 Set CG1 250 Set CG2 200 Set CB1 250 Set CB2 200 Case "オレンジ" "橙" "橙色" "だいだい" "だいだい色" "Orange" "orange" "ORANGE" "Orange" "orange" "ORANGE" Set CR1 250 Set CR2 150 Set CG1 150 Set CG2 50 Set CB1 100 Set CB2 0 Case "ライトブルー" "水色" "Lightblue" "lightblue" "LIGHTBLUE" "Lightblue" "lightblue" "LIGHTBLUE" Set CR1 100 Set CR2 0 Set CG1 250 Set CG2 200 Set CB1 250 Set CB2 200 EndSw Color RGB(CR2,CG2,CB2) FillColor RGB(CR1,CG1,CB1) _SelectSound "Explode.wav" _GetWavFromArgs() DrawWidth 2 For i = 1 To 20 ClearPicture _PaintTile BMP_FILE2 C_X C_Y Switch i Case 1 2 3 4 5 6 7 8 9 10 PaintPicture BMP_FILE C_X C_Y 透過 FillStyle 塗りつぶし Oval (C_X + 16) (C_Y + 16) (i * 5) 1 Case 11 13 15 17 19 PaintPicture BMP_FILE C_X (C_Y + 2) 透過 DrawWidth 3 FillStyle 透明 Oval (C_X + 16) (C_Y + 16) (i * 10) 1 Case 12 14 16 18 20 PaintPicture BMP_FILE C_X (C_Y - 2) 透過 DrawWidth 3 FillStyle 透明 Oval (C_X + 16) (C_Y + 16) (i * 10) 1 EndSw Refresh Wait 0.5 Next ChangeUnitBitmap 相手ユニットID 非表示解除 ClearPicture Refresh Return ##################################################