# Crit Building

#### Lode

Level 5
I need a trigger that:

Uses base spell Critical Strike, and damages a building by 50x the level of the attacking hero added onto his base damage.

Hero Level: 10
Base Damage: 200

I need a trigger that damages a BUILDING by (50 x 10{level of hero}) + base damage of hero\

{EDIT}
Does ANYONE know how to make this? Or am I not explaining correctly?

Last edited by a moderator:

#### reason 3

Level 15
Here you go...
• BuildCrit
• Events
• Unit - A unit Is attacked
• Conditions
• ((Triggering unit) is A structure) Equal to True
• ((Attacking unit) is A Hero) Equal to True
• Actions
• Set Temp_Integer = (Random integer number between 1 and 100)
• Set Damage = (50.00 x (Real((Hero level of (Attacking unit)))))
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• Temp_Integer Less than or equal to 25
• Then - Actions
• Unit - Cause (Attacking unit) to damage (Triggering unit), dealing Damage damage of attack type Hero and damage type Normal
• Else - Actions

#### Lode

Level 5
• BuildCrit
• Events
• Unit - A unit Is attacked
• Conditions
• ((Triggering unit) is A structure) Equal to True
• ((Attacking unit) is A Hero) Equal to True
• Actions
• Set Temp_Integer = (Random integer number between 1 and 100)
• Set Damage = (50.00 x (Real((Hero level of (Attacking unit)))))
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• Temp_Integer Less than or equal to 25
• Then - Actions
• Unit - Cause (Attacking unit) to damage (Triggering unit), dealing Damage damage of attack type Hero and damage type Normal
• Else - Actions
A few questions...

Temp_Integer is equal to % chance to hit?
If I wanted to make this a spell... what would I use?

Level 12
Please note that a player could abuse that by spamming the stop key, forcing the unit to repeatedly start to attack the building. I'd normally suggest a damage detection system, but I don't think you have the skills to implement it.

#### reason 3

Level 15
• BuildCrit
• Events
• Unit - A unit Is attacked
• Conditions
• ((Triggering unit) is A structure) Equal to True
• ((Attacking unit) is A Hero) Equal to True
• Actions
• Set Temp_Integer = (Random integer number between 1 and 100)
• Set Damage = (50.00 x (Real((Hero level of (Attacking unit)))))
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• Temp_Integer Less than or equal to 25
• Then - Actions
• Unit - Cause (Attacking unit) to damage (Triggering unit), dealing Damage damage of attack type Hero and damage type Normal
• Else - Actions
A few questions...

Temp_Integer is equal to % chance to hit?
If I wanted to make this a spell... what would I use?

Yes Temp_Integer is the % chances for critical strike to occur.
What do you mean,if you wanted to make this spell what would you use?
Temp_Integer is an Integer Variable
Damage is a Real Variable

@Dreadnought[dA] yes you are right,i just thought it would be too complicated for him to understand how it works and probably he would have problems implementing it.

#### Catch_ya

Level 11
About the stop key thing he could just do the unit takes damage method this should prevent you for keep pressing stop key because it fires when the unit IS damaged..

#### Super-Sheep

Level 20
"Unit is attacked" and "Damage taken" wont work together..?

#### Damage

Level 13
You cannot add a generic unit to "Unit takes damage" event. It must specifically be a unit pre-placed in the editor.

Unless you use a damage detection system.

#### reason 3

Level 15
You cannot add a generic unit to "Unit takes damage" event. It must specifically be a unit pre-placed in the editor.

Unless you use a damage detection system.

Exactly.

#### Lode

Level 5
What do you mean,if you wanted to make this spell what would you use?

I mean, i'm using spell CritBuilding, and I want this trigger to apply to that spell. How would I make this apply to the spell CritBuilding using base spell sourse Critical Hit? Do I HAVE to use Channel? If I do, how would I go about making a spell that would implement the 50x(hero level) + base damage on a % ratio of x%?

Basically, i'm using a spell that is PASSIVE (not clickable, like crit or bash) that uses a trigger to crit a building for 50x(hero level) + base damage on a % ratio of x%

#### ikillforeyou

Level 21
Use "Demolish" from neutral tinker, i think it has what you want.

#### Lode

Level 5
But this multiple the damage altogether, how can I make a trigger for a PASSIVE ability to damage building by 50x the LEVEL OF THE HERO?

Last edited:

#### reason 3

Level 15
Quite simple...Just create an ability that does nothing...you can edit the default critical and set the damage multiplier to 0.
Thus,when your hero learns this skill,he will get the critical buff.
Then you will need to add this condition to the above trigger
• ((Attacking unit) has buff Critical) Equal to True

#### reason 3

Level 15
Hmm, not rlly sure

Why not?When hero learns Critical strike abilty,you will be able to see the critical icon(buff) to his status.
This should work,i'm not 100% sure as i haven't tested it.

#### Lode

Level 5
Here is what I have:

• CritBuilding
• Events
• Unit - A Unit begins casting an ability
• Conditions
• (Ability being cast) Equal to BuildingCrit
• Actions
• If (All Conditions are True) then do (Then Actions) else to (Else Actions)
• If - Conditions
• (((Targeted unit) is A structure) Equal to True)
• Then - Actions
• Unit - Cause (Triggering unit) to damage (Attacked unit), dealing (50.00 x (Real((Level of (Triggering unit))))) damage of attack type Normal and damage type Normal
• Else - Actions
• Do Nothing
How do I add the BASE DAMAGE of the hero to this? (Down)

• Then - Actions
• Unit - Cause (Triggering unit) to damage (Attacked unit), dealing (50.00 x (Real((Level of (Triggering unit))))) damage of attack type Normal and damage type Normal
Why not?When hero learns Critical strike abilty,you will be able to see the critical icon(buff) to his status.
This should work,i'm not 100% sure as i haven't tested it.

So what you are saying is...the critical icon he has

Is really a buff that he posseses? A passive ability is equal to a buff?

And a quick side note...how are you guys making those dropdown bars on the trigger tags? cant figure it out

#### reason 3

Level 15
Here is what I have:

• CritBuilding
• Events
• Unit - A Unit begins casting an ability
• Conditions
• (Ability being cast) Equal to BuildingCrit
• Actions
• If (All Conditions are True) then do (Then Actions) else to (Else Actions)
• If - Conditions
• (((Targeted unit) is A structure) Equal to True)
• Then - Actions
• Unit - Cause (Triggering unit) to damage (Attacked unit), dealing (50.00 x (Real((Level of (Triggering unit))))) damage of attack type Normal and damage type Normal
• Else - Actions
• Do Nothing

I will try and explain it t you...the trigger you made fires up then an ability is being cast,but our ability critical strike is actually never casted...it's a passive abilty.
So probably your trigger won't work.
Try make it similar to mine.
Oh and by the way,remove the -Do Nothing its of no use here.
How do I add the BASE DAMAGE of the hero to this? (Down)

• Then - Actions
• Unit - Cause (Triggering unit) to damage (Attacked unit), dealing (50.00 x (Real((Level of (Triggering unit))))) damage of attack type Normal and damage type Normal
You don't need to add anything...your hero will hit the building so he will deal his normal damage,no need to trigger it.
So what you are saying is...the critical icon he has

Is really a buff that he posseses? A passive ability is equal to a buff?

Yes this is what i mean.
And a quick side note...how are you guys making those dropdown bars on the trigger tags? cant figure it out

Simply go to your world editor,right click on the trigger and press "copy as text",then ctrl+V it here in trigger tags.

Hope this helped!

#### Damage

Level 13
Critical Strike does NOT put a buff on a hero. It is a passive ability. You can check for "Level of (Crit Building) for (Triggering Unit) greater than or equal to 1" which will check for the ability actually being present on the unit, as part of the conditions for the % chance.

To check for the actual damage being dealt (so you can multiply it to make a crit), you simply cannot do that without a Damage Detection System.

#### ikillforeyou

Level 21
Or just do the same thing, but use a frost attack based ability, then make the buff duration 0.01 and make it slow/other stuff to 0.00

then check if the unit has the buff, and if it does, do events.

Thats what i do for passive random abilities, and such.

#### Lode

Level 5
I will try and explain it t you...the trigger you made fires up then an ability is being cast,but our ability critical strike is actually never casted...it's a passive abilty.
So probably your trigger won't work.
Try make it similar to mine.
Oh and by the way,remove the -Do Nothing its of no use here.
Thanks so much! This helped a lot
By the way, where is

• ((Attacking unit) has buff Critical) Equal to True
I can't find it under anything...

Critical Strike does NOT put a buff on a hero. It is a passive ability. You can check for "Level of (Crit Building) for (Triggering Unit) greater than or equal to 1" which will check for the ability actually being present on the unit, as part of the conditions for the % chance.

To check for the actual damage being dealt (so you can multiply it to make a crit), you simply cannot do that without a Damage Detection System.

Ok this explains a little more...so instead of putting

• Unit - A Unit begins casting an ability
Would I put

• Unit - A unit is attacked
then

• (((Targeted unit) is A structure) Equal to True)
• Actions
• If (All Conditions are True) then do (Then Actions) else to (Else Actions)
• If - Conditions
• Level of (Crit Building) for (Triggering Unit) Greater than or equal to 1
• Then - Actions
• Unit - Cause (Triggering unit) to damage (Attacked unit), dealing (50.00 x (Real((Level of (Triggering unit))))) damage of attack type Normal and damage type Normal
• Else - Actions
?

#### Damage

Level 13
In that case, no. Because the triggering unit is the unit being attacked.
Use "Attacking Unit" to refer to the attacker.

If you want a % chance, you have to have a condition along the lines of
• (Random integer number between 1 and 100) less than or equal to 15
(Where 15 is the %chance you want)

Similarly, you want the attacking unit to deal the damage to the triggering unit. Not triggering unit to damage attacked unit (they're the same thing in this case).

#### reason 3

Level 15
Once again,Damage is right.

Although i have already mentioned it above.

EDIT: Kinda silly question,but have you tried adding as Targets Allowed - Structures in Object Editor to the default critical strike ability?

Last edited:

#### Lode

Level 5
Here is what I have. and it is not working...what am I doing wrong??

• Smash
• Events
• Unit - A unit Is attacked
• Conditions
• ((Triggering unit) is A structure) Equal to True
• Actions
• Set Temp_Integer = (Random integer number between 1 and 100)
• Set Damage = (Real((Hero level of (Attacking unit))))
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• Temp_Integer Less than or equal to 15
• (Level of CritBuilding for (Attacking unit)) Equal to 1
• Then - Actions
• Unit - Cause (Attacking unit) to damage (Triggering unit), dealing Damage damage of attack type Normal and damage type Normal
• Else - Actions
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• Temp_Integer Less than or equal to 30
• (Level of CritBuilding for (Attacking unit)) Equal to 2
• Then - Actions
• Unit - Cause (Attacking unit) to damage (Triggering unit), dealing Damage damage of attack type Normal and damage type Normal
• Else - Actions
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• Temp_Integer Less than or equal to 45
• (Level of CritBuilding for (Attacking unit)) Equal to 3
• Then - Actions
• Unit - Cause (Attacking unit) to damage (Triggering unit), dealing Damage damage of attack type Normal and damage type Normal
• Else - Actions
EDIT: Kinda silly question,but have you tried adding as Targets Allowed - Structures in Object Editor to the default critical strike ability?
Yes, I have:
Level 1 - F) Stats - Targets Allowed ---- Structure

I edited it to allow only structures

#### ikillforeyou

Level 21
Just base it off of "Demolish" like i said before, then trigger it, if you want.

#### reason 3

Level 15
Here is what I have. and it is not working...what am I doing wrong??

• Smash
• Events
• Unit - A unit Is attacked
• Conditions
• ((Triggering unit) is A structure) Equal to True
• Actions
• Set Temp_Integer = (Random integer number between 1 and 100)
• Set Damage = (Real((Hero level of (Attacking unit))))
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• Temp_Integer Less than or equal to 15
• (Level of CritBuilding for (Attacking unit)) Equal to 1
• Then - Actions
• Unit - Cause (Attacking unit) to damage (Triggering unit), dealing Damage damage of attack type Normal and damage type Normal
• Else - Actions
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• Temp_Integer Less than or equal to 30
• (Level of CritBuilding for (Attacking unit)) Equal to 2
• Then - Actions
• Unit - Cause (Attacking unit) to damage (Triggering unit), dealing Damage damage of attack type Normal and damage type Normal
• Else - Actions
• If (All Conditions are True) then do (Then Actions) else do (Else Actions)
• If - Conditions
• Temp_Integer Less than or equal to 45
• (Level of CritBuilding for (Attacking unit)) Equal to 3
• Then - Actions
• Unit - Cause (Attacking unit) to damage (Triggering unit), dealing Damage damage of attack type Normal and damage type Normal
• Else - Actions

Change Damage to this...
• Set Damage = (50.00 x (Real((Hero level of (Attacking unit)))))
And at this
• Unit - Cause (Attacking unit) to damage (Triggering unit), dealing Damage damage of attack type Normal and damage type Normal
Change damage type to Hero(the first one)
like
• Unit - Cause (Attacking unit) to damage (Triggering unit), dealing Damage damage of attack type Hero and damage type Normal
I see no reasons why this shouldn't work.

#### ikillforeyou

Level 21
You can still abuse the stop glitch with that, use a damage detection system, or use a buff with an offest.

#### Lode

Level 5
It is based off of demolish with no % and no damage multiplier, as that is in the trigger...

#### Lode

Level 5
OK its fixed... thanks so much to all that helped +rep to all for dealing with me lol

A quick question though...

• Smash
• Then - Actions
• Unit - Cause (Attacking unit) to damage (Triggering unit), dealing Damage damage of attack type Hero and damage type Normal
For all heros, does the 'damage of attack type Hero' always have to be hero?

#### reason 3

Level 15
OK its fixed... thanks so much to all that helped +rep to all for dealing with me lol

A quick question though...

• Smash
• Then - Actions
• Unit - Cause (Attacking unit) to damage (Triggering unit), dealing Damage damage of attack type Hero and damage type Normal
For all heros, does the 'damage of attack type Hero' always have to be hero?

No it can be whatever you want,but in your case the attacking unit is a hero and the damage we have to apply to the building has to be hero.

Different Damage types deal different amount of damages to different amount of armors.

For example,Chaos deals 100% damage to all type of armors even divine.

#### ikillforeyou

Level 21
its usually damage type spells, as critical strike and shadow strike do "Spells" damage.

#### reason 3

Level 15
Not really...i think critical increases base damage which is hero type.

Replies
3
Views
475
Replies
3
Views
406
Replies
2
Views
672
Replies
0
Views
805
Replies
6
Views
753