Magic

Magic

190k Downloads

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

NightScythe1 opened this issue ยท 0 comments

commented

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!