diff --git a/internal/services/assets/weapons_gen.go b/internal/services/assets/weapons_gen.go index 910e72a3a..24e82a0a7 100644 --- a/internal/services/assets/weapons_gen.go +++ b/internal/services/assets/weapons_gen.go @@ -74,6 +74,7 @@ var weaponMap = map[string]string{ "pocketgrimoire": "UI_EquipIcon_Catalyst_Pocket", "lostprayertothesacredwinds": "UI_EquipIcon_Catalyst_Fourwinds", "prototypeamber": "UI_EquipIcon_Catalyst_Proto", + "reliquaryoftruth": "UI_EquipIcon_Catalyst_Sistrum", "ringofyaxche": "UI_EquipIcon_Catalyst_Isikhulu", "royalgrimoire": "UI_EquipIcon_Catalyst_Theocrat", "sacrificialfragments": "UI_EquipIcon_Catalyst_Fossil", diff --git a/internal/weapons/catalyst/reliquary/config.yml b/internal/weapons/catalyst/reliquary/config.yml new file mode 100644 index 000000000..54a690fcf --- /dev/null +++ b/internal/weapons/catalyst/reliquary/config.yml @@ -0,0 +1,3 @@ +package_name: reliquary +genshin_id: 14521 +key: reliquaryoftruth diff --git a/internal/weapons/catalyst/reliquary/data_gen.textproto b/internal/weapons/catalyst/reliquary/data_gen.textproto new file mode 100644 index 000000000..50e9a0397 --- /dev/null +++ b/internal/weapons/catalyst/reliquary/data_gen.textproto @@ -0,0 +1,63 @@ +id: 14521 +key: "reliquaryoftruth" +rarity: 5 +weapon_class: WEAPON_CATALYST +image_name: "UI_EquipIcon_Catalyst_Sistrum" +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: 1566338363 diff --git a/internal/weapons/catalyst/reliquary/reliquary.go b/internal/weapons/catalyst/reliquary/reliquary.go new file mode 100644 index 000000000..8362319dd --- /dev/null +++ b/internal/weapons/catalyst/reliquary/reliquary.go @@ -0,0 +1,110 @@ +package reliquary + +import ( + "fmt" + + "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.ReliquaryOfTruth, NewWeapon) +} + +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.CR] = 0.06 + 0.02*float64(r) + + char.AddStatMod(character.StatMod{ + Base: modifier.NewBase("reliquary-cr", -1), + Amount: func() []float64 { + return m + }, + }) + + secretoflies := func(args ...any) { + atk := args[1].(*info.AttackEvent) + if atk.Info.ActorIndex != char.Index() { + return + } + + m := make([]float64, attributes.EndStatType) + m[attributes.EM] = 60 + 20*float64(r) + + char.AddStatMod(character.StatMod{ + Base: modifier.NewBaseWithHitlag("reliquary-secretoflies", 10*60), + Extra: true, + AffectedStat: attributes.EM, + Amount: func() []float64 { + return m + }, + }) + + bothActive(char, r) + } + + moonoftruth := func(args ...any) { + atk := args[1].(*info.AttackEvent) + if atk.Info.ActorIndex != char.Index() { + return + } + if atk.Info.AttackTag != attacks.AttackTagDirectLunarBloom { + return + } + + m := make([]float64, attributes.EndStatType) + m[attributes.CR] = 0.18 + 0.06*float64(r) + + char.AddStatMod(character.StatMod{ + Base: modifier.NewBaseWithHitlag("reliquary-moonoftruth", 15*60), + Extra: true, + AffectedStat: attributes.CR, + Amount: func() []float64 { + return m + }, + }) + + bothActive(char, r) + } + + c.Events.Subscribe(event.OnSkill, secretoflies, fmt.Sprintf("reliquary-secretoflies-%v", char.Base.Key.String())) + c.Events.Subscribe(event.OnEnemyHit, moonoftruth, fmt.Sprintf("reliquary-moonoftruth-%v", char.Base.Key.String())) + + return w, nil +} + +func bothActive(char *character.CharWrapper, r int) { + if !char.StatusIsActive("reliquary-secretoflies") || !char.StatusIsActive("reliquary-moonoftruth") { + return + } + + m := make([]float64, attributes.EndStatType) + m[attributes.EM] = 30 + 10*float64(r) + m[attributes.CR] = 0.09 + 0.03*float64(r) + + duration := min(char.StatusDuration("reliquary-secretoflies"), char.StatusDuration("reliquary-moonoftruth")) + + char.AddStatMod(character.StatMod{ + Base: modifier.NewBaseWithHitlag("reliquary-both", duration), + Extra: true, + Amount: func() []float64 { + return m + }, + }) +} diff --git a/internal/weapons/catalyst/reliquary/reliquary_gen.go b/internal/weapons/catalyst/reliquary/reliquary_gen.go new file mode 100644 index 000000000..bb1cf7659 --- /dev/null +++ b/internal/weapons/catalyst/reliquary/reliquary_gen.go @@ -0,0 +1,25 @@ +// Code generated by "pipeline"; DO NOT EDIT. +package reliquary + +import ( + _ "embed" + + "github.com/genshinsim/gcsim/pkg/model" + "google.golang.org/protobuf/encoding/prototext" +) + +//go:embed data_gen.textproto +var pbData []byte +var base *model.WeaponData + +func init() { + base = &model.WeaponData{} + err := prototext.Unmarshal(pbData, base) + if err != nil { + panic(err) + } +} + +func (x *Weapon) Data() *model.WeaponData { + return base +} diff --git a/pkg/core/keys/weapon.go b/pkg/core/keys/weapon.go index b5b8b3708..655455cee 100644 --- a/pkg/core/keys/weapon.go +++ b/pkg/core/keys/weapon.go @@ -166,6 +166,7 @@ var weaponNames = []string{ "ravenbow", "recurvebow", "redhornstonethresher", + "reliquaryoftruth", "rightfulreward", "ringofyaxche", "royalbow", @@ -386,6 +387,7 @@ const ( RavenBow RecurveBow RedhornStonethresher + ReliquaryOfTruth RightfulReward RingOfYaxche RoyalBow diff --git a/pkg/shortcut/weapons.go b/pkg/shortcut/weapons.go index 4c8ccf956..d87585d1a 100644 --- a/pkg/shortcut/weapons.go +++ b/pkg/shortcut/weapons.go @@ -239,6 +239,8 @@ var WeaponNameToKey = map[string]keys.Weapon{ "recurve": keys.RecurveBow, "redhornstonethresher": keys.RedhornStonethresher, "redhorn": keys.RedhornStonethresher, + "reliquaryoftruth": keys.ReliquaryOfTruth, + "reliquary": keys.ReliquaryOfTruth, "rightfulreward": keys.RightfulReward, "ringofyaxche": keys.RingOfYaxche, "royalbow": keys.RoyalBow, diff --git a/pkg/simulation/imports.go b/pkg/simulation/imports.go index 93fffc8b5..9893c69d1 100644 --- a/pkg/simulation/imports.go +++ b/pkg/simulation/imports.go @@ -137,6 +137,7 @@ import ( _ "github.com/genshinsim/gcsim/internal/weapons/catalyst/pocket" _ "github.com/genshinsim/gcsim/internal/weapons/catalyst/prayer" _ "github.com/genshinsim/gcsim/internal/weapons/catalyst/prototype" + _ "github.com/genshinsim/gcsim/internal/weapons/catalyst/reliquary" _ "github.com/genshinsim/gcsim/internal/weapons/catalyst/ringofyaxche" _ "github.com/genshinsim/gcsim/internal/weapons/catalyst/royal" _ "github.com/genshinsim/gcsim/internal/weapons/catalyst/sacrifical" diff --git a/ui/packages/docs/docs/reference/weapons/reliquaryoftruth.md b/ui/packages/docs/docs/reference/weapons/reliquaryoftruth.md new file mode 100644 index 000000000..3ccf8f5bd --- /dev/null +++ b/ui/packages/docs/docs/reference/weapons/reliquaryoftruth.md @@ -0,0 +1,30 @@ +--- +title: > + Reliquary of Truth +--- + +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 + + + +## Known issues + + + +## Names + + + +## Params + + + +## Fields + + diff --git a/ui/packages/docs/src/components/Names/weapon_data.json b/ui/packages/docs/src/components/Names/weapon_data.json index f7f9a4f23..1895f8721 100644 --- a/ui/packages/docs/src/components/Names/weapon_data.json +++ b/ui/packages/docs/src/components/Names/weapon_data.json @@ -309,6 +309,9 @@ "redhornstonethresher": [ "redhorn" ], + "reliquaryoftruth": [ + "reliquary" + ], "rightfulreward": [], "ringofyaxche": [], "royalbow": [], diff --git a/ui/packages/localization/src/locales/names.generated.json b/ui/packages/localization/src/locales/names.generated.json index 78c0d23da..1a548ac14 100644 --- a/ui/packages/localization/src/locales/names.generated.json +++ b/ui/packages/localization/src/locales/names.generated.json @@ -248,6 +248,7 @@ "ravenbow": "鸦羽弓", "recurvebow": "反曲弓", "redhornstonethresher": "赤角石溃杵", + "reliquaryoftruth": "真语秘匣", "rightfulreward": "公义的酬报", "ringofyaxche": "木棉之环", "royalbow": "宗室长弓", @@ -1044,6 +1045,7 @@ "ravenbow": "Raven Bow", "recurvebow": "Recurve Bow", "redhornstonethresher": "Redhorn Stonethresher", + "reliquaryoftruth": "Reliquary of Truth", "rightfulreward": "Rightful Reward", "ringofyaxche": "Ring of Yaxche", "royalbow": "Royal Bow", @@ -1840,6 +1842,7 @@ "ravenbow": "Rabenbogen", "recurvebow": "Reflexbogen", "redhornstonethresher": "Rothorn-Steinbrecher", + "reliquaryoftruth": "Kästchen der Wahrheit", "rightfulreward": "Rechtmäßige Belohnung", "ringofyaxche": "Yaxche-Ring", "royalbow": "Königlicher Langbogen", @@ -2636,6 +2639,7 @@ "ravenbow": "鴉羽の弓", "recurvebow": "リカーブボウ", "redhornstonethresher": "赤角石塵滅砕", + "reliquaryoftruth": "真言の匣", "rightfulreward": "正義の報酬", "ringofyaxche": "ヤシュチェの環", "royalbow": "旧貴族長弓", @@ -3432,6 +3436,7 @@ "ravenbow": "까마귀깃 활", "recurvebow": "곡궁", "redhornstonethresher": "쇄석의 붉은 뿔", + "reliquaryoftruth": "진실의 함", "rightfulreward": "공의의 보상", "ringofyaxche": "약스체의 고리", "royalbow": "왕실의 장궁", @@ -4228,6 +4233,7 @@ "ravenbow": "Лук ворона", "recurvebow": "Изогнутый лук", "redhornstonethresher": "Краснорогий камнеруб", + "reliquaryoftruth": "Шкатулка истин", "rightfulreward": "Справедливая награда", "ringofyaxche": "Кольцо Яшче", "royalbow": "Королевский лук", @@ -5024,6 +5030,7 @@ "ravenbow": "Arco de Cuervo", "recurvebow": "Arco Recurvo", "redhornstonethresher": "Espadón Cornirrojo", + "reliquaryoftruth": "Relicario de la Verdad", "rightfulreward": "Retribución de la Justicia", "ringofyaxche": "Anillo del Yaxché", "royalbow": "Arco Real", diff --git a/ui/packages/ui/src/Data/weapon_data.generated.json b/ui/packages/ui/src/Data/weapon_data.generated.json index 42fed788c..77f531722 100644 --- a/ui/packages/ui/src/Data/weapon_data.generated.json +++ b/ui/packages/ui/src/Data/weapon_data.generated.json @@ -1064,6 +1064,14 @@ "image_name": "UI_EquipIcon_Claymore_Itadorimaru", "name_text_hash_map ": "3914951691" }, + "reliquaryoftruth": { + "id": 14521, + "key": "reliquaryoftruth", + "rarity": 5, + "weapon_class": "WEAPON_CATALYST", + "image_name": "UI_EquipIcon_Catalyst_Sistrum", + "name_text_hash_map ": "1566338363" + }, "rightfulreward": { "id": 13425, "key": "rightfulreward",