1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. Lead your forces to battle in the 15th Techtree Contest. The call is yours, commander!
    Dismiss Notice
  5. The reforging of the races is complete. Come see the 14th Techtree Contest Results.
    Dismiss Notice
  6. It's time to choose your horse in the race - the 32nd Modeling Contest Poll is up!
    Dismiss Notice
  7. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Damage Detection System (GUI) For Reforged v0.6b

Submitted by M4gz
This bundle is marked as pending. It has not been reviewed by a staff member yet.
Small & Simple GUI Damage Detection System (Reforged)
In Reforged exists native DDS and that system to handle these functions and methods.
Using same variables and methods as Bribe's DDS.
Differences:
1 - To detect Damage Type/Armor Type/Defense Type/Weapon Type/Attack Type BOOL variables are used. Instead of custom integer. for example - if (DEFENSE_TYPE_MEDIUM == true)
2 - To change Damage Type/Attack Type new variables are used.
for example - DamageEventDamageT == Spell)
3 - To change Armor Type/Defense Type/Weapon Type used BOOL variables. Just set value to TRUE and engine will change the type.
4 - It is made on triggers that allows you to simply understand and change according to needs.
5 - New Event Response and Variables from Blizzard are used.

It is a tiny system which gives you a powerful tool to detect and Modify:

  • Damage Source
  • Damage Target
  • Damage Amount + Modification +/-
  • Damage Type + Modification (by setting type)
  • Defense Type (Medium/Heavy/Hero etc)
  • Armor Type (flesh/metal/stone etc)
  • Attack Type+ Modification (by setting type)
  • Weapon Type+ Modification (by bool)
  • Attack is Normal or Not (if skill or regular attack)
  • IsSpell
  • is Melee/ IsRange
  • isLethal
Features:

  • Easy BOOL conditions usage for detecting any types of Damage or Armor
  • Modify dealing damage through any deep modifications.
  • Attaching unique Key to each damage event to prevent useless conditions during several damage modifications
  • Based on GUI triggers for any modifications.
  • Full Version and Tiny.
  • new Native Blizzard's functions and methods. Which makes you free out of tones of JASS and so on.
  • Same varibales as in Bribe's system so you can easly implement.

Reworked all variables to compare with Bribe's DDS. Added Lethal detection and HP, Weapon Type Detection and Modification. IsMelee or IsRange detection.
New Events:
  • AfterDamageEvent
  • DamageModifierEvent
  • LethalDamageEvent
New modification:
  • Attack Type (by setting variable DamageEventAttackT = Type of Attack)
  • Damage Type (by setting variable DamageEventDamageT = Type of Damage)
  • Weapon Type (by setting bool variable WEAPON_TYPE_ML_CHOP = true)

Added an event key let you to generate unique key to work with futher damage (attach key to event) modifications without repeating conditions. Just one time generate a key and then check its value and make the operations with future damage modifications. Needs 1 extra real variable and generator trigger (1 action) also need a real variable (or array) for each case when you want to handle unique modification events.

Added event after damage modification - now it is possible to handle event after damage been modified to get new damage amount and make extra actions with it. (in both verisons) in Verison 0.5a Added several stages of handing.

Added Armor Type detection for Damage Target.

Added Defense Type of Damage Target. In BOOL variables implementation. Now its possible to modify damage depending on units defense type.

Added Damage Modifier to change amout of dealing damage can be possitive or negative value. Must be not equal to 0 to modify.
Important! - if you causing damage via trigger and using Damage Modifier variable you need to paste Damage Modifier AFTER damaging action. (Its Blizzard's mechanics) - in v 0.5 added way how to make it possible


At first you need to attach Engine to Event:

  • Damage Engine Event
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set VariableSet Damage_Trigger = Damage Engine Core <gen>
      • Custom script: call TriggerRegisterAnyUnitEventBJ(udg_Damage_Trigger, EVENT_PLAYER_UNIT_DAMAGED)

The system itself is made in two versions - Light and Full

Light version allows you to detect:

  • Damage Source
  • Damage Target
  • Damage Amount
  • Attack is Normal or Not
Its enought for common usage. Attack is Normal or Not is a BOOL which is true if Attack is Normal or False if Attack is skill. That means you can easly use it for custom spells, abilities and so on. It needs only 5 variables to work!


The Full Verison Gives you full information about type of damage and type of attack (normal/divine/hero/pierce/cold/fire and so on)

added detection and modify - weapon, armor and defense
Added Armor types.
All Variables are BOOL so it let you to make checks easly.

  • Damage Engine Core
    • Events
    • Conditions
    • Actions
      • Custom script: local real DamageAmount = 0.00
      • Custom script: local attacktype AttackType = null
      • Custom script: local damagetype DamageType = null
      • Custom script: local armortype ArmorType = null
      • Custom script: local integer ArmorTypeTemp = 0
      • Custom script: local defensetype DefenseType = null
      • Custom script: local integer DefenseTypeTemp = 0
      • Custom script: local weapontype WeaponType = null
      • Custom script: local integer WeaponTypeIndex = 0
      • Custom script: local integer WeaponTypeIndexMod = 0
      • Set VariableSet DamageEvent = 0.00
      • -------- Set Basic Variables --------
      • Set VariableSet DamageEventSource = (Damage source)
      • Set VariableSet DamageEventTarget = (Damage Target)
      • Set VariableSet DamageEventAmount = (Damage taken)
      • Set VariableSet DamageEventDamageT = (Damage Type)
      • Set VariableSet DamageEventAttackT = (Damage Attack Type)
      • Custom script: set DamageAmount = udg_DamageEventAmount
      • Custom script: set DamageType = udg_DamageEventDamageT
      • Custom script: set AttackType = udg_DamageEventAttackT
      • Custom script: set WeaponType = BlzGetEventWeaponType()
      • -------- Detect Targets Defense type --------
      • Custom script: set DefenseTypeTemp = BlzGetUnitIntegerField(udg_DamageEventTarget, UNIT_IF_DEFENSE_TYPE)
      • Custom script: if (DefenseTypeTemp == 0) then
      • Set VariableSet DEFENSE_TYPE_LIGHT = True
      • Custom script: elseif (DefenseTypeTemp == 1) then
      • Set VariableSet DEFENSE_TYPE_MEDIUM = True
      • Custom script: elseif (DefenseTypeTemp == 2) then
      • Set VariableSet DEFENSE_TYPE_HEAVY = True
      • Custom script: elseif (DefenseTypeTemp == 3) then
      • Set VariableSet DEFENSE_TYPE_FORTIFIED = True
      • Custom script: elseif (DefenseTypeTemp == 4) then
      • Set VariableSet DEFENSE_TYPE_NORMAL = True
      • Custom script: elseif (DefenseTypeTemp == 5) then
      • Set VariableSet DEFENSE_TYPE_HERO = True
      • Custom script: elseif (DefenseTypeTemp == 6) then
      • Set VariableSet DEFENSE_TYPE_DIVINE = True
      • Custom script: else
      • Set VariableSet DEFENSE_TYPE_UNARMORED = True
      • Custom script: endif
      • -------- Detect Targets Armor type --------
      • Custom script: set ArmorTypeTemp = BlzGetUnitIntegerField(udg_DamageEventTarget, UNIT_IF_ARMOR_TYPE)
      • Custom script: if (ArmorTypeTemp == 1) then
      • Set VariableSet ARMOR_TYPE_FLESH = True
      • Custom script: elseif (ArmorTypeTemp == 2) then
      • Set VariableSet ARMOR_TYPE_METAL = True
      • Custom script: elseif (ArmorTypeTemp == 3) then
      • Set VariableSet ARMOR_TYPE_WOOD = True
      • Custom script: elseif (ArmorTypeTemp == 4) then
      • Set VariableSet ARMOR_TYPE_ETHEREAL = True
      • Custom script: elseif (ArmorTypeTemp == 5) then
      • Set VariableSet ARMOR_TYPE_STONE = True
      • Custom script: else
      • Set VariableSet ARMOR_TYPE_NONE = True
      • Custom script: endif
      • -------- Detect Attack Type --------
      • Custom script: if udg_DamageEventAttackT == ATTACK_TYPE_NORMAL then
      • Set VariableSet ATTACK_TYPE_SPELLS = True
      • Custom script: elseif udg_DamageEventAttackT == ATTACK_TYPE_MELEE then
      • Set VariableSet ATTACK_TYPE_NORMAL = True
      • Custom script: elseif udg_DamageEventAttackT == ATTACK_TYPE_PIERCE then
      • Set VariableSet ATTACK_TYPE_PIERCE = True
      • Custom script: elseif udg_DamageEventAttackT == ATTACK_TYPE_SIEGE then
      • Set VariableSet ATTACK_TYPE_SIEGE = True
      • Custom script: elseif udg_DamageEventAttackT == ATTACK_TYPE_MAGIC then
      • Set VariableSet ATTACK_TYPE_MAGIC = True
      • Custom script: elseif udg_DamageEventAttackT == ATTACK_TYPE_CHAOS then
      • Set VariableSet ATTACK_TYPE_CHAOS = True
      • Custom script: elseif udg_DamageEventAttackT == ATTACK_TYPE_HERO then
      • Set VariableSet ATTACK_TYPE_HERO = True
      • Custom script: endif
      • -------- Detect Damage Type --------
      • Custom script: if udg_DamageEventDamageT == DAMAGE_TYPE_UNKNOWN then
      • Set VariableSet DAMAGE_TYPE_UNKNOWN = True
      • Custom script: elseif udg_DamageEventDamageT == DAMAGE_TYPE_NORMAL then
      • Set VariableSet DAMAGE_TYPE_NORMAL = True
      • Custom script: elseif udg_DamageEventDamageT == DAMAGE_TYPE_ENHANCED then
      • Set VariableSet DAMAGE_TYPE_ENCHANCED = True
      • Custom script: elseif udg_DamageEventDamageT == DAMAGE_TYPE_FIRE then
      • Set VariableSet DAMAGE_TYPE_FIRE = True
      • Custom script: elseif udg_DamageEventDamageT == DAMAGE_TYPE_COLD then
      • Set VariableSet DAMAGE_TYPE_COLD = True
      • Custom script: elseif udg_DamageEventDamageT == DAMAGE_TYPE_LIGHTNING then
      • Set VariableSet DAMAGE_TYPE_LIGHTNING = True
      • Custom script: elseif udg_DamageEventDamageT == DAMAGE_TYPE_POISON then
      • Set VariableSet DAMAGE_TYPE_POISON = True
      • Custom script: elseif udg_DamageEventDamageT == DAMAGE_TYPE_DISEASE then
      • Set VariableSet DAMAGE_TYPE_DISEASE = True
      • Custom script: elseif udg_DamageEventDamageT == DAMAGE_TYPE_DIVINE then
      • Set VariableSet DAMAGE_TYPE_DIVINE = True
      • Custom script: elseif udg_DamageEventDamageT == DAMAGE_TYPE_MAGIC then
      • Set VariableSet DAMAGE_TYPE_MAGIC = True
      • Custom script: elseif udg_DamageEventDamageT == DAMAGE_TYPE_SONIC then
      • Set VariableSet DAMAGE_TYPE_SONIC = True
      • Custom script: elseif udg_DamageEventDamageT == DAMAGE_TYPE_ACID then
      • Set VariableSet DAMAGE_TYPE_ACID = True
      • Custom script: elseif udg_DamageEventDamageT == DAMAGE_TYPE_FORCE then
      • Set VariableSet DAMAGE_TYPE_FORCE = True
      • Custom script: elseif udg_DamageEventDamageT == DAMAGE_TYPE_DEATH then
      • Set VariableSet DAMAGE_TYPE_DEATH = True
      • Custom script: elseif udg_DamageEventDamageT == DAMAGE_TYPE_MIND then
      • Set VariableSet DAMAGE_TYPE_MIND = True
      • Custom script: elseif udg_DamageEventDamageT == DAMAGE_TYPE_PLANT then
      • Set VariableSet DAMAGE_TYPE_PLANT = True
      • Custom script: elseif udg_DamageEventDamageT == DAMAGE_TYPE_DEFENSIVE then
      • Set VariableSet DAMAGE_TYPE_DEFENSIVE = True
      • Custom script: elseif udg_DamageEventDamageT == DAMAGE_TYPE_DEMOLITION then
      • Set VariableSet DAMAGE_TYPE_DEMOLITION = True
      • Custom script: elseif udg_DamageEventDamageT == DAMAGE_TYPE_SLOW_POISON then
      • Set VariableSet DAMAGE_TYPE_SLOW_POISON = True
      • Custom script: elseif udg_DamageEventDamageT == DAMAGE_TYPE_SPIRIT_LINK then
      • Set VariableSet DAMAGE_TYPE_SPIRIT_LINK = True
      • Custom script: elseif udg_DamageEventDamageT == DAMAGE_TYPE_SHADOW_STRIKE then
      • Set VariableSet DAMAGE_TYPE_SHADOW_STRIKE = True
      • Custom script: elseif udg_DamageEventDamageT == DAMAGE_TYPE_UNIVERSAL then
      • Set VariableSet DAMAGE_TYPE_UNIVERSAL = True
      • Custom script: endif
      • -------- Detect Weapon Type --------
      • Custom script: if WeaponType == WEAPON_TYPE_METAL_LIGHT_CHOP then
      • Custom script: set WeaponTypeIndex = 1
      • Set VariableSet WEAPON_TYPE_ML_CHOP = True
      • Custom script: elseif WeaponType == WEAPON_TYPE_METAL_MEDIUM_CHOP then
      • Custom script: set WeaponTypeIndex = 2
      • Set VariableSet WEAPON_TYPE_MM_CHOP = True
      • Custom script: elseif WeaponType == WEAPON_TYPE_METAL_HEAVY_CHOP then
      • Custom script: set WeaponTypeIndex = 3
      • Set VariableSet WEAPON_TYPE_MH_CHOP = True
      • Custom script: elseif WeaponType == WEAPON_TYPE_METAL_LIGHT_SLICE then
      • Custom script: set WeaponTypeIndex = 4
      • Set VariableSet WEAPON_TYPE_ML_SLICE = True
      • Custom script: elseif WeaponType == WEAPON_TYPE_METAL_MEDIUM_SLICE then
      • Custom script: set WeaponTypeIndex = 5
      • Set VariableSet WEAPON_TYPE_MM_SLICE = True
      • Custom script: elseif WeaponType == WEAPON_TYPE_METAL_HEAVY_SLICE then
      • Custom script: set WeaponTypeIndex = 6
      • Set VariableSet WEAPON_TYPE_MH_SLICE = True
      • Custom script: elseif WeaponType == WEAPON_TYPE_METAL_MEDIUM_BASH then
      • Custom script: set WeaponTypeIndex = 7
      • Set VariableSet WEAPON_TYPE_MM_BASH = True
      • Custom script: elseif WeaponType == WEAPON_TYPE_METAL_HEAVY_BASH then
      • Custom script: set WeaponTypeIndex = 8
      • Set VariableSet WEAPON_TYPE_MH_BASH = True
      • Custom script: elseif WeaponType == WEAPON_TYPE_METAL_MEDIUM_STAB then
      • Custom script: set WeaponTypeIndex = 9
      • Set VariableSet WEAPON_TYPE_MM_STAB = True
      • Custom script: elseif WeaponType == WEAPON_TYPE_METAL_HEAVY_STAB then
      • Custom script: set WeaponTypeIndex = 10
      • Set VariableSet WEAPON_TYPE_MH_STAB = True
      • Custom script: elseif WeaponType == WEAPON_TYPE_WOOD_LIGHT_SLICE then
      • Custom script: set WeaponTypeIndex = 11
      • Set VariableSet WEAPON_TYPE_WL_SLICE = True
      • Custom script: elseif WeaponType == WEAPON_TYPE_WOOD_MEDIUM_SLICE then
      • Custom script: set WeaponTypeIndex = 12
      • Set VariableSet WEAPON_TYPE_WM_SLICE = True
      • Custom script: elseif WeaponType == WEAPON_TYPE_WOOD_HEAVY_SLICE then
      • Custom script: set WeaponTypeIndex = 13
      • Set VariableSet WEAPON_TYPE_WH_SLICE = True
      • Custom script: elseif WeaponType == WEAPON_TYPE_WOOD_LIGHT_BASH then
      • Custom script: set WeaponTypeIndex = 14
      • Set VariableSet WEAPON_TYPE_WL_BASH = True
      • Custom script: elseif WeaponType == WEAPON_TYPE_WOOD_MEDIUM_BASH then
      • Custom script: set WeaponTypeIndex = 15
      • Set VariableSet WEAPON_TYPE_WM_BASH = True
      • Custom script: elseif WeaponType == WEAPON_TYPE_WOOD_HEAVY_BASH then
      • Custom script: set WeaponTypeIndex = 16
      • Set VariableSet WEAPON_TYPE_WH_BASH = True
      • Custom script: elseif WeaponType == WEAPON_TYPE_WOOD_LIGHT_STAB then
      • Custom script: set WeaponTypeIndex = 17
      • Set VariableSet WEAPON_TYPE_WL_STAB = True
      • Custom script: elseif WeaponType == WEAPON_TYPE_WOOD_MEDIUM_STAB then
      • Custom script: set WeaponTypeIndex = 18
      • Set VariableSet WEAPON_TYPE_WM_STAB = True
      • Custom script: elseif WeaponType == WEAPON_TYPE_CLAW_LIGHT_SLICE then
      • Custom script: set WeaponTypeIndex = 19
      • Set VariableSet WEAPON_TYPE_CL_SLICE = True
      • Custom script: elseif WeaponType == WEAPON_TYPE_CLAW_MEDIUM_SLICE then
      • Custom script: set WeaponTypeIndex = 20
      • Set VariableSet WEAPON_TYPE_CM_SLICE = True
      • Custom script: elseif WeaponType == WEAPON_TYPE_CLAW_HEAVY_SLICE then
      • Custom script: set WeaponTypeIndex = 21
      • Set VariableSet WEAPON_TYPE_CH_SLICE = True
      • Custom script: elseif WeaponType == WEAPON_TYPE_AXE_MEDIUM_CHOP then
      • Custom script: set WeaponTypeIndex = 22
      • Set VariableSet WEAPON_TYPE_AM_CHOP = True
      • Custom script: elseif WeaponType == WEAPON_TYPE_ROCK_HEAVY_BASH then
      • Custom script: set WeaponTypeIndex = 23
      • Set VariableSet WEAPON_TYPE_RH_BASH = True
      • Custom script: else
      • Set VariableSet WEAPON_TYPE_NONE = True
      • Custom script: endif
      • -------- End Damage Type Detecting --------
      • -------- Detection IsNormal (Melee/Range) OR IsSpell --------
      • Custom script: if (AttackType != null and BlzGetEventIsAttack() == true) then
      • Set VariableSet IsDamageAttack = True
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageEventSource is A melee attacker) Equal to True
        • Then - Actions
          • Set VariableSet IsDamageMelee = True
        • Else - Actions
          • Set VariableSet IsDamageRanged = True
      • Custom script: else
      • Set VariableSet IsDamageSpell = True
      • Custom script: endif
      • -------- If Lethal Dmg --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Life of DamageEventTarget) Less than or equal to DamageEventAmount
        • Then - Actions
          • Set VariableSet IsDamageLethal = True
          • Set VariableSet LethalDamageEvent = 1.00
          • Set VariableSet LethalDamageHP = (Life of DamageEventTarget)
        • Else - Actions
      • -------- Run Event --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DamageEventAmount Greater than 0.00
        • Then - Actions
          • Set VariableSet DamageEvent = 1.00
        • Else - Actions
      • -------- Modify Params --------
      • -------- Detect Weapon Type --------
      • Custom script: if (udg_WEAPON_TYPE_ML_CHOP == true and WeaponTypeIndex != 1) then
      • Custom script: set WeaponTypeIndexMod = 1
      • Custom script: set WeaponType = WEAPON_TYPE_METAL_LIGHT_CHOP
      • Custom script: elseif (udg_WEAPON_TYPE_MM_CHOP == true and WeaponTypeIndex != 2) then
      • Custom script: set WeaponTypeIndexMod = 2
      • Custom script: set WeaponType = WEAPON_TYPE_METAL_MEDIUM_CHOP
      • Custom script: elseif (udg_WEAPON_TYPE_MH_CHOP == true and WeaponTypeIndex != 3) then
      • Custom script: set WeaponTypeIndexMod = 3
      • Custom script: set WeaponType = WEAPON_TYPE_METAL_HEAVY_CHOP
      • Custom script: elseif (udg_WEAPON_TYPE_ML_SLICE == true and WeaponTypeIndex != 4) then
      • Custom script: set WeaponTypeIndexMod = 4
      • Custom script: set WeaponType = WEAPON_TYPE_METAL_LIGHT_SLICE
      • Custom script: elseif (udg_WEAPON_TYPE_MM_SLICE == true and WeaponTypeIndex != 5) then
      • Custom script: set WeaponTypeIndexMod = 5
      • Custom script: set WeaponType = WEAPON_TYPE_METAL_MEDIUM_SLICE
      • Custom script: elseif (udg_WEAPON_TYPE_MH_SLICE == true and WeaponTypeIndex != 6) then
      • Custom script: set WeaponTypeIndexMod = 6
      • Custom script: set WeaponType = WEAPON_TYPE_METAL_HEAVY_SLICE
      • Custom script: elseif (udg_WEAPON_TYPE_MM_BASH == true and WeaponTypeIndex != 7) then
      • Custom script: set WeaponTypeIndexMod = 7
      • Custom script: set WeaponType = WEAPON_TYPE_METAL_MEDIUM_BASH
      • Custom script: elseif (udg_WEAPON_TYPE_MH_BASH == true and WeaponTypeIndex != 8) then
      • Custom script: set WeaponTypeIndexMod = 8
      • Custom script: set WeaponType = WEAPON_TYPE_METAL_HEAVY_BASH
      • Custom script: elseif (udg_WEAPON_TYPE_MM_STAB == true and WeaponTypeIndex != 9) then
      • Custom script: set WeaponTypeIndexMod = 9
      • Custom script: set WeaponType = WEAPON_TYPE_METAL_MEDIUM_STAB
      • Custom script: elseif (udg_WEAPON_TYPE_MH_STAB == true and WeaponTypeIndex != 10) then
      • Custom script: set WeaponTypeIndexMod = 10
      • Custom script: set WeaponType = WEAPON_TYPE_METAL_HEAVY_STAB
      • Custom script: elseif (udg_WEAPON_TYPE_WL_SLICE == true and WeaponTypeIndex != 11) then
      • Custom script: set WeaponTypeIndexMod = 11
      • Custom script: set WeaponType = WEAPON_TYPE_WOOD_LIGHT_SLICE
      • Custom script: elseif (udg_WEAPON_TYPE_WM_SLICE == true and WeaponTypeIndex != 12) then
      • Custom script: set WeaponTypeIndexMod = 12
      • Custom script: set WeaponType = WEAPON_TYPE_WOOD_MEDIUM_SLICE
      • Custom script: elseif (udg_WEAPON_TYPE_WH_SLICE == true and WeaponTypeIndex != 13) then
      • Custom script: set WeaponTypeIndexMod = 13
      • Custom script: set WeaponType = WEAPON_TYPE_WOOD_HEAVY_SLICE
      • Custom script: elseif (udg_WEAPON_TYPE_WL_BASH == true and WeaponTypeIndex != 14) then
      • Custom script: set WeaponTypeIndexMod = 14
      • Custom script: set WeaponType = WEAPON_TYPE_WOOD_LIGHT_BASH
      • Custom script: elseif (udg_WEAPON_TYPE_WM_BASH == true and WeaponTypeIndex != 15) then
      • Custom script: set WeaponTypeIndexMod = 15
      • Custom script: set WeaponType = WEAPON_TYPE_WOOD_MEDIUM_BASH
      • Custom script: elseif (udg_WEAPON_TYPE_WH_BASH == true and WeaponTypeIndex != 16) then
      • Custom script: set WeaponTypeIndexMod = 16
      • Custom script: set WeaponType = WEAPON_TYPE_WOOD_HEAVY_BASH
      • Custom script: elseif (udg_WEAPON_TYPE_WL_STAB == true and WeaponTypeIndex != 17) then
      • Custom script: set WeaponTypeIndexMod = 17
      • Custom script: set WeaponType = WEAPON_TYPE_WOOD_LIGHT_STAB
      • Custom script: elseif (udg_WEAPON_TYPE_WM_STAB == true and WeaponTypeIndex != 18) then
      • Custom script: set WeaponTypeIndexMod = 18
      • Custom script: set WeaponType = WEAPON_TYPE_WOOD_MEDIUM_STAB
      • Custom script: elseif (udg_WEAPON_TYPE_CL_SLICE == true and WeaponTypeIndex != 19) then
      • Custom script: set WeaponTypeIndexMod = 19
      • Custom script: set WeaponType = WEAPON_TYPE_CLAW_LIGHT_SLICE
      • Custom script: elseif (udg_WEAPON_TYPE_CM_SLICE == true and WeaponTypeIndex != 20) then
      • Custom script: set WeaponTypeIndexMod = 20
      • Custom script: set WeaponType = WEAPON_TYPE_CLAW_MEDIUM_SLICE
      • Custom script: elseif (udg_WEAPON_TYPE_CH_SLICE == true and WeaponTypeIndex != 21) then
      • Custom script: set WeaponTypeIndexMod = 21
      • Custom script: set WeaponType = WEAPON_TYPE_CLAW_HEAVY_SLICE
      • Custom script: elseif (udg_WEAPON_TYPE_AM_CHOP == true and WeaponTypeIndex != 22) then
      • Custom script: set WeaponTypeIndexMod = 22
      • Custom script: set WeaponType = WEAPON_TYPE_AXE_MEDIUM_CHOP
      • Custom script: elseif (udg_WEAPON_TYPE_RH_BASH == true and WeaponTypeIndex != 23) then
      • Custom script: set WeaponTypeIndexMod = 23
      • Custom script: set WeaponType = WEAPON_TYPE_ROCK_HEAVY_BASH
      • Custom script: endif
      • Custom script: if (WeaponTypeIndex != WeaponTypeIndexMod) then
      • Custom script: call BlzSetEventWeaponType(WeaponType)
      • Custom script: endif
      • -------- Attack Type Modify --------
      • Custom script: if (udg_DamageEventAttackT != AttackType) then
      • Event Response - Set Attack Type of Unit Damaged Event to DamageEventAttackT
      • Custom script: endif
      • -------- Damage Type Modify --------
      • Custom script: if (udg_DamageEventDamageT != DamageType) then
      • Event Response - Set Damage Type of Unit Damaged Event to DamageEventDamageT
      • Custom script: endif
      • -------- Apply damage modify --------
      • Custom script: if (udg_DamageEventAmount != DamageAmount) then
      • Set VariableSet DamageModifierEvent = 1.00
      • Event Response - Set Damage of Unit Damaged Event to DamageEventAmount
      • Set VariableSet AfterDamageEvent = 1.00
      • Set VariableSet DamageEvent = 2.00
      • Custom script: endif
      • -------- Clear --------
      • -------- Variables --------
      • Set VariableSet IsDamageAttack = False
      • Set VariableSet IsDamageSpell = False
      • Set VariableSet DamageModifierEvent = 0.00
      • Set VariableSet AfterDamageEvent = 0.00
      • Set VariableSet DamageEventSource = No unit
      • Set VariableSet DamageEventTarget = No unit
      • Set VariableSet DamageEventAmount = 0.00
      • Set VariableSet DamageEventDamageT = Unknown
      • Set VariableSet DamageKey = 0.00
      • Set VariableSet IsDamageLethal = False
      • Set VariableSet IsDamageRanged = False
      • Set VariableSet IsDamageMelee = False
      • Set VariableSet IsDamageLethal = False
      • Set VariableSet LethalDamageEvent = 0.00
      • Set VariableSet LethalDamageHP = 0.00
      • -------- ----- --------
      • Set VariableSet DEFENSE_TYPE_DIVINE = False
      • Set VariableSet DEFENSE_TYPE_FORTIFIED = False
      • Set VariableSet DEFENSE_TYPE_HEAVY = False
      • Set VariableSet DEFENSE_TYPE_HERO = False
      • Set VariableSet DEFENSE_TYPE_LIGHT = False
      • Set VariableSet DEFENSE_TYPE_MEDIUM = False
      • Set VariableSet DEFENSE_TYPE_NORMAL = False
      • Set VariableSet DEFENSE_TYPE_UNARMORED = False
      • -------- ----- --------
      • Set VariableSet ATTACK_TYPE_CHAOS = False
      • Set VariableSet ATTACK_TYPE_HERO = False
      • Set VariableSet ATTACK_TYPE_MAGIC = False
      • Set VariableSet ATTACK_TYPE_NORMAL = False
      • Set VariableSet ATTACK_TYPE_PIERCE = False
      • Set VariableSet ATTACK_TYPE_SIEGE = False
      • Set VariableSet ATTACK_TYPE_SPELLS = False
      • -------- ----- --------
      • Set VariableSet DAMAGE_TYPE_UNKNOWN = False
      • Set VariableSet DAMAGE_TYPE_NORMAL = False
      • Set VariableSet DAMAGE_TYPE_ENCHANCED = False
      • Set VariableSet DAMAGE_TYPE_FIRE = False
      • Set VariableSet DAMAGE_TYPE_COLD = False
      • Set VariableSet DAMAGE_TYPE_LIGHTNING = False
      • Set VariableSet DAMAGE_TYPE_POISON = False
      • Set VariableSet DAMAGE_TYPE_DISEASE = False
      • Set VariableSet DAMAGE_TYPE_DIVINE = False
      • Set VariableSet DAMAGE_TYPE_MAGIC = False
      • Set VariableSet DAMAGE_TYPE_SONIC = False
      • Set VariableSet DAMAGE_TYPE_ACID = False
      • Set VariableSet DAMAGE_TYPE_FORCE = False
      • Set VariableSet DAMAGE_TYPE_DEATH = False
      • Set VariableSet DAMAGE_TYPE_MIND = False
      • Set VariableSet DAMAGE_TYPE_PLANT = False
      • Set VariableSet DAMAGE_TYPE_DEFENSIVE = False
      • Set VariableSet DAMAGE_TYPE_DEMOLITION = False
      • Set VariableSet DAMAGE_TYPE_SLOW_POISON = False
      • Set VariableSet DAMAGE_TYPE_SPIRIT_LINK = False
      • Set VariableSet DAMAGE_TYPE_UNIVERSAL = False
      • -------- ----- --------
      • Set VariableSet ARMOR_TYPE_ETHEREAL = False
      • Set VariableSet ARMOR_TYPE_FLESH = False
      • Set VariableSet ARMOR_TYPE_METAL = False
      • Set VariableSet ARMOR_TYPE_NONE = False
      • Set VariableSet ARMOR_TYPE_STONE = False
      • Set VariableSet ARMOR_TYPE_WOOD = False
      • -------- -------------- --------
      • Set VariableSet WEAPON_TYPE_ML_CHOP = False
      • Set VariableSet WEAPON_TYPE_MM_CHOP = False
      • Set VariableSet WEAPON_TYPE_MH_CHOP = False
      • Set VariableSet WEAPON_TYPE_ML_SLICE = False
      • Set VariableSet WEAPON_TYPE_MM_SLICE = False
      • Set VariableSet WEAPON_TYPE_MH_SLICE = False
      • Set VariableSet WEAPON_TYPE_MM_BASH = False
      • Set VariableSet WEAPON_TYPE_MH_BASH = False
      • Set VariableSet WEAPON_TYPE_MM_STAB = False
      • Set VariableSet WEAPON_TYPE_MH_STAB = False
      • Set VariableSet WEAPON_TYPE_WL_SLICE = False
      • Set VariableSet WEAPON_TYPE_WM_SLICE = False
      • Set VariableSet WEAPON_TYPE_WH_SLICE = False
      • Set VariableSet WEAPON_TYPE_WL_BASH = False
      • Set VariableSet WEAPON_TYPE_WM_BASH = False
      • Set VariableSet WEAPON_TYPE_WH_BASH = False
      • Set VariableSet WEAPON_TYPE_WL_STAB = False
      • Set VariableSet WEAPON_TYPE_WM_STAB = False
      • Set VariableSet WEAPON_TYPE_CL_SLICE = False
      • Set VariableSet WEAPON_TYPE_CM_SLICE = False
      • Set VariableSet WEAPON_TYPE_CH_SLICE = False
      • Set VariableSet WEAPON_TYPE_AM_CHOP = False
      • Set VariableSet WEAPON_TYPE_RH_BASH = False
      • Set VariableSet WEAPON_TYPE_NONE = False

After we attach units to engine we need to handle the event it is looks like in others damage systems:

  • Event Attack Damage Type
    • Events
      • Game - Damage_event becomes Equal to 1.00
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (String(Damage_amount))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AttackType_HERO Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: Attack type HERO
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AttackType_PIERCE Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: Attack type PIERCE
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Damage_isNormal Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: is normal damage
        • Else - Actions
          • Game - Display to (All players) the text: not a normal damage...
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DamageType_MAGIC Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: Damage type is magic
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DamageType_COLD Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: Damage type is cold
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DamageType_DIVINE Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: Damage type is divi...
        • Else - Actions


  • Event Modify Damage
    • Events
      • Game - Damage_event becomes Equal to 1.00
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (String(Damage_amount))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of Damage_source) Equal to Паладин
          • Damage_isNormal Equal to True
        • Then - Actions
          • Unit - Cause Damage_source to damage Damage_target, dealing 500.00 damage of attack type Chaos and damage type Universal
          • Set VariableSet Damage_modifier = 20.00
          • -------- DMG = 500+20 --------
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • AttackType_MAGIC Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: Magic
        • Else - Actions
          • Game - Display to (All players) the text: Type is not a Magic
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of Damage_source) Equal to Верховный маг
        • Then - Actions
          • Set VariableSet Damage_modifier = -100.00
          • Game - Display to (All players) the text: Set -100 Damage for...
        • Else - Actions


  • Event Defence Type
    • Events
      • Game - Damage_event becomes Equal to 1.00
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (String(Damage_amount))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DefenseType_HERO Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: Target has hero Def...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DefenseType_LARGE Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: Target has Heavy De...
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • DefenseType_FORT Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: Target has Fortifie...
        • Else - Actions
  • Event Armor Type
    • Events
      • Game - Damage_event becomes Equal to 1.00
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (String(Damage_amount))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ArmorType_FLESH Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: Armor type flesh
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ArmorType_METAL Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: Armor type metal
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ArmorType_STONE Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: Armor type stone
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ArmorType_WOOD Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: Armor type wood
        • Else - Actions

Examples With Handling Damage Modify Event
For example makes 2x damage modifier:
  • Event Modify Damage x2
    • Events
      • Game - Damage_event becomes Equal to 1.00
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Basic Damage
      • Game - Display to (All players) the text: (String(Damage_amount))
      • Set VariableSet Damage_modifier = (Damage_amount x 2.00)

After that the Variable Damage_event becomes 2.0 and we can get new Damage_amount value and do what we want:
  • Event Modify Damage 2nd Call
    • Events
      • Game - Damage_event becomes Equal to 2.00
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Damage after Modify
      • Game - Display to (All players) the text: (String(Damage_amount))
      • Set VariableSet Damage_modifier = (Damage_amount x 2.00)

And After 2nd modification you can handle 3rd stage of that event

  • Event Modify Damage 3rd Call
    • Events
      • Game - Damage_event becomes Equal to 3.00
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Damage after 2nd Mo...
      • Game - Display to (All players) the text: (String(Damage_amount))

Work with Event Key same 3 previous triggers with Key usage. Here we run key generator and getting random value then store it in our variable:

  • Event Modify Damage 1st Call
    • Events
      • Game - Damage_event becomes Equal to 1.00
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Basic Damage
      • Game - Display to (All players) the text: (String(Damage_amount))
      • -------- IF MK generate custom key to make future work easly --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of Damage_source) Equal to Горный король
        • Then - Actions
          • Trigger - Run Damage Key Gen <gen> (checking conditions)
          • Set VariableSet Damage_key_MK = Damage_key
          • Set VariableSet Damage_modifier = (Damage_amount x 2.00)
        • Else - Actions

Now you dont need to check if hero is MK or any conditios which were in 1st trigger, just use the key to handle the event:

  • Event Modify Damage 2nd Call
    • Events
      • Game - Damage_event becomes Equal to 2.00
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Damage_key Equal to Damage_key_MK
        • Then - Actions
          • Game - Display to (All players) the text: Key is MK 2nd call
          • Game - Display to (All players) the text: Damage after Modify
          • Game - Display to (All players) the text: (String(Damage_amount))
          • Set VariableSet Damage_modifier = (Damage_amount x 2.00)
        • Else - Actions

Same solution for 3rd deep of trigger (deeps could be changed in core by any count):
  • Event Modify Damage 3rd Call
    • Events
      • Game - Damage_event becomes Equal to 3.00
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Damage_key Equal to Damage_key_MK
        • Then - Actions
          • Game - Display to (All players) the text: Key is MK 3nd call
          • Game - Display to (All players) the text: Damage after 2nd Mo...
          • Game - Display to (All players) the text: (String(Damage_amount))
        • Else - Actions
For using it just add 1 variable Damage_key (real) and one simple trigger:

  • Damage Key Gen
    • Events
    • Conditions
      • Damage_event Not equal to 0.00
    • Actions
      • Set VariableSet Damage_key = (Random real number between 0.00 and 1000.00)
v 0.6b - Fixed damage event fire.
v 0.6 Updated - Added Attack Type/Armor Type/Weapon Type modificator. And used same variables as Bribe's DDS
v 0.5b Updated - Added key damage generator for each event to prevent unnessery extra conditions.
v 0.5a Updated - Added extra handle after second call of damage modification
v 0.5 Updated - New event added when damage has been modified
v 0.4b Updated - Added TYPE OF ARMOR of target unit.
v 0.4 Updated - Added TYPE OF DEFENSE of target unit.
v 0.3b Updated - Added Test For Reccursion in Event trigger. System is safe out of it.
v 0.3 Updated - Added Damage Modify variable to change amount of damage.
v 0.2 Updated - Changed specific to generic damage event to avoid leaks.
That's all. Try test map it gives more info.


Keywords: damage detection, damage modification, gui, dds, armor type, attack type
Contents

Damage Engine (GUI) Reforged by M4gz (Map)

  1. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    8,211
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    Damage Engine already works with Reforged, uses a well-established API and does a lot more, more accurately, etc.
     
  2. M4gz

    M4gz

    Joined:
    Dec 30, 2019
    Messages:
    54
    Resources:
    0
    Resources:
    0
    Thanks for you comment. That system using native reforged functions and variables. It saves tones lines of unnecessary JASS code and gives overall same as other damage engines. For example in your great DDS is a big problem to detect Attack type is normal i was need to detect if not a spell but it doesnt works in every case. That solution can easly filtering by damage and attack types, or in lightweight version just by BOOL is attack type is normal = false
     
  3. Pyrogasm

    Pyrogasm

    Joined:
    Feb 27, 2007
    Messages:
    3,788
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Damage Engine can modify damage in the damaged event, but this system cannot. For that reason alone I would never use this, as modifying event damage is often one of the core things you want to do with a DDS.

    This system should use the new “any unit takes damage” event instead of manually adding specific unit events for all units on the map. This method results in many erroneous and useless events populating the trigger. I do not know of a reason this is explicitly bad but it surely can’t be good.
     
  4. M4gz

    M4gz

    Joined:
    Dec 30, 2019
    Messages:
    54
    Resources:
    0
    Resources:
    0
    Thanks for your comment. That system made on GUI triggers and its not able to use event like "any unit damaged" blizzard gives only event "specific unit event" but in other way it makes more accurate and less costly solution if you need to determinate units to save resources. Can you show "erroneous and useless events populating the trigger" for me to fix it. As for me that is what blizzard's did to make in game DDS more friendly.
    About modify damage you have same variables as in DDS and you can deal extra damage as you like. You have type of damage, amount, target and source - just make 1 trigger to deal damage to the target as type and amount you want - it's just 1 action. I was thinking about that but as i get the right way is to make it clean and let maker to do what he wants with damage.
    PS it's a damage detect system not a damage modify system.
     
    Last edited: Feb 4, 2020
  5. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    1,531
    Resources:
    0
    Resources:
    0
    Isn't there a limit with using Specific Unit Events like this? I'm pretty sure after a certain number of units are added to the Events it will stop supporting newer units.
     
  6. Clanzion

    Clanzion

    Joined:
    Jul 4, 2016
    Messages:
    438
    Resources:
    0
    Resources:
    0
    I'm not sure what patch you are on, but Blizzard did made available a "any unit damaged" event in the latest patches. Bribe's Damage Engine essentially adds this jass only(afaik) event to GUIers. Since I don't have reforged, I have no clue if blizzard added the event to GUI.

    What Pryogasm meant was is that these events you add to the trigger will stay after the unit dies, essentially causing a permanent leak since the events are no longer in use or traceable until the trigger is destroyed (jass only)
     
    Last edited: Feb 5, 2020
  7. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    1,531
    Resources:
    0
    Resources:
    0
    He's using:
    • Trigger - Add to Damage Engine Core <gen> the event (Unit - (Triggering unit) Takes damage)

    I'm like 90% sure this will stop working once you add a certain number of units.
     
  8. Pyrogasm

    Pyrogasm

    Joined:
    Feb 27, 2007
    Messages:
    3,788
    Resources:
    1
    Spells:
    1
    Resources:
    1
    I forgot it was JASS only but yes this is what I meant.
    I can't deal negative damage to reduce the damage dealt by something.
     
  9. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    8,211
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    Looks like Blizzard quietly added a nee native! I'm preparing an update to Damage Engine in light of this exciting news! Nice discovery, +rep
     
  10. M4gz

    M4gz

    Joined:
    Dec 30, 2019
    Messages:
    54
    Resources:
    0
    Resources:
    0
    Thank you all for your interest. I changed the event made generic event instead of specific as you told. Unfortunately in WE Reforged (Im using regular WE in Reforged) event is not exists and i was need to make like that:

    • Damage Engine Event
      • Events
        • Map initialization
      • Conditions
      • Actions
        • Set VariableSet Damage_Trigger = Damage Engine Core <gen>
        • Custom script: call TriggerRegisterAnyUnitEventBJ(udg_Damage_Trigger, EVENT_PLAYER_UNIT_DAMAGED)

    Variable Damage_Trigger is not necessary you can replace it with trigger name in custom script.
    Also found an interesting thing how to detect last hit (dying moment)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Life of (Damage Target)) Less than or equal to (Damage taken)
      • Then - Actions
        • Game - Display to (All players) the text: Unit is dead (lasth...
      • Else - Actions
     
    Last edited: Feb 5, 2020
  11. M4gz

    M4gz

    Joined:
    Dec 30, 2019
    Messages:
    54
    Resources:
    0
    Resources:
    0
    New Verison 0.3
    Now its possible to use damage modifier as you like. It can be possitive to deal extra damage or reduce incoming damage. Or negative to up hp.
    Just set variable value:
    • Set VariableSet Damage_modifier = 10.00

    Or
    • Set VariableSet Damage_modifier = -100.00


    Done.
     
    Last edited: Feb 5, 2020
  12. M4gz

    M4gz

    Joined:
    Dec 30, 2019
    Messages:
    54
    Resources:
    0
    Resources:
    0
    Added tests for reccursions in 0.3b version in Event trigger. System is safe out of it.
    What I need to add or change for approval?
     
  13. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    8,211
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    Never mind! Uninstalling Reforged nuked my entire Maps folder, so the progress I made in implementing this is gone.
     
  14. M4gz

    M4gz

    Joined:
    Dec 30, 2019
    Messages:
    54
    Resources:
    0
    Resources:
    0
    Sad to hear that. Could you give a review or some ideads to make it better
     
  15. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    8,211
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    Philosophically I am against having two differing systems with two different sets of APIs. If the idea is that you want yours to be a minimalist Damage Engine, I give you permission to have your API match mine so that implementers can at least have an easier time switching between the two.

    As far as approvals go, I'm thankfully no longer a moderator so that's up to them to decide.
     
  16. M4gz

    M4gz

    Joined:
    Dec 30, 2019
    Messages:
    54
    Resources:
    0
    Resources:
    0
    Thanks for answer. Ill try to implement with your system. If i add Armor type and Defence type (Do i need to store both types? Or only Defence type) And do i need to store these type/types for both - Source and Target unit or only for target?
     
  17. M4gz

    M4gz

    Joined:
    Dec 30, 2019
    Messages:
    54
    Resources:
    0
    Resources:
    0
    Update 0.4 : now its possible to detect targets type of defense (normal/heavy/fort/hero and so on)
    -------
    Update 0.4b : now its possible to detect targets type of armor (flesh/metal/wood/stone and so on)
     
    Last edited: Feb 7, 2020
  18. M4gz

    M4gz

    Joined:
    Dec 30, 2019
    Messages:
    54
    Resources:
    0
    Resources:
    0
    Update 0.5 : New event added when damage has been modified. You can handle new event after modification to get new value of damage and, for example, do extra damage or what you need.
    ----------------
    Update 0.5a : Added extra handle for damage modification. Now it is possible to catch the event after 1st damage modification and after 2nd damage modification. For example tt would be usefully if you need to modificate damage by item then by passive skill and so on. You can add any count of handling just copypaste that part of code in core and change damage_event variable to +1
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Damage_modifier Not equal to 0.00
      • Then - Actions
        • Custom script: call BlzSetEventDamage(udg_Damage_modifier)
        • Set VariableSet Damage_amount = (Damage taken)
        • Set VariableSet Damage_event = 2.00
      • Else - Actions

    Next will be = 3.00 then = 4.00 and so on.
    ----------------
    Update 0.5b : added damage key now you can get uniue key and compare it in future damage modifications to prevent useless conditions. For example make 1 time a key allow you to detect if event call was from point where you generate it.
     
    Last edited: Feb 7, 2020
  19. M4gz

    M4gz

    Joined:
    Dec 30, 2019
    Messages:
    54
    Resources:
    0
    Resources:
    0
    Update 0.6 Now varibables and methods compare with Bribe's DDS. Also added new methods, events and detections.