1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  5. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  6. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  7. The results are out! Check them out.
    Dismiss Notice
  8. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  9. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  10. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

HWC Artistic Mind - Team Alliance

Submitted by Chaosy
This bundle is marked as approved. It works and satisfies the submission rules.
Spell submission for the HWC.
Code made by Chaosy
Models by Misha
Icons by Hayate

Artistic Mind:
Apheraz inspires all targets in an area, making their fantasies run rampant. Their own creations are unleashed on them. The creations last for 12/14/16 seconds unless killed. The creations will only deal damage to the origin.​

Shitty gif:
[​IMG]

import instructions
Code (vJASS):

/*

    1. Copy the "Charm" and "Required" folder into your map unless you already have some
    of those libraries in your map, in which case you only need the missing ones.
 
    2. Import the required abilities/units from the object editor
 
 
    3. Make sure to edit the configs in the various libraries if you decide to use different IDs
    for your object editor units/spells.
*/


code
Code (vJASS):

native UnitAlive takes unit id returns boolean
//! zinc
    library ArtisticMind requires Missile, TimedUnitScale, TimerUtils, GroupTools, StunEngine {
 
        constant real GROW_TIME = 1;
        constant real CAST_TIME = 1;
        constant integer SPELL_ID = 'A003';
        constant string GROUND_FX = "Aphs Cast Effect.mdx";
        constant string MANIFEST_SPAWN_EFFECT = "Aphs Normal Effect.mdx";
        constant string MANIFEST_SPAWN_MISSILE = "Aphs Link Effect.mdx";
        constant real MANIFEST_COLOR = 80;
        constant real MANIFEST_SHRINK = 10;
        constant real MANIFEST_DURATION = 10;
        constant real MANIFEST_DURATION_INC = 2;
 
        integer lvl;
 
        hashtable hash = InitHashtable();
        group g;

        private function stun(unit u, real dur) {
            udg_STE_TARGET = u;
            udg_STE_DURATION = dur;
            udg_STE_STACK_TIME = true;
            udg_STE_ADD_STUN = true;
            TriggerEvaluate(udg_STE_TRIGGER);
        }
 
        private function getDuration(integer level) -> real {
            return 10 + (level * MANIFEST_DURATION_INC);
        }
 
        private struct Spawn {
            static method onFinish (Missile missile) -> boolean {
                timer t;
                integer h;
                integer level = LoadInteger(hash, missile, 0);
                unit target = LoadUnitHandle(hash, missile, 1);
                integer id = GetUnitTypeId(target);
                unit u = CreateUnit(Player(13), id, missile.x, missile.y, missile.angle);
         
                DestroyEffect(AddSpecialEffect(MANIFEST_SPAWN_EFFECT, GetUnitX(u), GetUnitY(u)));
                stun(u, GROW_TIME);
                SetUnitInvulnerable(u, true);
                SetUnitVertexColorBJ(u, MANIFEST_COLOR, MANIFEST_COLOR, MANIFEST_COLOR, 60);
                SetUnitScalePercent(u, MANIFEST_SHRINK, MANIFEST_SHRINK, MANIFEST_SHRINK);
                UnitScale[u].apply(1, GROW_TIME);
         
                t = NewTimer();
         
                h = GetHandleId(t);
         
                SaveBoolean(hash, GetHandleId(u), 1, true);
         
                SaveUnitHandle(hash, h, 0, u);
                SaveUnitHandle(hash, h, 1, target);
                SaveInteger(hash, h, 2, level);
         
                TimerStart(t, GROW_TIME, false, function() {
                    timer t = GetExpiredTimer();
                    integer id = GetHandleId(t);
                    unit u = LoadUnitHandle(hash, id, 0);
                    unit origin = LoadUnitHandle(hash, id, 1);
                    integer level = LoadInteger(hash, id, 2);
             
                    IssueTargetOrder(u, "attack", origin);
             
                    SetUnitInvulnerable(u, false);
                    UnitApplyTimedLife(u, 'BTLF', getDuration(level));
             
                    FlushChildHashtable(hash, id);
                    ReleaseTimer(t);
             
                    SaveUnitHandle(hash, GetHandleId(u), 0, origin);
             
                    t = null;
                    u = null;
                    origin = null;
                });
         
                FlushChildHashtable(hash, missile);
         
                u = null;
                target = null;
                t = null;
                return true;
            }
            module MissileStruct;
        }
 
        private function groupLoop() {
            unit u = GetEnumUnit();
            real x = GetUnitX(u);
            real y = GetUnitY(u);
     
            Missile m =  Missile.create(x, y, 75, GetRandomReal(0, 360), 400, 50);
     
            SaveInteger(hash, m, 0, lvl);
            SaveUnitHandle(hash, m, 1, u);
     
            m.speed     = 10.;
            m.model     = MANIFEST_SPAWN_MISSILE;
            m.arc       = bj_PI/4;
            Spawn.launch(m);
     
            u = null;
        }
 
        private function isManifestation(unit u) -> boolean{
            return LoadBoolean(hash, GetHandleId(u), 1);
        }
 
        private function onCastFilter(unit u, player p) -> boolean {
            return UnitAlive(u) && !isManifestation(u) && IsUnitEnemy(u, p);
        }
 
        private function onDelay() {
            timer t = GetExpiredTimer();
            integer h = GetHandleId(t);
            real x = LoadReal(hash, h, 1);
            real y = LoadReal(hash, h, 2);
            unit u = LoadUnitHandle(hash, h, 0);
     
            DestroyEffect(LoadEffectHandle(hash, h, 3));
     
            FlushChildHashtable(hash, h);
            ReleaseTimer(t);
            t = null;
     
            g = NewGroup();
            GroupUnitsInArea(g, x, y, 300);
     
            h = GetHandleId(g);
            SavePlayerHandle(hash, h, 0, GetOwningPlayer(u));
     
            ForGroup(g, function () {
                unit u = GetEnumUnit();
                player p = LoadPlayerHandle(hash, GetHandleId(g), 0);
                if(!onCastFilter(u, p)) {
                    GroupRemoveUnit(g, u);
                }
                p = null;
                u = null;
            });
     
            FlushChildHashtable(hash, h);
 
            lvl = GetUnitAbilityLevel(u, SPELL_ID);
 
            ForGroup(g, function groupLoop);
            ReleaseGroup(g);
        }
 
        private function onCast() {
            real x = GetSpellTargetX();
            real y = GetSpellTargetY();
            unit u = GetSpellAbilityUnit();
            timer t = NewTimer();
            integer h = GetHandleId(t);
            SaveEffectHandle(hash, h, 3, AddSpecialEffect(GROUND_FX, x, y));
     
            SaveUnitHandle(hash, h, 0, u);
            SaveReal(hash, h, 1, x);
            SaveReal(hash, h, 2, y);
     
            TimerStart(t, CAST_TIME, false, function onDelay);
     
            u = null;
            t = null;
        }
 
        private function filter() -> boolean{
            return GetSpellAbilityId() == SPELL_ID;
        }
 
        private function isSet(unit u) -> boolean {
            return u != null;
        }
 
        private function onDamage() {
            unit origin = LoadUnitHandle(hash, GetHandleId(udg_DamageEventSource), 0);
            if (origin != udg_DamageEventTarget && isSet(origin)) {
                udg_DamageEventAmount = 0.00;
            }
            origin = null;
        }
 
        private function onDeathFilter() -> boolean{
            return isManifestation(GetFilterUnit());
        }
 
        private function onDeath() {
            FlushChildHashtable(hash, GetHandleId(GetTriggerUnit()));
        }
 
        private function onInit() {
            trigger t = CreateTrigger();
            TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT);
            TriggerAddCondition(t, Condition(function filter));
            TriggerAddAction(t, function onCast);
     
            t = CreateTrigger();
            TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_DEATH);
            TriggerAddCondition(t, Condition(function onDeathFilter));
            TriggerAddAction(t, function onDeath);
     
            t = CreateTrigger();
            TriggerRegisterVariableEvent(t, "udg_DamageModifierEvent", EQUAL, 1.00);
            TriggerAddAction(t, function onDamage);
     
            t = null;
        }
    }
//! endzinc
Contents

HWC - Artistic Mind (Map)

Reviews
KILLCIDE
Simple concept, but the missile effects making it pretty interesting. Based off Cokemonkey's review, this spell is in an approvable state. Needs Fixed Nothing Suggestions Consider Cokemonkey's suggestions to improve the code / concept Status Approved
  1. ssbbssc2

    ssbbssc2

    Joined:
    Aug 20, 2015
    Messages:
    108
    Resources:
    0
    Resources:
    0
    hmmm, looks neat :) and it is good idea for spell
     
  2. Misha

    Misha

    Joined:
    Jun 9, 2008
    Messages:
    7,196
    Resources:
    71
    Models:
    62
    Icons:
    1
    Packs:
    2
    Skins:
    4
    StarCraft II Resources:
    2
    Resources:
    71
    @Archian @IcemanBo you might want to check this one out and see if everything is good. maybe even close the comments, being a contest entry and all
     
  3. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,180
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    "Spells submission for the HWC" does tell me nothing.. @Chaosy .

    Closed.
     
  4. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,496
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    Simple concept, but the missile effects making it pretty interesting. Based off Cokemonkey's review, this spell is in an approvable state.

    Needs Fixed

    • Nothing

    Suggestions

    • Consider Cokemonkey's suggestions to improve the code / concept

    Status


    Approved