Package moe.maika.ygofm.gamedata
Class Pool
java.lang.Object
moe.maika.ygofm.gamedata.Pool
Implementation of drop pools.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
An immutable class representing a card and its probability of being dropped.static enum
The type of drop pool. -
Method Summary
Modifier and TypeMethodDescriptionReturns all entries in this pool.getAllEntries
(Predicate<Pool.Entry> filter) Returns all entries in this pool that match the given filter.getDrop
(int rand) Returns the card dropped by the AI when using this pool for the given RNG value.Returns the card dropped by the AI when using this pool for the given RNG seed.getEntry
(int cardId) Returns thePool.Entry
for the given card ID.Returns thePool.Entry
for the given card.
-
Method Details
-
getDrop
Returns the card dropped by the AI when using this pool for the given RNG value.- Parameters:
rand
- the value returned by FM'srand()
function (before modulo)- Returns:
- the card dropped, or the card added to the AI's deck if called on the Deck pool
-
getDrop
Returns the card dropped by the AI when using this pool for the given RNG seed.- Parameters:
seed
- the RNG seed- Returns:
- the card dropped, or the card added to the AI's deck if called on the Deck pool
-
getEntry
Returns thePool.Entry
for the given card ID.- Parameters:
cardId
-- Returns:
- the entry for the given card ID, or null if the card is not in the pool
-
getEntry
Returns thePool.Entry
for the given card.- Parameters:
card
-- Returns:
- the entry for the given card, or null if the card is not in the pool
-
getAllEntries
Returns all entries in this pool.- Returns:
- all entries in this pool
-
getAllEntries
Returns all entries in this pool that match the given filter.- Parameters:
filter
-- Returns:
- all entries in this pool that match the given filter
-