Mythical Scroll V1,0

This bundle is marked as approved. It works and satisfies the submission rules.
Presentation:
One Day I saw Mythic Sfx, then I had this idea.

I hope you will find it interesting and enjoy it.

Description:
This spell is a ground targetable army teleport spell.
This spell is divided in 2 parts. The first part is summoning a portal.
The second part is Launching a scroll to target location, and moves allied units in the area when the scroll lands.


full



How to Import:
1 - You must copy/paste the 2 custom abilities into your map.
2 - Copy and paste all the trigger.
3 - Enjoy that nice effects

Screenshots:

full




full




full




full



Changelogs:
V1,0
First Release

Credits:
Effects made by @Mythic
Spell made by me

You can use in-game and edit, dont forget to give credits.
Have Fun and a lot of kills.
Contents

Mythical Scroll V1,0 (Map)

Reviews
MyPad
This is quite a simple yet useful spell to have. The choice of portal models is decent; it stands out in the battlefield, and does not smother the player with too much flashiness, despite the brightness of the portal itself. On a side note, I could...

MyPad

Spell Reviewer
Level 20
Joined
May 9, 2014
Messages
1,636
This is quite a simple yet useful spell to have. The choice of portal models is decent; it stands out in the battlefield, and does not smother the player with too much flashiness, despite the brightness of the portal itself.

Though the code works, there are some optimizations to be desired and suggestions to be made:
  1. The nullFilter function can be done away with entirely, since it does not appear to actually filter units.
    As a result, the change will look like the following:

    JASS:
    private struct Scroll
        ..
        private method scrollTeleport takes nothing returns nothing
            ..
            call GroupEnumUnitsInRange(G, .x, .y, RADIUS, null)    // Changed line

  2. The use of polar coordinates is actually unnecessary for this spell, since the positions of the targets to be teleported
    are calculated relative to the cast point coordinates of the teleport skill. The calculation of distance, as well as the angle
    incurs unnecessary overhead to the system.

    1623333241806.png


    Using the information about the change in the x-coordinate dx and the y-coordinate dy respectively, the new position of
    the teleported units can be calculated as follows:

    1623333656733.png


  3. It appears that the spell breaks orders, both current and shift-queued ones. Unless it is intentional, this can be
    replaced with [ljass]SetUnitX[/ljass] and [ljass]SetUnitY[/ljass] respectively.

  4. The initializer function can be set to private.

  5. The triggers which check when either one of the two spells are cast can be merged into one trigger.
    Similarly, the conditions and the actions thread for each one of the two spells can be merged into one.

    Ideally, this would be the structure of the unified trigger when both the conditions and actions of the
    separate triggers are merged.

    JASS:
    private function OnSpellCast takes nothing returns nothing
        local integer abilID = GetSpellAbilityId()
        if abilID == SPELL_PORTAL then
            call Trig_MythicalScrollPortal_Actions()
        elseif abilID == SPELL_TELEPORT then
            call Trig_MythicalScrollTeleport_Actions()
        endif
    endfunction
    
    private function Init_MythicalScroll takes nothing returns nothing
        local trigger T = CreateTrigger()
        call TriggerRegisterAnyUnitEventBJ(T, EVENT_PLAYER_UNIT_SPELL_EFFECT)
        call TriggerAddCondition(T, Condition(function OnSpellCast)) // The Condition function can also accept functions which do not return boolean values.
        // call TriggerAddAction(T, function OnSpellCast) // Either one will do
        // Other preload stuff
    endfunction

  6. Keep variable naming conventions consistent in the code. There are certain instances where the variables start with a lowercase letter, and other instances where the variables start with an uppercase letter.

On a side note, I could not get the error message to be produced, which indicates that the spell is working as intended. Hence, I'll approve this spell, but please check out the Code Review for more details on the optimization of the spell.

Status:


Approved
 
Top