-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy patheagle.go
More file actions
55 lines (50 loc) · 1.35 KB
/
eagle.go
File metadata and controls
55 lines (50 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package eagle
import (
"github.com/simimpact/srsim/pkg/engine"
"github.com/simimpact/srsim/pkg/engine/equip/relic"
"github.com/simimpact/srsim/pkg/engine/event"
"github.com/simimpact/srsim/pkg/engine/info"
"github.com/simimpact/srsim/pkg/engine/modifier"
"github.com/simimpact/srsim/pkg/engine/prop"
"github.com/simimpact/srsim/pkg/key"
"github.com/simimpact/srsim/pkg/model"
)
const eagle = "eagle-of-twilight-thunder"
// 2pc: Increases Wind DMG by 10%.
// 4pc: After the wearer uses their Ultimate, their action is Advanced Forward by 25%.
func init() {
relic.Register(key.EagleOfTwilightLine, relic.Config{
Effects: []relic.SetEffect{
{
MinCount: 2,
Stats: info.PropMap{prop.WindDamagePercent: 0.1},
CreateEffect: nil,
},
{
MinCount: 4,
Stats: nil,
CreateEffect: func(engine engine.Engine, owner key.TargetID) {
engine.AddModifier(owner, info.Modifier{
Name: eagle,
Source: owner,
})
},
},
},
})
modifier.Register(eagle, modifier.Config{
Listeners: modifier.Listeners{
OnAfterAction: onAfterUltimate,
},
})
}
func onAfterUltimate(mod *modifier.Instance, e event.ActionEnd) {
if e.AttackType == model.AttackType_ULT {
mod.Engine().ModifyGaugeNormalized(info.ModifyAttribute{
Key: eagle,
Target: mod.Owner(),
Source: mod.Owner(),
Amount: -0.25,
})
}
}