-
Notifications
You must be signed in to change notification settings - Fork 34
Hanya #327
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
base: main
Are you sure you want to change the base?
Hanya #327
Changes from 13 commits
8ec1f29
19fc636
e36d9c9
64f4e54
0f82921
9d77766
db99ce0
4fae4cf
e8a3e54
90ed42c
b271d7f
8b5ed33
c32e7f5
86da1da
18b83bf
9bd8cea
dd632cb
7352995
ef43a11
4d94eb1
68a77fd
a71f8af
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| package hanya | ||
|
|
||
| import ( | ||
| "github.com/simimpact/srsim/pkg/engine/info" | ||
| "github.com/simimpact/srsim/pkg/key" | ||
| "github.com/simimpact/srsim/pkg/model" | ||
| ) | ||
|
|
||
| const ( | ||
| Normal key.Attack = "hanya-normal" | ||
| ) | ||
|
|
||
| func (c *char) Attack(target key.TargetID, state info.ActionState) { | ||
| c.engine.Attack(info.Attack{ | ||
| Key: Normal, | ||
| Source: c.id, | ||
| Targets: []key.TargetID{target}, | ||
| BaseDamage: info.DamageMap{ | ||
| model.DamageFormula_BY_ATK: basic[c.info.AttackLevelIndex()], | ||
| }, | ||
| StanceDamage: 30, | ||
| EnergyGain: 20, | ||
| AttackType: model.AttackType_MAZE_NORMAL, | ||
| DamageType: model.DamageType_PHYSICAL, | ||
| }) | ||
|
|
||
| state.EndAttack() | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| package hanya | ||
|
|
||
| import ( | ||
| "github.com/simimpact/srsim/pkg/engine/info" | ||
| "github.com/simimpact/srsim/pkg/engine/modifier" | ||
| "github.com/simimpact/srsim/pkg/engine/prop" | ||
| "github.com/simimpact/srsim/pkg/key" | ||
| "github.com/simimpact/srsim/pkg/model" | ||
| ) | ||
|
|
||
| const ( | ||
| E1 = "hanya-e1" | ||
| E1Cooldown = "hanya-e1-cooldown" | ||
| E2 = "hanya-e2" | ||
| ) | ||
|
|
||
| func init() { | ||
| modifier.Register(E1, modifier.Config{ | ||
| Stacking: modifier.ReplaceBySource, | ||
| Listeners: modifier.Listeners{ | ||
| OnTriggerDeath: E1HanyaAdv, | ||
| }, | ||
| }) | ||
|
|
||
| modifier.Register(E1Cooldown, modifier.Config{ | ||
| Listeners: modifier.Listeners{ | ||
| OnPhase2: E1HanyaCD, | ||
| }, | ||
| }) | ||
|
|
||
| modifier.Register(E2, modifier.Config{ | ||
| StatusType: model.StatusType_STATUS_BUFF, | ||
| Stacking: modifier.ReplaceBySource, | ||
| Duration: 1, | ||
| }) | ||
| } | ||
|
|
||
| func (c *char) initEidolons() { | ||
| if c.info.Eidolon >= 2 { | ||
| c.engine.AddModifier(c.id, info.Modifier{ | ||
| Name: E2, | ||
| Source: c.id, | ||
| Stats: info.PropMap{ | ||
| prop.SPDConvert: 0.2, | ||
| }, | ||
| }) | ||
|
||
| } | ||
| } | ||
|
|
||
| func E1HanyaAdv(mod *modifier.Instance, target key.TargetID) { | ||
| if !mod.Engine().HasModifier(mod.Source(), E1Cooldown) { | ||
kdovtdc marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| mod.Engine().ModifyGaugeNormalized(info.ModifyAttribute{ | ||
| Key: E1, | ||
| Source: mod.Owner(), | ||
| Target: mod.Source(), | ||
| Amount: -1500, | ||
kdovtdc marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }) | ||
| } | ||
| } | ||
|
|
||
| func E1HanyaCD(mod *modifier.Instance) { | ||
| mod.RemoveSelf() | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| package hanya | ||
|
|
||
| import ( | ||
| "github.com/simimpact/srsim/pkg/engine" | ||
| "github.com/simimpact/srsim/pkg/engine/info" | ||
| "github.com/simimpact/srsim/pkg/engine/target/character" | ||
| "github.com/simimpact/srsim/pkg/key" | ||
| "github.com/simimpact/srsim/pkg/model" | ||
| ) | ||
|
|
||
| func init() { | ||
| character.Register(key.Hanya, character.Config{ | ||
| Create: NewInstance, | ||
| Rarity: 4, | ||
| Element: model.DamageType_PHYSICAL, | ||
| Path: model.Path_HARMONY, | ||
| MaxEnergy: 140, | ||
| Promotions: promotions, | ||
| Traces: traces, | ||
| SkillInfo: character.SkillInfo{ | ||
| Attack: character.Attack{ | ||
| SPAdd: 1, | ||
| TargetType: model.TargetType_ENEMIES, | ||
| }, | ||
| Skill: character.Skill{ | ||
| SPNeed: 1, | ||
| TargetType: model.TargetType_ENEMIES, | ||
| }, | ||
| Ult: character.Ult{ | ||
| TargetType: model.TargetType_ALLIES, | ||
| }, | ||
| Technique: character.Technique{ | ||
| TargetType: model.TargetType_ENEMIES, | ||
| IsAttack: true, | ||
| }, | ||
| }, | ||
| }) | ||
| } | ||
|
|
||
| type char struct { | ||
| engine engine.Engine | ||
| id key.TargetID | ||
| info info.Character | ||
| } | ||
|
|
||
| func NewInstance(engine engine.Engine, id key.TargetID, charInfo info.Character) info.CharInstance { | ||
| c := &char{ | ||
| engine: engine, | ||
| id: id, | ||
| info: charInfo, | ||
| } | ||
|
|
||
| c.initEidolons() | ||
|
|
||
| return c | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.