diff --git a/internal/services/assets/weapons_gen.go b/internal/services/assets/weapons_gen.go index 646fc7d33..86c052f32 100644 --- a/internal/services/assets/weapons_gen.go +++ b/internal/services/assets/weapons_gen.go @@ -161,6 +161,7 @@ var weaponMap = map[string]string{ "aquilafavonia": "UI_EquipIcon_Sword_Falcon", "blackclifflongsword": "UI_EquipIcon_Sword_Blackrock", "theblacksword": "UI_EquipIcon_Sword_Bloodstained", + "calamityofeshu": "UI_EquipIcon_Sword_SacrificialNgombe", "cinnabarspindle": "UI_EquipIcon_Sword_Opus", "coolsteel": "UI_EquipIcon_Sword_Steel", "darkironsword": "UI_EquipIcon_Sword_Darker", diff --git a/internal/weapons/sword/calamityofeshu/calamityofeshu.go b/internal/weapons/sword/calamityofeshu/calamityofeshu.go new file mode 100644 index 000000000..ff4a5e947 --- /dev/null +++ b/internal/weapons/sword/calamityofeshu/calamityofeshu.go @@ -0,0 +1,46 @@ +package calamityofeshu + +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/combat" + "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.CalamityOfEshu, 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 := float64(p.Refine) + + m := make([]float64, attributes.EndStatType) + m[attributes.DmgP] = 0.15 + 0.05*r + m[attributes.CR] = 0.06 + 0.02*r + char.AddAttackMod(character.AttackMod{ + Base: modifier.NewBase("calamityofeshu", -1), + Amount: func(atk *combat.AttackEvent, t combat.Target) ([]float64, bool) { + if !c.Player.Shields.CharacterIsShielded(char.Index, c.Player.Active()) { + return nil, false + } + if atk.Info.AttackTag != attacks.AttackTagNormal && atk.Info.AttackTag != attacks.AttackTagExtra { + return nil, false + } + return m, true + }, + }) + + return w, nil +} diff --git a/internal/weapons/sword/calamityofeshu/calamityofeshu_gen.go b/internal/weapons/sword/calamityofeshu/calamityofeshu_gen.go new file mode 100644 index 000000000..d7c8e137a --- /dev/null +++ b/internal/weapons/sword/calamityofeshu/calamityofeshu_gen.go @@ -0,0 +1,25 @@ +// Code generated by "pipeline"; DO NOT EDIT. +package calamityofeshu + +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/internal/weapons/sword/calamityofeshu/config.yml b/internal/weapons/sword/calamityofeshu/config.yml new file mode 100644 index 000000000..ac45437d9 --- /dev/null +++ b/internal/weapons/sword/calamityofeshu/config.yml @@ -0,0 +1,3 @@ +package_name: calamityofeshu +genshin_id: 11432 +key: calamityofeshu diff --git a/internal/weapons/sword/calamityofeshu/data_gen.textproto b/internal/weapons/sword/calamityofeshu/data_gen.textproto new file mode 100644 index 000000000..2a8193790 --- /dev/null +++ b/internal/weapons/sword/calamityofeshu/data_gen.textproto @@ -0,0 +1,63 @@ +id: 11432 +key: "calamityofeshu" +rarity: 4 +weapon_class: WEAPON_SWORD_ONE_HAND +image_name: "UI_EquipIcon_Sword_SacrificialNgombe" +base_stats: { + base_props: { + prop_type: FIGHT_PROP_BASE_ATTACK + initial_value: 43.7349 + curve: GROW_CURVE_ATTACK_202 + } + base_props: { + prop_type: FIGHT_PROP_ATTACK_PERCENT + initial_value: 0.06 + curve: GROW_CURVE_CRITICAL_201 + } + promo_data: { + max_level: 20 + } + promo_data: { + max_level: 40 + add_props: { + prop_type: FIGHT_PROP_BASE_ATTACK + value: 25.9 + } + } + promo_data: { + max_level: 50 + add_props: { + prop_type: FIGHT_PROP_BASE_ATTACK + value: 51.9 + } + } + promo_data: { + max_level: 60 + add_props: { + prop_type: FIGHT_PROP_BASE_ATTACK + value: 77.8 + } + } + promo_data: { + max_level: 70 + add_props: { + prop_type: FIGHT_PROP_BASE_ATTACK + value: 103.7 + } + } + promo_data: { + max_level: 80 + add_props: { + prop_type: FIGHT_PROP_BASE_ATTACK + value: 129.7 + } + } + promo_data: { + max_level: 90 + add_props: { + prop_type: FIGHT_PROP_BASE_ATTACK + value: 155.6 + } + } +} +name_text_hash_map: 590019915 diff --git a/pkg/core/keys/weapon.go b/pkg/core/keys/weapon.go index d41b31ce1..1ec861fce 100644 --- a/pkg/core/keys/weapon.go +++ b/pkg/core/keys/weapon.go @@ -54,6 +54,7 @@ var weaponNames = []string{ "blackcliffwarbow", "blacktassel", "bloodtaintedgreatsword", + "calamityofeshu", "calamityqueller", "cashflowsupervision", "chainbreaker", @@ -257,6 +258,7 @@ const ( BlackcliffWarbow BlackTassel BloodtaintedGreatsword + CalamityOfEshu CalamityQueller CashflowSupervision ChainBreaker diff --git a/pkg/shortcut/weapons.go b/pkg/shortcut/weapons.go index f6822a3a3..6bfeab2d2 100644 --- a/pkg/shortcut/weapons.go +++ b/pkg/shortcut/weapons.go @@ -41,6 +41,7 @@ var WeaponNameToKey = map[string]keys.Weapon{ "blacktassel": keys.BlackTassel, "bloodtaintedgreatsword": keys.BloodtaintedGreatsword, "bloodtainted": keys.BloodtaintedGreatsword, + "calamityofeshu": keys.CalamityOfEshu, "calamityqueller": keys.CalamityQueller, "calamity": keys.CalamityQueller, "cashflowsupervision": keys.CashflowSupervision, diff --git a/pkg/simulation/imports.go b/pkg/simulation/imports.go index 4cddb2dac..ca8a6590d 100644 --- a/pkg/simulation/imports.go +++ b/pkg/simulation/imports.go @@ -220,6 +220,7 @@ import ( _ "github.com/genshinsim/gcsim/internal/weapons/sword/aquila" _ "github.com/genshinsim/gcsim/internal/weapons/sword/blackcliff" _ "github.com/genshinsim/gcsim/internal/weapons/sword/blacksword" + _ "github.com/genshinsim/gcsim/internal/weapons/sword/calamityofeshu" _ "github.com/genshinsim/gcsim/internal/weapons/sword/cinnabar" _ "github.com/genshinsim/gcsim/internal/weapons/sword/coolsteel" _ "github.com/genshinsim/gcsim/internal/weapons/sword/darkironsword" diff --git a/ui/packages/docs/docs/reference/weapons/calamityofeshu.md b/ui/packages/docs/docs/reference/weapons/calamityofeshu.md new file mode 100644 index 000000000..80ba4ea1d --- /dev/null +++ b/ui/packages/docs/docs/reference/weapons/calamityofeshu.md @@ -0,0 +1,29 @@ +--- +title: Calamity of Eshu +--- + +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 1d68e1b86..799dcd2a8 100644 --- a/ui/packages/docs/src/components/Names/weapon_data.json +++ b/ui/packages/docs/src/components/Names/weapon_data.json @@ -49,6 +49,7 @@ "bloodtaintedgreatsword": [ "bloodtainted" ], + "calamityofeshu": [], "calamityqueller": [ "calamity" ], diff --git a/ui/packages/ui/src/Data/weapon_data.generated.json b/ui/packages/ui/src/Data/weapon_data.generated.json index 8b18e0946..5006073c2 100644 --- a/ui/packages/ui/src/Data/weapon_data.generated.json +++ b/ui/packages/ui/src/Data/weapon_data.generated.json @@ -168,6 +168,14 @@ "image_name": "UI_EquipIcon_Claymore_Siegfry", "name_text_hash_map ": "4090429643" }, + "calamityofeshu": { + "id": 11432, + "key": "calamityofeshu", + "rarity": 4, + "weapon_class": "WEAPON_SWORD_ONE_HAND", + "image_name": "UI_EquipIcon_Sword_SacrificialNgombe", + "name_text_hash_map ": "590019915" + }, "calamityqueller": { "id": 13507, "key": "calamityqueller",