Page 1 of 1

Charging the attack - Technical Code here

Posted: 04 Dec 2004, 21:47
by MathGeek
Came up with an idea for charging up the attack like in SOM.

Here's the code:

//player->attack_power starts as an integer at 0

if(key[KEY_LCONTROL]) {
if ( attack power == 0 )
attack( 0 );
player->attack_power++;
}
else{
if ( player->attack_power > 1 ){
attack(player->attack_power);
}
player->attack_power = 0;
}

So I think that would allow for minimal alteration to the game. The attack function is not the one used in the game, but can be changed easy enough. Hope that this can be done.

Posted: 05 Dec 2004, 09:41
by ElvenProgrammer
I understand your idea, but the code should be improved a bit, it's not that hard. The problem is the time else I would have done it...if you can manage to create some working code give it to me and I'll add it. :D

Posted: 07 Dec 2004, 17:44
by T7g
yeah, and don't forget, SoM's battle system penalized you for attacking at low charge levels

Posted: 07 Dec 2004, 20:34
by ElvenProgrammer
Mmm this is a bit harder they only thing I can promise is that if you attack while charging you won't do any damage.

Posted: 09 Dec 2004, 20:32
by SimEdw
One way to do it is to send a package for every sec of charging. Then when the cilent sends the attack to the server the server can check if the charging was high enough and what damge that should be caused.

This is the only way to prentend evil hackers from making there own client where they always gets a giant charge in no time.

Posted: 09 Dec 2004, 21:16
by ElvenProgrammer
The problem is that athena doesn't support this fighting system. :(

Posted: 10 Dec 2004, 14:14
by Rotonen
Aren't we developing our own server in any case, so why should we care about what Athena can and cannot do?

Posted: 10 Dec 2004, 14:52
by ElvenProgrammer
Sure, but even if SimEdw is going along well with his server, it will take a while before it replaces eAthena, so it's better to consider all the alternatives. :roll:

Posted: 11 Dec 2004, 23:46
by Rotonen
But designing too much stuff for our "temporary" server and then moving it all into our own server could cause a lot of unnecessary work..?

Posted: 12 Dec 2004, 09:35
by ElvenProgrammer
Well surely we should think carefully about it, so we can migrate to our own server with not much trouble :D

Posted: 14 Feb 2005, 20:49
by Frankablu
Why not have the attack charge code client side and then when the attack is finished charging send the attack command to the server with the target?

(Yes I know you could cheat with a hacked client but you can enforce it later with your own server)

Posted: 14 Feb 2005, 21:08
by maci
but you can enforce it later with your own server
hmm this wouldnt be THAT easy

Posted: 14 Feb 2005, 21:37
by Frankablu
I am talking about a temperately hack to get the feature implemented not a permanent solution the charging would have to be moved to the server eventually.

Posted: 16 Feb 2005, 23:16
by Kyokai
If I remember right, in SoM, you either had an attack at full power (100% charge) or at a tenth of its strength for anything lower.

Don't forget that we'll need to put in over-charged attacks like SoM had (200%, 300%, etc.) This works in conjuntion with the weapon skills system.