Skip to content

Commit

Permalink
magiclysm - fix hand impeding spell costs
Browse files Browse the repository at this point in the history
  • Loading branch information
KorGgenT committed Jan 11, 2020
1 parent 7d73de1 commit 8715a04
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/magic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,17 @@ int spell::energy_cost( const player &p ) const
if( !has_flag( spell_flag::NO_HANDS ) ) {
// the first 10 points of combined encumbrance is ignored, but quickly adds up
const int hands_encumb = std::max( 0, p.encumb( bp_hand_l ) + p.encumb( bp_hand_r ) - 10 );
cost += 10 * hands_encumb;
switch( type->energy_source ) {
default:
cost += 10 * hands_encumb;
break;
case hp_energy:
cost += hands_encumb;
break;
case stamina_energy:
cost += 100 * hands_encumb;
break;
}
}
return cost;
}
Expand Down

0 comments on commit 8715a04

Please sign in to comment.