From 99301a4cec031753c0133a9181f67b03b8ad7e3a Mon Sep 17 00:00:00 2001 From: Standing-Storm <120433252+Standing-Storm@users.noreply.github.com> Date: Thu, 4 Jan 2024 17:34:36 -0600 Subject: [PATCH] [MoM] Edit spell UI a bit for psionics (#70638) * Initial commit * Update src/magic.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/magic.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/magic.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update src/magic.cpp Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- src/magic.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/magic.cpp b/src/magic.cpp index a574f89fd385a..70e89b3bcc059 100644 --- a/src/magic.cpp +++ b/src/magic.cpp @@ -2412,7 +2412,11 @@ bool spell::energy_cost_encumbered( const Character &guy ) const std::string spell::enumerate_spell_data( const Character &guy ) const { std::vector spell_data; - if( has_flag( spell_flag::CONCENTRATE ) && temp_concentration_difficulty_multiplyer > 0 ) { + if( has_flag( spell_flag::PSIONIC ) ) { + spell_data.emplace_back( _( "is a psionic power" ) ); + } + if( has_flag( spell_flag::CONCENTRATE ) && !has_flag( spell_flag::PSIONIC ) && + temp_concentration_difficulty_multiplyer > 0 ) { spell_data.emplace_back( _( "requires concentration" ) ); } if( has_flag( spell_flag::VERBAL ) && temp_sound_multiplyer > 0 ) { @@ -2423,15 +2427,20 @@ std::string spell::enumerate_spell_data( const Character &guy ) const } if( !no_hands() ) { spell_data.emplace_back( _( "impeded by gloves" ) ); - } else { + } else if( no_hands() && !has_flag( spell_flag::PSIONIC ) ) { spell_data.emplace_back( _( "does not require hands" ) ); } if( !has_flag( spell_flag::NO_LEGS ) && temp_somatic_difficulty_multiplyer > 0 ) { spell_data.emplace_back( _( "requires mobility" ) ); } - if( effect() == "attack" && range( guy ) > 1 && has_flag( spell_flag::NO_PROJECTILE ) ) { + if( effect() == "attack" && range( guy ) > 1 && has_flag( spell_flag::NO_PROJECTILE ) && + !has_flag( spell_flag::PSIONIC ) ) { spell_data.emplace_back( _( "can be cast through walls" ) ); } + if( effect() == "attack" && range( guy ) > 1 && has_flag( spell_flag::NO_PROJECTILE ) && + has_flag( spell_flag::PSIONIC ) ) { + spell_data.emplace_back( _( "can be channeled through walls" ) ); + } return enumerate_as_string( spell_data ); }