Dex-chan lover
- Joined
- Jul 3, 2018
- Messages
- 440
Yeah this is pretty much exactly what I wanted, but with spell incantations acting like snippets of code. The fun begins when high level mages start interacting with the code in novel and unexpected ways. Or you could have them unlock higher tiers of magic that should be "impossible" but they've simply been given higher level access to the underlying magic systems that's usually blocked for end users. Or maybe a character is abusing exploits to use magic in unintended ways and becomes a huge problem until they get smited by the devs for it. The gameplay and narrative possibilities are endless.<Cool Coding shit>
If either reaches 0, the spell function should stop. This is there to stop the spell from potentially draining your entire mana pool if it goes wrong. A compiler crash is okay. You suddenly dying after your spell went into an unending recursive loop is unacceptable. I'll be damned if I let those fucking errors and bugs kill me, they're frustrating enough as it is.
Yours is the safer way of doing things and works fine. Me personally, I like the idea that if a mage isn't keeping an eye on their syntax or is getting too greedy with their spellcasting, any 'errors' in the code return a unique backfire function depending on the base spell. No mana for a fireball spell, you start coughing up smoke; overload the parameters beyond your ability, it explodes in your face and lights the surrounding on fire.