From 6c31f958551553bdbd0ff2891ae7e0de9b4c0087 Mon Sep 17 00:00:00 2001 From: kdovtdc Date: Tue, 3 Dec 2024 21:22:33 +0100 Subject: [PATCH 1/2] Add `StatusType` field to `info.Modifier` added field so that it can be used for impls requiring to see if the mod applied has a certain `StatusType` (e.g. It's Showtime LC, Pioneer Relic set) --- pkg/engine/info/modifier.go | 3 +++ pkg/engine/modifier/modifier.go | 1 + 2 files changed, 4 insertions(+) diff --git a/pkg/engine/info/modifier.go b/pkg/engine/info/modifier.go index e2149393..7857da8d 100644 --- a/pkg/engine/info/modifier.go +++ b/pkg/engine/info/modifier.go @@ -62,6 +62,9 @@ type Modifier struct { // Any additional weaknesses that are applied to the target by this modifier. Weakness WeaknessMap `exhaustruct:"optional" json:"weakness"` + // The type of status this modifier is (BUFF, DEBUFF, or OTHER). If unspecified, will default to OTHER + StatusType model.StatusType `exhaustruct:"optional" json:"statustype"` + // CanDispel indicates whether the modifier can be removed through dispel effects. // If true, the modifier can be targeted and removed by dispel abilities; if false (default), // it is immune to dispel. diff --git a/pkg/engine/modifier/modifier.go b/pkg/engine/modifier/modifier.go index 1d47ef3b..6d6aed5f 100644 --- a/pkg/engine/modifier/modifier.go +++ b/pkg/engine/modifier/modifier.go @@ -237,6 +237,7 @@ func (mi *Instance) ToModel() info.Modifier { CountAddWhenStack: mi.countAddWhenStack, Stats: props, DebuffRES: res, + StatusType: mi.statusType, CanDispel: mi.canDispel, } } From 211d987ba13763ed652abf20799dd3e517e0ce8f Mon Sep 17 00:00:00 2001 From: kdovtdc Date: Tue, 3 Dec 2024 21:44:22 +0100 Subject: [PATCH 2/2] Fix typo --- pkg/engine/info/modifier.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/engine/info/modifier.go b/pkg/engine/info/modifier.go index 7857da8d..2ed27c77 100644 --- a/pkg/engine/info/modifier.go +++ b/pkg/engine/info/modifier.go @@ -63,7 +63,7 @@ type Modifier struct { Weakness WeaknessMap `exhaustruct:"optional" json:"weakness"` // The type of status this modifier is (BUFF, DEBUFF, or OTHER). If unspecified, will default to OTHER - StatusType model.StatusType `exhaustruct:"optional" json:"statustype"` + StatusType model.StatusType `exhaustruct:"optional" json:"status_type"` // CanDispel indicates whether the modifier can be removed through dispel effects. // If true, the modifier can be targeted and removed by dispel abilities; if false (default),