tuxemon.event.actions.transfer_money module
- final class tuxemon.event.actions.transfer_money.MoneyMathAction(transaction, amount, slug=None)[source]
Bases:
EventAction
Performs a mathematical transaction on the player’s money.
Script usage
transfer_money <transaction>,<amount>[,slug]
- Script parameters:
transaction – Operator symbol.
amount – amount of money.
slug – Slug name (e.g. NPC, etc.)
eg – +,100,mom (player gets 100 from mom)
eg – -,100,mom (mom gets 100 from player)
eg – +,100 (player gets 100)
- Parameters:
transaction (str) –
amount (int) –
slug (str | None) –
- amount: int
- name: ClassVar[str] = 'transfer_money'
- slug: str | None = None
- start()[source]
Called only once, when the action is started.
For all actions, you will need to override this method.
For actions that only need to run one frame you can simply put all the code here. If the action will need to run over several frames, you can init your action here, then override the update method.
- Return type:
None
- transaction: str