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

🐞 Extends feature - extending an extended creature inherits the original creatures stats instead of the modified ones. #400

Closed
3 of 7 tasks
MattGRMP opened this issue Apr 26, 2024 · 0 comments · Fixed by #408

Comments

@MattGRMP
Copy link

Check for existing bug reports before submitting.

  • I searched for existing Bug Reports and found no similar reports.

Expected Behavior

Creature A extends an Acolyte but changes the stats. Creature B then extends creature A. The expected behavior is that creature B will have the same stats as creature A.

name: Creature A
extends: Acolyte
stats:
  - 8
  - 12
  - 12
  - 10
  - 10
  - 16
name: Creature B
extends: 
- Creature A

Current behaviour

Instead of inheriting the stats specified in the creature A statblock, it ends up using the stats from the original Acolyte stat block.
image
image

Reproduction

  1. Launch Obsidian Sandbox via the 'Open Sandbox Vault' command.
  2. Install the Fantasy Statblocks plugin and enable it.
  3. Create a new note.
  4. Paste the following into the new note
---
statblock: inline
name: Creature A
---

```statblock

name: Creature A
extends: Acolyte
stats:
  - 8
  - 12
  - 12
  - 10
  - 10
  - 16
```

```statblock
name: Creature B
extends: 
- Creature A
```
  1. Run the Fantasy Statblocks: Parse Frontmatter for Creatures command
  2. Refresh Creature B statblock (move the text cursor into the statblock and out again.)

Which Operating Systems are you using?

  • Android
  • iPhone/iPad
  • Linux
  • macOS
  • Windows

Obsidian Version Check

1.5.12 and 1.5.3

Plugin Version

4.2.4

Confirmation

  • I have disabled all other plugins and the issue still persists.

Possible solution

Is the recursive function used by the extends feature calling itself after applying stats from the current depth? If so maybe it should be calling itself at the start of the function to start from the deepest level and overwrite stats as it returns.

@MattGRMP MattGRMP changed the title Extends feature - extending an extended creature inherits the original creatures stats instead of the modified ones. 🐞 Extends feature - extending an extended creature inherits the original creatures stats instead of the modified ones. Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant