Open AdamPlenty opened 1 week ago
I'd argue some people would like to keep this behaviour, so maybe an option on the script command?
EDIT: nevermind, I guess if anyone want a disease that doesn't spread they can use USE_POWER_ON_CREATURE
or USE_POWER_ON_PLAYERS_CREATURES
with PLAYER_NEUTRAL
set as caster.
So yeah +1 for the fix you propose. Mh. 🤔
~I'd argue some people would like to keep this behaviour, so maybe an option on the script command?~
EDIT: nevermind, I guess if anyone want a disease that doesn't spread they can use
USE_POWER_ON_CREATURE
orUSE_POWER_ON_PLAYERS_CREATURES
withPLAYER_NEUTRAL
set as caster.So yeah +1 for the fix you propose.
Would adams fix proposal not also make it spread when PLAYER_NEUTRAL is set as a caster on USE_POWER_ON_PLAYERS_CREATURES
?
~I'd argue some people would like to keep this behaviour, so maybe an option on the script command?~ EDIT: nevermind, I guess if anyone want a disease that doesn't spread they can use
USE_POWER_ON_CREATURE
orUSE_POWER_ON_PLAYERS_CREATURES
withPLAYER_NEUTRAL
set as caster. So yeah +1 for the fix you propose.Would adams fix proposal not also make it spread when PLAYER_NEUTRAL is set as a caster on
USE_POWER_ON_PLAYERS_CREATURES
?
Mh I didn't consider that. Annoying. ☹️
The only other way to fix this that I can see is to add a casting player parameter to USE_SPELL_ON_CREATURE. However, this would have to go at the end, which is inconsistent with USE_POWER_ON_CREATURE, because otherwise it would break existing maps. But is it really worth it just for Disease? The spells this was intended to be used for (Freeze, Slow, etc) have no casting player, so this parameter was not and is not needed. We could just leave it as it is, and put a warning saying to use POWER_DISEASE instead.
Edit: Actually, with the porting of creature spells into Keeper spells, is continuing to use USE_SPELL_ON_CREATURE at all still worth it?
Actually, with the porting of creature spells into Keeper spells, is continuing to use USE_SPELL_ON_CREATURE at all still worth it?
Yes, personally I prefer to use this command. So maybe we shouldn't change it at all and let it be used by player neutral. Then add a notice on the wiki about disease that it can't spread with this command?
POWER_DISEASE was fixed by #3626, but SPELL_DISEASE remains problematic, because it's cast by PLAYER_NEUTRAL:
https://github.com/dkfans/keeperfx/blob/cdb6f864271fef54189e66ad0c37db952a886827/src/lvl_script_value.c#L213
and Disease is hardcoded to not spread when cast by PLAYER_NEUTRAL:
https://github.com/dkfans/keeperfx/blob/6d3a8e8cb139fe1517e91e9d223c148090f9a6fe/src/power_process.c#L212