| 03-02-2008, 08:40 PM | #1 |
The only posts that belong in this thread are submissions for the 10th spell making session. Any other posts will be deleted and their posters penalized for breaking the rules. |
| 03-03-2008, 02:12 PM | #2 |
Piercing Knives The Assassin throws 4/7/10 knives which curve toward the target point. Upon hitting an enemy unit, each knife will deal 25/35/45 damage, slow the unit by 20%/25%/30%, and pierce it. Pierced units will have 40/55/70 damage dealt to them upon the expiration of the Pierce buff. Pierce damage is stackable. Pierce lasts 5 seconds. Each enemy may only be hit by one knife from each volley. Download Map |
| 03-04-2008, 12:34 AM | #3 |
STONE CRUSHER the Stone Master summon wave of falling rocks which damages nearby units xD loled. 3 lvl spell. 1 - 10 rocks 2 - 20 rocks 3 - 30 rocks // MUI use vJass... (taked ~8 hours to create this spell if some one is interested in this xD) |
| 03-04-2008, 09:12 PM | #4 |
Spirit Helix - The spell follows the JESP standard and requires the Jass NewGen pack. .SpiritHelix.w3x. |
| 03-05-2008, 11:53 PM | #5 |
I guess this would be an alpha submission, I can updated this at a later date correct? ![]() Spirit Bomb Do some neat stuff, deal some damage, lose some life, etc. Spell Code:scope SpiritBomb globals // Rawcode of Spirit Bomb ability private constant integer abil_id = 'A000' // Rawcode of your caster dummy private constant integer dummy_id = 'n000' // Order for both abilities private constant string order = "channel" // Area for damage and tree destroy private constant real area = 500. // Rawcode of Spirit Bomb (Helper) ability private constant integer ally_abil_id = 'A001' // HP cost per ~.2 seconds of channel time for caster/helpers private constant real cost = 10. // Max channel duration private constant real length = 10. // Speed at which the bomb increases its size private constant real size = 1.02 // Effect for bomb private constant string bombfx = "units\\nightelf\\Wisp\\Wisp.mdl" // Effect for aura around caster private constant string aurafx = "Abilities\\Spells\\NightElf\\Tranquility\\Tranquility.mdl" // Effect at target when the bomb hits private constant string hit = "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl" // Lightning effect from allies who help to spirit bomb private constant string lightfx = "DRAL" // Do not touch these private boolexpr Bool = null private real Ally_Help = 0. private unit Caster = null private unit Bomb = null // Trigger for ability, will become SpiritBomb_Trigger, which can be used publically public trigger Trigger = null private timer T = CreateTimer() private group G = CreateGroup() private location L = null private rect R = Rect(-area,-area,area,area) endglobals private function Damage takes real time returns real // Input equation for damage dealt // Time refers to the length of time the hero channels // Ally_Help refers to the length of time allies helped by channeling as well, which is additive for each ally return (75.*time) + (75.*Ally_Help) // For instance here, the bomb deals 75 damage for every second channeled by the hero // and 75 additional damage for every second any other hero channels endfunction //=========================================================================== // Struct for movement private struct BombMovement unit bomb real time real cos real sin real speed integer runs effect sfx endstruct globals private BombMovement dat endglobals // Ally functions private function Add_Ability takes nothing returns nothing call UnitAddAbility(GetEnumUnit(),ally_abil_id) endfunction private function Remove_Ability takes nothing returns nothing call UnitRemoveAbility(GetEnumUnit(),ally_abil_id) if OrderId2String(GetUnitCurrentOrder(GetEnumUnit()))==order then call PauseUnit(GetEnumUnit(),true) call IssueImmediateOrder(GetEnumUnit(),"stop") call PauseUnit(GetEnumUnit(),false) endif endfunction private function Ally_Actions takes nothing returns nothing local timer tim = CreateTimer() local unit cast = GetTriggerUnit() local lightning light = AddLightningEx(lightfx,false,GetUnitX(Bomb),GetUnitY(Bomb),700.,GetUnitX(cast),GetUnitY(cast),200.) call TimerStart(tim,9999.,false,null) loop exitwhen OrderId2String(GetUnitCurrentOrder(cast))!=order or GetWidgetLife(cast)<.405 call TriggerSleepAction(0.) call UnitDamageTarget(cast,cast,cost,false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,null) endloop set Ally_Help = Ally_Help + TimerGetElapsed(tim) call DestroyTimer(tim) call DestroyLightning(light) set cast = null set tim = null set light = null endfunction private function Allies takes nothing returns boolean set bj_ghoul[55] = GetFilterUnit() return bj_ghoul[55]!=Caster and GetWidgetLife(bj_ghoul[55])>.405 and IsUnitAlly(bj_ghoul[55],GetOwningPlayer(Caster)) and IsUnitType(bj_ghoul[55],UNIT_TYPE_HERO)==true endfunction // Main spell functions private function FilterIsEnemy takes nothing returns boolean return IsUnitEnemy(GetFilterUnit(), bj_groupEnumOwningPlayer) and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>.405 endfunction private function DamageEnemiesArea takes unit damageUnit, real x, real y, real amount returns nothing local unit u call GroupClear(G) set bj_groupEnumOwningPlayer = GetOwningPlayer(damageUnit) call GroupEnumUnitsInRange(G, x, y, area, Condition(function FilterIsEnemy)) loop set u = FirstOfGroup(G) exitwhen u == null call GroupRemoveUnit(G,u) call UnitDamageTarget(damageUnit,u,amount,false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,null) endloop endfunction private function KillTrees takes nothing returns nothing call KillDestructable(GetEnumDestructable()) endfunction private function Move_Bomb_Child takes nothing returns nothing local real x = GetUnitX(dat.bomb) local real y = GetUnitY(dat.bomb) if dat.runs>=25 then call MoveRectTo(R,x,y) call EnumDestructablesInRect(R,null,function KillTrees) call DamageEnemiesArea(dat.bomb,x,y,Damage(dat.time)) call KillUnit(dat.bomb) call DestroyEffect(dat.sfx) call DestroyEffect(AddSpecialEffect(hit,x,y)) call dat.destroy(dat) set Ally_Help = 0. call PauseTimer(T) else call SetUnitX(dat.bomb,x + dat.cos) call SetUnitY(dat.bomb,y + dat.sin) set dat.runs = dat.runs + 1 call SetUnitFlyHeight(dat.bomb,250.-(10.*dat.runs),0.) endif endfunction private function Move_Bomb takes unit bomb, real time, location targ, effect sfx returns nothing local real xtarg = GetLocationX(targ) local real ytarg = GetLocationY(targ) local real xbomb = GetUnitX(bomb) local real ybomb = GetUnitY(bomb) local real ang = Atan2((ytarg-ybomb),(xtarg-xbomb)) local real dist = SquareRoot((xbomb-xtarg)*(xbomb-xtarg) + (ybomb-ytarg)*(ybomb-ytarg)) set dat = BombMovement.create() set dat.bomb = bomb set dat.time = time set dat.speed = dist/25. set dat.cos = dat.speed*Cos(ang) set dat.sin = dat.speed*Sin(ang) set dat.runs = 0 set dat.sfx = sfx call PauseTimer(T) call TimerStart(T,.04,true,function Move_Bomb_Child) endfunction private function Main_Actions takes nothing returns nothing local unit cast = GetTriggerUnit() local player play = GetOwningPlayer(cast) local unit bomb = CreateUnit(play,dummy_id,GetUnitX(cast),GetUnitY(cast),0.) local unit aura = CreateUnit(play,dummy_id,GetUnitX(cast),GetUnitY(cast),0.) local effect auraeffect = AddSpecialEffectTarget(aurafx,aura,"origin") local effect bombeffect = AddSpecialEffectTarget(bombfx,bomb,"origin") local real scale = 1. set L = GetSpellTargetLoc() call GroupClear(G) set Caster = cast set Bomb = bomb call UnitAddAbility(bomb, 'amrf') call UnitRemoveAbility(bomb, 'amrf') call GroupEnumUnitsInRect(G,bj_mapInitialPlayableArea,Bool) call ForGroup(G,function Add_Ability) call SetUnitScale(aura,2.,2.,2.) call SetUnitScale(bomb,.5,.5,.5) call SetUnitFlyHeight(bomb,250.,0.) call SetUnitFlyHeight(aura,0.,0.) call TimerStart(T,9999.,false,null) loop exitwhen OrderId2String(GetUnitCurrentOrder(cast))!=order or TimerGetElapsed(T)>length or GetWidgetLife(cast)<.405 call TriggerSleepAction(0.) call SetUnitScale(bomb,scale,scale,scale) call UnitDamageTarget(cast,cast,cost,false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,null) set scale = scale*size endloop call ForGroup(G,function Remove_Ability) call KillUnit(aura) call DestroyEffect(auraeffect) call Move_Bomb(bomb,TimerGetElapsed(T),L,bombeffect) set aura = null set cast = null set bomb = null set bombeffect = null set auraeffect = null call RemoveLocation(L) endfunction // Conditions private function Conditions takes nothing returns nothing if GetSpellAbilityId()==abil_id then call Main_Actions() elseif GetSpellAbilityId()==ally_abil_id then call Ally_Actions() endif endfunction //=========================================================================== public function InitTrig takes nothing returns nothing set Trigger = CreateTrigger() call TriggerRegisterAnyUnitEventBJ( Trigger, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddAction( Trigger, function Conditions ) set Bool = Condition(function Allies) endfunction endscope btw this is very un-MUI, more from a lack of need then anything else |
| 03-06-2008, 09:08 AM | #6 |
fireball v2. just another fireball spl by ME=) // use NGJP |
| 03-07-2008, 02:17 AM | #7 | |||
My Entry:
|
| 03-07-2008, 11:54 PM | #9 | |
THIS IS MY FINAL UPDATE!!!!!!!!!!
JASS:library UserDecFunctions globals private unit TEMPUnit private effect TEMPEffect endglobals function Expiration takes nothing returns nothing call KillUnit(EmpoweredLight.ProjDummy) call Projectile.destroy(EmpoweredLight) call DestroyTimer(Movement) call DestroyTimer(EmpoweredTimer) call StopSound(Sound,false,false) endfunction //Functions used in the structs (IE, Collision functions) made by you go here function TenSeconds takes nothing returns nothing local unit u = TEMPUnit local effect e = TEMPEffect local integer x = 0 local timer t local real timeRemaining loop exitwhen x==OnHitImmunityDuration if (1 > 0) then set t = CreateTimer() call TimerStart(t, 1, false, null) loop set timeRemaining = TimerGetRemaining(t) exitwhen timeRemaining <= 0 if (timeRemaining > bj_POLLED_WAIT_SKIP_THRESHOLD) then call TriggerSleepAction(0.1 * timeRemaining) else call TriggerSleepAction(bj_POLLED_WAIT_INTERVAL) endif endloop call DestroyTimer(t) set timeRemaining=0 endif if (GetUnitState(u, UNIT_STATE_LIFE) <= 0)then call UnitRemoveAbility(u,OnHitAbilityRawcode) call DestroyEffect(e) return endif set x = x+1 endloop call UnitRemoveAbility(u,OnHitAbilityRawcode) call DestroyEffect(e) endfunction private function RunChecks takes unit U returns boolean local boolean check1 local boolean check2 local boolean check3 set check1 = (GetUnitTypeId(U)!=DummyUnitRawcode) set check2 = (GetUnitState(U, UNIT_STATE_LIFE) > 0) set check3 = ((GetUnitAbilityLevel(U, BuffRawcode) > 0)==false) if (check1 == true and check2 == true and check3 == true) then if (U==EmpoweredLight.Caster) then if (HitsCaster==true) then return true else return false endif endif if (IsUnitType(U,UNIT_TYPE_FLYING)) then if (HitsAir==true) then return true else return false endif endif if (IsUnitAlly(U,GetOwningPlayer(EmpoweredLight.Caster))) then if (HitsAllies==true) then if (IsUnitType(U,UNIT_TYPE_STRUCTURE)) then if (HitsBuildings==true) then return true else return false endif else return true endif else return false endif endif if (IsUnitEnemy(U,GetOwningPlayer(EmpoweredLight.Caster))) then if (HitsEnemies==true) then if (IsUnitType(U,UNIT_TYPE_STRUCTURE)) then if (HitsBuildings==true) then return true else return false endif else return true endif else return false endif endif else return false endif return false endfunction private function CollisionEx takes nothing returns nothing if (RunChecks(GetEnumUnit())==true) then if (IsUnitType(GetEnumUnit(),UNIT_TYPE_UNDEAD)==ReverseDamageOnUndead) or (IsUnitEnemy(GetEnumUnit(),GetOwningPlayer(EmpoweredLight.Caster))==ReverseDamageOnEnemy) then call SetUnitState((GetEnumUnit()), UNIT_STATE_LIFE, GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)+EmpoweredLight.Damage) set EmpoweredLight.Size = EmpoweredLight.Size+SizeIncreasePerHit call SetUnitScale(EmpoweredLight.ProjDummy,EmpoweredLight.Size,EmpoweredLight.Size,EmpoweredLight.Size) set EmpoweredLight.Damage = EmpoweredLight.Damage+DamageIncreasePerHit+(R2I((EmpoweredLight.Level/SpellLevelsToUpgrade))*DamageUpgradePerXLevels) set EmpoweredLight.ObjectCollisionSize = EmpoweredLight.ObjectCollisionSize+CollisionIncreasePerHit call TimerStart( EmpoweredTimer, ( TimerGetRemaining(EmpoweredTimer) + TimeLifeIncreasePerHit ), false,function Expiration ) set TEMPEffect = AddSpecialEffectTarget(ModelPath,GetEnumUnit(),AttachmentPoint) call UnitAddAbility(GetEnumUnit(),OnHitAbilityRawcode) set TEMPUnit = GetEnumUnit() call ExecuteFunc("TenSeconds") else call SetUnitState((GetEnumUnit()), UNIT_STATE_LIFE, GetUnitState(GetEnumUnit(),UNIT_STATE_LIFE)-EmpoweredLight.Damage) set EmpoweredLight.Size = EmpoweredLight.Size+SizeIncreasePerHit call SetUnitScale(EmpoweredLight.ProjDummy,EmpoweredLight.Size,EmpoweredLight.Size,EmpoweredLight.Size) set EmpoweredLight.Damage = EmpoweredLight.Damage+DamageIncreasePerHit+(R2I((EmpoweredLight.Level/SpellLevelsToUpgrade))*DamageUpgradePerXLevels) set EmpoweredLight.ObjectCollisionSize = EmpoweredLight.ObjectCollisionSize+CollisionIncreasePerHit call TimerStart( EmpoweredTimer, ( TimerGetRemaining(EmpoweredTimer) + TimeLifeIncreasePerHit ), false,function Expiration ) set TEMPEffect = AddSpecialEffectTarget(ModelPath,GetEnumUnit(),AttachmentPoint) call UnitAddAbility(GetEnumUnit(),OnHitAbilityRawcode) set TEMPUnit = GetEnumUnit() call ExecuteFunc("TenSeconds") endif endif endfunction function OnUnitCollision takes nothing returns nothing local group g = CreateGroup() call GroupEnumUnitsInRangeOfLoc(g,GetUnitLoc(EmpoweredLight.ProjDummy) , EmpoweredLight.ObjectCollisionSize, null) // set g = GetUnitsInRangeOfLocAll(EmpoweredLight.ObjectCollisionSize,GetUnitLoc(EmpoweredLight.ProjDummy)) call ForGroup(g, function CollisionEx) call DestroyGroup(g) endfunction endlibrary library VectorLib initializer SYSTEMINIT //////////////////////////////////// //This is TheSecretArts' // //WIP Basic Vector System // //Only for use in Spell Making // //Contest #10. Only TheSecretArts// //can use this system. // //////////////////////////////////// globals Vector GRAVITYVECTOR Vector MathVector endglobals struct Vector real x //This detirmines where the vector 'is' real y //This detirmines where the vector 'is' real z //This detirmines where the vector 'is' real Fx //These values are counterintuitive from what you might think real Fy //These are based on planes, rather than force, a negative is backwards, thats why there is no directional value real Fz //This way, it requires less math and is easier and less taxing if many events are happening at once //the force values should be speed/sec. method SetX takes real x returns nothing set this.x = x endmethod method SetY takes real y returns nothing set this.y = y endmethod method SetZ takes real z returns nothing set this.z = z endmethod method SetFx takes real m returns nothing set this.Fx = m endmethod method SetFy takes real m returns nothing set this.Fy = m endmethod method SetFz takes real m returns nothing set this.Fz = m endmethod static method create takes real X, real Y, real Z, real FX, real FY, real FZ returns Vector local Vector Vec = Vector.allocate() set Vec.x = X set Vec.y = Y set Vec.z = Z set Vec.Fz = FZ set Vec.Fy = FY set Vec.Fx = FX return Vec endmethod endstruct function VectorNull takes Vector A returns Vector set MathVector.x = A.x set MathVector.y = A.y set MathVector.z = A.z set MathVector.Fx = 0 set MathVector.Fy = 0 set MathVector.Fz = 0 return MathVector endfunction function VectorAdd takes Vector A, Vector B returns Vector set MathVector.Fx = A.Fx + B.Fx set MathVector.Fy = A.Fy + B.Fy set MathVector.Fz = A.Fz + B.Fz return MathVector endfunction function VectorSubtract takes Vector A, Vector B returns Vector set MathVector.Fx = A.Fx - B.Fx set MathVector.Fy = A.Fy - B.Fy set MathVector.Fz = A.Fz - B.Fz return MathVector endfunction function VectorMultiply takes Vector A, Vector B returns Vector set MathVector.Fx = A.Fx * B.Fx set MathVector.Fy = A.Fy * B.Fy set MathVector.Fz = A.Fz * B.Fz return MathVector endfunction function VectorDivide takes Vector A, Vector B returns Vector set MathVector.Fx = A.Fx / B.Fx set MathVector.Fy = A.Fy / B.Fy set MathVector.Fz = A.Fz / B.Fz return MathVector endfunction private function SYSTEMINIT takes nothing returns nothing //MUST BE CALLED ON INITIALIZATION, I CAN'T STRESS THIS ENOUGH. set MathVector = Vector.create(0,0,0,0,0,0) set GRAVITYVECTOR = Vector.create(0,0,0,0,0,-9.8) set GRAVITYVECTOR.Fz = 0 //(I've modified it so that my projectiles won't fall.) endfunction endlibrary library ProjSyst needs VectorLib, UserDecFunctions /////////////////////////////////////// //This is TheSecretArts' WIP // //projectile system. // //This version is for use with // //Spell Making Contest #10 ONLY // //Only TheSecretArts can use this WIP// /////////////////////////////////////// globals Projectile EmpoweredLight endglobals struct Projectile real TimeLife private real BaseTerrainLevel // This is used when FollowsTerrainHeight is FALSE, this stands as the base terrain level // real Cd //This is the drag coefficient, this effects how air drag effects the projectile // real RA //This is the reference area, this is used in calculating drag real ObjectCollisionSize //Say the unit has a proximity effect, this would allow control over that proximity size // real Mass // To make a projectile that doesnt fall, set mass to zero location TargetPoint unit Target //More or less for homing projectiles unit ProjDummy integer Level sound Noise //The sounds associated with the projectile real Damage real Size real TimeStep unit Caster string UnitCollision //Function name to run on unit collision, will check if you hit allies and if this unit can hit allies. //////////////////////////////The Following have been deprecated in this instance of this system //////////////////////////////Because it is all handled by outsides functions..... // boolean HitsUnits // boolean EffectedByWind //At the moment this does not effect the unit, but when wind is implemented, spells that create wind or natural wind will not effect the projectile, for most objects this should probably be used. // boolean HitsCliffs //this could be toggled false so that it floats through cliffs // boolean ExplodesOnGround // boolean FollowsTerrainHeight //This is a big one, this determines wether the unit's z is based off terrain height, or a base level (the base level is intially based of terrain height, but then becomes independed of terrain height) // boolean HitsCaster //If the spell rebounds back by some means, can it hit the caster // boolean HitsAllies // string CasterCollision //Function name to run on caster collision // string AllyCollision //Function name to run on allied collision // string GroundCollision //Function name to run on Ground collision // string CliffCollision //Function name to run on cliff collision ////////////////////////////// ////////////////////////////// Vector Ve=0 method Initialization takes real x, real y, real z, real Fx, real Fy, real Fz returns nothing set this.Ve = Vector.create(x,y,z,Fx,Fy,Fz) set this.Ve.x = x set this.Ve.y = y set this.Ve.z = z set this.Ve.Fx = Fx set this.Ve.Fy = Fy set this.Ve.Fz = Fz endmethod method DetectUnitCollision takes nothing returns nothing local boolean TFBool = this.CheckCollision() if (TFBool==TRUE) then call ExecuteFunc(this.UnitCollision) endif endmethod method SetNewXYZ takes nothing returns nothing //Doesnt move unit, just sets the values to prepare movement. Has a use for debugging set this.Ve.x = this.Ve.x + (this.Ve.Fx * this.TimeStep) set this.Ve.y = this.Ve.y + (this.Ve.Fy * this.TimeStep) // if (this.FollowsTerrainHeight == TRUE) then call VectorAdd(this.Ve,GRAVITYVECTOR) // set this.Ve.z = this.Ve.Fz + this.Ve.z // else // ((z-grav*X)*TS) // call VectorAdd(v,GRAVITYVECTOR) // set this.Ve.Fz = (TERRAINHEIGHT-this.BaseTerrainLevel) set this.Ve.z = this.Ve.Fz + this.Ve.z // endif endmethod method MoveToXYZ takes nothing returns nothing call SetUnitPosition(this.ProjDummy,this.Ve.x,this.Ve.y) call UnitAddAbility(this.ProjDummy,'Amrf') call SetUnitFlyHeight(this.ProjDummy,this.Ve.z,0) call UnitRemoveAbility(this.ProjDummy,'Amrf') endmethod method SmartMove takes nothing returns nothing // this pretty much combines MovetoXYZ and SetNewXYZ set this.Ve.x = this.Ve.x + (this.Ve.Fx * this.TimeStep) set this.Ve.y = this.Ve.y + (this.Ve.Fy * this.TimeStep) // if (this.FollowsTerrainHeight == TRUE) then call VectorAdd(this.Ve,GRAVITYVECTOR) // set this.Ve.z = this.Ve.Fz + this.Ve.z // else // ((z-grav*X)*TS) // call VectorAdd(this.Ve,GRAVITYVECTOR) // set this.Ve.Fz = (TERRAINHEIGHT-this.BaseTerrainLevel) set this.Ve.z = this.Ve.Fz + this.Ve.z // endif call SetUnitPosition( this.ProjDummy , this.Ve.x , this.Ve.y ) call UnitAddAbility( this.ProjDummy , 'Amrf' ) call SetUnitFlyHeight( this.ProjDummy , this.Ve.z , 0 ) call UnitRemoveAbility( this.ProjDummy , 'Amrf' ) call this.DetectUnitCollision() endmethod private method CheckCollision takes nothing returns boolean local group g = CreateGroup() call GroupEnumUnitsInRangeOfLoc(g,GetUnitLoc(this.ProjDummy) , this.ObjectCollisionSize, null) if (CountUnitsInGroup(g)>0) then call DestroyGroup(g) return TRUE else call DestroyGroup(g) return FALSE endif endmethod endstruct endlibrary library EmpoweredLight initializer SpellInitializer needs ProjSyst /////////////////////////////////////////// //This is spell making contest #10 // //entry: Empowered Light // //Also check the Library UserDecFunctions// //for it also contains part of this spell// //that is used by my system. // /////////////////////////////////////////// globals //Here are some user-declarable variables used by CascadingCataclysm! private trigger CheckCast timer Movement timer EmpoweredTimer private constant real TimeLifeBase = 1.75 private constant real TimeLifeIncrementPerLevel = .25 constant real TimeLifeIncreasePerHit = .25 private constant real DamageBase = -50 private constant real DamageIncrementPerLevel = -10 constant real DamageIncreasePerHit = -10 constant real Size = 1 constant real DamageUpgradePerXLevels = -25 constant real SizeIncreasePerHit = .1 private constant real CollisionSize = 75 constant real CollisionIncreasePerHit = 7.5 constant integer SpellLevelsToUpgrade = 3 constant integer DummyUnitRawcode = 'u000' constant integer AbilityRawcode = 'A001' constant integer BuffRawcode = 'B000' constant integer OnHitAbilityRawcode = 'A002' constant integer OnHitImmunityDuration = 10 private constant string UnitCollisionFunction = "OnUnitCollision" //The Model Path below is automatically preloaded by VectorInitialization constant string ModelPath = "Abilities\\Spells\\NightElf\\FaerieFire\\FaerieFireTarget.mdl" constant string AttachmentPoint = "overhead" constant string SoundPath = "Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.wav" sound Sound = CreateSound(SoundPath, true, true, true, 1, 0, "SpellsEAX") constant boolean HitsAir = true constant boolean HitsAllies = true constant boolean HitsCaster = true constant boolean HitsEnemies = true //I have no idea why you would want this to be false unless you were modding this into a healing spell... LIKE THIS ONE!!!! constant boolean HitsBuildings = false constant boolean ReverseDamageOnEnemy = true constant boolean ReverseDamageOnUndead = true //If the spell is holy healing, will hurt undead instead. Same thing with Death Coil(ish) spells. endglobals private function MoveConditions takes nothing returns nothing if (R2I(TimerGetRemaining(EmpoweredTimer)) > 0 ) then call EmpoweredLight.SmartMove() endif endfunction private function CastCondition takes nothing returns boolean if ( GetSpellAbilityId() == AbilityRawcode ) then return true endif return false endfunction private function CalculateForceX takes unit u returns real local location p = Location(GetLocationX(GetUnitLoc(u)) + 1000 * Cos(GetUnitFacing(u) * bj_DEGTORAD),GetLocationY(GetUnitLoc(u)) + 1000 * Sin(GetUnitFacing(u) * bj_DEGTORAD)) local real XMX //X minus X to find delta X local real XC //X over (distance/speed) 1000/200=5 set XMX = GetLocationX(p)-GetLocationX(GetUnitLoc(u)) set XC = (XMX/(TimeLifeBase+TimeLifeIncrementPerLevel)) return XC endfunction private function CalculateForceY takes unit u returns real local location p = Location(GetLocationX(GetUnitLoc(u)) + 1000 * Cos(GetUnitFacing(u) * bj_DEGTORAD),GetLocationY(GetUnitLoc(u)) + 1000 * Sin(GetUnitFacing(u) * bj_DEGTORAD)) local real YMY //Y minus Y local real YC //Y over (distance/speed) set YMY = GetLocationY(p)-GetLocationY(GetUnitLoc(u)) set YC = (YMY/(TimeLifeBase+TimeLifeIncrementPerLevel)) return YC endfunction private function Casted takes nothing returns nothing local unit U set U = CreateUnitAtLoc(Player(0),DummyUnitRawcode,GetUnitLoc(GetTriggerUnit()),0) set EmpoweredLight = Projectile.create() call EmpoweredLight.Initialization(GetUnitX(U),GetUnitY(U),100,CalculateForceX(GetTriggerUnit()),CalculateForceY(GetTriggerUnit()),0) set EmpoweredLight.Caster = GetTriggerUnit() set EmpoweredLight.Level = GetUnitAbilityLevel(GetTriggerUnit(),AbilityRawcode) set EmpoweredLight.ObjectCollisionSize =CollisionSize set EmpoweredLight.Size = Size set EmpoweredLight.Damage = ((DamageIncrementPerLevel*(EmpoweredLight.Level)))+DamageBase set EmpoweredLight.ProjDummy = U call AttachSoundToUnit(Sound,EmpoweredLight.ProjDummy) call SetSoundVolume(Sound,1254)//127 call StartSound(Sound) set EmpoweredLight.TimeStep = .04 //Don't Change! Unless you want choppy movement or a higher CPU tax set EmpoweredLight.TimeLife = ((TimeLifeIncrementPerLevel*(EmpoweredLight.Level)))+TimeLifeBase set EmpoweredLight.UnitCollision = "OnUnitCollision" call SetUnitFacing(EmpoweredLight.ProjDummy,GetUnitFacing(GetTriggerUnit())) set EmpoweredLight.TargetPoint = Location(GetLocationX(GetUnitLoc(GetTriggerUnit())) + 1000 * Cos(GetUnitFacing(GetTriggerUnit()) * bj_DEGTORAD),GetLocationY(GetUnitLoc(GetTriggerUnit())) + 1000 * Sin(GetUnitFacing(GetTriggerUnit()) * bj_DEGTORAD)) set Movement = CreateTimer() set EmpoweredTimer = CreateTimer() call TimerStart(EmpoweredTimer, EmpoweredLight.TimeLife, false, function Expiration ) call TimerStart(Movement, EmpoweredLight.TimeStep, true, function MoveConditions) set U = null endfunction private function SpellInitializer takes nothing returns nothing local integer index call Preload(ModelPath) call PreloadStart() set CheckCast = CreateTrigger( ) set index = 0 loop call TriggerRegisterPlayerUnitEvent(CheckCast, Player(index), EVENT_PLAYER_UNIT_SPELL_FINISH, null) set index = index + 1 exitwhen index == bj_MAX_PLAYER_SLOTS endloop call TriggerAddCondition( CheckCast, Condition( function CastCondition ) ) call TriggerAddAction(CheckCast, function Casted ) set index = 0 endfunction endlibrary |
| 03-08-2008, 10:27 AM | #10 |
Requirement:
Description: Sends an uncontrollable Sky bomber to bombard all units in a line. If the Sky bomber is destroyed before it throws all the bomb, all the bomb it stored will be dropped. Each bomb deals 250 siege damage. You may detonate the bomber to drop all the bombs.
Spell Code: JASS://***************************************************************************** //* * //* Spell Making Session #10 : Sky Bomber * //* ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ * //* Send a sky bomber to attack the enemy, destory it before its bombs falls * //* on you! (This map don't really use the effect system function, but it is * //* using the EffectTimer in the effect system to create the bomb dropping * //* and the bomber movement) * //* * //***************************************************************************** scope SkyBomber globals //Sky Bomber configuration constants : // SB_id : the spell id code // SB_bomber : the sky bomber unit id // SB_detonate : the spell id for detonate // SB_bomb_mode : model path of the missle // SB_bomb_launch : model path of the effect when the bomber dropping missle private constant integer SB_id = 'A007' private constant integer SB_bomber = 'n000' private constant integer SB_detonate = 'A008' private constant string SB_bomb_model = "Abilities\\Weapons\\DemolisherFireMissile\\DemolisherFireMissile.mdl" private constant string SB_bomb_launch = "Abilities\\Spells\\Items\\AIfb\\AIfbSpecialArt.mdl" endglobals //Change the values here in any way you wish : // SB_dmg : damage of each bomb dropped // SB_bomb : total number of bomb dropped // SB_dist : total travel distance until the bomber timeout // SB_spd : movement speed of the bomber private constant function SB_dmg takes real lvl returns real return ((lvl*0) + 250) //250,250,250 endfunction private constant function SB_bomb takes integer lvl returns integer return ((lvl*2) + 2) //4,6,8 endfunction private constant function SB_dist takes real lvl returns real return ((lvl*350) + 450) //800,1150,1500 endfunction private constant function SB_spd takes real lvl returns real return ((lvl*0) + 125) //125,125,125 endfunction //=========================================================================== // Sky Bomber spell script: //=========================================================================== private struct ReleaseBomb extends EffectSystem_EffectTimer unit u unit d real h integer lvl effect e method onExpire takes nothing returns nothing if this.h <= 5 then call DestroyEffect(this.e) call DamageUnitsInAOEEx(this.u,SB_dmg(this.lvl),GetUnitX(this.d),GetUnitY(this.d),125,false,DamageTypes(ATTACK_TYPE_SIEGE,DAMAGE_TYPE_DEMOLITION)+DamageTrees()+DamageIgnore(UNIT_TYPE_FLYING)) call CasterRecycleTimed(this.d,0,3) call this.destroy() else set this.h = this.h-4.25+GetRandomReal(0,1) call CS_MoveUnit(this.d,GetUnitX(this.d)+GetRandomReal(-2,2),GetUnitY(this.d)+GetRandomReal(-2,2)) call SetUnitFlyHeight(this.d,this.h,0.) endif endmethod static method create takes unit damager, unit bomber, integer lvl returns ReleaseBomb local ReleaseBomb this = ReleaseBomb.allocate() call DestroyEffect(AddSpecialEffectTarget(SB_bomb_launch,bomber,"origin")) set this.d = GetACaster() call CS_MoveUnit(this.d,GetUnitX(bomber),GetUnitY(bomber)) set this.u = damager set this.e = AddSpecialEffectTarget(SB_bomb_model,this.d,"origin") set this.h = ES_GetUnitZ(bomber)+100 set this.lvl = lvl return this endmethod endstruct private struct BomberMovement extends EffectSystem_EffectTimer unit c unit u real r real i real d real a real spd integer lvl integer bomb method onDestroy takes nothing returns nothing call UnitRemoveAbility(this.c,SB_detonate) call UnitAddAbility(this.c,SB_id) call SetUnitAbilityLevel(this.c,SB_id,this.lvl) call SetPlayerAbilityAvailable(GetOwningPlayer(this.c),SB_id,true) endmethod method onExpire takes nothing returns nothing if this.u==null then call this.destroy() elseif GetWidgetLife(this.u)<=0.405 then loop set this.bomb=this.bomb-1 exitwhen this.bomb<=0 call ReleaseBomb.create(this.c,this.u,this.lvl) endloop call PauseUnit(this.u,false) call this.destroy() elseif this.bomb<=0 then call PauseUnit(this.u,false) call SetUnitExploded(this.u,true) call ShowUnit(this.u,false) call KillUnit(this.u) call this.destroy() else if this.i<=0 then call ReleaseBomb.create(this.c,this.u,this.lvl) set this.i=this.i+this.r set this.bomb=this.bomb-1 endif set this.i=this.i-this.spd call CS_MoveUnit(this.u,GetUnitX(this.u)+this.spd*Cos(this.a),GetUnitY(this.u)+this.spd*Sin(this.a)) endif endmethod static method create takes unit caster, unit bomber, integer lvl, integer bomb, real angle, real spd returns BomberMovement local BomberMovement this = BomberMovement.allocate() call AttachObject(caster,SCOPE_PRIVATE+"bomber",bomber) set this.r=SB_dist(lvl)/(bomb+1) set this.i=this.r set this.spd=spd*0.035 set this.a=angle set this.c=caster set this.u=bomber set this.bomb=bomb set this.lvl=GetUnitAbilityLevel(caster,SB_id) call UnitRemoveAbility(caster,SB_id) call UnitAddAbility(caster,SB_detonate) call UnitRemoveAbility(bomber,'Amov') call SetPlayerAbilityAvailable(GetOwningPlayer(caster),SB_id,false) call PauseUnit(bomber,true) return this endmethod endstruct private function SkyBomber takes nothing returns nothing local unit u = GetTriggerUnit() local location l = GetSpellTargetLoc() local real x = GetUnitX(u) local real y = GetUnitY(u) local real a = Atan2(GetLocationY(l)-y,GetLocationX(l)-x) local integer lvl = GetUnitAbilityLevel(u,SB_id) call BomberMovement.create(u,CreateUnit(GetOwningPlayer(u),SB_bomber,x,y,57.2958*a),lvl,SB_bomb(lvl),a,SB_spd(lvl)) call RemoveLocation(l) set l=null set u=null endfunction private function SkyBomberDetonate takes nothing returns nothing local unit u = GetAttachedUnit(GetTriggerUnit(),SCOPE_PRIVATE+"bomber") if u!=null then call SetUnitExploded(u,true) call KillUnit(u) endif set u=null endfunction function InitTrig_Sky_Bomber takes nothing returns nothing call OnAbilityEffect(SB_id,SCOPE_PRIVATE+"SkyBomber") call OnAbilityEffect(SB_detonate,SCOPE_PRIVATE+"SkyBomberDetonate") call PreloadAbility(SB_id) call PreloadAbility(SB_detonate) endfunction endscope |
| 03-08-2008, 09:50 PM | #11 | |||
Background: The spell is made specifically for the Spell Session #10 on wc3c. The spell also complies with the JESP manifest, is fully multi-instanceable, and requires Grimoire and vJass. Download |
| 03-09-2008, 10:30 PM | #12 |
| 03-10-2008, 09:24 PM | #13 | |
Fissure By Here-b-Trollz * Made specifically for this contest * Requires vJass * Requires a few external functions which are included in the library 'Cache' Tooltip:
|
| 03-15-2008, 09:02 AM | #14 |
Multi-Shoot -Require vJass -Multiinstanceable The Ranger shoots an arrow that splits into many, dealing each one 50 damage to the first target it hits. The far the point you choose to shoot it at is to the caster, the more the arrows spread out. A given number of arrows are frozen and will slow the movement speed and attack speed by 50%. Additionally, you can chose a point where frozen arrows will be concentrated in a single one whenever you shoot in the angle of this point. Level 1 - Split into 5 arrows, 2 frozen. Level 2 - Split into 7 arrows, 3 frozen. Level 3 - Split into 9 arrows, 4 frozen. |
| 03-15-2008, 12:51 PM | #15 |
~ update 2 ~ ![]() - Requires JassHelper (JassNewGenPack) for vJass syntax. - Follows the JESP standard. Ptyalize This hero spits a rotating sludge ball towards the target point. Any enemy units who collide with it will become attached to it. Consequently, any other enemy unit who collides with an attached unit will become attached to that unit. After a certain time, the sludge ball explodes, all attached units are damaged and flinged away in a centrifugal manner. Level 1 - Lasts 3 seconds. Deals 40 damage + angular velocity * radius from the sludge ball. Level 2 - Lasts 4 seconds. Deals 55 damage + angular velocity * radius from the sludge ball. Level 3 - Lasts 5 seconds. Deals 70 damage + angular velocity * radius from the sludge ball. |
