Conversation
internal/character/hanya/eidolon.go
Outdated
| c.engine.AddModifier(c.id, info.Modifier{ | ||
| Name: E2, | ||
| Source: c.id, | ||
| Stats: info.PropMap{ | ||
| prop.SPDConvert: 0.2, | ||
| }, | ||
| }) |
There was a problem hiding this comment.
needs a listener first to check for Skill use and then apply Spd buff
There was a problem hiding this comment.
idea: Change skill logic to check for e2 and add speed modifier with duration of 1 (and other necessary logic etc) instead. Most likely need to add after state.endAttack() is called, but should otherwise have the same semantics. Can check tomorrow to be sure.
kdovtdc
left a comment
There was a problem hiding this comment.
additional comments found during manual testing
| StanceDamage: 60, | ||
| EnergyGain: 30, | ||
| }) | ||
|
|
There was a problem hiding this comment.
need to call an AttackEnd() here (same as dm), otherwise the Burden's atkCount will benefit from the same Skill that applied the effect
There was a problem hiding this comment.
correction: the AttackEnd() is positioned here correctly, but the atkCount should actually benefit from the same Skill that applied the effect; explanations in comments below
internal/character/hanya/skill.go
Outdated
| c.engine.AddModifier(target, info.Modifier{ | ||
| Name: Burden, | ||
| Source: c.id, | ||
| State: BurdenState{ |
There was a problem hiding this comment.
should use a pointer: &BurdenState
There was a problem hiding this comment.
this will also mean you need a pointer for l. 123 when calling BurdenState as go expects a pointer (otherwise will panic)
| StanceDamage: 60, | ||
| EnergyGain: 30, | ||
| }) | ||
|
|
There was a problem hiding this comment.
correction: the AttackEnd() is positioned here correctly, but the atkCount should actually benefit from the same Skill that applied the effect; explanations in comments below
| func BurdenCallbackSP(mod *modifier.Instance, e event.AttackEnd) { | ||
| if e.AttackType != model.AttackType_SKILL && e.AttackType != model.AttackType_NORMAL && e.AttackType != model.AttackType_ULT { | ||
| return | ||
| } | ||
| state := mod.State().(*BurdenState) | ||
| state.atkCount += 1 | ||
| // It shouldn't ever actually be greater than 2 | ||
| if state.atkCount >= 2 { | ||
| state.atkCount = 0 | ||
| state.triggersRemaining -= 1 | ||
| mod.Engine().ModifySP(info.ModifySP{ | ||
| Key: Burden, | ||
| Source: mod.Source(), | ||
| Amount: 1, | ||
| }) | ||
| mod.Engine().AddModifier(e.Attacker, info.Modifier{ | ||
| Name: A2, | ||
| Source: mod.Source(), | ||
| Duration: 1, | ||
| }) | ||
| hanya, _ := mod.Engine().CharacterInfo(mod.Source()) | ||
| // A6 | ||
| if hanya.Traces["103"] { | ||
| mod.Engine().ModifyEnergy(info.ModifyAttribute{ | ||
| Key: A6, | ||
| Source: mod.Source(), | ||
| Target: mod.Source(), | ||
| Amount: 2, | ||
| }) | ||
| } | ||
| if state.triggersRemaining < 1 { | ||
| mod.RemoveSelf() | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
it seems that this function should listen to ActionEnd (instead of AttackEnd) event to ensure atkCount benefits from the Skill applying it (attack ends -> debuff is applied -> action ends -> listener is triggered here correctly).
edit: corrected listener names to event names
| if c.engine.HPRatio(target) > 0 { | ||
| c.engine.AddModifier(target, info.Modifier{ | ||
| Name: Burden, | ||
| Source: c.id, | ||
| State: &BurdenState{ | ||
| atkCount: 0, | ||
| triggersRemaining: 2, | ||
| }, | ||
| }) | ||
| } |
There was a problem hiding this comment.
The following mechanic has also been observed:
- Hanya uses Skill on new target. Debuff is added with 2 triggers remaining.
- Ally attacks the same target. SP recovery is triggered. 1 trigger remains.
- Ally attacks the same target.
- Hanya uses Skill on target. Triggers remaining goes back to 2 for a short moment, the SP recovery is triggered, and 1 trigger remains.
The way I believe this works is that triggersRemaining count is reset to 2 before the modifier is applied, so it isn't dependent on the modifier being applied or not. Since Burden (correctly) has the Unique stacking behavior, the count would only be reset when the mod is successfully applied, but at step 4 it should fail to apply.
| func BurdenAboutToDie(mod *modifier.Instance) { | ||
| hanya, _ := mod.Engine().CharacterInfo(mod.Source()) | ||
| // A4 | ||
| if hanya.Traces["102"] && mod.State().(BurdenState).atkCount <= 1 { | ||
| mod.Engine().ModifySP(info.ModifySP{ | ||
| Key: A4, | ||
| Source: mod.Source(), | ||
| Amount: 1, | ||
| }) | ||
| } | ||
| } |
There was a problem hiding this comment.
following from how some variables are reset or not before the mod is added, the variable used to check here should be a different one than atkCount. unless I missed something, this variable is exactly 2 - triggersRemaining as it is incremented every time the other is decremented and the initial values are 0 and 2, respectively.
No description provided.