AceLegend90
New Member
- Reaction score
- 6
Hi, I've been stuck on this ability for awhile, and I've gone through all the possible ideas I could think of.
This is what the ability does: The ability morphs the target hero into another hero for so and so seconds. The morphed hero has no abilities (doesn't matter if his old skills are disabled or removed) except for a new ability that is an aura that turns other heroes in so and so range into the morphed hero as well. The units affected by the aura retain their abilities but not their life, mana, damage, armor, and attributes. After the original target hero turns back into himself again, I want him to be completely his old self with his abilities with any life/mana gains/losses and experience gains.
Now, I have the aura working fine except for that when the people in the aura turn back to their old selves, they have to redistribute their skill points.
I've approached this many, many ways already but couldn't come up with a solution, so I decided to post it on a forum.
Here's what I have for morphing the regular hero:
Here's what I have for the aura:
Help is much appreciated!
This is what the ability does: The ability morphs the target hero into another hero for so and so seconds. The morphed hero has no abilities (doesn't matter if his old skills are disabled or removed) except for a new ability that is an aura that turns other heroes in so and so range into the morphed hero as well. The units affected by the aura retain their abilities but not their life, mana, damage, armor, and attributes. After the original target hero turns back into himself again, I want him to be completely his old self with his abilities with any life/mana gains/losses and experience gains.
Now, I have the aura working fine except for that when the people in the aura turn back to their old selves, they have to redistribute their skill points.
I've approached this many, many ways already but couldn't come up with a solution, so I decided to post it on a forum.
Here's what I have for morphing the regular hero:
Code:
Victimize
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Victimize
Actions
Set Victimize_UnitSP = (Unspent skill points of (Target unit of ability being cast))
Set Point = (Player 1 (Red) start location)
Unit - Create 1 (Unit-type of (Target unit of ability being cast)) for Player 1 (Red) at Point facing 0.00 degrees
Custom script: call RemoveLocation(udg_Point)
Set Victimize_UnitOriginal = (Last created unit)
Unit - Replace (Target unit of ability being cast) with a Ghoul (morph) using The old unit's relative life and mana
Set Victimize_Unit = (Last replaced unit)
Hero - Modify unspent skill points of Victimize_Unit: Set to 0 points
Unit - Add Victimize Aura to Victimize_Unit
Unit - Set level of Victimize Aura for Victimize_Unit to 1
Trigger - Turn on Victimize Aura <gen>
Unit - Add a (11.00 + (10.00 x (Real((Level of Victimize for (Triggering unit)))))) second Generic expiration timer to Victimize_Unit
Wait (10.00 + (10.00 x (Real((Level of Victimize for (Triggering unit)))))) seconds
Unit - Replace Victimize_Unit with a (Unit-type of Victimize_UnitOriginal) using The old unit's relative life and mana
Hero - Modify unspent skill points of (Last replaced unit): Set to Victimize_UnitSP points
Unit - Remove Victimize_UnitOriginal from the game
Wait 5.00 seconds
Trigger - Turn off Victimize Aura <gen>
Here's what I have for the aura:
Code:
Victimize Aura
Events
Time - Every 0.25 seconds of game time
Conditions
Actions
Set VictimizeAura_UnitsBuffed = (Units in (Playable map area) matching ((((Matching unit) has buff Victimize Aura ) Equal to True) and ((Unit-type of (Matching unit)) Not equal to Ghoul (morph))))
Set Index = 1
Unit Group - Pick every unit in VictimizeAura_UnitsBuffed and do (Actions)
Loop - Actions
Unit - Create 1 (Unit-type of (Picked unit)) for Player 1 (Red) at (Player 1 (Red) start location) facing Default building facing degrees
Set VictimizeAura_UnitsOriginal[Index] = (Last created unit)
Unit - Set the custom value of (Picked unit) to Index
Set Index = (Index + 1)
Unit - Add Victimize Aura Morph to (Picked unit)
Unit - Set level of Victimize Aura Morph for (Picked unit) to 1
Set VictimizeAura_UnitsNotBuffed = (Units in (Playable map area) matching ((((Matching unit) has buff Victimize Aura ) Equal to False) and ((Unit-type of (Matching unit)) Equal to Ghoul (morph))))
Custom script: call DestroyGroup(udg_VictimizeAura_UnitsBuffed)
Unit Group - Pick every unit in VictimizeAura_UnitsNotBuffed and do (Actions)
Loop - Actions
Unit - Decrease level of Victimize Aura Morph for (Picked unit)
Unit - Remove Victimize Aura Morph from (Picked unit)
For each (Integer Index) from 1 to 4, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Custom value of (Picked unit)) Equal to Index
Then - Actions
Unit - Replace (Picked unit) with a (Unit-type of VictimizeAura_UnitsOriginal[Index]) using The old unit's relative life and mana
Unit - Remove VictimizeAura_UnitsOriginal[Index] from the game
Else - Actions
Do nothing
Selection - Select (Last replaced unit) for (Owner of (Last replaced unit))
Custom script: call DestroyGroup(udg_VictimizeAura_UnitsNotBuffed)
Help is much appreciated!