TerryCavanagh / diceydungeons.com

Dicey Dungeons
48 stars 7 forks source link

(modding) there is no way to define which spell is casted when using status.scriptoncastspell #2987

Open S2dd7 opened 1 year ago

S2dd7 commented 1 year ago

let's say i want to do something like "upgrade the next spell you cast", and my current method is "iterate through all the equipment and setvar some variable, then when you cast a spell, iterate through all the equipment and if the equipment doesn't have that variable set, then upgrade it and set a variable". it works on turn 1 but it doesn't work afterwards (the new spell appears after the status.scriptoncastspell runs). and the only way to make that work is actuators (the same method but used in actuator's script). maybe adding an e hook for status.scriptoncastspell that returns an actual object of created spell would be nice for modders.