Record Class ConsumableEffectOutcome
java.lang.Object
java.lang.Record
idlab.colonyops.model.events.ConsumableEffectOutcome
- Record Components:
consumableType- the type of consumable that firedturnsLeft- remaining turns of the consumable after this tick (0 = expired this turn)healAmount- HP restored this tick; only present forConsumableType.MEDIC_KITusesRestored- uses restored to the weapon this tick; only present forConsumableType.AMMO_PACKweaponUsesLeft- total uses left on the weapon after the restore; only present forConsumableType.AMMO_PACK
- All Implemented Interfaces:
ActionOutcome
public record ConsumableEffectOutcome(ConsumableType consumableType, int turnsLeft, Integer healAmount, Integer usesRestored, Integer weaponUsesLeft)
extends Record
implements ActionOutcome
Outcome for a passive per-turn consumable effect.
Reported every turn for ConsumableType.MEDIC_KIT and ConsumableType.AMMO_PACK.
JETPACK and MAGMA_BORE are not reported this way; their effect applies at the point of use.
-
Constructor Summary
ConstructorsConstructorDescriptionConsumableEffectOutcome(ConsumableType consumableType, int turnsLeft, Integer healAmount, Integer usesRestored, Integer weaponUsesLeft) Creates an instance of aConsumableEffectOutcomerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconsumableTyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thehealAmountrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of theturnsLeftrecord component.Returns the value of theusesRestoredrecord component.Returns the value of theweaponUsesLeftrecord component.
-
Constructor Details
-
ConsumableEffectOutcome
public ConsumableEffectOutcome(ConsumableType consumableType, int turnsLeft, Integer healAmount, Integer usesRestored, Integer weaponUsesLeft) Creates an instance of aConsumableEffectOutcomerecord class.- Parameters:
consumableType- the value for theconsumableTyperecord componentturnsLeft- the value for theturnsLeftrecord componenthealAmount- the value for thehealAmountrecord componentusesRestored- the value for theusesRestoredrecord componentweaponUsesLeft- the value for theweaponUsesLeftrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
consumableType
Returns the value of theconsumableTyperecord component.- Returns:
- the value of the
consumableTyperecord component
-
turnsLeft
-
healAmount
Returns the value of thehealAmountrecord component.- Returns:
- the value of the
healAmountrecord component
-
usesRestored
Returns the value of theusesRestoredrecord component.- Returns:
- the value of the
usesRestoredrecord component
-
weaponUsesLeft
Returns the value of theweaponUsesLeftrecord component.- Returns:
- the value of the
weaponUsesLeftrecord component
-