@@ -13,32 +13,32 @@ import (
1313 "github.com/genshinsim/gcsim/pkg/core/keys"
1414 "github.com/genshinsim/gcsim/pkg/core/player/character"
1515 "github.com/genshinsim/gcsim/pkg/core/targets"
16- "github.com/genshinsim/gcsim/pkg/model/reactions "
16+ "github.com/genshinsim/gcsim/pkg/model"
1717 "github.com/genshinsim/gcsim/pkg/modifier"
1818)
1919
20- var reactToElements = map [reactions .ReactionType ][]attributes.Element {
21- reactions . Overload : {attributes .Electro , attributes .Pyro },
22- reactions . Superconduct : {attributes .Electro , attributes .Cryo },
23- reactions . Melt : {attributes .Pyro , attributes .Cryo },
24- reactions . Vaporize : {attributes .Pyro , attributes .Hydro },
25- reactions . Freeze : {attributes .Cryo , attributes .Hydro },
26- reactions . ElectroCharged : {attributes .Electro , attributes .Hydro },
27- reactions . SwirlHydro : {attributes .Anemo , attributes .Hydro },
28- reactions . SwirlCryo : {attributes .Anemo , attributes .Cryo },
29- reactions . SwirlElectro : {attributes .Anemo , attributes .Electro },
30- reactions . SwirlPyro : {attributes .Anemo , attributes .Pyro },
31- reactions . CrystallizeHydro : {attributes .Geo , attributes .Hydro },
32- reactions . CrystallizeCryo : {attributes .Geo , attributes .Cryo },
33- reactions . CrystallizeElectro : {attributes .Geo , attributes .Electro },
34- reactions . CrystallizePyro : {attributes .Geo , attributes .Pyro },
35- reactions . Aggravate : {attributes .Dendro , attributes .Electro },
36- reactions . Spread : {attributes .Dendro },
37- reactions . Quicken : {attributes .Dendro , attributes .Electro },
38- reactions . Bloom : {attributes .Dendro , attributes .Hydro },
39- reactions . Hyperbloom : {attributes .Dendro , attributes .Electro },
40- reactions . Burgeon : {attributes .Dendro , attributes .Pyro },
41- reactions . Burning : {attributes .Dendro , attributes .Pyro },
20+ var reactToElements = map [model .ReactionType ][]attributes.Element {
21+ model . ReactionTypeOverload : {attributes .Electro , attributes .Pyro },
22+ model . ReactionTypeSuperconduct : {attributes .Electro , attributes .Cryo },
23+ model . ReactionTypeMelt : {attributes .Pyro , attributes .Cryo },
24+ model . ReactionTypeVaporize : {attributes .Pyro , attributes .Hydro },
25+ model . ReactionTypeFreeze : {attributes .Cryo , attributes .Hydro },
26+ model . ReactionTypeElectroCharged : {attributes .Electro , attributes .Hydro },
27+ model . ReactionTypeSwirlHydro : {attributes .Anemo , attributes .Hydro },
28+ model . ReactionTypeSwirlCryo : {attributes .Anemo , attributes .Cryo },
29+ model . ReactionTypeSwirlElectro : {attributes .Anemo , attributes .Electro },
30+ model . ReactionTypeSwirlPyro : {attributes .Anemo , attributes .Pyro },
31+ model . ReactionTypeCrystallizeHydro : {attributes .Geo , attributes .Hydro },
32+ model . ReactionTypeCrystallizeCryo : {attributes .Geo , attributes .Cryo },
33+ model . ReactionTypeCrystallizeElectro : {attributes .Geo , attributes .Electro },
34+ model . ReactionTypeCrystallizePyro : {attributes .Geo , attributes .Pyro },
35+ model . ReactionTypeAggravate : {attributes .Dendro , attributes .Electro },
36+ model . ReactionTypeSpread : {attributes .Dendro },
37+ model . ReactionTypeQuicken : {attributes .Dendro , attributes .Electro },
38+ model . ReactionTypeBloom : {attributes .Dendro , attributes .Hydro },
39+ model . ReactionTypeHyperbloom : {attributes .Dendro , attributes .Electro },
40+ model . ReactionTypeBurgeon : {attributes .Dendro , attributes .Pyro },
41+ model . ReactionTypeBurning : {attributes .Dendro , attributes .Pyro },
4242}
4343
4444func init () {
@@ -59,7 +59,7 @@ func (s *Set) SetIndex(idx int) { s.Index = idx }
5959func (s * Set ) GetCount () int { return s .Count }
6060func (s * Set ) Init () error { return nil }
6161
62- func (s * Set ) buffCB (react reactions .ReactionType , gadgetEmit bool ) func (args ... interface {}) bool {
62+ func (s * Set ) buffCB (react model .ReactionType , gadgetEmit bool ) func (args ... interface {}) bool {
6363 return func (args ... interface {}) bool {
6464 trg := args [0 ].(combat.Target )
6565 if gadgetEmit && trg .Type () != targets .TargettableGadget {
@@ -132,36 +132,36 @@ func NewSet(c *core.Core, char *character.CharWrapper, count int, param map[stri
132132 // equipping character can trigger this effect while off-field, and the DMG bonus
133133 // from Artifact Sets with the same name do not stack.
134134 if count >= 4 {
135- for evt , react := range map [event.Event ]reactions .ReactionType {
136- event .OnOverload : reactions . Overload ,
137- event .OnSuperconduct : reactions . Superconduct ,
138- event .OnMelt : reactions . Melt ,
139- event .OnVaporize : reactions . Vaporize ,
140- event .OnFrozen : reactions . Freeze ,
141- event .OnElectroCharged : reactions . ElectroCharged ,
142- event .OnSwirlHydro : reactions . SwirlHydro ,
143- event .OnSwirlCryo : reactions . SwirlCryo ,
144- event .OnSwirlElectro : reactions . SwirlElectro ,
145- event .OnSwirlPyro : reactions . SwirlPyro ,
146- event .OnCrystallizeHydro : reactions . CrystallizeHydro ,
147- event .OnCrystallizeCryo : reactions . CrystallizeCryo ,
148- event .OnCrystallizeElectro : reactions . CrystallizeElectro ,
149- event .OnCrystallizePyro : reactions . CrystallizePyro ,
150- event .OnAggravate : reactions . Aggravate ,
151- event .OnSpread : reactions . Spread ,
152- event .OnQuicken : reactions . Quicken ,
153- event .OnBloom : reactions . Bloom ,
154- event .OnHyperbloom : reactions . Hyperbloom ,
155- event .OnBurgeon : reactions . Burgeon ,
156- event .OnBurning : reactions . Burning ,
135+ for evt , react := range map [event.Event ]model .ReactionType {
136+ event .OnOverload : model . ReactionTypeOverload ,
137+ event .OnSuperconduct : model . ReactionTypeSuperconduct ,
138+ event .OnMelt : model . ReactionTypeMelt ,
139+ event .OnVaporize : model . ReactionTypeVaporize ,
140+ event .OnFrozen : model . ReactionTypeFreeze ,
141+ event .OnElectroCharged : model . ReactionTypeElectroCharged ,
142+ event .OnSwirlHydro : model . ReactionTypeSwirlHydro ,
143+ event .OnSwirlCryo : model . ReactionTypeSwirlCryo ,
144+ event .OnSwirlElectro : model . ReactionTypeSwirlElectro ,
145+ event .OnSwirlPyro : model . ReactionTypeSwirlPyro ,
146+ event .OnCrystallizeHydro : model . ReactionTypeCrystallizeHydro ,
147+ event .OnCrystallizeCryo : model . ReactionTypeCrystallizeCryo ,
148+ event .OnCrystallizeElectro : model . ReactionTypeCrystallizeElectro ,
149+ event .OnCrystallizePyro : model . ReactionTypeCrystallizePyro ,
150+ event .OnAggravate : model . ReactionTypeAggravate ,
151+ event .OnSpread : model . ReactionTypeSpread ,
152+ event .OnQuicken : model . ReactionTypeQuicken ,
153+ event .OnBloom : model . ReactionTypeBloom ,
154+ event .OnHyperbloom : model . ReactionTypeHyperbloom ,
155+ event .OnBurgeon : model . ReactionTypeBurgeon ,
156+ event .OnBurning : model . ReactionTypeBurning ,
157157 } {
158158 elements := reactToElements [react ]
159159 if ! slices .Contains (elements , char .Base .Element ) {
160160 continue
161161 }
162162 gadgetEmit := false
163163 switch react {
164- case reactions . Burgeon , reactions . Hyperbloom :
164+ case model . ReactionTypeBurgeon , model . ReactionTypeHyperbloom :
165165 gadgetEmit = true
166166 }
167167 c .Combat .Events .Subscribe (evt , s .buffCB (react , gadgetEmit ), fmt .Sprintf ("scroll-4pc-%v-%v" , react , char .Base .Key .String ()))
0 commit comments