File tree Expand file tree Collapse file tree 2 files changed +13
-10
lines changed
Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,10 @@ if (obj_ncombat.defeat == 0) {
3232 var _column_id = _candidate.column_id ;
3333 var _unit_id = _candidate.id ;
3434 var _unit = _candidate.unit ;
35- _unit.update_health (roll_personal_dice (1 , 10 , " high" , _unit));
35+ var _constitution_test_mod = _unit.hp () * -1 ;
36+ var _constitution_test = global.character_tester .standard_test (_unit, " constitution" , _constitution_test_mod);
37+
38+ _unit.update_health (_constitution_test[1 ]);
3639 _column_id.marine_dead [_unit_id] = false ;
3740 unit_recovery_score -= 1 ;
3841 units_saved += 1 ;
Original file line number Diff line number Diff line change @@ -51,15 +51,15 @@ for (var i=0;i<array_length(unit_struct);i++){
5151 obj_ncombat.vehicle_recovery_score += skill_level;
5252 obj_ncombat.techmarines_alive ++;
5353 }
54- } else if (marine_dead[i] == 1 ) and (unit. hp ()>- 25 ) and ( marine_type[i]!=" " ) and ((obj_ncombat.dropping +obj_ncombat.defeat )!=2 ){
55- var rand1, survival ;
56- onceh= 0 ;
57- survival= 40 ;
58- if (obj_ncombat. membrane = 1 ) then survival-= 20 ;
59- rand1= floor ( random ( 100 ))+ 1 ;
60- skill_level = irandom (unit. luck );
61- rand1-=skill_level ;
62- if (rand1<=survival) and (marine_dead[i]!= 2 ) {
54+ } else if (marine_dead[i] == 1 ) and (marine_type[i]!=" " ) and ((obj_ncombat.dropping +obj_ncombat.defeat )!=2 ){
55+ var survival_mod = unit. luck * - 1 ;
56+ if (obj_ncombat. membrane == 1 ) {
57+ survival_mod += 20 ;
58+ }
59+ survival_mod += unit. hp () * - 1 ;
60+
61+ var survival_test = global. character_tester . standard_test (unit, " constitution " , survival_mod) ;
62+ if (survival_test[ 0 ]) {
6363 // show_message(string(marine_type[i])+" mans up#Roll: "+string(rand1)+"#Needed: "+string(survival)+"-");
6464 marine_dead[i]=0 ;
6565 // unit.update_health(2);
You can’t perform that action at this time.
0 commit comments