public interface CastingCost extends Cost
A Spell may have one or more (or no) CastingCost records assigned to it.
A CastingCost can be XP (or "Mana" when provided by a wand) or Material (reagents) as costs, or a combination of both.
| Modifier and Type | Method and Description |
|---|---|
int |
getMana()
Returns the raw mana cost.
|
int |
getMana(CostReducer reducer)
Returns the Mana amount to deduct
|
int |
getXP()
Deprecated.
|
int |
getXP(CostReducer reducer)
Deprecated.
|
boolean |
has(Spell spell)
Check to see if a given spell cast should succeed, given that
it has any required costs.
|
void |
refund(Spell spell)
Refund this cost, giving it back to the caster of the target spell.
|
void |
use(Spell spell)
Use this cost, taking it from the caster of the target spell
|
checkSupported, convert, deduct, deduct, deduct, deduct, getBalance, getDescription, getDescription, getFullDescription, getFullDescription, getItemStack, getType, give, has, has, has, has, isEmpty, isEmpty, isItem, scale@Deprecated int getXP()
@Deprecated int getXP(CostReducer reducer)
reducer - The CostReducer to use to calculate costsint getMana()
int getMana(CostReducer reducer)
reducer - The CostReducer to use to calculate costsboolean has(Spell spell)
spell - the spell being castvoid use(Spell spell)
spell - the spell being castvoid refund(Spell spell)
spell - the spell refunding the costCopyright © 2021 elMakers. All rights reserved.