Crit Building

Level 5
Joined
May 10, 2009
Messages
88
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\

Please help?

{EDIT}
Does ANYONE know how to make this? Or am I not explaining correctly?
 
Last edited by a moderator:
Level 15
Joined
Aug 11, 2009
Messages
1,607
Here you go...:thumbs_up:
  • 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

Made it in a hurry...
 
Level 5
Joined
May 10, 2009
Messages
88
  • 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
Joined
Feb 23, 2007
Messages
1,030
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.
 
Level 15
Joined
Aug 11, 2009
Messages
1,607
  • 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.
 
Level 5
Joined
May 10, 2009
Messages
88
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%
 
Level 5
Joined
May 10, 2009
Messages
88
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:
Level 15
Joined
Aug 11, 2009
Messages
1,607
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
 
Level 5
Joined
May 10, 2009
Messages
88
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

criticalstrike.gif


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 :(
 
Level 15
Joined
Aug 11, 2009
Messages
1,607
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

criticalstrike.gif


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!
 
Level 13
Joined
Aug 31, 2009
Messages
744
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.
 
Level 5
Joined
May 10, 2009
Messages
88
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
?
 
Level 13
Joined
Aug 31, 2009
Messages
744
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).
 
Level 15
Joined
Aug 11, 2009
Messages
1,607
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:
Level 5
Joined
May 10, 2009
Messages
88
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
 
Level 15
Joined
Aug 11, 2009
Messages
1,607
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.
 
Level 5
Joined
May 10, 2009
Messages
88
It is based off of demolish with no % and no damage multiplier, as that is in the trigger...
 
Level 5
Joined
May 10, 2009
Messages
88
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?
 
Level 15
Joined
Aug 11, 2009
Messages
1,607
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.
 
Top