Skip to content

Commit

Permalink
Merge pull request #1865 from LazyDope/slice_with
Browse files Browse the repository at this point in the history
fix(cast): broaden acceptable with arg input
  • Loading branch information
Croebh committed Oct 18, 2022
2 parents 8e8feac + 9031cd3 commit 56d6dbc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cogs5e/utils/actionutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,10 @@ async def cast_spell(
ab_override = mod + prof_bonus
spell_override = mod
elif with_arg is not None:
if with_arg not in constants.STAT_ABBREVIATIONS:
abbr_with = with_arg[:3].lower()
if abbr_with not in constants.STAT_ABBREVIATIONS:
raise InvalidArgument(f"{with_arg} is not a valid stat to cast with.")
with_arg = abbr_with
mod = caster.stats.get_mod(with_arg)
dc_override = 8 + mod + caster.stats.prof_bonus
ab_override = mod + caster.stats.prof_bonus
Expand Down

0 comments on commit 56d6dbc

Please sign in to comment.