Area damage with a skill

  • JTP
  • JTP's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
1 year 5 months ago - 1 year 5 months ago #6292 by JTP
JTP created the topic: Area damage with a skill
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: 1 year 5 months ago by JTP.

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

More
1 year 5 months ago #6293 by Halenbane
Halenbane replied the 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
1 year 5 months ago #6295 by WhiskyTest
WhiskyTest replied the topic: Area damage with a skill
Yeah also the Earthquake spell

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

  • JTP
  • JTP's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
1 year 5 months ago #6296 by JTP
JTP replied the 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.

  • JTP
  • JTP's Avatar Topic Author
  • Offline
  • Platinum Boarder
  • Platinum Boarder
More
1 year 5 months ago - 1 year 5 months ago #6297 by JTP
JTP replied the 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: 1 year 5 months ago by JTP.

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

More
1 year 5 months ago #6302 by WhiskyTest
WhiskyTest replied the 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!
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.

More
1 year 5 months ago #6339 by Liko
Liko replied the topic: Area damage with a skill
Might want to add a check to make sure they are either in combat with you and make sure level 60's aren't spam killing level 1 players by mistake.

DragonBall: Tournament (1.2.0)
Owner/Developer

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

Time to create page: 1.547 seconds