Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MoM] Edit spell UI a bit for psionics #70638

Merged
merged 6 commits into from
Jan 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions src/magic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string> 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 ) {
Expand All @@ -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 );
}

Expand Down
Loading