12 Aug, 2009, boblinski wrote in the 21st comment:
Votes: 0
is there a snippet for fighter_list anywhere?

how does it work, what does it do?
12 Aug, 2009, KaVir wrote in the 22nd comment:
Votes: 0
boblinski said:
is there a snippet for fighter_list anywhere?

how does it work, what does it do?

Just maintains a separate list of people who are fighting, so you don't need to iterate through everyone each violence update. I suspect quite a few muds do it that way, although it's not the sort of thing you notice unless you look at the source code. Grab a copy of GodWars Deluxe from the repository if you want an example to copy.
13 Aug, 2009, Hades_Kane wrote in the 23rd comment:
Votes: 0
KaVir said:
boblinski said:
is there a snippet for fighter_list anywhere?

how does it work, what does it do?

Just maintains a separate list of people who are fighting, so you don't need to iterate through everyone each violence update. I suspect quite a few muds do it that way, although it's not the sort of thing you notice unless you look at the source code. Grab a copy of GodWars Deluxe from the repository if you want an example to copy.


Is GodWars Deluxe a new thing? You seem to be plugging that a lot lately and I was wondering if it was a new release of your old codebase :p
13 Aug, 2009, Ssolvarain wrote in the 24th comment:
Votes: 0
Hades_Kane said:
KaVir said:
boblinski said:
is there a snippet for fighter_list anywhere?

how does it work, what does it do?

Just maintains a separate list of people who are fighting, so you don't need to iterate through everyone each violence update. I suspect quite a few muds do it that way, although it's not the sort of thing you notice unless you look at the source code. Grab a copy of GodWars Deluxe from the repository if you want an example to copy.


Is GodWars Deluxe a new thing? You seem to be plugging that a lot lately and I was wondering if it was a new release of your old codebase :p


Now with 30% more blood!
13 Aug, 2009, Elervan wrote in the 25th comment:
Votes: 0
After looking more at the code I remember seeing it in, it does this.

act_move.c at the bottom of void do_stand: just after the } below case POS_FIGHTING:
ch->bashed = FALSE;
if ((ch->fighting != NULL) && ch->position < POS_FIGHTING))
ch->position = POS_FIGHTING;


in fight.c in void set_fighting there is this placed right before ch->position = POS_FIGHTING;
if (!ch->bashed)


in fight.c in do_bash there is a check for this after victim->position = POS_RESTING;
victim->bashed = TRUE;


then finally in merc.h in struct char_data add
bool bashed;


Basically, when a npc or player is bashed/tripped (need to add another check in do_trip), the npc/player has to type stand to get back up. Cancels out when fight in over. Not sure if this is how it should be done, but it works on here.
13 Aug, 2009, KaVir wrote in the 26th comment:
Votes: 0
Hades_Kane said:
Is GodWars Deluxe a new thing? You seem to be plugging that a lot lately and I was wondering if it was a new release of your old codebase :p

No, I've not touched it for about a decade. It's just coincidence that two recent questions concerned implementing a feature that was already present in that codebase. In fairness he did specifically ask if there was a snippet available, so I don't think it's unreasonable to suggest a codebase he can copy it from, and off the top of my head I don't know of any other public codebases that implement combat that way.
13 Aug, 2009, Ssolvarain wrote in the 27th comment:
Votes: 0
I'm curious….
Have you ever put up a history/your thoughts on the God Wars codebase? I know you had a major hand in it, and it was leaked, but past that, I'm really not sure. I'm always interested in history :)
13 Aug, 2009, Hades_Kane wrote in the 28th comment:
Votes: 0
KaVir said:
Hades_Kane said:
Is GodWars Deluxe a new thing? You seem to be plugging that a lot lately and I was wondering if it was a new release of your old codebase :p

No, I've not touched it for about a decade. It's just coincidence that two recent questions concerned implementing a feature that was already present in that codebase. In fairness he did specifically ask if there was a snippet available, so I don't think it's unreasonable to suggest a codebase he can copy it from, and off the top of my head I don't know of any other public codebases that implement combat that way.


Oh, undoubtedly… I've been referenced to codebases before when looking for a snippet or some help on implementing something specific, I'm just not sure I was very familiar with the "deluxe" version of GodWars, so I was just curious if you had recently put up something more updated than the previous versions :)
20.0/28