diff --git a/Models/Liveries/Blur.png b/Models/Liveries/Blur.png old mode 100644 new mode 100755 diff --git a/Models/Liveries/Default.jpg b/Models/Liveries/Default.jpg old mode 100644 new mode 100755 index 6acb6f1..7dd912b Binary files a/Models/Liveries/Default.jpg and b/Models/Liveries/Default.jpg differ diff --git a/Models/Liveries/Default.xml b/Models/Liveries/Default.xml new file mode 100755 index 0000000..5d61174 --- /dev/null +++ b/Models/Liveries/Default.xml @@ -0,0 +1,16 @@ + + + + + + + + + Default - USAF 142ATW NY ANG + Liveries/Default.jpg + + + + + + \ No newline at end of file diff --git a/Models/Liveries/Disk.png b/Models/Liveries/Disk.png old mode 100644 new mode 100755 diff --git a/Models/Liveries/FAF_ED1_33.jpg b/Models/Liveries/FAF_ED1_33.jpg new file mode 100644 index 0000000..2129dc2 Binary files /dev/null and b/Models/Liveries/FAF_ED1_33.jpg differ diff --git a/Models/Liveries/FAF_ED1_33.xml b/Models/Liveries/FAF_ED1_33.xml new file mode 100755 index 0000000..5f31cde --- /dev/null +++ b/Models/Liveries/FAF_ED1_33.xml @@ -0,0 +1,16 @@ + + + + + + + + + French Air Force ED 1/33 + Liveries/FAF_ED1_33.jpg + + + + + + \ No newline at end of file diff --git a/Models/Liveries/FGUK.jpg b/Models/Liveries/FGUK.jpg new file mode 100755 index 0000000..30dae54 Binary files /dev/null and b/Models/Liveries/FGUK.jpg differ diff --git a/Models/Liveries/FGUK.xml b/Models/Liveries/FGUK.xml new file mode 100755 index 0000000..3a1d9ec --- /dev/null +++ b/Models/Liveries/FGUK.xml @@ -0,0 +1,16 @@ + + + + + + + + + FGUK North Theatre OPS + Liveries/FGUK.jpg + + + + + + \ No newline at end of file diff --git a/Models/Liveries/IAM32St.jpg b/Models/Liveries/IAM32St.jpg new file mode 100644 index 0000000..a38b5a9 Binary files /dev/null and b/Models/Liveries/IAM32St.jpg differ diff --git a/Models/Liveries/IAM32St.xml b/Models/Liveries/IAM32St.xml new file mode 100755 index 0000000..94a9d6d --- /dev/null +++ b/Models/Liveries/IAM32St.xml @@ -0,0 +1,16 @@ + + + + + + + + + Italian Aeronautica Militare 32 Stormo + Liveries/IAM32St.jpg + + + + + + \ No newline at end of file diff --git a/Models/Liveries/MQ-9.jpg b/Models/Liveries/MQ-9.jpg new file mode 100755 index 0000000..6acb6f1 Binary files /dev/null and b/Models/Liveries/MQ-9.jpg differ diff --git a/Models/Liveries/NASA.jpg b/Models/Liveries/NASA.jpg new file mode 100644 index 0000000..ca4efe5 Binary files /dev/null and b/Models/Liveries/NASA.jpg differ diff --git a/Models/Liveries/NASA.xml b/Models/Liveries/NASA.xml new file mode 100755 index 0000000..e04cc18 --- /dev/null +++ b/Models/Liveries/NASA.xml @@ -0,0 +1,16 @@ + + + + + + + + + NASA Ikhana Project + Liveries/NASA.jpg + + + + + + \ No newline at end of file diff --git a/Models/Liveries/Paintkit.pdf b/Models/Liveries/Paintkit.pdf old mode 100644 new mode 100755 diff --git a/Models/Liveries/RAF13S.jpg b/Models/Liveries/RAF13S.jpg new file mode 100644 index 0000000..1fd514c Binary files /dev/null and b/Models/Liveries/RAF13S.jpg differ diff --git a/Models/Liveries/RAF13S.xml b/Models/Liveries/RAF13S.xml new file mode 100755 index 0000000..eb67c5c --- /dev/null +++ b/Models/Liveries/RAF13S.xml @@ -0,0 +1,16 @@ + + + + + + + + + RAF 13th Sqn + Liveries/RAF13S.jpg + + + + + + \ No newline at end of file diff --git a/Models/Liveries/RAF39S.jpg b/Models/Liveries/RAF39S.jpg new file mode 100644 index 0000000..64677b3 Binary files /dev/null and b/Models/Liveries/RAF39S.jpg differ diff --git a/Models/Liveries/RAF39S.xml b/Models/Liveries/RAF39S.xml new file mode 100755 index 0000000..55bc375 --- /dev/null +++ b/Models/Liveries/RAF39S.xml @@ -0,0 +1,16 @@ + + + + + + + + + RAF 39th Sqn + Liveries/RAF39S.jpg + + + + + + \ No newline at end of file diff --git a/Models/Liveries/RAF54S.jpg b/Models/Liveries/RAF54S.jpg new file mode 100644 index 0000000..6081c14 Binary files /dev/null and b/Models/Liveries/RAF54S.jpg differ diff --git a/Models/Liveries/RAF54S.xml b/Models/Liveries/RAF54S.xml new file mode 100755 index 0000000..303ca19 --- /dev/null +++ b/Models/Liveries/RAF54S.xml @@ -0,0 +1,16 @@ + + + + + + + + + RAF 54th Sqn + Liveries/RAF54S.jpg + + + + + + \ No newline at end of file diff --git a/Models/Liveries/RNLAF306S.jpg b/Models/Liveries/RNLAF306S.jpg new file mode 100644 index 0000000..390ab05 Binary files /dev/null and b/Models/Liveries/RNLAF306S.jpg differ diff --git a/Models/Liveries/RNLAF306S.xml b/Models/Liveries/RNLAF306S.xml new file mode 100755 index 0000000..0c97fc1 --- /dev/null +++ b/Models/Liveries/RNLAF306S.xml @@ -0,0 +1,16 @@ + + + + + + + + + RNLAF 306 Sqn + Liveries/RNLAF306S.jpg + + + + + + \ No newline at end of file diff --git a/Models/Liveries/Test.jpg b/Models/Liveries/Test.jpg old mode 100644 new mode 100755 diff --git a/Models/Liveries/USAF42AS.jpg b/Models/Liveries/USAF42AS.jpg new file mode 100644 index 0000000..9e5b2e1 Binary files /dev/null and b/Models/Liveries/USAF42AS.jpg differ diff --git a/Models/Liveries/USAF42AS.xml b/Models/Liveries/USAF42AS.xml new file mode 100755 index 0000000..efe9a36 --- /dev/null +++ b/Models/Liveries/USAF42AS.xml @@ -0,0 +1,16 @@ + + + + + + + + + USAF 42 AS + Liveries/USAF42AS.jpg + + + + + + \ No newline at end of file diff --git a/Models/Liveries/USCBP.jpg b/Models/Liveries/USCBP.jpg new file mode 100644 index 0000000..a5c470e Binary files /dev/null and b/Models/Liveries/USCBP.jpg differ diff --git a/Models/Liveries/USCBP.xml b/Models/Liveries/USCBP.xml new file mode 100755 index 0000000..eda2945 --- /dev/null +++ b/Models/Liveries/USCBP.xml @@ -0,0 +1,16 @@ + + + + + + + + + US Customs and Border Patrol + Liveries/USCBP.jpg + + + + + + \ No newline at end of file diff --git a/Models/Liveries/United States Air Force.xml b/Models/Liveries/United States Air Force.xml index 8060fa2..b234164 100755 --- a/Models/Liveries/United States Air Force.xml +++ b/Models/Liveries/United States Air Force.xml @@ -7,7 +7,7 @@ United States Air Force - Liveries/Default.jpg + Liveries/MQ-9.jpg diff --git a/Models/MQ-9-2.xml b/Models/MQ-9-2.xml old mode 100644 new mode 100755 index 7a4fcd9..861cb27 --- a/Models/MQ-9-2.xml +++ b/Models/MQ-9-2.xml @@ -360,7 +360,7 @@ MQ-9 sim/model/livery texture - Aircraft/MQ-9/Models/Liveries/Default.jpg + Aircraft/MQ-9/Models/Liveries/MQ-9.jpg diff --git a/Models/MQ-9.ac b/Models/MQ-9.ac old mode 100644 new mode 100755 index 8766894..5f03c88 --- a/Models/MQ-9.ac +++ b/Models/MQ-9.ac @@ -363,7 +363,7 @@ kids 39 OBJECT poly name "AileronL" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 336 0.40538 -0.427044 6.10711 @@ -2905,7 +2905,7 @@ kids 0 OBJECT poly name "AileronR" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 336 0.405379 -0.427042 -6.10711 @@ -5447,7 +5447,7 @@ kids 0 OBJECT poly name "Antennas" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 3539 -0.334625 -0.425939 -7.09598 @@ -33018,7 +33018,7 @@ kids 0 OBJECT poly name "Blades" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 423 4.25986 -0.137114 -0.153899 @@ -36137,7 +36137,7 @@ kids 0 OBJECT poly name "ElevatorL" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 340 3.20876 0.948071 2.07554 @@ -38725,7 +38725,7 @@ kids 0 OBJECT poly name "ElevatorR" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 340 3.20876 0.948071 -2.07554 @@ -41313,7 +41313,7 @@ kids 0 OBJECT poly name "Engine" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 1689 1.74316 0.225238 0.0032469 @@ -54693,7 +54693,7 @@ kids 0 OBJECT poly name "FlapL1" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 251 0.383878 -0.198953 1.55702 @@ -56632,7 +56632,7 @@ kids 0 OBJECT poly name "FlapL2" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 187 0.383878 -0.22759 4.15203 @@ -58059,7 +58059,7 @@ kids 0 OBJECT poly name "FlapR1" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 251 0.383878 -0.198953 -1.55702 @@ -59998,7 +59998,7 @@ kids 0 OBJECT poly name "FlapR2" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 187 0.383878 -0.227588 -4.15203 @@ -61425,7 +61425,7 @@ kids 0 OBJECT poly name "Fuselage" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 7319 0.552877 -0.343002 9.31399 @@ -118292,7 +118292,7 @@ kids 0 OBJECT poly name "GearBoxB" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 319 2.00264 -0.397682 0.454194 @@ -120517,7 +120517,7 @@ kids 0 OBJECT poly name "GearBoxF" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 57 -0.549842 -0.742394 -1e-07 @@ -120880,7 +120880,7 @@ kids 0 OBJECT poly name "HellfirePylonL" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 238 -0.994616 -0.802733 1.94589 @@ -122630,7 +122630,7 @@ kids 0 OBJECT poly name "HellfirePylonR" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 238 -0.994616 -0.802733 -1.94589 @@ -124380,7 +124380,7 @@ kids 0 OBJECT poly name "HStabilizerL" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 603 3.20876 0.888774 2.06587 @@ -128911,7 +128911,7 @@ kids 0 OBJECT poly name "HStabilizerR" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 603 3.20876 0.888774 -2.06587 @@ -133442,7 +133442,7 @@ kids 0 OBJECT poly name "JawN" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 118 -3.34989 -1.68083 0.104979 @@ -134360,7 +134360,7 @@ kids 0 OBJECT poly name "Lights" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 183 2.78223 0.669074 -0.0140444 @@ -135775,7 +135775,7 @@ kids 0 OBJECT poly name "Propeller" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 194 4.71532 0.0583465 -0.0793374 @@ -137441,7 +137441,7 @@ kids 0 OBJECT poly name "PylonL1" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 405 -0.811794 -0.457006 2.04736 @@ -140542,7 +140542,7 @@ kids 0 OBJECT poly name "PylonL2" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 405 -0.882646 -0.457006 1.18461 @@ -143643,7 +143643,7 @@ kids 0 OBJECT poly name "PylonR1" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 405 -0.811795 -0.457006 -2.04736 @@ -146744,7 +146744,7 @@ kids 0 OBJECT poly name "PylonR2" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 405 -0.882646 -0.457006 -1.18461 @@ -149845,7 +149845,7 @@ kids 0 OBJECT poly name "Rudder" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 311 3.13551 -1.03335 0.0641197 @@ -152206,7 +152206,7 @@ kids 0 OBJECT poly name "Scissor1N" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 34 -3.13067 -1.58151 -0.0722363 @@ -152488,7 +152488,7 @@ kids 0 OBJECT poly name "Scissor2N" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 60 -2.88295 -1.13603 -0.0526668 @@ -153024,7 +153024,7 @@ kids 0 OBJECT poly name "Sensor" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 2400 -4.57771 -1.03412 -0.0109268 @@ -172384,7 +172384,7 @@ kids 0 OBJECT poly name "SensorMount1" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 436 -4.37581 -0.72585 0.269207 @@ -175444,7 +175444,7 @@ kids 0 OBJECT poly name "SensorMount2" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 104 -4.69901 -0.582895 0.0640987 @@ -176284,7 +176284,7 @@ kids 0 OBJECT poly name "Strut1N" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 304 -3.3214 -1.44725 -0.0344578 @@ -178756,7 +178756,7 @@ kids 0 OBJECT poly name "Strut2N" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 110 -2.90214 -1.30022 -0.110746 @@ -179690,7 +179690,7 @@ kids 0 OBJECT poly name "StrutL" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 213 -0.35147 -1.77434 1.55963 @@ -181339,7 +181339,7 @@ kids 0 OBJECT poly name "StrutR" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 213 -0.35147 -1.77434 -1.55963 @@ -182988,7 +182988,7 @@ kids 0 OBJECT poly name "VStabilizer" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 465 3.13551 -1.07528 0.107143 @@ -186501,7 +186501,7 @@ kids 0 OBJECT poly name "WheelL" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 1110 -0.429736 -1.84946 1.73691 @@ -195631,7 +195631,7 @@ kids 0 OBJECT poly name "WheelN" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 866 -3.20969 -1.88934 0.114236 @@ -202713,7 +202713,7 @@ kids 0 OBJECT poly name "WheelR" loc 0.295158 0.778684 -2e-07 -texture "Liveries/Default.jpg" +texture "Liveries/MQ-9.jpg" crease 30.000000 numvert 1110 -0.429736 -1.84946 -1.73691 diff --git a/Models/MQ-9.xml b/Models/MQ-9.xml old mode 100644 new mode 100755 index e892cd8..a192add --- a/Models/MQ-9.xml +++ b/Models/MQ-9.xml @@ -357,7 +357,7 @@ MQ-9 sim/model/livery texture - Aircraft/MQ-9/Models/Liveries/Default.jpg + Aircraft/MQ-9/Models/Liveries/MQ-9.jpg diff --git a/Nasal/damage.nas b/Nasal/damage.nas old mode 100644 new mode 100755 index f81c8f6..03ffed6 --- a/Nasal/damage.nas +++ b/Nasal/damage.nas @@ -11,13 +11,32 @@ var clamp = func(v, min, max) { v < min ? min : v > max ? max : v } var TRUE = 1; var FALSE = 0; + +var cannon_types = { + " M70 rocket hit": 0.25, #135mm + " M55 cannon shell hit": 0.10, # 30mm + " KCA cannon shell hit": 0.10, # 30mm + " Gun Splash On ": 0.10, # 30mm + " M61A1 shell hit": 0.05, # 20mm + " GAU-8/A hit": 0.10, # 30mm + " BK27 cannon hit": 0.07, # 27mm + " GSh-30 hit": 0.10, # 30mm + " 7.62 hit": 0.005,# 7.62mm + " 50 BMG hit": 0.015,# 12.7mm +}; + + + var warhead_lbs = { "aim-120": 44.00, "AIM120": 44.00, + "AIM-120": 44.00, "RB-99": 44.00, "aim-7": 88.00, + "AIM-7": 88.00, "RB-71": 88.00, "aim-9": 20.80, + "AIM9": 20.80, "AIM-9": 20.80, "RB-24": 20.80, "RB-24J": 20.80, @@ -27,23 +46,61 @@ var warhead_lbs = { "Meteor": 55.00, "AIM-54": 135.00, "Matra R550 Magic 2": 27.00, + "MatraR550Magic2": 27.00, "Matra MICA": 30.00, + "MatraMica": 30.00, + "MatraMicaIR": 30.00, "RB-15F": 440.92, "SCALP": 992.00, "KN-06": 315.00, "GBU12": 190.00, "GBU16": 450.00, "Sea Eagle": 505.00, + "SeaEagle": 505.00, "AGM65": 200.00, "RB-04E": 661.00, "RB-05A": 353.00, "RB-75": 126.00, "M90": 500.00, "M71": 200.00, + "M71R": 200.00, "MK-82": 192.00, "LAU-68": 10.00, "M317": 145.00, "GBU-31": 945.00, + "AIM132": 22.05, + "ALARM": 450.00, + "STORMSHADOW": 850.00, + "R-60": 6.60, + "R-27R1": 85.98, + "R-27T1": 85.98, + "FAB-500": 564.00, + "Exocet": 364.00, +}; + +var fireMsgs = { + + # F14 + " FOX3 at": nil, # radar + " FOX2 at": nil, # heat + " FOX1 at": nil, # semi-radar + + # Viggen + " Fox 1 at": nil, # semi-radar + " Fox 2 at": nil, # heat + " Fox 3 at": nil, # radar + " Greyhound at": nil, # cruise missile + " Bombs away at": nil, # bombs + " Bruiser at": nil, # anti-ship + " Rifle at": nil, # TV guided + + # SAM and missile frigate + " Bird away at": nil, # G/A + + # F15 + " aim7 at": nil, + " aim9 at": nil, + " aim120 at": nil, }; var incoming_listener = func { @@ -62,11 +119,7 @@ var incoming_listener = func { # a m2000 is firing at us m2000 = TRUE; } - if (last_vector[1] == " FOX2 at" or last_vector[1] == " Fox 1 at" or last_vector[1] == " Fox 2 at" or last_vector[1] == " Fox 3 at" - or last_vector[1] == " Greyhound at" or last_vector[1] == " Bombs away at" or last_vector[1] == " Bruiser at" or last_vector[1] == " Rifle at" or last_vector[1] == " Bird away at" - or last_vector[1] == " aim7 at" or last_vector[1] == " aim9 at" - or last_vector[1] == " aim120 at" - or m2000 == TRUE) { + if (contains(fireMsgs, last_vector[1]) or m2000 == TRUE) { # air2air being fired if (size(last_vector) > 2 or m2000 == TRUE) { #print("Missile launch detected at"~last_vector[2]~" from "~author); @@ -174,20 +227,30 @@ var incoming_listener = func { nearby_explosion(); } } - } elsif (last_vector[1] == " M70 rocket hit" or last_vector[1] == " M55 cannon shell hit" or last_vector[1] == " KCA cannon shell hit" or last_vector[1] == " Gun Splash On " or last_vector[1] == " M61A1 shell hit" or last_vector[1] == " GAU-8/A hit") { - # cannon hitting someone - #print("cannon"); + } elsif (cannon_types[last_vector[1]] != nil) { if (size(last_vector) > 2 and last_vector[2] == " "~callsign) { - # that someone is me! - #print("hitting me"); + var last3 = split(" ", last_vector[3]); + if(size(last3) > 2 and size(last3[2]) > 2 and last3[2] == "hits" ) { + var probability = cannon_types[last_vector[1]]; + var hit_count = num(last3[1]); + if (hit_count != nil) { + var damaged_sys = 0; + for (var i = 1; i <= hit_count; i = i + 1) { + var failed = fail_systems(probability); + damaged_sys = damaged_sys + failed; + } - var probability = 0.20; # take 20% damage from each hit - if (last_vector[1] == " M70 rocket hit" or last_vector[1] == " Gun Splash On " or last_vector[1] == " GAU-8/A hit") { - probability = 0.30; + printf("Took %.1f%% x %2d damage from cannon! %s systems was hit.", probability*100, hit_count, damaged_sys); + nearby_explosion(); + } + } else { + var probability = cannon_types[last_vector[1]]; + #print("probability: " ~ probability); + + var failed = fail_systems(probability * 3);# Old messages is assumed to be 3 hits + printf("Took %.1f%% x 3 damage from cannon! %s systems was hit.", probability*100, failed); + nearby_explosion(); } - var failed = fail_systems(probability); - printf("Took %.1f%% damage from cannon! %s systems was hit.", probability*100, failed); - nearby_explosion(); } } } diff --git a/README.md b/README.md index 4d66c34..9565741 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Author: Petar Jedvaj (pjedvaj) Date: 3 Jul 2016 License: GNU General Public License FDM: JSBSim -Addons: Bombable, Walker +Addons: Bombable, Walker, MP damage code. **************** Splash screen and thumbnail photos are downloaded from Wikimedia Commons *************** ***************************** Data used for devlopment are taken from Wikipedia *************************