diff --git a/data/mods/Magiclysm/eoc_spell_difficulty_modifiers.json b/data/mods/Magiclysm/eoc_spell_difficulty_modifiers.json index 028f7c866d4a2..7703005380b10 100644 --- a/data/mods/Magiclysm/eoc_spell_difficulty_modifiers.json +++ b/data/mods/Magiclysm/eoc_spell_difficulty_modifiers.json @@ -13,9 +13,7 @@ "effect": [ { "math": [ - "u_spellcasting_adjustment('difficulty', 'mod': 'magiclysm', 'flag_whitelist': 'SOMATIC' )", - "=", - "(u_effect_intensity('grabbed', 'bodypart': 'arm_l') + u_effect_intensity('grabbed', 'bodypart': 'arm_r') ) / 10" + "u_spellcasting_adjustment('difficulty', 'mod': 'magiclysm', 'flag_whitelist': 'SOMATIC' ) = (u_effect_intensity('grabbed', 'bodypart': 'arm_l') + u_effect_intensity('grabbed', 'bodypart': 'arm_r') ) / 10" ] } ] diff --git a/src/magic.cpp b/src/magic.cpp index 834c415af6e35..d10c4717ea363 100644 --- a/src/magic.cpp +++ b/src/magic.cpp @@ -1005,18 +1005,11 @@ std::vector spell::targetable_locations( const Character &sourc std::vector selectable_targets; for( const tripoint_bub_ms &query : here.points_in_radius( char_pos, range( source ) ) ) { - if( !ignore_walls && has_obstruction( query ) ) { - // it's blocked somewhere! + if( ( !ignore_walls && has_obstruction( query ) ) || ( !select_ground && !source.sees( query ) ) ) { + // it's blocked somewhere or you can't target a critter you can't see continue; } - if( !select_ground ) { - if( !source.sees( query ) ) { - // can't target a critter you can't see - continue; - } - } - if( is_valid_target( source, query ) ) { selectable_targets.push_back( query ); }