Dear Buscher,
great thanks for that amazing mod. I slightly surprised why so fancy multinational script is so underrated by community :-)
Also, please, check some feedback:
- infected unit became orange, but not green in TFTD. Perhaps, it happens as planned, but if no -> please, replace COLOR_X1_PURPLE0 with COLOR_X1_GRAY;
- PSIed/MCed Chryssalids and Tentaculats also able to infect any alien unit, include zombies too. It can to occur "funny" endless transformation cycles, where 2 opposing"infectors" permanently generates yourself during hit exchanging (also infected zombie will spawn zombie again). I used my poor knowledge in y-script and particularly solved it via faction restricting:
damageUnit:
- offset: 22 # infect unit
code: |
var ptr RuleArmor armorRule;
var ptr RuleItem itemRule;
var int temp;
var int infectionDamage;
var int side1;
weapon_item.getRuleItem itemRule;
itemRule.getTag infectionDamage Tag.CAN_DO_INFECTION_DAMAGE;
if eq infectionDamage 0; # can't infect
return;
end;
unit.getRuleArmor armorRule;
armorRule.getSize temp;
if eq temp 2; # don't affect tanks
return;
end;
unit.getFaction side1;
if eq side1 1; # don`t infect units at alien side <c> pWWWa
return;
end;
if gt to_health 0; # only if pierced
unit.setTag Tag.CURRENT_INFECTION_DAMAGE infectionDamage;
end;
return;
but I suppose, that correct solution for that issue is restriction for infecting exact units (especially STR_ZOMBIE), isn`t it ?
- it will be great, if incendiary / phosphor damage type will able to remove infection from units too (based on comments in script code).