I am developing an rpg-sort of game. My question is how a dual-tech system would work (like snes chrono trigger game had). I already have coded how to use a single skill.
Probably not the best way to do it, but here is how i have it working right now:
I have a Skill class and in my level, I define a Skill currentSkill When a skill is activated, the level starts rendering everything at half-speed except for the skill caster and the skill target.
Now what i am not really sure how to do is, how to structure my dual-skill class, and how to make this one's animation (which would include animating the 2 skill casters + skill targets) affect the initial skill cast.
The dual skill should be activated after a single skill is activated, eg. Character A casts skill a, which can be combined with character B skill b to produce skill c.
If that was somehow clear to you (think I complicated it) could you please provide some pseudo code / idea / example on how to achieve it?
EDIT:
I realize after reading the comments (and re-reading my question) that i was not clear on what I want to achieve, so I'll try to re-word myself (non native english speaker, so sorry for the lack of grammar)
Some considerations :
- It's not a multiplayer game so I will refer to the characters (or "players") you can use as units.
- Its some kind of rpg battle game ( it's pretty much a clone of the mobile game battlehearts but with dual-skills added, if you have seen that, you can get a pretty good idea on what game i'm working on).
basic idea:
- Unit A casts skill a.
- Unit B checks that he can combine its skill b with skill a.
- Unit B casts skill b.
- Unit A skill gets canceled
- Unit B skill gets canceled
- Unit A and B cast skill c.
here's some example:
- Unit A is swordman (with a single-target critical-hit skill called Bash)
- Unit B is mage (with a skill called air strike).
- bash + air strike = air slash ( skill that pierces and damages all enemies in a line, for example)
.asd
- swordman uses bash
- mage "realizes" he can combine it with air strike
- on mage, skill air slash gets enabled.
- when used, air strike consumes bash's and air stryke's cooldown, but executes a different skill (im talking about a different animation here, not sync'ing bash and air strike animations)
question is, how would you structure the code to achieve the above behavior? what kind of datastructure would you use to store information about dual-skills?