• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Advanced Duel System

Status
Not open for further replies.
Level 3
Joined
Oct 28, 2011
Messages
23
I would want a duel system like the MMORPG RAN ONLINE HAS.

Below is the description(wc3 adoption):

Click the Interaction Abilities and choose DUEL on a Player/AI Hero

The Owner of the Hero requested for the duel will be notified and choose if he will accept/refuse your challenge.

Once accepted, a countdown will start and a ring of about 750 radius VISIBLE ONLY to the owner of duelling units will be created, with the center of the ring located between the two units.

The duel starts and their HP and Mana is restored full.However, ONLY the two units can be damaged by one another. Hostile creeps and player units cannot interrupt the battle. They can enter the ring (which is INVISIBLE to them) but neither cannot damage nor be affected by their skills. Same as the duelling units, the ONLY unit they can damage, even it is an AoE with effect(like freeze), is their opponent.



The duel will end IF and ONLY IF:

1. One Kills(Defeats) the other.

2. One Goes out the ring, which will result to a DRAW.

3. The owner of one of the units disconnects(of course).

4. A specific event causes it to end so. Unit with more HP left is considered the winner.


However, the defeated unit MUST not be killed nor be considered DEAD. After the duel, the HP and Mana is reverted to before the duel started but negative buffs will remain. (If a unit duelled with 10 HP and lose the fight with a kill-unit poison status that deals 10 HP dmg/sec then that unit will most probably DIE seconds after the duel)



So much on that... It's kinda long and my vJass experience and knowledge is not yet enough for this big system so i need to request this one for the geniuses out there.

(Oh, before i forgot, the party leader can also request another party leader for a PARTY duel, same rules though but with more units battling)
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
I think you have to create a Unit Group variable which puts the duel unit(s) and check if they're in the Unit Group or not, and do the exception, here's what I mean

  • Earth Shatter
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Earth Shatter
    • Actions
      • Set CasterLoc = (Position of (Triggering unit))
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within AoE_EA of CasterLoc matching (((Matching unit) is in DuelGroup) Equal to False)) and do (Actions)
        • Loop - Actions
          • Unit - Kill (Picked unit)
      • Custom script: call RemoveLocation(udg_CasterLoc)
Here's one of the example of other spells in your custom map (just an example)

You should always make this check every time you want to inflict damage/effect/buff/etc to a unit because when the Duel System is happening, you don't want the Duel Unit(s) to be attacked/spell-affected by other spells in your map, right ?

Also, you must do this for the Duel Unit too, not only for the surrounding unt

For example, if the Duel Unit cast spells, be it AoE or single-target, the target/affected unit must be in DuelGroup (variable) in order for it to only focus its spell range to the Duel Unit(s) only, and not the surrounding

This is one method to exclude units.
 
Level 9
Joined
Feb 16, 2011
Messages
595
hmm send me the map you want this system in and i will try to create it in gui but i will need a dueling area (in the map) and i must warn you it might have leaks
 
Level 3
Joined
Oct 28, 2011
Messages
23
hmm send me the map you want this system in and i will try to create it in gui but i will need a dueling area (in the map) and i must warn you it might have leaks

I think it has to be my job to clean the leaks. I'll try to send it later fOr it's nOt with me yet. :ogre_hurrhurr:

Playing Ran Online :thumbs_up:
 
Status
Not open for further replies.
Top