Moerill / Moerill/Mess

Discussion bonus damage take 2

Open
#80 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
16
Forks
9
PR merge metrics
No merged PRs in 30d

Description

I've noticed there is an issue with bonus damage added by #46. Specifically bonus damage spells can't be up cast since the attack card is just taking the spells base damage directly. So this got me to thinking and here what I've come up with.

First split bonus damage into two types, spells and features. Sneak attack would be an example of a feature type bonus damage since there is no up casting. Hex and Hunter's mark are examples of spell type bonus damage.

Feature bonus damage will remain as is with no changes. It works just fine so lets not break it.

Spell bonus damage won't be automatically added to attack cards but instead will work as follows.

  1. When a bonus spell with the bonus damage flag is cast it repentant data will be added to the flags section of the actor casting it including, the spell item ID, full damage formula (including up cast damage dice) and target ID if there is one.

  2. All attacks will include Feature bonus damage plus spell bonus damage from the actor flags set above if it doesn't have a target ID OR the target ID matches the target of the attack assuming it also has one. So if either target ID is missing or both target ID's match the damage will be included in the attack card.

  3. Add a row of small icons at the bottom of the attack card, below damage buttons that shows all active spell bonus damage's. Clicking on the each icon brings up a menu, similar to applying damage to targets, that offers two options. First to clear the bonus damage and second to change the target ID to the current attack cards target ID. This will allow for ending the spell effect and transferring it to a new target.

Any thoughts etc on all this is welcome. I'll work on this over the next day or so adjusting per any comments here.

Bob

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the bonus-damage implementation from #46 and the attack-card and actor-flag behavior described here. Trace how spell damage formulas, upcasting, targets, and feature bonuses are currently represented. Done means spell bonuses are tracked separately, applied only to eligible attacks, and can be cleared or retargeted from the attack card.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.