@@ -63,6 +63,31 @@ func (value *APLValueCurrentHealthPercent) String() string {
6363 return fmt .Sprintf ("Current Health %%" )
6464}
6565
66+ type APLValueMaxHealth struct {
67+ DefaultAPLValueImpl
68+ unit * Unit
69+ }
70+
71+ func (rot * APLRotation ) newValueMaxHealth (_ * proto.APLValueMaxHealth , uuid * proto.UUID ) APLValue {
72+ unit := rot .unit
73+ if ! unit .HasHealthBar () {
74+ rot .ValidationMessageByUUID (uuid , proto .LogLevel_Warning , "%s does not use Health" , unit .Label )
75+ return nil
76+ }
77+ return & APLValueMaxHealth {
78+ unit : unit ,
79+ }
80+ }
81+ func (value * APLValueMaxHealth ) Type () proto.APLValueType {
82+ return proto .APLValueType_ValueTypeFloat
83+ }
84+ func (value * APLValueMaxHealth ) GetFloat (sim * Simulation ) float64 {
85+ return value .unit .MaxHealth ()
86+ }
87+ func (value * APLValueMaxHealth ) String () string {
88+ return "Max Health"
89+ }
90+
6691type APLValueCurrentMana struct {
6792 DefaultAPLValueImpl
6893 unit UnitReference
@@ -124,7 +149,7 @@ type APLValueCurrentRage struct {
124149 unit * Unit
125150}
126151
127- func (rot * APLRotation ) newValueCurrentRage (config * proto.APLValueCurrentRage , uuid * proto.UUID ) APLValue {
152+ func (rot * APLRotation ) newValueCurrentRage (_ * proto.APLValueCurrentRage , uuid * proto.UUID ) APLValue {
128153 unit := rot .unit
129154 if ! unit .HasRageBar () {
130155 rot .ValidationMessageByUUID (uuid , proto .LogLevel_Warning , "%s does not use Rage" , unit .Label )
@@ -149,7 +174,7 @@ type APLValueCurrentFocus struct {
149174 unit * Unit
150175}
151176
152- func (rot * APLRotation ) newValueCurrentFocus (config * proto.APLValueCurrentFocus , uuid * proto.UUID ) APLValue {
177+ func (rot * APLRotation ) newValueCurrentFocus (_ * proto.APLValueCurrentFocus , uuid * proto.UUID ) APLValue {
153178 unit := rot .unit
154179 if ! unit .HasFocusBar () {
155180 rot .ValidationMessageByUUID (uuid , proto .LogLevel_Warning , "%s does not use Focus" , unit .Label )
@@ -260,7 +285,7 @@ type APLValueCurrentEnergy struct {
260285 unit * Unit
261286}
262287
263- func (rot * APLRotation ) newValueCurrentEnergy (config * proto.APLValueCurrentEnergy , uuid * proto.UUID ) APLValue {
288+ func (rot * APLRotation ) newValueCurrentEnergy (_ * proto.APLValueCurrentEnergy , uuid * proto.UUID ) APLValue {
264289 unit := rot .unit
265290 if ! unit .HasEnergyBar () {
266291 rot .ValidationMessageByUUID (uuid , proto .LogLevel_Warning , "%s does not use Energy" , unit .Label )
@@ -368,7 +393,7 @@ type APLValueCurrentComboPoints struct {
368393 unit * Unit
369394}
370395
371- func (rot * APLRotation ) newValueCurrentComboPoints (config * proto.APLValueCurrentComboPoints , uuid * proto.UUID ) APLValue {
396+ func (rot * APLRotation ) newValueCurrentComboPoints (_ * proto.APLValueCurrentComboPoints , uuid * proto.UUID ) APLValue {
372397 unit := rot .unit
373398 if ! unit .HasEnergyBar () {
374399 rot .ValidationMessageByUUID (uuid , proto .LogLevel_Warning , "%s does not use Combo Points" , unit .Label )
@@ -418,7 +443,7 @@ type APLValueCurrentRunicPower struct {
418443 unit * Unit
419444}
420445
421- func (rot * APLRotation ) newValueCurrentRunicPower (config * proto.APLValueCurrentRunicPower , uuid * proto.UUID ) APLValue {
446+ func (rot * APLRotation ) newValueCurrentRunicPower (_ * proto.APLValueCurrentRunicPower , uuid * proto.UUID ) APLValue {
422447 unit := rot .unit
423448 if ! unit .HasRunicPowerBar () {
424449 rot .ValidationMessageByUUID (uuid , proto .LogLevel_Warning , "%s does not use Runic Power" , unit .Label )
0 commit comments