-
Notifications
You must be signed in to change notification settings - Fork 126
Added Nocturne's Curtain Call #2577
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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,3 @@ | ||
| package_name: nocturnes | ||
| genshin_id: 14522 | ||
| key: nocturnescourtaincall |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| id: 14522 | ||
| key: "nocturnescourtaincall" | ||
| rarity: 5 | ||
| weapon_class: WEAPON_CATALYST | ||
| image_name: "UI_EquipIcon_Catalyst_Brisingamen" | ||
| base_stats: { | ||
| base_props: { | ||
| prop_type: FIGHT_PROP_BASE_ATTACK | ||
| initial_value: 44.3358 | ||
| curve: GROW_CURVE_ATTACK_304 | ||
| } | ||
| base_props: { | ||
| prop_type: FIGHT_PROP_CRITICAL_HURT | ||
| initial_value: 0.192 | ||
| curve: GROW_CURVE_CRITICAL_301 | ||
| } | ||
| promo_data: { | ||
| max_level: 20 | ||
| } | ||
| promo_data: { | ||
| max_level: 40 | ||
| add_props: { | ||
| prop_type: FIGHT_PROP_BASE_ATTACK | ||
| value: 31.1 | ||
| } | ||
| } | ||
| promo_data: { | ||
| max_level: 50 | ||
| add_props: { | ||
| prop_type: FIGHT_PROP_BASE_ATTACK | ||
| value: 62.2 | ||
| } | ||
| } | ||
| promo_data: { | ||
| max_level: 60 | ||
| add_props: { | ||
| prop_type: FIGHT_PROP_BASE_ATTACK | ||
| value: 93.4 | ||
| } | ||
| } | ||
| promo_data: { | ||
| max_level: 70 | ||
| add_props: { | ||
| prop_type: FIGHT_PROP_BASE_ATTACK | ||
| value: 124.5 | ||
| } | ||
| } | ||
| promo_data: { | ||
| max_level: 80 | ||
| add_props: { | ||
| prop_type: FIGHT_PROP_BASE_ATTACK | ||
| value: 155.6 | ||
| } | ||
| } | ||
| promo_data: { | ||
| max_level: 90 | ||
| add_props: { | ||
| prop_type: FIGHT_PROP_BASE_ATTACK | ||
| value: 186.7 | ||
| } | ||
| } | ||
| } | ||
| name_text_hash_map: 1441327747 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| package nocturnes | ||
|
|
||
| import ( | ||
| "github.com/genshinsim/gcsim/pkg/core" | ||
| "github.com/genshinsim/gcsim/pkg/core/attacks" | ||
| "github.com/genshinsim/gcsim/pkg/core/attributes" | ||
| "github.com/genshinsim/gcsim/pkg/core/event" | ||
| "github.com/genshinsim/gcsim/pkg/core/info" | ||
| "github.com/genshinsim/gcsim/pkg/core/keys" | ||
| "github.com/genshinsim/gcsim/pkg/core/player/character" | ||
| "github.com/genshinsim/gcsim/pkg/modifier" | ||
| ) | ||
|
|
||
| func init() { | ||
| core.RegisterWeaponFunc(keys.NocturnesCourtainCall, NewWeapon) | ||
| } | ||
|
|
||
| const ICDKey = "nocturnes-courtain-call-icd" | ||
|
|
||
| type Weapon struct { | ||
| Index int | ||
| } | ||
|
|
||
| func (w *Weapon) SetIndex(idx int) { w.Index = idx } | ||
| func (w *Weapon) Init() error { return nil } | ||
|
|
||
| func NewWeapon(c *core.Core, char *character.CharWrapper, p info.WeaponProfile) (info.Weapon, error) { | ||
| w := &Weapon{} | ||
| r := p.Refine | ||
|
|
||
| m := make([]float64, attributes.EndStatType) | ||
| m[attributes.HPP] = 0.075 + float64(r)*0.025 | ||
| char.AddStatMod(character.StatMod{ | ||
| Base: modifier.NewBase("nocturnes-courtain-call-hp", -1), | ||
| Amount: func() []float64 { | ||
| return m | ||
| }, | ||
| }) | ||
|
|
||
| onHitF := func(args ...any) { | ||
| atk := args[1].(*info.AttackEvent) | ||
| if atk.Info.ActorIndex != char.Index() { | ||
| return | ||
| } | ||
| if atk.Info.AttackTag < attacks.LunarReactionStartDelim || atk.Info.AttackTag > attacks.DirectLunarReactionEndDelim { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can use |
||
| return | ||
| } | ||
| w.nocturneBuff(c, char, r) | ||
| } | ||
|
|
||
| onReactF := func(args ...any) { | ||
| atk := args[1].(*info.AttackEvent) | ||
| if atk.Info.ActorIndex != char.Index() { | ||
| return | ||
| } | ||
|
|
||
| w.nocturneBuff(c, char, r) | ||
| } | ||
|
|
||
| c.Events.Subscribe(event.OnEnemyHit, onHitF, "nocturnes-courtain-call-buff") | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should be OnEnemyDamage? Fix spelling on |
||
| c.Events.Subscribe(event.OnLunarCharged, onReactF, "nocturnes-courtain-call-buff") | ||
| c.Events.Subscribe(event.OnLunarBloom, onReactF, "nocturnes-courtain-call-buff") | ||
| // c.Events.Subscribe(event.OnLunarCrystallize, onReactF, "nocturnes-courtain-call-buff") | ||
|
|
||
| return w, nil | ||
| } | ||
|
|
||
| func (w *Weapon) nocturneBuff(c *core.Core, char *character.CharWrapper, r int) { | ||
| if !char.StatusIsActive(ICDKey) { | ||
| char.AddEnergy("nocturnes-courtain-call", 15) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The energy scales by refine. |
||
| char.AddStatus(ICDKey, 18*60, true) | ||
| } | ||
|
|
||
| m := make([]float64, attributes.EndStatType) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Allocate this array in Init/NewWeapon. Prevents reallocating this array constantly |
||
| m[attributes.HPP] = 0.09 + float64(r)*0.03 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should be 0.12 + float64(r)*0.02 |
||
| char.AddStatMod(character.StatMod{ | ||
| Base: modifier.NewBaseWithHitlag("nocturnes-courtain-call-hp", 12*60), | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rename the buff to |
||
| AffectedStat: attributes.HPP, | ||
| Amount: func() []float64 { | ||
| return m | ||
| }, | ||
| }) | ||
|
|
||
| c.Events.Subscribe(event.OnEnemyHit, func(args ...any) { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Move this to Init/NewWeapon. Only give the buff when the Bountiful Sea's Sacred Wine effect is active. Also need to add a subscription to |
||
| atk := args[1].(*info.AttackEvent) | ||
|
|
||
| if atk.Info.AttackTag < attacks.LunarReactionStartDelim || atk.Info.AttackTag > attacks.DirectLunarReactionEndDelim { | ||
| return | ||
| } | ||
| atk.Snapshot.Stats[attributes.CD] += 0.6 | ||
| }, "nocturnes-courtain-call-buff") | ||
| } | ||
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 |
|---|---|---|
|
|
@@ -145,6 +145,7 @@ var weaponNames = []string{ | |
| "moonweaversdawn", | ||
| "mountainbracingbolt", | ||
| "mouunsmoon", | ||
| "nocturnescourtaincall", | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nocturnescurtaincall |
||
| "oathsworneye", | ||
| "oldmercspal", | ||
| "otherworldlystory", | ||
|
|
@@ -365,6 +366,7 @@ const ( | |
| MoonweaversDawn | ||
| MountainBracingBolt | ||
| MouunsMoon | ||
| NocturnesCourtainCall | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NocturnesCurtainCall |
||
| OathswornEye | ||
| OldMercsPal | ||
| OtherworldlyStory | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -200,6 +200,8 @@ var WeaponNameToKey = map[string]keys.Weapon{ | |
| "mouunsmoon": keys.MouunsMoon, | ||
| "mouun": keys.MouunsMoon, | ||
| "mouuns": keys.MouunsMoon, | ||
| "nocturnescourtaincall": keys.NocturnesCourtainCall, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NocturnesCurtainCall |
||
| "nocturnes": keys.NocturnesCourtainCall, | ||
| "oathsworneye": keys.OathswornEye, | ||
| "oathsworn": keys.OathswornEye, | ||
| "oldmercspal": keys.OldMercsPal, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| --- | ||
| title: > | ||
| Nocturne's Curtain Call | ||
| --- | ||
|
|
||
| import AoETable from "@site/src/components/AoE/AoETable"; | ||
| import IssuesTable from "@site/src/components/Issues/IssuesTable"; | ||
| import NamesList from "@site/src/components/Names/NamesList"; | ||
| import ParamsTable from "@site/src/components/Params/ParamsTable"; | ||
| import FieldsTable from "@site/src/components/Fields/FieldsTable"; | ||
|
|
||
| ## AoE Data | ||
|
|
||
| <AoETable item_key="nocturnescourtaincall" data_src="weapon" /> | ||
|
|
||
| ## Known issues | ||
|
|
||
| <IssuesTable item_key="nocturnescourtaincall" data_src="weapon" /> | ||
|
|
||
| ## Names | ||
|
|
||
| <NamesList item_key="nocturnescourtaincall" data_src="weapon" /> | ||
|
|
||
| ## Params | ||
|
|
||
| <ParamsTable item_key="nocturnescourtaincall" data_src="weapon" /> | ||
|
|
||
| ## Fields | ||
|
|
||
| <FieldsTable item_key="nocturnescourtaincall" data_src="weapon" /> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -254,6 +254,9 @@ | |
| "mouun", | ||
| "mouuns" | ||
| ], | ||
| "nocturnescourtaincall": [ | ||
| "nocturnes" | ||
| ], | ||
| "oathsworneye": [ | ||
| "oathsworn" | ||
| ], | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The HP should be
0.08 + float64(r)*0.02