Spell Ice Mirage

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
JASS - Yes - vJASS REQUIRED
MUI - Yes
Works - Yes
Fun - In Soviet Russia, spell casts YOU!!
Leaks - I am not an old pipe!

Ice Mirage

This spell creates a number of dark magicians around the target, who cause a spell to be cast that does massive damage to the target and surrounding units.

IceMirage.gif


Code:

JASS:
//**************************ICE MIRAGE by GHAN_04***********************
//******************************DESCRIPTION*****************************
//**Creates a number of dark magicians around the target, who cause a
//**spell to be cast that does massive damage to the target and 
//**surrounding units.**************************************************
//**********************************************************************

scope IceMirage initializer Init                                      //When the map starts up, run the "Init" function.

    globals //Declaring some globals for our ability.
    //********************CONFIGURATION CONSTANTS - YOU MAY EDIT***********************************
        private constant integer ICE_MIRAGE_CODE = 'A000'             //Raw Code of the hero ability.
        private constant integer ICE_MIRAGE_EFFECT_CODE = 'A001'      //Raw Code of the Effect ability that the Dummy has.
        private constant integer DUMMY_UNIT_CODE = 'u000'             //Raw Code of the Dummy unit.
        private constant integer IMAGE_UNIT_CODE = 'u001'             //Raw Code of the Image units.
        private constant integer NUMBER_OF_IMAGES = 5                 //Number of images that appear around the target.
        private constant real IMAGE_RADIUS = 300.0                    //Distance from target the images will appear.
    //*********************PLEASE DO NOT EDIT BELOW THIS LINE***************************************
        private trigger t = CreateTrigger()                           //Makes a new trigger for us to use.
    endglobals
    
    private function Conditions takes nothing returns boolean
        return GetSpellAbilityId() == ICE_MIRAGE_CODE                 //Checks to make sure the ability being cast = Ice Mirage.
    endfunction
    
    private function Actions takes nothing returns nothing
        //Begin by creating some variables for our spell.
        local unit target = GetSpellTargetUnit()
        local unit caster = GetTriggerUnit()
        local real casterX = GetUnitX(caster)
        local real casterY = GetUnitY(caster)
        local real targetX = GetUnitX(target)
        local real targetY = GetUnitY(target)
        local real offsetX
        local real offsetY
        local unit dummy = CreateUnit(GetOwningPlayer(caster), DUMMY_UNIT_CODE, targetX, targetY, bj_UNIT_FACING) //Create the dummy that casts the spell.
        local integer count = 0
        local integer abilitylevel = GetUnitAbilityLevel(caster, ICE_MIRAGE_CODE)
        local unit imageunit
        call PauseUnit(target, true) //Pause the target while the ability is being cast.
        loop
            exitwhen count > NUMBER_OF_IMAGES - 1
            set offsetX = targetX + IMAGE_RADIUS * Cos(((360/NUMBER_OF_IMAGES) * count) * bj_DEGTORAD) //These two actions get the location where we will create the image.
            set offsetY = targetY + IMAGE_RADIUS * Sin(((360/NUMBER_OF_IMAGES) * count) * bj_DEGTORAD)
            set imageunit = CreateUnit(GetOwningPlayer(caster), IMAGE_UNIT_CODE, offsetX, offsetY, bj_RADTODEG * Atan2(targetY - offsetY, targetX - offsetX)) //Now that we know the location, create the unit.
            call SetUnitAnimation(imageunit, "attack") //Play the attack animation.
            set imageunit = null //Clear the potential leak. Though, I'm not sure it needs to be cleared every time....
            set count = count + 1 //No infinte loops allowed.
        endloop
        call UnitAddAbility(dummy, ICE_MIRAGE_EFFECT_CODE) //Give the dummy the ability to cast.
        call SetUnitAbilityLevel(dummy, ICE_MIRAGE_EFFECT_CODE, abilitylevel) //Set the level of the ability to the same as the Hero's ability level.
        call IssueTargetOrder(dummy, "frostnova", target) //Cast the nova ability.
        call TriggerSleepAction(0.5) //Wait to unpause the unit.
        call PauseUnit(target, false) //Now unpause the unit.
        set dummy = null //Clear leaks.
        set target = null
        set caster = null
    endfunction
    
    private function Init takes nothing returns nothing
        local integer index = 0
        loop
            call TriggerRegisterPlayerUnitEvent(t, Player(index), EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
            set index = index + 1
            exitwhen index == bj_MAX_PLAYER_SLOTS
        endloop
        call TriggerAddCondition(t, Condition(function Conditions))
        call TriggerAddAction(t, function Actions)
    endfunction
    
endscope


I created this spell a while back for someone in a spell request thread. Just figured I'd submit it now. I don't know if the person who requested it ever got it, actually.
 

Attachments

  • Ice Mirage.w3x
    16 KB · Views: 230

Romek

Super Moderator
Reaction score
964
Screenshot?
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
Whenever I try to take screenshots of WC3, they end up as black images. I don't know why, but I can't get any.
 

Viikuna

No Marlo no game.
Reaction score
265
Fun - In Soviet Russia, spell casts YOU!!
:D

anyways, maybe NUMBER_OF_IMAGES and IMAGE_RADIUS could be turned to functions, which take integer level, so people could have more images with higher levels and stuff like that.
 
Reaction score
91
> Whenever I try to take screenshots of WC3, they end up as black images. I don't know why, but I can't get any.
I have the same problem... Does anybody know how to fix it?
 

D.V.D

Make a wish
Reaction score
73
The spell looks kinda wierd because the spirits are just made. Make a effect? And, the randomly frost nova. Maybe add a spell animation. Other than that its great.
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
Hmm.... Interesting.
Surprisingly, pasting into Irfanview worked. So much for Warcraft III storing screenshots. Note to self: WC3 input is not to be trusted.
I think I know the reason for the black screenshots. It is probably because I have my resolution set to a custom number in the registry to accommodate my widescreen monitor.

Anyway, added a screenshot.
 

BlackRose

Forum User
Reaction score
239
Whenever I try to take screenshots of WC3, they end up as black images. I don't know why, but I can't get any.
Same with me, it works on one computer, but the other it does not....

The spell looks rather bland... I think I once made something like this... <In GUI>. Except they were Liches that floated upwards.

Also, Revenants in red with blue tinting looks funny, maybe just set them to blue entirely?
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
> Whenever I try to take screenshots of WC3, they end up as black images. I don't know why, but I can't get any.
I have the same problem... Does anybody know how to fix it?

Newer graphic cards have these kinds of problem. I use Fraps as alternative.
 

Julian4life

New Member
Reaction score
7
Yeah! That was mine! :D
I requested it, and i actually didn't find it to add it yet, i lost the thread.
But yeah, i think it was from a spell request thread yeah?

Thats awesome!
+rep'd
implemented into game & credited just now! :D

lol long time no see.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top