#spell system?

1 messages · Page 1 of 1 (latest)

zinc pawn
#

ok...

#

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

ivory salmon
#

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)

zinc pawn
#

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?

ivory salmon
#

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

zinc pawn
#

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?

ivory salmon
#

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

zinc pawn
#

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

ivory salmon
#

Ok thanks for the help. I will take a look at this when I get home

zinc pawn
#

just realized I made this way more complicated than I needed to

zinc pawn
ivory salmon
zinc pawn
#

yeah

#

the reason for doing that is so that the actual ability logic is super simple, just 2 abstract method calls

#

all the implementation is deferred to the base/status classes