Oh, right. I just thought that since I enabled this option in the overall game settings and the Reapers are not affected, then they need some strong magic
Obviously, I was wrong. Probably, the overall game setting doesn't affect 4-tile units. But enabling `bleedImmune` for REAPER_ARMOR did the trick. Thanks!
I also wanted to make them while woundable, but less susceptible to wounds than other units (since they are big and tough and have two hearts). However, I can't make work this code when placed inside their unit description. When it is placed in the global section, it works (but then it works for all units of course, not just Reapers). This is the code inside the unit description, it does not work:
units:
- type: STR_REAPER_TERRORIST
scripts:
damageUnit: |
debug_log 1 to_health;
debug_log 2 to_wound;
div to_wound 2;
debug_log 3 to_wound;
return;
This is what I place in the global scripts section, it works:
damageUnit:
- offset: 10
code: |
var int temp;
# disregard damage negated by armor
if eq to_health 0;
return;
end;
# get frame for flashing red
battle_game.getAnimFrame temp;
unit.setTag Tag.LAST_HIT_FRAME temp;
# wound reduction
debug_log 1 to_health;
debug_log 2 to_wound;
div to_wound 2;
debug_log 3 to_wound;
return;
The code inside the unit description lacks the offset, but that's how it was in the examples given here:
https://openxcom.org/forum/index.php?topic=5245.0. Is it wrong?