• 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.

Damage/Armor Type Bonuses with triggers

Status
Not open for further replies.
Level 13
Joined
Oct 16, 2010
Messages
737
So I've been looking at different damage detection scripts for my Pokemon map. And I wondered. Rather than changing the damage types (piercing, siege etc) and the armor types would it be possibly to make different units deal bonus damage via triggers. And the same with their spells?
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
use this
http://www.hiveworkshop.com/forums/...prev=search=gui%20damage%20engine&d=list&r=20

then u can store to variable how much reduction u want to x/y unit also u could make elemental defence too.

(if u dont know how then u can check my rpg template there have example for physical/magic defence, so different reduction if u hit the target with physical damage and different if u do with magical damage, bad side u must set the damage type at every ability what u use)
 
Level 13
Joined
Oct 16, 2010
Messages
737
Which variable(s)? And I've decided not to bother with spells as some of them are continuous (for example Soul Burn and Acid Bomb).

Also could the reduction be changed to amplify damage?


*Edit*

I've just looked at your system. And I have NO IDEA what to do with it.

Does it make any differences that I will be using 14 different damage types and 14 different attack types?

To explain. Currently I created an ability (based on Item Armor Bonus with no bonus) for each different attack and defence type. Then created a trigger which notices if a unit is being attacked, then checks to see what damage the attacker has and what defence type the target has via integer checks on the ability levels of each unit.
I have then created a wait event before any other actions process. Then half of the attackers primary attribute is dealt to the target.
If that made no sense here is an example, this is how basic I want it really:
  • Fire Damage
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Fire Attack for (Attacking unit)) Equal to 1
      • Or - Any (Conditions) are true
        • Conditions
          • (Level of Grass Armor for (Attacked unit)) Equal to 1
          • (Level of Bug Armor for (Attacked unit)) Equal to 1
          • (Level of Steel Armor for (Attacked unit)) Equal to 1
    • Actions
      • Wait 0.50 seconds
      • Unit - Cause (Attacking unit) to damage (Attacked unit), dealing (Real(((Agility of (Attacking unit) (Exclude bonuses)) / 2))) damage of attack type Hero and damage type Normal
      • Special Effect - Create a special effect at (Position of (Attacked unit)) using Abilities\Spells\Items\AIfb\AIfbSpecialArt.mdl
      • Wait 1.00 seconds
      • Special Effect - Destroy (Last created special effect)
 
Last edited:
Level 17
Joined
Nov 13, 2006
Messages
1,814
Which variable(s)? And I've decided not to bother with spells as some of them are continuous (for example Soul Burn and Acid Bomb).

Also could the reduction be changed to amplify damage?


*Edit*

I've just looked at your system. And I have NO IDEA what to do with it.

Does it make any differences that I will be using 14 different damage types and 14 different attack types?

To explain. Currently I created an ability (based on Item Armor Bonus with no bonus) for each different attack and defence type. Then created a trigger which notices if a unit is being attacked, then checks to see what damage the attacker has and what defence type the target has via integer checks on the ability levels of each unit.
I have then created a wait event before any other actions process. Then half of the attackers primary attribute is dealt to the target.
If that made no sense here is an example, this is how basic I want it really:
  • Fire Damage
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Fire Attack for (Attacking unit)) Equal to 1
      • Or - Any (Conditions) are true
        • Conditions
          • (Level of Grass Armor for (Attacked unit)) Equal to 1
          • (Level of Bug Armor for (Attacked unit)) Equal to 1
          • (Level of Steel Armor for (Attacked unit)) Equal to 1
    • Actions
      • Wait 0.50 seconds
      • Unit - Cause (Attacking unit) to damage (Attacked unit), dealing (Real(((Agility of (Attacking unit) (Exclude bonuses)) / 2))) damage of attack type Hero and damage type Normal
      • Special Effect - Create a special effect at (Position of (Attacked unit)) using Abilities\Spells\Items\AIfb\AIfbSpecialArt.mdl
      • Wait 1.00 seconds
      • Special Effect - Destroy (Last created special effect)

oh so only amror type?

this ability thing work well but still i advide use that gui damage event and sheck there if DamageEventTarget got this abilities then set DamageEventAmount = DamageEventAmount / 2 :p

its easy and fast and this give correct result :)
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
I generally don't get how to edit your trigger... XD

if u upload ur map i can put it else simple u can go to here

http://www.hiveworkshop.com/forums/...prev=search=gui%20damage%20engine&d=list&r=20

copy the ability, and triggers to ur map then in set damage trigger u can make ur if (where u check the armor abilities) and there u set the DamageEventAmount (this is the correct damage amount what u can edit after it is fired out and before the target reicive so just simple divide it with 2)
 
Level 13
Joined
Oct 16, 2010
Messages
737
Okay I'll attach the map to this.

What I need damage wise:
Multiplier for bonus damage = 100% bonus damage
Multiplier for less damage = 75% of norm damage

And if you're feeling like a nice soul could you try to actually put the damage types in?? I know that's a bit far of a question... but ya know....
If so:

Fire: Grass, Bug, Steel
Water: Fire, Ground, Rock
Grass: Water, Rock, Ground
Flying: Grass, Bug
Bug: Grass
Rock: Flying, Electric
Ground: Rock, Steel, Electric, Poison
Poison: Grass
Physic: Poison, Fighting
Ghost: Physic, Ghost
Fighting: Rock, Steel, Normal
Normal: None
Electric: Water, Flying

Fire: Water, Rock, Fire
Water: Grass, Water
Grass: Fire, Poison, Grass
Flying: Rock, Ground, Flying
Bug: Fire, Bug
Rock: Rock, Water
Ground: Water, Flying, Grass, Ground
Poison: Steel, Rock, Ghost, Physic, Poison
Physic: Ghost, Physic
Ghost: Normal
Fighting: Bug, Fighting
Normal: Ghost, Steel, Rock
Electric: Rock, Ground, Grass, Bug, Steel, Electric
 
Last edited:
Level 17
Joined
Nov 13, 2006
Messages
1,814
i dont steal the fun from u, so i made only for fire, rest u can do it :p

here the trighger but map also attached

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Level of Fire Attack for DamageEventSource) Greater than 0
    • Then - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Level of Rock Armor for DamageEventTarget) Greater than 0
              • (Level of Water Armor for DamageEventTarget) Greater than 0
              • (Level of Fire Armor for DamageEventTarget) Greater than 0
        • Then - Actions
          • Set DamageEventAmount = (DamageEventAmount x 0.75)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Level of Grass Armor for DamageEventTarget) Greater than 0
                  • (Level of Steel Armor for DamageEventTarget) Greater than 0
                  • (Level of Bug Armor for DamageEventTarget) Greater than 0
            • Then - Actions
              • Set DamageEventAmount = (DamageEventAmount x 2.00)
            • Else - Actions
    • Else - Actions
 

Attachments

  • PokeMap.w3x
    5.7 MB · Views: 94
Level 17
Joined
Nov 13, 2006
Messages
1,814
Okay all of that is done. One last question. I've already made a few spells via triggers that have to be casted (you can have a look at those). How would I make them fit the damage type system?

if u have area damage trigger or any ability what do damage to more unit, convert it to single target damage

example if u have a trigger where do a aoe damage with 600 range then do unit group with 600 range and deal damage to each picked unit in group

why?

for declare ur damage type u must put before damage this DamageEventType=8
(this 8 is a number, u can put any number there, depend what damage type u want) and simple just check in set damage trigger if DamageEventType == 8 then do this or that :p

problem if ur spells are aoe and damage going out same time then this damage type thing applied to 1st unit :/

so this is why instead this

  • Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius 500.00 at (Target point of ability being cast), dealing 100.00 damage of attack type Spells and damage type Normal
u must do this

  • Unit Group - Pick every unit in (Units within 512.00 of (Target point of ability being cast) matching (((Matching unit) belongs to an enemy of (Triggering player)) Equal to True)) and do (Actions)
    • Loop - Actions
      • Set DamageEventType = 8
      • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
but never forget the remove leaks, point and unti group in this case

http://world-editor-tutorials.thehelper.net/cat_usersubmit.php?view=27219
 
Level 13
Joined
Oct 16, 2010
Messages
737
That sounds simple enough... What if the spell is a single target that deals damage in relation to the users intelligence. for example 2x intel. so if intel was 6 it'd deal 12 damage. How would that work?

Oh and I've put in all of the other stuff and I officially LOVE this system. :D
One question though, will it fail if you use a spell like Soul Burn where it deals damage over time then someone else uses a spell alike it?

*Edit*
Would the spell be classed as DamageTypeSpell? If so that is set to be 1?
 
Last edited:
Level 17
Joined
Nov 13, 2006
Messages
1,814
That sounds simple enough... What if the spell is a single target that deals damage in relation to the users intelligence. for example 2x intel. so if intel was 6 it'd deal 12 damage. How would that work?

Oh and I've put in all of the other stuff and I officially LOVE this system. :D
One question though, will it fail if you use a spell like Soul Burn where it deals damage over time then someone else uses a spell alike it?

*Edit*
Would the spell be classed as DamageTypeSpell? If so that is set to be 1?

1.

if u want set in set damage trigger then just do this

DamageEventAmount = DamageEventAmount + Hero Intellingece(damage source)*2

2. at soul burn it is fail but this is why have more dot spell in spell section, coz that also could make via trigger (basically periodical trigger damage to a target) but u can use a approved dot spell from spell section then simple just declare the damageventtype before damage

3. it is setted if u set before damage (so not automatical) but i think DamageEventType the better way coz lets say if 1 then attack is wood damage, if 3 then fire, etc

NOTICE:

if ur unit attackk only with 1 element damage so lets say bug unit can attack only with bug damage type then set ur unit point value to a number and check it in set damage trigger



i give a example:

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Point-value of DamageEventSource) Equal to 2
    • Then - Actions
      • -------- then lets say 2 is wood elemental attacker --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Point-value of DamageEventTarget) Equal to 5
              • (Point-value of DamageEventTarget) Equal to 2
              • (Point-value of DamageEventTarget) Equal to 3
        • Then - Actions
          • -------- then lets say 2 is wood/fire/metal elemental target --------
        • Else - Actions
    • Else - Actions
for this each ur unit must get a different point value in bject editor

so wood element lets say2, fire element lets say 3, metal lets say 5

then u dont need any armor or damageventtype just check the unit point value=>u dont need to declare DamageEventType or change abilities, u can use soulburn too because unit point value is constant value so if a wood mob do dot then its is allways wood elemental damage
 
Level 13
Joined
Oct 16, 2010
Messages
737
Well most of it works fine anyway. And those that deal damage over time already deal A LOT of damage so I'm not bothered if they don't work.
I am also saying that because I don't really understand what you said....

*Edit*

So if this were the case for the point values (which i don't know how to set via editor)
1 - Fire
2 - Water
3 - Grass
4 - Bug
5 - Flying
6 - Steel
7 - Rock
8 - Ground
9 - Electric
10 - Ghost
11 - Physic
12 - Poison
13 - Fighting
14 - Normal


I would then be able to get rid of the armor abilities and stuff and just use point values? I need that explained.... If you want to do an example I've uploaded the map again
 
Last edited:
Level 17
Joined
Nov 13, 2006
Messages
1,814
i dont need map for that, i show in screenshot coz i dont must import to ur map something, just make 2 if :p
 

Attachments

  • blabla.JPG
    blabla.JPG
    155.4 KB · Views: 134
Level 13
Joined
Oct 16, 2010
Messages
737
Okay. I haven't done the point-value stuff yet as I've been busy with other stuff in the map. I have found a very big error in the system. Here is the prime example (it's happened with other abilities too): I stunned an opponent for 7 seconds. The damage from the spell worked fine but during this 7 seconds of stun no other damage type bonuses/losses worked on the unit. I don't know if it stops working through the entire map when something gets stunned but I definitely know that during the stun it wasn't taking any bonus damage.... Any ideas?
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
Okay. I haven't done the point-value stuff yet as I've been busy with other stuff in the map. I have found a very big error in the system. Here is the prime example (it's happened with other abilities too): I stunned an opponent for 7 seconds. The damage from the spell worked fine but during this 7 seconds of stun no other damage type bonuses/losses worked on the unit. I don't know if it stops working through the entire map when something gets stunned but I definitely know that during the stun it wasn't taking any bonus damage.... Any ideas?

idk what ability u used like armor/attack, maybe its dont work during u are stunned, this is why u can try the point values :p
 
Status
Not open for further replies.
Top