I want some help with this spell. For one, I'm happy that I made a trigger that does work. Code below:
Edit: While I did fix the spell, by changing x to +, every time I hit a unit, it does damage instantly, instead of waiting for the projectile to interact with the unit. Any help with this?
-
Coro Bolt Activation
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Corrosive Bolt
-
(Level of Corrosive Bolt for Alchemist) Greater than or equal to 0
-
-
Actions
-
Set Alchemist = (Casting unit)
-
Set CB_AffectedUnit = (Target unit of ability being cast)
-
Set CB_Level = (Level of Corrosive Bolt for Alchemist)
-
Set CB_Damage = 100.00
-
Set CB_BonusDamage = 30.00
-
Set CB_Level3_Damage_Structure = 200.00
-
Set CB_Chance_Level3 = (Random integer number between 1 and 100)
-
Set CB_BonusEffect1 = Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
-
Set CB_BonusEffect2 = Objects\Spawnmodels\NightElf\NECancelDeath\NECancelDeath.mdl
-
Set CB_BonusEffect1_Removal = (Last created special effect)
-
Set CB_BonusEffect2_Removal = (Last created special effect)
-
-------- I specified the second condition for efficiency. --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Then - Actions
-
-------- I set the damage that the spell will do against enemy units. --------
-
Unit - Cause Alchemist to damage CB_AffectedUnit, dealing (CB_Damage x (20.00 x (Real(CB_Level)))) damage of attack type Spells and damage type Normal
-
-------- Now, I set the bonus damage done to enemy units, if they have any of the 4 buffs mentioned in the Initiation part. --------
-
-------- I added the code that tells the trigger not to attack the mechanical units. --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(CB_AffectedUnit is Mechanical) Equal to False
-
Or - Any (Conditions) are true
-
Conditions
-
(CB_AffectedUnit has buff Cripple) Equal to True
-
(CB_AffectedUnit has buff Faerie Fire) Equal to True
-
(CB_AffectedUnit has buff Purge) Equal to True
-
(CB_AffectedUnit has buff Slow) Equal to True
-
-
-
-
Then - Actions
-
Unit - Cause Alchemist to damage CB_AffectedUnit, dealing (CB_BonusDamage + (20.00 x (Real(CB_Level)))) damage of attack type Spells and damage type Normal
-
-------- Now, it's time for the first special effect to show up and after that, I'll remove it. --------
-
Special Effect - Create a special effect attached to the origin of CB_AffectedUnit using CB_BonusEffect1
-
Special Effect - Destroy CB_BonusEffect1_Removal
-
-------- Now it's time to check the condition for the mechanical units and then make them take extra damage. --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(CB_AffectedUnit is Mechanical) Equal to True
-
CB_Level Greater than or equal to 2
-
-
Then - Actions
-
Unit - Cause Alchemist to damage CB_AffectedUnit, dealing (CB_BonusDamage + (20.00 x (Real(CB_Level)))) damage of attack type Spells and damage type Normal
-
-------- I apply the same special effect for mechanical units. --------
-
Special Effect - Create a special effect attached to the origin of CB_AffectedUnit using CB_BonusEffect1
-
Special Effect - Destroy CB_BonusEffect1_Removal
-
-------- The trigger isn't done. Now we must check if the spell has reached level 3,... --------
-
-------- ... if the spell has a 35% chance to deal bonus damage to enemy structures... --------
-
-------- ... and if the spell targets an enemy structure. --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
CB_Level Greater than or equal to 3
-
(CB_AffectedUnit is A structure) Equal to True
-
CB_Chance_Level3 Less than or equal to 35
-
-
Then - Actions
-
-------- If the conditions have been met, then it's time to cause bonus damage to enemy buildings. --------
-
Unit - Cause Alchemist to damage CB_AffectedUnit, dealing CB_Level3_Damage_Structure damage of attack type Spells and damage type Normal
-
-------- Now I use the 2nd special effect and after that, it's removed. --------
-
Special Effect - Create a special effect attached to the orgin of CB_AffectedUnit using CB_BonusEffect2
-
Special Effect - Destroy CB_BonusEffect2_Removal
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
Edit: While I did fix the spell, by changing x to +, every time I hit a unit, it does damage instantly, instead of waiting for the projectile to interact with the unit. Any help with this?