From f4eba3dc288705c7895a2b7ae3fc18abcc5514f4 Mon Sep 17 00:00:00 2001 From: Procyonae <45432782+Procyonae@users.noreply.github.com> Date: Tue, 26 Nov 2024 00:12:58 +0000 Subject: [PATCH] Test Ping Korgent --- .../Magiclysm/eoc_spell_difficulty_modifiers.json | 4 +--- src/magic.cpp | 11 ++--------- 2 files changed, 3 insertions(+), 12 deletions(-) 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 ); }