apply target lock to offensive spells as default-off cSpell field

This commit is contained in:
2025-03-19 08:35:53 -05:00
parent 8ea34d434d
commit 8ae88a4ce6
3 changed files with 79 additions and 64 deletions

View File

@@ -1046,10 +1046,8 @@ void handle_target_mode(eGameMode target_mode, int range, eSpell spell) {
// Lock on to enemies in range:
if(has_feature_flag("target-lock", "V1") && get_bool_pref("TargetLock", true)){
// Skip this for spells that don't target enemies
switch(spell){
case eSpell::DISPEL_SQUARE: case eSpell::DISPEL_BARRIER: case eSpell::DISPEL_SPHERE:
return;
}
cSpell spell_info = *spell;
if(!spell_info.target_lock) return;
location loc = univ.current_pc().combat_pos;