1. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  2. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  3. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

help me with an spell idea

Discussion in 'World Editor Help Zone' started by Eagle XI, Nov 13, 2015.

  1. Eagle XI

    Eagle XI

    Joined:
    Mar 9, 2012
    Messages:
    1,359
    Resources:
    117
    Models:
    2
    Icons:
    109
    Packs:
    4
    Skins:
    2
    Resources:
    117
    I have such an ultimate in mind for an chaos orc caster hero.
    Figured could be done through morphing the chaos orc unit into version with chaos dmg and back when the buff wears off.
    But rather would like it to function on any friendly unit(fe. hired mercs) aslong as its not having already chaos dmg, and its too much work to create an fel dmg version of everything.

    Is there another method to modify dmg type and how should this be structured ? also it will be used in an altered melee setting so the whole has to be MUI.
     
  2. DEE-BOO

    DEE-BOO

    Joined:
    Apr 4, 2010
    Messages:
    505
    Resources:
    1
    Icons:
    1
    Resources:
    1
    Damage Detection System can modify the damage type and the healing part is pretty easy if you know dynamic indexing.

    Set HP Heal = 20% of Target's Maximum Hp.
    Set Duration = 60.00
    Set Heal Per Second = HP Heal / Duration

    Event Periodic Timer every 1 second
    Set Hp Of Target = Hp Of Target + Heal Per Second
    Set Duration = Duration - 1.00

    Turn off Trigger if Duration is 0.00 or Healing Target is dead or Healing target doesn't have healing buff anymore, etc.
     
  3. Wietlol

    Wietlol

    Joined:
    Aug 1, 2013
    Messages:
    4,638
    Resources:
    3
    Spells:
    3
    Resources:
    3
    Regenerating the health is easy.
    For the chaos damage though, you could try to use a damage engine to change the attacktype to chaos when that unit applies basic attack damage.

    I hear Bribe talking a lot about his DDS where you can do that... or at least that is what I understand from it...
     
  4. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    8,398
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    No damage system that works with natural WC3 damage can get the original damage before armor and which type of damage it was, so retroactively converting a unit's attack type to chaos is impossible without knowing how much min/max damage a unit has in the first place so that it can be re-applied without reduction. Even then, the attack type in the UI will remain unchanged.

    Morphing is possible, but you have to make a copy of all units and have the right ability for each. Not a fun challenge.
     
  5. Eagle XI

    Eagle XI

    Joined:
    Mar 9, 2012
    Messages:
    1,359
    Resources:
    117
    Models:
    2
    Icons:
    109
    Packs:
    4
    Skins:
    2
    Resources:
    117
    So you are basically saying "its not possible, it would have been done longst ago if it was doable", ok.
    In that case then will have to stay limited for chaos orc units only. Suppose i should able to do that through the morphing.

    I have an additional question:
    And what about an arrow type spell that reduces armor per hit ? Think about atc Incinerate but instead stacking the damage up per hit would reduce the armor by -1 per hit (but goes no lower than 0).
    Is that one technically impossible too ? there is an orb ability doing the armor reduction but its passive, and then also faerie fire.
     
  6. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    8,398
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    An easier way to reduce a unit's armor is to use stat modifier tricks, but you have to know in advance how much armor the unit currently has or else you're going to go below 0 if you remove too much (no way of knowing when the armor is 0 and armor is not an integer so you may end up with something like 0.9 armor even then). WC3 has a lot of accidental awesomeness but what the devs did not spend the right amount of time making possible for users is simply not possible without discovering useful bugs or using workarounds.
     
  7. Wietlol

    Wietlol

    Joined:
    Aug 1, 2013
    Messages:
    4,638
    Resources:
    3
    Spells:
    3
    Resources:
    3
    Wanna bet?
    I bet there is one... however only a few here are capable of using it properly.
     
  8. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    8,398
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    Natural WC3 damage, no. UnitDamageTarget, definitely.
     
  9. Wietlol

    Wietlol

    Joined:
    Aug 1, 2013
    Messages:
    4,638
    Resources:
    3
    Spells:
    3
    Resources:
    3
    Natural damage no?
    That is interesting.

    Because I actually have one that reverts damage using an inverse of the armortype reduction factor and armor value reduction factor.
    It isn't that hard, but it is quite heavy and should not be used for maps larger than normal melee maps.

    You can really change the attack type in the onDamage event and it will apply newly calculated damage.
     
  10. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    8,398
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    So there is an accurate way to get the armor value, now? All the methods proposed to the community are full of bugs.
     
  11. Wietlol

    Wietlol

    Joined:
    Aug 1, 2013
    Messages:
    4,638
    Resources:
    3
    Spells:
    3
    Resources:
    3
    Well, I can get the attack type and damage type.
    Which basically means that I can simulate damage by damaging the target again but now also checking its HP before and compare it to after to get the total damage value.
    Then I divide that one by the amount of damage that I inserted into the simulation and I have the damage factor.

    When using ridiculous numbers, you get a serious accurate armor value.
     
  12. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    8,398
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    That's actually a really smart way to do it, though I can see why it would be such a massive operation per attack.
     
  13. Wietlol

    Wietlol

    Joined:
    Aug 1, 2013
    Messages:
    4,638
    Resources:
    3
    Spells:
    3
    Resources:
    3
    Well, because this is the action done for this check:
    Disable trigger.
    Give unit massive hp boost
    Increase unit current hp to X
    Apply Y damage
    Calculate reduction factor
    Remove massive hp boost
    Reset hp to normal
    Enable trigger.

    And that is done twice because I also have to check if the damage would kill the unit before the damage will be applied.
    Next to all other stuff, it is quite heavy.
    It will still work on 8 player maps but 12 player maps or maps that would have more combat than melee maps, it is recommended to just abandon standard damage.