: [Essentials script]
Pokémon TCG mod
View Single Post
September 25th, 2012, 06:06 AM
Lead Dev of Pokémon Essentials
Join Date: Jan 2008
Pretty much everything I can think of is either directly related to drawing things on-screen, or are fragments of code which aren't really useful at the moment and would be subject to change anyway.
That's why, if you can, I'd like you to think about how best to implement card effects in battle, and how/when to check them.
Ideally I would like all effects of each kind (attack, ability, held item, general card effects) to to be grouped together in their own section, like move effects do with their function codes (card effects have their own function codes). That is, have something similar to class PokeBattle_Move (a basic class for a standard effect), then a PokeBattle_MoveEffects-type script section containing addition classes, one for each function code. The basic class would do nothing, but would contain all the methods which are called at every time any possible effect would be checked/used (which each function code's class can overwrite).
This would require a TCGBattle_CardEffect (or TCGBattle_AttackEffect, TCGBattle_AbilityEffect, etc.) entity to be created for each effect, but should they be created/discarded only while being used/checked, or should they constantly exist for as long as the card with that effect is on the field? Should there be multiple classes, one per kind of effect, which are used solely for their effect, or should there be just the one class for the card itself (which will exist anyway) with all possible effects/checks merged into that? Should the four kinds of function code mentioned above be separated into distinct function code continuums at all? Should handlers (like those used for some item effects) be used instead of the PokeBattle_Move-style "basic plus addition" classes? Could a hybrid of function codes and handlers work better, or even be possible?
Then we have the question of when effects need to be checked (e.g. before/during/after using an attack, upon flipping a coin, between turns, after drawing a card, when picking a Prize Card, etc. etc.). There are obviously many points during a duel when an effect could occur, so there would need to be many methods/handlers to cover all these occasions. And some effects only affect their own card, while some affect all cards in play - should these be differentiated in how they are checked, or just in the effect itself?
I hope this has made any sense at all.
The Pokémon Essentials Wiki
All Animations Project
View Public Profile
Send a private message to Maruno
Find all posts by Maruno
Find threads started by Maruno
Ignore Posts by Maruno