Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] Allow math/variables in costs & active costs #1335

Open
NightScythe1 opened this issue Mar 25, 2024 · 0 comments
Open

[Request] Allow math/variables in costs & active costs #1335

NightScythe1 opened this issue Mar 25, 2024 · 0 comments

Comments

@NightScythe1
Copy link
Member

Currently trying to create a system where a spell's cost and active cost can be affected by a player's attributes. For example, they could get a cost reduction on some spells but not others, by having something like this in the spell's cost section:

  costs:
    mana: 10 * $destruction_reduction

where destruction_reduction is an attribute of 0.5 or 1 etc. Unfortunately this doesn't work in magic currently, as any formulas placed under costs or active costs seem to negate the cost entirely. I tried to workaround this by using the TakeCost action and a repeat/interval, as these seem to allow equations, but it's too tricky to get this working reliably as a replacement for active cost, as the shortest interval possible is one tick and we can't use floats/decimals when taking Mana/costs. I wanted to ask if it would be possible to implement the use of variables & equations under the cost & active cost fields, but no worries if that's a limitation/not feasible. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant