SpasMaster
Hosted Project: SC
- Joined
- Jan 29, 2010
- Messages
- 1,994
Hello, Hive.
I have been experiencing an issue with a simple ability and I cannot figure out what can be the reason for it. So, let me explain what the ability does and what exactly is the issue.
Shatter is a single target ability that instantly deals damage. If the Hero (Ice Lancer) is buffed by Frost Armor, it is consumed, but the damage dealt is increased and the target is stunned.
(There is also a Talent in there that disables that Frost Armor-consumption effect)
Pretty simple. Yet occasionally the trigger apparently does not execute. No damage is dealt, nothing happens. I still cannot find any pattern as to when exactly it does not work, otherwise I would've been able to locate the issue. Something, somewhere, sometimes for some reason prevents the damage to be dealt.
Now, this is an ability in Sunken City which has hundreds of triggers, so the reason for this could be many things. I am not expecting a specific response saying "This is the reason" but rather a lead. What could cause such behavior? What should I be looking for? How would you advise me to narrow down the possibilities?
Here are a couple of important notes:
• The Shatter trigger does not interact directly with any other triggers (it's not turned on/off by anything)
• I figured the [Shatter_Damage] variable could be getting changed somewhere else (to 0 for example), thus resulting in no damage. That's not the case. The variable is only used in this trigger.
• In the Object Editor, the ability is based off Chain Lightning with 1 target and 0 damage.
And finally, here is the trigger itself:
[trigger=""]
Shatter
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Shatter
Actions
Set Generic_Point = (Position of (Triggering unit))
Set Shatter_Damage = ((90.00 x (Real((Level of Shatter for (Triggering unit))))) + (2.65 x (Real((Agility of (Triggering unit) (Include bonuses))))))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Talents_Unit[1] has an item of type Snowy Bond) Equal to True
Then - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) has buff Frost Armor (Troll)) Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Talents_Unit[1] has an item of type Icebreak) Equal to True
Then - Actions
Set Shatter_Damage = (Shatter_Damage x 1.60)
Else - Actions
Set Shatter_Damage = (Shatter_Damage x 1.30)
Unit - Create 1 Dummy (Generic Uses) for (Owner of (Triggering unit)) at Generic_Point facing Default building facing degrees
Unit - Add Shatter Stun to (Last created unit)
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Target unit of ability being cast)
Unit - Remove Frost Armor (Troll) buff from (Triggering unit)
Else - Actions
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing Shatter_Damage damage of attack type Spells and damage type Normal
Custom script: call RemoveLocation(udg_Generic_Point)
[/trigger]
I have been experiencing an issue with a simple ability and I cannot figure out what can be the reason for it. So, let me explain what the ability does and what exactly is the issue.
Shatter is a single target ability that instantly deals damage. If the Hero (Ice Lancer) is buffed by Frost Armor, it is consumed, but the damage dealt is increased and the target is stunned.
(There is also a Talent in there that disables that Frost Armor-consumption effect)
Pretty simple. Yet occasionally the trigger apparently does not execute. No damage is dealt, nothing happens. I still cannot find any pattern as to when exactly it does not work, otherwise I would've been able to locate the issue. Something, somewhere, sometimes for some reason prevents the damage to be dealt.
Now, this is an ability in Sunken City which has hundreds of triggers, so the reason for this could be many things. I am not expecting a specific response saying "This is the reason" but rather a lead. What could cause such behavior? What should I be looking for? How would you advise me to narrow down the possibilities?
Here are a couple of important notes:
• The Shatter trigger does not interact directly with any other triggers (it's not turned on/off by anything)
• I figured the [Shatter_Damage] variable could be getting changed somewhere else (to 0 for example), thus resulting in no damage. That's not the case. The variable is only used in this trigger.
• In the Object Editor, the ability is based off Chain Lightning with 1 target and 0 damage.
And finally, here is the trigger itself:
[trigger=""]
Shatter
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Shatter
Actions
Set Generic_Point = (Position of (Triggering unit))
Set Shatter_Damage = ((90.00 x (Real((Level of Shatter for (Triggering unit))))) + (2.65 x (Real((Agility of (Triggering unit) (Include bonuses))))))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Talents_Unit[1] has an item of type Snowy Bond) Equal to True
Then - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) has buff Frost Armor (Troll)) Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Talents_Unit[1] has an item of type Icebreak) Equal to True
Then - Actions
Set Shatter_Damage = (Shatter_Damage x 1.60)
Else - Actions
Set Shatter_Damage = (Shatter_Damage x 1.30)
Unit - Create 1 Dummy (Generic Uses) for (Owner of (Triggering unit)) at Generic_Point facing Default building facing degrees
Unit - Add Shatter Stun to (Last created unit)
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Target unit of ability being cast)
Unit - Remove Frost Armor (Troll) buff from (Triggering unit)
Else - Actions
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing Shatter_Damage damage of attack type Spells and damage type Normal
Custom script: call RemoveLocation(udg_Generic_Point)
[/trigger]
Last edited: