Class LifeDrainAreaFactory
java.lang.Object
games.stendhal.server.entity.mapstuff.area.OccupantAreaFactory
games.stendhal.server.entity.mapstuff.area.LifeDrainAreaFactory
- All Implemented Interfaces:
ConfigurableFactory
A base factory for
LifeDrainArea
objects.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected OccupantArea
Creates the OccupantArea.protected double
Extract the damage ratio from a context.protected int
Extract the minimum damage amount from a context.Methods inherited from class games.stendhal.server.entity.mapstuff.area.OccupantAreaFactory
create, getHeight, getInterval, getPlayersOnly, getWidth
-
Constructor Details
-
LifeDrainAreaFactory
public LifeDrainAreaFactory()
-
-
Method Details
-
getDamageRatio
Extract the damage ratio from a context.- Parameters:
ctx
- The configuration context.- Returns:
- The damage ratio (or 10% is unset).
-
getMimimumDamage
Extract the minimum damage amount from a context.- Parameters:
ctx
- The configuration context.- Returns:
- The minimum damage amount (or 10 is unset).
-
createArea
Creates the OccupantArea.- Specified by:
createArea
in classOccupantAreaFactory
- Parameters:
ctx
- The configuration context.- Returns:
- An OccupantArea.
- Throws:
IllegalArgumentException
- in case of an invalid configuration
-