diff --git a/scripts/scr_powers/scr_powers.gml b/scripts/scr_powers/scr_powers.gml index 5983b3c8f1..584194fbc5 100644 --- a/scripts/scr_powers/scr_powers.gml +++ b/scripts/scr_powers/scr_powers.gml @@ -559,57 +559,81 @@ function scr_powers(power_set, power_count, enemy_target, unit_id) { if (obj_ncombat.sorcery_seen=1) then obj_ncombat.sorcery_seen=2; if (p_type="buff") or (power_name="gather_energy"){ + var marine_index; + var _random_marine_list = []; + for (var i=0;i0){h=floor(random(men))+1;if (marine_type[h]!="") and (marine_dead[h]=0) and (marine_mshield[h]=0){buf-=1;marine_mshield[h]=2;}} - if (buf=0){ - if (marine_mshield[unit_id]<2){ - buf-=1;marine_mshield[unit_id]=2; - }} + var buf=9; + for (var i=0;i0){ - h=irandom(men-1)+1; - if (marine_type[h]!="") and (marine_dead[h]=0) and (marine_fshield[h]=0){ - buf-=1; - marine_fshield[h]=2; - } - } - if (buf=0){ - if (marine_fshield[unit_id]<2){ - buf-=1;marine_fshield[unit_id]=2; - } - } - } + var buf=9; + for (var i=0;i0){h=floor(random(men))+1;if (marine_type[h]!="") and (marine_hp[h]<=80) and (marine_dead[h]=0){buf-=1;marine_hp[h]+=20;if (marine_hp[h]>100) then marine_hp[h]=100;}} - } + + var buf=5;h=0; + for (var i=0;i0){h=floor(random(men))+1;if (marine_type[h]!="") and (marine_attack[h]<2.5) and (marine_dead[h]=0){buf-=1;marine_attack[h]+=1.5;marine_defense[h]-=0.15;}} + var buf=5;h=0; + for (var i=0;iunit.max_health()) then unit.update_health(unit.max_health())} - if (power_name="Telekinetic Dome"){if (marine_dome[unit_id]<3) then marine_dome[unit_id]=3;} - if (power_name="Spatial Distortion"){if (marine_spatial[unit_id]<3) then marine_spatial[unit_id]=3;} + if (power_name="Telekinetic Dome"){ + if (marine_dome[unit_id]<3) then marine_dome[unit_id]=3; + } + if (power_name="Spatial Distortion"){ + if (marine_spatial[unit_id]<3) then marine_spatial[unit_id]=3; + } /*obj_ncombat.newline=string(flavour_text1)+string(flavour_text2)+string(flavour_text3); obj_ncombat.newline_color="blue";