Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions internal/services/assets/weapons_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions internal/weapons/catalyst/nocturnes/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package_name: nocturnes
genshin_id: 14522
key: nocturnescourtaincall
63 changes: 63 additions & 0 deletions internal/weapons/catalyst/nocturnes/data_gen.textproto
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
92 changes: 92 additions & 0 deletions internal/weapons/catalyst/nocturnes/nocturnes.go
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
Copy link
Collaborator

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

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 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can use !attacks.AttackTagIsLunar(atk.Info.AttackTag)

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")
Copy link
Collaborator

@Charlie-Zheng Charlie-Zheng Feb 26, 2026

Choose a reason for hiding this comment

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

I think this should be OnEnemyDamage? Fix spelling on curtain

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)
Copy link
Collaborator

@Charlie-Zheng Charlie-Zheng Feb 26, 2026

Choose a reason for hiding this comment

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

The energy scales by refine. 13 + float64(r). Change to nocturnes-curtain-call

char.AddStatus(ICDKey, 18*60, true)
}

m := make([]float64, attributes.EndStatType)
Copy link
Collaborator

@Charlie-Zheng Charlie-Zheng Feb 26, 2026

Choose a reason for hiding this comment

The 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
Copy link
Collaborator

Choose a reason for hiding this comment

The 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),
Copy link
Collaborator

@Charlie-Zheng Charlie-Zheng Feb 26, 2026

Choose a reason for hiding this comment

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

Rename the buff to nocturnes-curtain-call-buff (note the spelling) and use char.StatModIsActive() for the Crit DMG bonus

AffectedStat: attributes.HPP,
Amount: func() []float64 {
return m
},
})

c.Events.Subscribe(event.OnEnemyHit, func(args ...any) {
Copy link
Collaborator

Choose a reason for hiding this comment

The 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 OnLunarChargedReactionAttack to buff CDMG for the individual contribution to Reaction LC.

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")
}
25 changes: 25 additions & 0 deletions internal/weapons/catalyst/nocturnes/nocturnes_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pkg/core/keys/weapon.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ var weaponNames = []string{
"moonweaversdawn",
"mountainbracingbolt",
"mouunsmoon",
"nocturnescourtaincall",
Copy link
Collaborator

Choose a reason for hiding this comment

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

nocturnescurtaincall

"oathsworneye",
"oldmercspal",
"otherworldlystory",
Expand Down Expand Up @@ -365,6 +366,7 @@ const (
MoonweaversDawn
MountainBracingBolt
MouunsMoon
NocturnesCourtainCall
Copy link
Collaborator

Choose a reason for hiding this comment

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

NocturnesCurtainCall

OathswornEye
OldMercsPal
OtherworldlyStory
Expand Down
2 changes: 2 additions & 0 deletions pkg/shortcut/weapons.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ var WeaponNameToKey = map[string]keys.Weapon{
"mouunsmoon": keys.MouunsMoon,
"mouun": keys.MouunsMoon,
"mouuns": keys.MouunsMoon,
"nocturnescourtaincall": keys.NocturnesCourtainCall,
Copy link
Collaborator

Choose a reason for hiding this comment

The 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,
Expand Down
1 change: 1 addition & 0 deletions pkg/simulation/imports.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ import (
_ "github.com/genshinsim/gcsim/internal/weapons/catalyst/mappa"
_ "github.com/genshinsim/gcsim/internal/weapons/catalyst/memory"
_ "github.com/genshinsim/gcsim/internal/weapons/catalyst/moonglow"
_ "github.com/genshinsim/gcsim/internal/weapons/catalyst/nocturnes"
_ "github.com/genshinsim/gcsim/internal/weapons/catalyst/oathsworneye"
_ "github.com/genshinsim/gcsim/internal/weapons/catalyst/otherworldly"
_ "github.com/genshinsim/gcsim/internal/weapons/catalyst/perception"
Expand Down
30 changes: 30 additions & 0 deletions ui/packages/docs/docs/reference/weapons/nocturnescourtaincall.md
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" />
3 changes: 3 additions & 0 deletions ui/packages/docs/src/components/Names/weapon_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@
"mouun",
"mouuns"
],
"nocturnescourtaincall": [
"nocturnes"
],
"oathsworneye": [
"oathsworn"
],
Expand Down
7 changes: 7 additions & 0 deletions ui/packages/localization/src/locales/names.generated.json
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@
"moonweaversdawn": "织月者的曙色",
"mountainbracingbolt": "镇山之钉",
"mouunsmoon": "曚云之月",
"nocturnescourtaincall": "帷间夜曲",
"oathsworneye": "证誓之明瞳",
"oldmercspal": "佣兵重剑",
"otherworldlystory": "异世界行记",
Expand Down Expand Up @@ -1023,6 +1024,7 @@
"moonweaversdawn": "Moonweaver's Dawn",
"mountainbracingbolt": "Mountain-Bracing Bolt",
"mouunsmoon": "Mouun's Moon",
"nocturnescourtaincall": "Nocturne's Curtain Call",
"oathsworneye": "Oathsworn Eye",
"oldmercspal": "Old Merc's Pal",
"otherworldlystory": "Otherworldly Story",
Expand Down Expand Up @@ -1819,6 +1821,7 @@
"moonweaversdawn": "Dämmerlicht des Mondwebers",
"mountainbracingbolt": "Bergschützer-Bolzen",
"mouunsmoon": "Mouun-Mond",
"nocturnescourtaincall": "Nachtmusik im Schleier",
"oathsworneye": "Auge des Gelöbnisses",
"oldmercspal": "Söldnerzweihänder",
"otherworldlystory": "Geschichten einer anderen Welt",
Expand Down Expand Up @@ -2615,6 +2618,7 @@
"moonweaversdawn": "月紡ぎの曙光",
"mountainbracingbolt": "鎮山の釘",
"mouunsmoon": "曚雲の月",
"nocturnescourtaincall": "帳の夜曲",
"oathsworneye": "誓いの明瞳",
"oldmercspal": "傭兵の重剣",
"otherworldlystory": "異世界旅行記",
Expand Down Expand Up @@ -3411,6 +3415,7 @@
"moonweaversdawn": "달을 엮는 자의 새벽빛",
"mountainbracingbolt": "산을 고정하는 못",
"mouunsmoon": "모운의 달",
"nocturnescourtaincall": "막간의 야상곡",
"oathsworneye": "맹세의 눈동자",
"oldmercspal": "용병 중검",
"otherworldlystory": "이세계 여행기",
Expand Down Expand Up @@ -4207,6 +4212,7 @@
"moonweaversdawn": "Рассвет прядильщицы луны",
"mountainbracingbolt": "Крепящий горы шип",
"mouunsmoon": "Луна Моун",
"nocturnescourtaincall": "Вызов ноктюрна",
"oathsworneye": "Око клятвы",
"oldmercspal": "Лучший друг наёмника",
"otherworldlystory": "Потусторонняя история",
Expand Down Expand Up @@ -5003,6 +5009,7 @@
"moonweaversdawn": "Alba de la Tejelunas",
"mountainbracingbolt": "Púa Sustentamontañas",
"mouunsmoon": "Luna de Mouun",
"nocturnescourtaincall": "Nocturno tras el Velo",
"oathsworneye": "Ojo del Juramento",
"oldmercspal": "Espada del Mercenario",
"otherworldlystory": "Historias de Otros Mundos",
Expand Down
8 changes: 8 additions & 0 deletions ui/packages/ui/src/Data/weapon_data.generated.json
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,14 @@
"image_name": "UI_EquipIcon_Bow_Maria",
"name_text_hash_map ": "1860795787"
},
"nocturnescourtaincall": {
"id": 14522,
"key": "nocturnescourtaincall",
"rarity": 5,
"weapon_class": "WEAPON_CATALYST",
"image_name": "UI_EquipIcon_Catalyst_Brisingamen",
"name_text_hash_map ": "1441327747"
},
"oathsworneye": {
"id": 14415,
"key": "oathsworneye",
Expand Down