ID:151392
 
Allo.

So ive been thinking of ways to allow more options into a skill system rather then your usual "get this skill, cast this skill 1000 times bla bla its your favourite skill all it does is damage".. rinse and repeat with new skills.

So i was thinking with my current skills they launch off in certain elemental categories. Wind, Fire, Earth, Water, Lightning. and was thinking why not allow skills to be able to merge together once there in affect.

So if a mage was to cast a water frontal attack that pushes an enemy back while dealing damage but was then able to also activate a lightning skill such as a simple lightning bullet (when cast alone) but since it would be cast in progression to the water skill it would then instead of firing transcend into the water creating electrified water. Thus damaging the enemy more.

But if they were to say use the water skill and then cast fire eclipse dragon (which is obviously a fireball in the shape of a dragon) it would pretty much just be nulled by the water.. while also nulling the water. (evaporation effect)


This same concept would apply to different situations.

Player One uses Water and Lightning
Player Two uses Fire and Wind
Player Three uses Lightning and Wind

If player one shot player two with a water blast and hit.. player two would begin to be pushed back.. But player three decides he wants to come in and kill them both so he decides to launch his Lightning bullet into player ones water stream.. Now as this is a different magical energy to that of the caster (and the skills manifest in a physical form using their soul energy so Water manifests from the mouth as does fire and wind (or fan typed weapons)). theres exceptions to it and quite afew. but thats the basic idea.
So anyway the lightning strikes player ones stream and thus sends his current through the stream. eletrocuting both player one and two. then if damage of player threes power is then amped by water.. and dealt to hp and so on.


Scenario 2.
Player two launchs fire dragon. and quickly launches field of wind (AoE wind damage field). This powers up the dragon as the wind fuels the flames, the dragon then does more damage to player one.. also the same effect would apply if player three launched a similar wind skill. except due to the mixing of different soul energies it has the chance to disrupt the casters skill (blow it away instead)

Scenario 3.
Player one casts water. player two casts dragon.
Those 2 skills collide. and thus evaporate, (unless one has higher energy power then the other by atleast 25%)


Thoughts and ideas how to achieve this effectively?
~Midget
You're being too vague. Ask a better, more specific question. What do you want to achieve "effectively"? Are you asking how to implement this in code? How to flesh it out further? You're not giving us any information, so I don't know what response you expect.
In response to Toadfish
Well i guess its a bit of both. though.

What i want to be able to do is exactly that but as it stands im not quite sure how to do it. so its abit of both

So i guess the more precise thing to say would be in code then. i got the general idea of launching things but i need to know the proper ways of being able to get them to combine and what not. Bump and other such procs are effective enough to be used for colliding of pre existing skills. of different players.

But what im trying to do is pretty much have skills that are channeling skills (easiest interpretation) but also be able to have an additional skill be casted that would not "fire" as it normally would. i guess it could and all be in the bump states just think its a tad bit ugly like that
In response to Midgetbuster
This is a very large question. Coding something like this will take a lot of time. I will give you something to work with:

obj/projectile
var/projectile_collection/collection // a collection of all projectiles that spawned as a result of some player casting some spell

proc/combine(obj/projectile/proj) collection.combine(proj.collection)
proc/shouldCombine(obj/projectile/proj) // true when two projectiles should combine into a single attack

Move()
. = ..()
if (.)
var/list/nearby = range(5, src) // I think this is the syntax for range(), but check the reference to be sure
for (var/obj/projectile/proj in nearby)
if (shouldCombine(proj)) combine(proj)

projectile_collection
var/list/projectiles

proc/combine(projectile_collection/proj)
// create a new projectile_collection of the desired type, and change every projectile in src.projectiles and proj.projectiles into the appropriate new type

fireball
waterbeam
...


The way this works: a player casting a spell will result in a new projectile_collection being created. The projectile_collection will then propagate the map with obj/projectiles as necessary (say, a fireball might 'propagate' it with an /obj/projectile/fireball). Those projectiles, when moving, check nearby to see if they should combine with a different projectile. If they should, collection.combine() is called, which results in all projectiles of both collections being replaced with the new 'combined' projectile type.

I don't think this is the best way to do this, maybe someone knows of a better way. This is the first thing that comes to mind.
In response to Toadfish
Yea probably something similar to that i guess.

Its like a player creating a wave (or wall) of water. and then infusing it further with another element, to reinforce it and make it stronger.

So yea was just curious on the most efficient way of doing it as opposed to having an ugly launching of multiple projectiles and running them only through bump (or similar)
In response to Midgetbuster
With my code, you might eventually use Bump() as a gate to combining two attacks. In that case, you want to override Bump() to do a check similar to the one I did in Move().
In response to Toadfish
Yeah well as it stands its not to hard to do the bumping of things together, just basically i run checks within the variables of the projectile.

so a fire would check for water element. check its power vs its power if within 25 of each other dispose of both. if over on either. highest takes over, then its just a matter of displaying some spiffy icon changes and effects.

Kinda the same with just adding different infusing (the water and lightning)