Moderator
M
Moderator
|
Moderator: Pharaoh_ Date: 12th of July, 2012 22:31 (GMT+2)
|
Arb init

Events


Map initialization

Conditions

Actions


-------- ============================================================== --------


-------- =============YOU CAN CONFIGURE THE VALUES BELOW=========== --------


-------- you can configure the damage dealt by the summoned unit. --------


Set Ab_Damage = 25.00


-------- you can configure the time. --------


-------- this is also multiplied by the level of the ability --------


Set Ab_Time = 10.00


-------- ============================================================== --------


-------- configure the damage dealt to the target during the cast --------


Set Ab_damage_percent = 6.67


-------- using 6.67 in damage_percent means 15% --------


-------- the formula is: Timed_Damage[integer] = (((Life of u[integer]) x (Real((Level of Cripple (Neutral Hostile) for caster[integer])))) / damage_percent) --------


-------- so, if life of the summoned unit is 250, multiply that to the level of the ability divided by the damage_percent, that's the real damage dealt to the target unit --------


-------- using this configuration, the damage would be: --------


-------- Level 1 = 35.982008 or just 36 to round this off --------


-------- Level 2 = 59.97001 or 60 --------


-------- Level 3 = 142.4287857 or 142 --------


-------- ============================================================== --------


-------- you can configure the kind of unit to spawn in each level --------


-------- in the object editor, do not forget to configure the food cost and lumber cost of the units to be used here --------


-------- food cost and lumber cost should be set to zero --------


-------- it is also the best to create custom units only for this --------


Set Ab_TimedUnit[1] = Bandit


-------- HP = 240 --------


Set Ab_TimedUnit[2] = Rogue


-------- HP = 400 --------


Set Ab_TimedUnit[3] = Bandit Lord


-------- HP = 950 --------


-------- ============================================================== --------


-------- configure all the special effects --------


Set Ab_SFXCreationPath = Abilities\Spells\Human\Resurrect\ResurrectTarget.mdl


Set Ab_SFXRemovePath = Abilities\Spells\Human\MassTeleport\MassTeleportCaster.mdl


Set Ab_TargetSFXPath = Abilities\Spells\Orc\Purge\PurgeBuffTarget.mdl


-------- configure the attachment point for the target --------


Set Ab_TargetSFXAttchment = origin


-------- ============================================================== --------


Set Ab_Spell = Abettor


-------- =============END OF CONFIGURABLES=========== --------


-------- ============================================================== --------


-------- DON'T TOUCH THE ACTION BELOW --------


-------- ============================================================== --------


Set Ab_unit_counter = 1


-------- ============================================================== --------
Arb create

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Ab_Spell

Actions


-------- DON'T TOUCH THE ACTIONS BELOW --------


Set Ab_size = (Ab_size + 1)


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




Ab_size Greater than Ab_maxsize



Then - Actions




Set Ab_index[Ab_size] = Ab_size




Set Ab_maxsize = Ab_size



Else - Actions


Set Ab_integer = Ab_index[Ab_size]


-------- ========================================================== --------


Set Ab_target[Ab_integer] = (Target unit of ability being cast)


Set Ab_caster[Ab_integer] = (Triggering unit)


Set Ab_TargetPos = (Position of Ab_target[Ab_integer])


Set Ab_SpawnUnit[Ab_integer] = (Ab_unit_counter x (Level of Abettor for Ab_caster[Ab_integer]))


Set Ab_TimedLife[Ab_integer] = (Ab_Time x (Real((Level of Abettor for Ab_caster[Ab_integer]))))


Set Ab_caster_position = (Position of Ab_caster[Ab_integer])


Set Ab_u_pos_initial[Ab_integer] = (Ab_TargetPos offset by 100.00 towards (Facing of Ab_caster[Ab_integer]) degrees)


-------- ======================================================= --------


Unit - Create 1 Ab_TimedUnit[Ab_SpawnUnit[Ab_integer]] for (Owner of Ab_caster[Ab_integer]) at Ab_u_pos_initial[Ab_integer] facing Default building facing degrees


Set Ab_timed_unit[Ab_integer] = (Last created unit)


Set Ab_Timed_Damage[Ab_integer] = ((Life of Ab_timed_unit[Ab_integer]) / Ab_damage_percent)


Set Ab_DamageReal[Ab_integer] = (Ab_Damage x (Real((Level of Ab_Spell for Ab_caster[Ab_integer]))))


Special Effect - Create a special effect at Ab_u_pos_initial[Ab_integer] using Ab_SFXCreationPath


Special Effect - Destroy (Last created special effect)


Special Effect - Create a special effect attached to the Ab_TargetSFXAttchment of Ab_target[Ab_integer] using Ab_TargetSFXPath


Set Ab_target_SFX[Ab_integer] = (Last created special effect)


Unit - Cause Ab_caster[Ab_integer] to damage Ab_target[Ab_integer], dealing Ab_Timed_Damage[Ab_integer] damage of attack type Spells and damage type Normal


Custom script: call RemoveLocation(udg_Ab_u_pos_initial[udg_Ab_integer])


Custom script: call RemoveLocation(udg_Ab_caster_position)


Custom script: call RemoveLocation(udg_Ab_TargetPos)


Trigger - Turn on Arb timer <gen>


-------- ======================================================= --------