Class CaptureHealth
java.lang.Object
com.pixelmonmod.pixelmon.api.pokemon.catching.CaptureHealth
Class for storing health values and Pokémon references for capture calculation purposes.
-
Constructor Summary
ConstructorDescriptionCaptureHealth
(RaidData.RaidPlayer raidPlayer, RaidData raid) Constructs a new CaptureHealth representing a raid capture.CaptureHealth
(PixelmonEntity entity) Constructs a new CaptureHealth representing a regular capture (in battle or out of battle, not a raid). -
Method Summary
Modifier and TypeMethodDescriptiondouble
Gets the current HP for the purposes of the capture attempt this object is associated with.Gets thePixelmonEntity
associated with the capture attempt this object is associated with.double
getMaxHP()
Gets the max HP for the purposes of the capture attempt this object is associated with.getRaid()
Gets theRaidData
associated with the capture attempt this object is associated with.Gets theRaidData.RaidPlayer
associated with the capture attempt this object is associated with.Gets thePixelmonWrapper
associated with the capture attempt this object is associated with.boolean
Whether there is aPixelmonEntity
associated with the capture attempt this object is associated with.boolean
Whether there is aPixelmonWrapper
associated with the capture attempt this object is associated with.boolean
isRaid()
Whether there is aRaidData
andRaidData.RaidPlayer
associated with the capture attempt this object is associated with.
-
Constructor Details
-
CaptureHealth
Constructs a new CaptureHealth representing a regular capture (in battle or out of battle, not a raid).- Parameters:
entity
- ThePixelmonEntity
being caught.
-
CaptureHealth
Constructs a new CaptureHealth representing a raid capture.- Parameters:
raidPlayer
- TheRaidData.RaidPlayer
instance performing this capture.raid
- TheRaidData
this capture is part of.
-
-
Method Details
-
getCurrentHP
public double getCurrentHP()Gets the current HP for the purposes of the capture attempt this object is associated with.- Returns:
- The current HP value.
-
getMaxHP
public double getMaxHP()Gets the max HP for the purposes of the capture attempt this object is associated with.- Returns:
- The max HP value.
-
hasEntity
public boolean hasEntity()Whether there is aPixelmonEntity
associated with the capture attempt this object is associated with.- Returns:
- Whether there is a
PixelmonEntity
associated with the capture attempt this object is associated with.
-
getEntity
Gets thePixelmonEntity
associated with the capture attempt this object is associated with.- Returns:
- The
PixelmonEntity
for the capture attempt this object is associated with.
-
hasWrapper
public boolean hasWrapper()Whether there is aPixelmonWrapper
associated with the capture attempt this object is associated with.- Returns:
- Whether there is a
PixelmonWrapper
associated with the capture attempt this object is associated with.
-
getWrapper
Gets thePixelmonWrapper
associated with the capture attempt this object is associated with.- Returns:
- The
PixelmonWrapper
for the capture attempt this object is associated with.
-
isRaid
public boolean isRaid()Whether there is aRaidData
andRaidData.RaidPlayer
associated with the capture attempt this object is associated with.- Returns:
- Whether there is a
RaidData
andRaidData.RaidPlayer
associated with the capture attempt this object is associated with.
-
getRaidPlayer
Gets theRaidData.RaidPlayer
associated with the capture attempt this object is associated with.- Returns:
- The
RaidData.RaidPlayer
for the capture attempt this object is associated with.
-
getRaid
Gets theRaidData
associated with the capture attempt this object is associated with.- Returns:
- The
RaidData
for the capture attempt this object is associated with.
-