Skip to content

Commit 66ca41e

Browse files
committed
Added Azurelight
1 parent bf52299 commit 66ca41e

9 files changed

Lines changed: 188 additions & 0 deletions

File tree

internal/services/assets/weapons_gen.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
package azurelight
2+
3+
import (
4+
"fmt"
5+
6+
"github.com/genshinsim/gcsim/pkg/core"
7+
"github.com/genshinsim/gcsim/pkg/core/attributes"
8+
"github.com/genshinsim/gcsim/pkg/core/event"
9+
"github.com/genshinsim/gcsim/pkg/core/info"
10+
"github.com/genshinsim/gcsim/pkg/core/keys"
11+
"github.com/genshinsim/gcsim/pkg/core/player/character"
12+
"github.com/genshinsim/gcsim/pkg/modifier"
13+
)
14+
15+
func init() {
16+
core.RegisterWeaponFunc(keys.Azurelight, NewWeapon)
17+
}
18+
19+
const (
20+
buffKey = "azurelight-buff"
21+
)
22+
23+
type Weapon struct {
24+
Index int
25+
}
26+
27+
func (w *Weapon) SetIndex(idx int) { w.Index = idx }
28+
func (w *Weapon) Init() error { return nil }
29+
func NewWeapon(c *core.Core, char *character.CharWrapper, p info.WeaponProfile) (info.Weapon, error) {
30+
var w Weapon
31+
refine := p.Refine
32+
33+
m := make([]float64, attributes.EndStatType)
34+
atkp := 0.18 + 0.06*float64(refine)
35+
cd := 0.30 + 0.10*float64(refine)
36+
37+
c.Events.Subscribe(event.OnSkill, func(args ...interface{}) bool {
38+
// don't proc if someone else used a skill
39+
if c.Player.Active() != char.Index {
40+
return false
41+
}
42+
43+
// add buff
44+
char.AddStatMod(character.StatMod{
45+
Base: modifier.NewBaseWithHitlag(buffKey, 12*60),
46+
AffectedStat: attributes.NoStat,
47+
Amount: func() ([]float64, bool) {
48+
if char.Energy == 0 {
49+
m[attributes.ATKP] = atkp * 2
50+
m[attributes.CD] = cd
51+
} else {
52+
m[attributes.ATKP] = atkp
53+
m[attributes.CD] = 0
54+
}
55+
return m, true
56+
},
57+
})
58+
59+
return false
60+
}, fmt.Sprintf("azurelight-%v", char.Base.Key))
61+
62+
return &w, nil
63+
}

internal/weapons/sword/azurelight/azurelight_gen.go

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package_name: azurelight
2+
genshin_id: 11517
3+
key: azurelight
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
id: 11517
2+
key: "azurelight"
3+
rarity: 5
4+
weapon_class: WEAPON_SWORD_ONE_HAND
5+
image_name: "UI_EquipIcon_Sword_OuterSword"
6+
base_stats: {
7+
base_props: {
8+
prop_type: FIGHT_PROP_BASE_ATTACK
9+
initial_value: 47.537
10+
curve: GROW_CURVE_ATTACK_302
11+
}
12+
base_props: {
13+
prop_type: FIGHT_PROP_CRITICAL
14+
initial_value: 0.048
15+
curve: GROW_CURVE_CRITICAL_301
16+
}
17+
promo_data: {
18+
max_level: 20
19+
}
20+
promo_data: {
21+
max_level: 40
22+
add_props: {
23+
prop_type: FIGHT_PROP_BASE_ATTACK
24+
value: 31.1
25+
}
26+
}
27+
promo_data: {
28+
max_level: 50
29+
add_props: {
30+
prop_type: FIGHT_PROP_BASE_ATTACK
31+
value: 62.2
32+
}
33+
}
34+
promo_data: {
35+
max_level: 60
36+
add_props: {
37+
prop_type: FIGHT_PROP_BASE_ATTACK
38+
value: 93.4
39+
}
40+
}
41+
promo_data: {
42+
max_level: 70
43+
add_props: {
44+
prop_type: FIGHT_PROP_BASE_ATTACK
45+
value: 124.5
46+
}
47+
}
48+
promo_data: {
49+
max_level: 80
50+
add_props: {
51+
prop_type: FIGHT_PROP_BASE_ATTACK
52+
value: 155.6
53+
}
54+
}
55+
promo_data: {
56+
max_level: 90
57+
add_props: {
58+
prop_type: FIGHT_PROP_BASE_ATTACK
59+
value: 186.7
60+
}
61+
}
62+
}
63+
name_text_hash_map: 1479741275

pkg/core/keys/weapon.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ var weaponNames = []string{
4545
"astralvulturescrimsonplumage",
4646
"athousandblazingsuns",
4747
"athousandfloatingdreams",
48+
"azurelight",
4849
"balladoftheboundlessblue",
4950
"balladofthefjords",
5051
"beaconofthereedsea",
@@ -258,6 +259,7 @@ const (
258259
AstralVulturesCrimsonPlumage
259260
AThousandBlazingSuns
260261
AThousandFloatingDreams
262+
Azurelight
261263
BalladOfTheBoundlessBlue
262264
BalladOfTheFjords
263265
BeaconOfTheReedSea

pkg/shortcut/weapons.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ var WeaponNameToKey = map[string]keys.Weapon{
2727
"athousandfloatingdreams": keys.AThousandFloatingDreams,
2828
"thousandfloatingdreams": keys.AThousandFloatingDreams,
2929
"tfd": keys.AThousandFloatingDreams,
30+
"azurelight": keys.Azurelight,
3031
"balladoftheboundlessblue": keys.BalladOfTheBoundlessBlue,
3132
"boundlessblue": keys.BalladOfTheBoundlessBlue,
3233
"balladofthefjords": keys.BalladOfTheFjords,

pkg/simulation/imports.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ import (
229229
_ "github.com/genshinsim/gcsim/internal/weapons/sword/alley"
230230
_ "github.com/genshinsim/gcsim/internal/weapons/sword/amenoma"
231231
_ "github.com/genshinsim/gcsim/internal/weapons/sword/aquila"
232+
_ "github.com/genshinsim/gcsim/internal/weapons/sword/azurelight"
232233
_ "github.com/genshinsim/gcsim/internal/weapons/sword/blackcliff"
233234
_ "github.com/genshinsim/gcsim/internal/weapons/sword/blacksword"
234235
_ "github.com/genshinsim/gcsim/internal/weapons/sword/calamityofeshu"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: Azurelight
3+
---
4+
5+
import AoETable from "@site/src/components/AoE/AoETable";
6+
import IssuesTable from "@site/src/components/Issues/IssuesTable";
7+
import NamesList from "@site/src/components/Names/NamesList";
8+
import ParamsTable from "@site/src/components/Params/ParamsTable";
9+
import FieldsTable from "@site/src/components/Fields/FieldsTable";
10+
11+
## AoE Data
12+
13+
<AoETable item_key="azurelight" data_src="weapon" />
14+
15+
## Known issues
16+
17+
<IssuesTable item_key="azurelight" data_src="weapon" />
18+
19+
## Names
20+
21+
<NamesList item_key="azurelight" data_src="weapon" />
22+
23+
## Params
24+
25+
<ParamsTable item_key="azurelight" data_src="weapon" />
26+
27+
## Fields
28+
29+
<FieldsTable item_key="azurelight" data_src="weapon" />

0 commit comments

Comments
 (0)