Conversation
internal/global/common/bleed.go
Outdated
| // Custom event trigger for bleed dots | ||
| func (B BleedState) TriggerEvent(mod *modifier.Instance) { |
There was a problem hiding this comment.
nit: might not be clear to users what TriggerEvent means when reading character implementations (though not against the name)
Thinking about implementations, such as Sampo E4 or Kafka, these would also need to take in a Ratio which gets multiplied against the original damage percentage of the mod (IE: Sampo E4 is 4%). In the game implementation, this would be that DOT_TriggerRatio: https://damnae.github.io/stargazer/#/modifier-MCommon_Element_Electric/from/avatar-1005/@59d64be43a1da285cf22ba9be5ed90ef2b23f857
| type CustomEventTriggerable interface { | ||
| TriggerEvent() | ||
| } |
There was a problem hiding this comment.
this should be specific to trigger dots/element modifiers and not some generic "any custom event" trigger
.vscode/settings.json
Outdated
| "editor.formatOnSave": true, | ||
| "editor.codeActionsOnSave": { | ||
| "source.fixAll.eslint": true | ||
| "source.fixAll.eslint": "explicit" |
There was a problem hiding this comment.
file name should be all lowercase with underscore separation (triggerable_dot.go)
internal/global/common/burn.go
Outdated
| AttackType: model.AttackType_DOT, | ||
| DamageType: model.DamageType_FIRE, | ||
| BaseDamage: info.DamageMap{ | ||
| model.DamageFormula_BY_BREAK_DAMAGE: b.BreakBaseMulti, |
internal/global/common/bleed.go
Outdated
| AttackType: model.AttackType_DOT, | ||
| DamageType: model.DamageType_PHYSICAL, | ||
| BaseDamage: info.DamageMap{ | ||
| model.DamageFormula_BY_ATK: b.DamagePercentage, |
internal/global/common/wind.go
Outdated
| AttackType: model.AttackType_DOT, | ||
| DamageType: model.DamageType_WIND, | ||
| BaseDamage: info.DamageMap{ | ||
| model.DamageFormula_BY_ATK: w.DamagePercentage * mod.Count(), |
internal/global/common/wind.go
Outdated
| AttackType: model.AttackType_DOT, | ||
| DamageType: model.DamageType_WIND, | ||
| BaseDamage: info.DamageMap{ | ||
| model.DamageFormula_BY_BREAK_DAMAGE: w.BreakBaseMulti * mod.Count(), |
| func (c *char) OnProjectileHit(target key.TargetID, stanceDamage float64, i int) { | ||
| // if c.info.Eidolon >= 4 && c.engine.HasBehaviorFlag(target, model.BehaviorFlag_STAT_DOT_POISON) { | ||
| // //TODO: implement sampo E4 | ||
| // } | ||
| if c.info.Eidolon >= 4 && c.engine.HasBehaviorFlag(target, model.BehaviorFlag_STAT_DOT_POISON) { | ||
| // Wind dot (kit dots) | ||
| for _, dot := range c.engine.GetModifiers(target, common.WindShear) { | ||
| dot.State.(common.WindShearState).TriggerDot(dot, 0.06, c.engine, target) | ||
| } | ||
|
|
||
| // Break wind dots | ||
| for _, dot := range c.engine.GetModifiers(target, common.BreakWindShear) { | ||
| dot.State.(common.BreakWindShearState).TriggerDot(dot, 0.06, c.engine, target) | ||
| } | ||
| } |
There was a problem hiding this comment.
NIT: My FUD with this is you are checking by behavior flag but getting modifiers by name. Runs us into an odd situation for what if there is something that is STAT_DOT_POISON but not WindShear or BreakWindShear. Best if we had some way to GetModifiersByBehaviorFlag instead?
WIP, need to add: