I'm trying these triggers but in the defend damage reduction trigger there is no "Unit - A unit Takes damage" in the generic unit eventYou can use a Damage event:
Defend Toggle
Events
Unit - A unit Is issued an order with no target
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Issued order) Equal to (Order(defend))
Then - Actions
Unit - Add Defend (Check) to (Triggering unit)
Set VariableSet DefendCount = (DefendCount + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DefendCount Equal to 1
Then - Actions
Trigger - Turn on Defend Damage Reduction <gen>
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Issued order) Equal to (Order(undefend))
Then - Actions
Unit - Remove Defend (Check) from (Triggering unit)
Set VariableSet DefendCount = (DefendCount - 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DefendCount Equal to 0
Then - Actions
Trigger - Turn off Defend Damage Reduction <gen>
Else - Actions
Else - Actions
Defend (Check) is a hidden passive ability based on Storm Hammers which serves to detect when a unit is defending or not.
Defend Damage Reduction
Events
Unit - A unit Takes damage
Conditions
(Level of Defend (Check) for (Triggering unit)) Equal to 1
Actions
Event Response - Set Damage of Unit Damaged Event to ((Damage taken) x 0.75)
Edit: Or apply Chaosium's suggestion in the first trigger and skip the need for the Defend Damage Reduction trigger and the DefendCount stuff.
Which one exactly? Because the Defence Bonus Option data used give him bonus armor. is that what you mean?Create an ability based on Spiked Carapace, it has a field allowing to grant X% damage reduction, then you simply add/remove this ability when defend is cast/cancelled
Received Damage Factor = 1.00.Which one exactly? Because the Defence Bonus Option data used give him bonus armor. is that what you mean?