#spell system?
1 messages · Page 1 of 1 (latest)
so it sounded like you want certain 'words' to only be allowed in only one of the three slots? @ivory salmon
I have a lot of questions
Yes. So the first word will determine the form the spel takes (like beam of light, ethereal spear, etc) and second word will be auxiliary effects like fire damage or poison damage. Third word will determine how many of the spell get created (ex: single version of a light pillar spell is just one beam while the multi version would be like pillars of light from dark souls 3)
so the 3rd argument could just be an int, right?
wait mb
does the difficulty come into what the spell should be named given arbitrary sub-abilities?
Kind of yes. Since the player crafts their spells I have to make this system robust enough that it can make a large combination of words without being a hot pile of garbage in the implementation (like it would with if statements)
Unfortunately I have to go to work right now but i can respond back in about 4 or so hours
well, I would think that the second word could just prefix the first word's name
say you have first word "beam of light"
the second word could prefix that with "venomous " or "flaming " or wtv
well
I'm a little lost at this point, did you mostly need help with how to implement the spells themselves without even considering how they'll be named?
No the words themselves are arbitrary. They are going to end up being Latin or something. I’m looking for help with implementing the spells without naming consideration at the moment
ok, here's what I'm thinking:
abstract class word1
abstract void TakeEffect() { // instantiate something maybe? }
abstract class word2
abstract void ApplyStatusEffect(Unit){ // Apply status effects or whatever on that unit}
class ability
Properties:
word1 BaseEffect
word2 StatusEffect
int Number
Methods:
CastAbility(){
for (int i = 0; i < Number; i++) word1.TakeEffect;
word2.ApplyStatusEffect(/*somehow get a reference to what you hit*/);
}
@ivory salmon.
that first word could honestly just instantiate a projectile, and you can put a script on the projectile itself that the ability sets the status effect of
sorry if this doesn't help that much, but I'm going to do something else now
Ok thanks for the help. I will take a look at this when I get home
just realized I made this way more complicated than I needed to
in this example, you make child classes for each unique ability and status effect
So if I have poison damage and a pillar of light, I’d make a class for pillar of light and a class for poison damage that Inherit from the abstract ones?