- Joined
- May 3, 2008
- Messages
- 18
Take into consideration that this is my first post here, sorry if i make any mistakes.
So, the thing i need help with is probably some fault in logic i made while making my spell with triggers in GUI.
The problem is as follows:
The spell executes, the special effects work, but when the damage part of the spell comes it seems to do some random damage instead a fixed one while sometimes hitting the same unit more than once and sometimes doesn't damage the unit at all.
I am not good with JASS, so i may(probably) have misplaced some RemLoc custom text.
-------------

-------------
EDIT: The first 3 numbers in the picture are the damage caused by the skill i based my skill of (Thunder Clap).
So, the thing i need help with is probably some fault in logic i made while making my spell with triggers in GUI.
The problem is as follows:
The spell executes, the special effects work, but when the damage part of the spell comes it seems to do some random damage instead a fixed one while sometimes hitting the same unit more than once and sometimes doesn't damage the unit at all.
-
Test 2
-
Events
-
Unit - Tester 0016 <gen> Takes damage
-
Unit - Tester 0017 <gen> Takes damage
-
Unit - Tester 0018 <gen> Takes damage
-
-
Conditions
-
Actions
-
Game - Display to (All players) the text: (String((Damage taken)))
-
-
-
Magic The Gathering
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Magic: The Gathering [Spell Breaker]
-
-
Actions
-
Set MTGCasterUnit = (Casting unit)
-
Set MTGGlaivePoint = ((Position of MTGCasterUnit) offset by 48.00 towards ((Facing of MTGCasterUnit) - 45.00) degrees)
-
Set MTGUG = (Units within 500.00 of (Position of MTGCasterUnit) matching (((Matching unit) belongs to an enemy of (Owner of MTGCasterUnit)) Equal to True))
-
Set MTGUGInteger = (Number of units in MTGUG)
-
For each (Integer A) from 1 to MTGUGInteger, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in MTGUG) Greater than or equal to 1
-
-
Then - Actions
-
Set MTGUnitTarget[(Integer A)] = (Random unit from MTGUG)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(MTGUnitTarget[(Integer A)] is dead) Equal to True
-
-
Then - Actions
-
Unit Group - Remove MTGUnitTarget[(Integer A)] from MTGUG
-
-
Else - Actions
-
Set tempPoint = (Position of MTGUnitTarget[(Integer A)])
-
Unit - Create 1 Magic: The Gathering for (Owner of MTGCasterUnit) at tempPoint facing Default building facing degrees
-
Set MTGSpecialEffectUnit[(Integer A)] = (Last created unit)
-
Custom script: call RemoveLocation(udg_tempPoint)
-
-
-
-
Else - Actions
-
Do nothing
-
-
-
-
-
Animation - Play MTGCasterUnit's spell animation
-
Animation - Change MTGCasterUnit's animation speed to 150.00% of its original speed
-
Trigger - Turn on Magic The Gathering Special Effect <gen>
-
Wait 0.50 seconds
-
Trigger - Turn off Magic The Gathering Special Effect <gen>
-
Animation - Change MTGCasterUnit's animation speed to 100.00% of its original speed
-
For each (Integer A) from 1 to MTGUGInteger, do (Actions)
-
Loop - Actions
-
Unit - Set mana of MTGUnitTarget[(Integer A)] to ((Mana of MTGUnitTarget[(Integer A)]) x 0.90)
-
Unit - Cause MTGCasterUnit to damage MTGUnitTarget[(Integer A)], dealing ((12.00 x (Real((Hero level of MTGCasterUnit)))) + (0.10 x (Mana of MTGUnitTarget[(Integer A)]))) damage of attack type Spells and damage type Normal
-
Unit - Cause MTGCasterUnit to damage MTGUnitTarget[(Integer A)], dealing ((((12.00 x (Real((Hero level of MTGCasterUnit)))) + (0.10 x (Mana of MTGUnitTarget[(Integer A)]))) x (Real((Level of + Power for MTGCasterUnit)))) x 0.10) damage of attack type Spells and damage type Normal
-
Unit Group - Remove MTGUnitTarget[(Integer A)] from MTGUG
-
-
-
-------- Removal --------
-
For each (Integer A) from 1 to MTGUGInteger, do (Actions)
-
Loop - Actions
-
Unit - Remove MTGSpecialEffectUnit[(Integer A)] from the game
-
-
-
Set MTGCasterUnit = No unit
-
Custom script: call RemoveLocation(udg_tempPoint)
-
Custom script: call RemoveLocation(udg_MTGGlaivePoint)
-
Set MTGUGInteger = 0
-
-
-------------

-------------
EDIT: The first 3 numbers in the picture are the damage caused by the skill i based my skill of (Thunder Clap).
Last edited: