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

Hanya #327

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open

Hanya #327

wants to merge 22 commits into from

Conversation

aaron-hwang
Copy link
Collaborator

No description provided.

internal/character/hanya/eidolon.go Outdated Show resolved Hide resolved
internal/character/hanya/eidolon.go Outdated Show resolved Hide resolved
Comment on lines 40 to 46
c.engine.AddModifier(c.id, info.Modifier{
Name: E2,
Source: c.id,
Stats: info.PropMap{
prop.SPDConvert: 0.2,
},
})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs a listener first to check for Skill use and then apply Spd buff

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

internal/character/hanya/ult.go Outdated Show resolved Hide resolved
internal/character/hanya/ult.go Outdated Show resolved Hide resolved
internal/character/hanya/skill.go Outdated Show resolved Hide resolved
internal/character/hanya/ult.go Show resolved Hide resolved
internal/character/hanya/eidolon.go Show resolved Hide resolved
Copy link
Collaborator

@kdovtdc kdovtdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

additional comments found during manual testing

StanceDamage: 60,
EnergyGain: 30,
})

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to call an AttackEnd() here (same as dm), otherwise the Burden's atkCount will benefit from the same Skill that applied the effect

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

c.engine.AddModifier(target, info.Modifier{
Name: Burden,
Source: c.id,
State: BurdenState{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should use a pointer: &BurdenState

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will also mean you need a pointer for l. 123 when calling BurdenState as go expects a pointer (otherwise will panic)

internal/character/hanya/technique.go Outdated Show resolved Hide resolved
StanceDamage: 60,
EnergyGain: 30,
})

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment on lines +99 to +133
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()
}
}
}
Copy link
Collaborator

@kdovtdc kdovtdc Nov 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment on lines +55 to +64
if c.engine.HPRatio(target) > 0 {
c.engine.AddModifier(target, info.Modifier{
Name: Burden,
Source: c.id,
State: &BurdenState{
atkCount: 0,
triggersRemaining: 2,
},
})
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following mechanic has also been observed:

  1. Hanya uses Skill on new target. Debuff is added with 2 triggers remaining.
  2. Ally attacks the same target. SP recovery is triggered. 1 trigger remains.
  3. Ally attacks the same target.
  4. 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.

Comment on lines +135 to +145
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,
})
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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 this pull request may close these issues.

2 participants