DeathCurrencyLoss ​
Inherits: Resource
One rule of the money a player loses when dying (Gameplay Config > Combat > Death & Revival): which currency, and how much of it goes. The rules of the config are applied one after the other.
Properties ​
int | currency_id | 0 |
Mode | mode | Mode.PERCENT |
float | amount | 10.0 |
bool | drop_on_ground | false |
Methods ​
int | lost_from( held: int ) |
String | describe() |
Array[String] | validate() |
Enumerations ​
enum Mode ​
How the amount is worked out: a percentage of what the player holds, a fixed amount, or what the player is left with.
- PERCENT =
0- Loses this percentage of what it holds (10 = a tenth) - LOSE_AMOUNT =
1- Loses this amount (never more than it holds) - SET_TO =
2- Is left with this amount: what is above it is lost (a player with less keeps what it has: it never gains)
Property descriptions ​
int currency_id = 0 ​
The currency this rule is about (0 = every currency the player holds)
Mode mode = Mode.PERCENT ​
How the amount is worked out
float amount = 10.0 ​
The percentage (Percent), the amount lost (Lose amount) or the amount that is kept (Set to)
bool drop_on_ground = false ​
The money that is lost lies on the ground around the body as a pile of coins (needs dropped items), instead of being gone
Method descriptions ​
int lost_from( held: int ) ​
How much of a held amount this rule takes away
String describe() ​
A short text for the editor: "10 % of Gold", "50 Gold", "everything above 100 of every currency"
Array[String] validate() ​
Problems with the rule, as readable messages (empty = fine)