Class EnvironmentEntityList
java.lang.Object
net.demilich.metastone.game.spells.custom.EnvironmentEntityList
- All Implemented Interfaces:
Serializable
,Cloneable
,EnvironmentValue
Stores a list of entities in the environment, instead of on an attribute on an entity.
This class behaves like a multimap of source
entity keys and EntityReference
values. Use getList(GameContext)
to retrieve the general entity list, or use getList(GameContext, Environment)
for an
entity list named by a particular environment variable.
Use getCards(GameContext, Entity)
to get a list of cards associated with a specific source
entity.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
getCards
(GameContext context, Entity source) Retrieves a read-only view of a list of cards from this list.getCopy()
static EnvironmentEntityList
getList
(GameContext context) static EnvironmentEntityList
getList
(GameContext context, Environment environmentVariable) getReferences
(Entity source) Gets a list of referenced cards.
-
Constructor Details
-
EnvironmentEntityList
public EnvironmentEntityList()
-
-
Method Details
-
getList
- Parameters:
context
-- Returns:
-
getList
-
getCopy
- Specified by:
getCopy
in interfaceEnvironmentValue
-
add
-
clear
-
getReferences
Gets a list of referenced cards. This reference will always reflect the underlying list as it gets changed, but is not mutable- Parameters:
source
-- Returns:
- See Also:
-
getCards
Retrieves a read-only view of a list of cards from this list.- Parameters:
context
-source
-- Returns:
-