Record Class DealDamageEffect
java.lang.Object
java.lang.Record
org.magic.api.ast.effects.DealDamageEffect
- All Implemented Interfaces:
EffectNode
public record DealDamageEffect(int amount, TargetSelectorNode target)
extends Record
implements EffectNode
-
Constructor Summary
ConstructorsConstructorDescriptionDealDamageEffect(int amount, TargetSelectorNode target) Creates an instance of aDealDamageEffectrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintamount()Returns the value of theamountrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.target()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DealDamageEffect
Creates an instance of aDealDamageEffectrecord class.- Parameters:
amount- the value for theamountrecord componenttarget- the value for thetargetrecord 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. -
amount
public int amount()Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-
target
Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-