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/reliquary/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package_name: reliquary
genshin_id: 14521
key: reliquaryoftruth
63 changes: 63 additions & 0 deletions internal/weapons/catalyst/reliquary/data_gen.textproto
Original file line number Diff line number Diff line change
@@ -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
110 changes: 110 additions & 0 deletions internal/weapons/catalyst/reliquary/reliquary.go
Original file line number Diff line number Diff line change
@@ -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
},
})
}
25 changes: 25 additions & 0 deletions internal/weapons/catalyst/reliquary/reliquary_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 @@ -166,6 +166,7 @@ var weaponNames = []string{
"ravenbow",
"recurvebow",
"redhornstonethresher",
"reliquaryoftruth",
"rightfulreward",
"ringofyaxche",
"royalbow",
Expand Down Expand Up @@ -386,6 +387,7 @@ const (
RavenBow
RecurveBow
RedhornStonethresher
ReliquaryOfTruth
RightfulReward
RingOfYaxche
RoyalBow
Expand Down
2 changes: 2 additions & 0 deletions pkg/shortcut/weapons.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions pkg/simulation/imports.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
30 changes: 30 additions & 0 deletions ui/packages/docs/docs/reference/weapons/reliquaryoftruth.md
Original file line number Diff line number Diff line change
@@ -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

<AoETable item_key="reliquaryoftruth" data_src="weapon" />

## Known issues

<IssuesTable item_key="reliquaryoftruth" data_src="weapon" />

## Names

<NamesList item_key="reliquaryoftruth" data_src="weapon" />

## Params

<ParamsTable item_key="reliquaryoftruth" data_src="weapon" />

## Fields

<FieldsTable item_key="reliquaryoftruth" 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 @@ -309,6 +309,9 @@
"redhornstonethresher": [
"redhorn"
],
"reliquaryoftruth": [
"reliquary"
],
"rightfulreward": [],
"ringofyaxche": [],
"royalbow": [],
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 @@ -248,6 +248,7 @@
"ravenbow": "鸦羽弓",
"recurvebow": "反曲弓",
"redhornstonethresher": "赤角石溃杵",
"reliquaryoftruth": "真语秘匣",
"rightfulreward": "公义的酬报",
"ringofyaxche": "木棉之环",
"royalbow": "宗室长弓",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -2636,6 +2639,7 @@
"ravenbow": "鴉羽の弓",
"recurvebow": "リカーブボウ",
"redhornstonethresher": "赤角石塵滅砕",
"reliquaryoftruth": "真言の匣",
"rightfulreward": "正義の報酬",
"ringofyaxche": "ヤシュチェの環",
"royalbow": "旧貴族長弓",
Expand Down Expand Up @@ -3432,6 +3436,7 @@
"ravenbow": "까마귀깃 활",
"recurvebow": "곡궁",
"redhornstonethresher": "쇄석의 붉은 뿔",
"reliquaryoftruth": "진실의 함",
"rightfulreward": "공의의 보상",
"ringofyaxche": "약스체의 고리",
"royalbow": "왕실의 장궁",
Expand Down Expand Up @@ -4228,6 +4233,7 @@
"ravenbow": "Лук ворона",
"recurvebow": "Изогнутый лук",
"redhornstonethresher": "Краснорогий камнеруб",
"reliquaryoftruth": "Шкатулка истин",
"rightfulreward": "Справедливая награда",
"ringofyaxche": "Кольцо Яшче",
"royalbow": "Королевский лук",
Expand Down Expand Up @@ -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",
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 @@ -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",
Expand Down