[Enhancement]: Add Damage Calculator page #39
Labels
No labels
bug
classlib
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
ui
webapi
wontfix
devtype
2d art
devtype
3d art
devtype
concept art
devtype
design
devtype
playtesting
devtype
programming
priority
0
priority
1
priority
2
state
duplicate
state
help wanted
state
invalid
state
wontfix
type
bug
type
enhancement
type
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
LokiShell/Charwiki#39
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
(Optional) Contact Details
No response
Summary
Add a page that allows calculating the damage an attack from a Loomian would do to another Loomian
Detailed description
Make a page that allows users to calculate the damage a complex set (including Loomian, ability, item, moves and stats modifiers) would do to another set.
(Optional) Technical description
I think the best design for this functionality would be:
AbilityEffectandMoveEffectenum. This would store ability effects and secondary move effects. For example, a value forAbilityEffectcould beAwakening, and a value forMoveEffectcould beDartBurst. First values (0 equivalents) should beNone. We do not need to create values for effects that don't affect damage calculation.Effectcolumn of typeAbilityEffectto theLoomianAbilityentity, and aPowercolumn of typeintand anEffectcolumn of typeMoveEffectto theLoomianMoveentity.DamageCalculationResultclass with information about the dealt damage.IDamageCalculatorinterface with methods likeApplyAttackerAbility(AbilityEffect abilityEffect)andCalculateDamage(). This could use the lazy evaluation pattern. TheCalculateDamage()method should return aOperationResult<DamageCalculationResult>instance.IDamageCalculationServiceclass that encapsulates the calls to theIDamageCalculator.IDamageCalculationServicein theWebUiproject.IDamageCalculationServiceto perform calculations.Damage calculation should not need to use WebApi. All logic processing should be able to be done on the WebUi project (even though adding it in ClassLib might be a good practice). This also means the response DTOs for moves and abilities need to be modified to return their new properties, allowing the WebUi to calc damage without further intervention of the WebApi.