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

Concentration check triggered when reverting hp.tempmax and the actor's hp.value is higher than hp.max #3955

Closed
thatlonelybugbear opened this issue Aug 8, 2024 · 0 comments
Assignees
Labels
bug Functionality which is not working as intended
Milestone

Comments

@thatlonelybugbear
Copy link
Contributor

Split from #3363

  • Creature gets a boon on tempmax and afterwards is healed above the normal hp.max.
  • The tempmax boon reverts. The "hp loss" will trigger a concentration check, which is not considered actual damage and against RAW Concentration.

Maybe a change in actor.mjs:3307 would make sense?

async _onUpdate(data, options, userId) {
    super._onUpdate(data, options, userId);
    if ( userId === game.userId ) {
      await this.updateEncumbrance(options);
      this._onUpdateExhaustion(data, options);
    }

     const hp = options.dnd5e?.hp;
     if ( hp && !options.isRest && !options.isAdvancement ) {
        const curr = this.system.attributes.hp;
        const changes = {
        hp: curr.value - hp.value,
        temp: curr.temp - hp.temp,
      };
      changes.total = changes.hp + changes.temp;

      if ( Number.isInteger(changes.total) && (changes.total != 0) ) {
        this._displayTokenEffect(changes);
-     if ( !game.settings.get("dnd5e", "disableConcentration") && (userId === game.userId) && (changes.total < 0) ) {
+     if ( !game.settings.get("dnd5e", "disableConcentration") && (userId === game.userId) && (changes.total < 0) && (curr.value != curr.effectiveMax) ) {

          this.challengeConcentration({ dc: this.getConcentrationDC(-changes.total) });
        }
        //...
@thatlonelybugbear thatlonelybugbear changed the title [Bug] - Concentration check triggered when reverting hp.tempmax and the actor's hp.value is higher than hp.max Concentration check triggered when reverting hp.tempmax and the actor's hp.value is higher than hp.max Aug 8, 2024
@Fyorl Fyorl added the bug Functionality which is not working as intended label Oct 3, 2024
@Fyorl Fyorl added this to the D&D5E 4.1.0 milestone Oct 3, 2024
@arbron arbron self-assigned this Nov 7, 2024
@arbron arbron closed this as completed in 800f02b Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality which is not working as intended
Projects
None yet
3 participants