Welcome to the Builder Academy

Question Area damage with a skill

More
22 Nov 2016 20:05 - 22 Nov 2016 20:22 #6292 by JTP
Area damage with a skill was created by JTP
Hi

I would like to make a skill that does a one time area damage and hit everyone in the room. Is there a way to do that ?

Not a area spell :)
Last edit: 22 Nov 2016 20:22 by JTP.

Please Log in or Create an account to join the conversation.

More
22 Nov 2016 20:40 #6293 by Halenbane
Replied by Halenbane on topic Area damage with a skill
You may use the Whirlwind skill for some inspiration

Please Log in or Create an account to join the conversation.

More
22 Nov 2016 20:48 #6295 by WhiskyTest
Replied by WhiskyTest on topic Area damage with a skill
Yeah also the Earthquake spell

Please Log in or Create an account to join the conversation.

More
22 Nov 2016 20:50 #6296 by JTP
Replied by JTP on topic Area damage with a skill
Im not making a spell, but a skill for a barbarian

Please Log in or Create an account to join the conversation.

More
22 Nov 2016 20:52 - 22 Nov 2016 20:52 #6297 by JTP
Replied by JTP on topic Area damage with a skill
Whirlwind goes on and on until nothing else to hit.


I just need this skill to do a one time damage to everyone. Then player needs to use the skill again, if he wants more done.
Last edit: 22 Nov 2016 20:52 by JTP.

Please Log in or Create an account to join the conversation.

More
22 Nov 2016 21:59 #6302 by WhiskyTest
Replied by WhiskyTest on topic Area damage with a skill
Skills are just spells that don't use the mana casting bits and pieces..

I'd just plagiarize the earthquake spell like this:

Browser code!
Code:
void awesome_barbarian_skill(int level, struct char_data *ch) { struct char_data *tch, *next_tch; const char *to_char = NULL, *to_room = NULL; if (ch == NULL) return; to_char = "You channel the power of Crom and unleash a violent forcewave!"; to_room ="The veins on $n's head and neck bulge as the power of Crom explodes from $e!"; if (to_char != NULL) act(to_char, FALSE, ch, 0, 0, TO_CHAR); if (to_room != NULL) act(to_room, FALSE, ch, 0, 0, TO_ROOM); for (tch = world[IN_ROOM(ch)].people; tch; tch = next_tch) { next_tch = tch->next_in_room; /* The skips: 1: the caster * 2: immortals * 3: if no pk on this mud, skips over all players * 4: pets (charmed NPCs) * 5: other players in the same group (if the spell is 'violent') */ if (tch == ch) continue; if (!IS_NPC(tch) && GET_LEVEL(tch) >= LVL_IMMORT) continue; if (!CONFIG_PK_ALLOWED && !IS_NPC(ch) && !IS_NPC(tch)) continue; if (!IS_NPC(ch) && IS_NPC(tch) && AFF_FLAGGED(tch, AFF_CHARM)) continue; if (!IS_NPC(tch) && GROUP(ch) && GROUP(ch) == GROUP(tch)) continue; /* Doesn't matter if they die here so we don't check. -gg 6/24/98 */ damage(whatever the stock damage code is); // whatever other cool stuff should happen } }

That's the guts of the damage-to-all-in-room, just tidy up the damage() call - I can't remember what stock damage is haha..
Then add in skill checks and definitions like the other skills have

Please Log in or Create an account to join the conversation.

Time to create page: 0.272 seconds