Skip to content

Commit

Permalink
Merge pull request #1979 from Infinidoge/fix/combat-check-save-ephem
Browse files Browse the repository at this point in the history
fix: properly handle cadv/cdis/sadv/sdis in arg context
  • Loading branch information
SeanStoves committed Jan 19, 2024
2 parents ccdbcac + eb1cb26 commit 5a42055
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cogs5e/utils/checkutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ def run_check(skill_key, caster, args, embed):
mapper=lambda effect: effect.effects.check_dis, reducer=lambda checks: set().union(*checks), default=set()
)
if skill_key in cadv_effects or base_ability_key in cadv_effects:
combat_context["adv"] = True
combat_context["adv"] = ["True"]
if skill_key in cdis_effects or base_ability_key in cdis_effects:
combat_context["dis"] = True
combat_context["dis"] = ["True"]

args.add_context("combat", combat_context)
args.set_context("combat")
Expand Down Expand Up @@ -132,9 +132,9 @@ def run_save(save_key, caster, args, embed):
mapper=lambda effect: effect.effects.save_dis, reducer=lambda saves: set().union(*saves), default=set()
)
if stat in sadv_effects:
combat_context["adv"] = True # Because adv() only checks last() just forcibly add them
combat_context["adv"] = ["True"] # Because adv() only checks last() just forcibly add them
if stat in sdis_effects:
combat_context["dis"] = True
combat_context["dis"] = ["True"]

args.add_context("combat", combat_context)
args.set_context("combat")
Expand Down

0 comments on commit 5a42055

Please sign in to comment.