mirror of
https://github.com/l0k1/oprf_assets.git
synced 2026-10-02 10:35:48 +00:00
Updated damage
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
</equals>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
|
||||
<model>
|
||||
<path>EDAK_SHELTER1.ac</path>
|
||||
<name>shelter</name>
|
||||
@@ -30,7 +30,7 @@
|
||||
</equals>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
|
||||
<model>
|
||||
<path>Gasometer.ac</path>
|
||||
<name>gas</name>
|
||||
@@ -45,7 +45,7 @@
|
||||
</equals>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
|
||||
<model>
|
||||
<path>hangar_25x25m_tan.ac</path>
|
||||
<name>hangar</name>
|
||||
@@ -60,7 +60,7 @@
|
||||
</equals>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
|
||||
<model>
|
||||
<path>Industrial50x100.ac</path>
|
||||
<name>industry</name>
|
||||
@@ -75,7 +75,7 @@
|
||||
</equals>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
|
||||
<model>
|
||||
<path>Poolbeg_TurboGas.ac</path>
|
||||
<name>pool</name>
|
||||
@@ -90,7 +90,7 @@
|
||||
</equals>
|
||||
</condition>
|
||||
</animation>
|
||||
|
||||
|
||||
<model>
|
||||
<path>Quadplex_18x18.ac</path>
|
||||
<name>plex</name>
|
||||
@@ -131,4 +131,4 @@
|
||||
</offsets>
|
||||
</model>
|
||||
|
||||
</PropertyList>
|
||||
</PropertyList>
|
||||
+50
-7
@@ -30,7 +30,6 @@ var TRUE = 1;
|
||||
var FALSE = 0;
|
||||
|
||||
var hp = hp_max;
|
||||
|
||||
setprop("sam/damage", math.max(0,100*hp/hp_max));#used in HUD
|
||||
|
||||
var cannon_types = {
|
||||
@@ -45,12 +44,14 @@ var cannon_types = {
|
||||
" Gun Splash On ": 0.100, # 30mm
|
||||
" GSh-30 hit": 0.100, # 30mm
|
||||
" GAU-8/A hit": 0.100, # 30mm
|
||||
" Mk3Z hit": 0.100, # 30mm Jaguar
|
||||
" BK27 cannon hit": 0.070, # 27mm
|
||||
" GSh-23 hit": 0.065, # 23mm
|
||||
" M61A1 shell hit": 0.050, # 20mm
|
||||
" 50 BMG hit": 0.015, # 12.7mm (non-explosive)
|
||||
" 7.62 hit": 0.005, # 7.62mm (non-explosive)
|
||||
" Hydra-70 hit": 0.25, #
|
||||
" 7.62 hit": 0.005, # 7.62mm (non-explosive)
|
||||
" Hydra-70 hit": 0.250, # F-16
|
||||
" SNEB hit": 0.250, # Jaguar
|
||||
};
|
||||
|
||||
# lbs of warheads is explosive+fragmentation+fuse, so total warhead mass.
|
||||
@@ -61,13 +62,16 @@ var warhead_lbs = {
|
||||
"AGM-84": 488.00,
|
||||
"AGM-88": 146.00,
|
||||
"AGM65": 200.00,
|
||||
"AGM-119": 264.50,
|
||||
"AGM-154A": 493.00,
|
||||
"AGM-158": 1000.00,
|
||||
"ALARM": 450.00,
|
||||
"AM39-Exocet": 364.00,
|
||||
"AS-37-Martel": 330.00,
|
||||
"AS30L": 529.00,
|
||||
"CBU-87": 100.00,# bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"BL755": 100.00,# 800lb bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"CBU-87": 100.00,# bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"CBU-105": 100.00,# bomblet warhead. Mix of armour piecing and HE. 100 due to need to be able to kill buk-m2.
|
||||
"Exocet": 364.00,
|
||||
"FAB-100": 92.59,
|
||||
"FAB-250": 202.85,
|
||||
@@ -88,6 +92,7 @@ var warhead_lbs = {
|
||||
"M90": 10.00,# bomblet warhead. x3 of real mass.
|
||||
"MK-82": 192.00,
|
||||
"MK-83": 445.00,
|
||||
"MK-83HD": 445.00,
|
||||
"MK-84": 945.00,
|
||||
"OFAB-100": 92.59,
|
||||
"RB-04E": 661.00,
|
||||
@@ -98,7 +103,7 @@ var warhead_lbs = {
|
||||
"RN-18T": 1200.00, #fictional, thermobaeric replacement for the RN-28 nuclear bomb
|
||||
"RS-2US": 28.66,
|
||||
"S-21": 245.00,
|
||||
"S-24": 271.00,
|
||||
"S-24": 271.00,
|
||||
"SCALP": 992.00,
|
||||
"Sea Eagle": 505.00,
|
||||
"SeaEagle": 505.00,
|
||||
@@ -122,6 +127,7 @@ var warhead_air_lbs = {
|
||||
"KN-06": 315.00,
|
||||
"M317": 145.00,
|
||||
"Magic-2": 27.00,
|
||||
"Majic": 26.45,
|
||||
"Matra MICA": 30.00,
|
||||
"Matra R550 Magic 2": 27.00,
|
||||
"MATRA-R530": 55.00,
|
||||
@@ -149,12 +155,15 @@ var warhead_air_lbs = {
|
||||
"RB-74": 20.80,
|
||||
"RB-99": 44.00,
|
||||
"S530D": 66.00,
|
||||
"S48N6": 330.00,# 48N6 from S-300pmu
|
||||
};
|
||||
|
||||
var cluster = {
|
||||
# cluster munition list
|
||||
"M90": nil,
|
||||
"CBU-87": nil,
|
||||
"CBU-105": nil,
|
||||
"BL755": nil,
|
||||
};
|
||||
|
||||
var fireMsgs = {
|
||||
@@ -348,7 +357,7 @@ var fail_systems = func (probability, factor = 100) {#this factor needs tuning a
|
||||
hp -= factor * probability*(0.75+rand()*0.25);# from 75 to 100% damage
|
||||
printf("HP: %d/%d", hp, hp_max);
|
||||
setprop("sam/damage", math.max(0,100*hp/hp_max));#used in HUD
|
||||
if ( hp < 0 and getprop("sim/multiplay/generic/int[17]") != 7) {
|
||||
if ( hp < 0 ) {
|
||||
setprop("/carrier/sunk/",1);#we are dead
|
||||
setprop("/sim/multiplay/generic/int[2]",1);#radar off
|
||||
setprop("/sim/multiplay/generic/int[0]",1);#smoke on
|
||||
@@ -360,14 +369,48 @@ var fail_systems = func (probability, factor = 100) {#this factor needs tuning a
|
||||
var mode_list = keys(failure_modes);
|
||||
var failed = 0;
|
||||
foreach(var failure_mode_id; mode_list) {
|
||||
#print(failure_mode_id);
|
||||
if (rand() < probability) {
|
||||
FailureMgr.set_failure_level(failure_mode_id, 1);
|
||||
failed += 1;
|
||||
if (failure_mode_id == "Engines/engine") {
|
||||
# fail UH1 yasim:
|
||||
setprop("sim/model/uh1/state",0);
|
||||
setprop("controls/engines/engine/magnetos", 0);
|
||||
#set a listener so that if a restart is attempted, it'll fail.
|
||||
yasim_list = setlistener("sim/model/uh1/state",func {setprop("sim/model/uh1/state",0);});
|
||||
}
|
||||
}
|
||||
}
|
||||
if (rand() < probability) {
|
||||
# fail UH1 yasim:
|
||||
setprop("sim/model/uh1/state",0);
|
||||
setprop("controls/engines/engine/magnetos", 0);
|
||||
#set a listener so that if a restart is attempted, it'll fail.
|
||||
if (yasim_list == nil) {
|
||||
yasim_list = setlistener("sim/model/uh1/state",func {setprop("sim/model/uh1/state",0);});
|
||||
}
|
||||
}
|
||||
return failed;
|
||||
}
|
||||
};
|
||||
var yasim_list = nil;
|
||||
|
||||
var repairYasim = func {
|
||||
if (yasim_list != nil) {
|
||||
removelistener(yasim_list);
|
||||
yasim_list = nil;
|
||||
}
|
||||
setprop("sim/crashed", 0);
|
||||
var failure_modes = FailureMgr._failmgr.failure_modes;
|
||||
var mode_list = keys(failure_modes);
|
||||
|
||||
foreach(var failure_mode_id; mode_list) {
|
||||
FailureMgr.set_failure_level(failure_mode_id, 0);
|
||||
}
|
||||
}
|
||||
|
||||
setlistener("/sim/signals/reinit", repairYasim);
|
||||
|
||||
hp_f = [hp_max,hp_max,hp_max,hp_max,hp_max,hp_max,hp_max];
|
||||
|
||||
@@ -521,4 +564,4 @@ var re_init = func {
|
||||
}
|
||||
}
|
||||
|
||||
setlistener("/sim/signals/reinit", re_init, 0, 0);
|
||||
setlistener("/sim/signals/reinit", re_init, 0, 0);
|
||||
|
||||
@@ -118,6 +118,7 @@
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
|
||||
</group>
|
||||
|
||||
</PropertyList>
|
||||
|
||||
Reference in New Issue
Block a user