Skip to content

Instantly share code, notes, and snippets.

@nulleqcodes
Created December 13, 2024 18:00
Show Gist options
  • Save nulleqcodes/4e707b369b03eb23ce1e220fc262aa20 to your computer and use it in GitHub Desktop.
Save nulleqcodes/4e707b369b03eb23ce1e220fc262aa20 to your computer and use it in GitHub Desktop.
---mobdefinition_Void Weaver---
ID :: voidweaver
Prefab :: colossus
Range Behavior :: [[Medium Ranged]]
Abilities :: [[Void Barrage]] [[Void Nova]] [[Void Rift]] [[Void Spears]] [[Void Pull]] [[Void Eruption]]
Bounding Box :: 0 2.73 2.5 3.0
Type :: Boss
Loot :: [[VoidWeaver]]
---loottable_VoidWeaver---
[[999 Quantum Sniper]] @ 2.0
[[999 Void Piercer]] @ 2.0
---ability_Void Barrage---
Bullet Definition :: [[voidbarrage]]
VFX Cast :: trigger:Attack*
---bulletdef_voidbarrage---
sprite Custom_11
color 5
potency 100
nway speed:10 bullets:12 spread:70 angle:0 directionType:relative
nway speed:8 bullets:15 spread:80 angle:180 directionType:relative
wait 10
radial bullets:12 speed:12 angle:0 directionType:relative
---ability_Void Nova---
Bullet Definition :: [[voidnova]]
VFX Cast :: trigger:Blast*
Max Range :: 100.0
---bulletdef_voidnova---
sprite CirclePool 4
potency 250
fire 0 relative 0
aoeexplosion
radius 4
timedFill 15
damageEvery 15
wait 15
vfx BombExplosion 5
wait 1
fire novaspread
vanish
---bulletdef_novaspread---
sprite Basic
color 5
potency 100
radial bullets:48 speed:8 angle:0 directionType:absolute
wait 5
radial bullets:48 speed:6 angle:3.75 directionType:absolute
---ability_Void Rift---
Bullet Definition :: [[voidrift]]
VFX Cast :: trigger:Teleport*
---bulletdef_voidrift---
sprite Custom_7
color 5
line bullets:1 delay:0 angle:0 directionType:relative
wait 50
fire riftspread
vanish
line bullets:1 delay:0 angle:90 directionType:relative
wait 50
fire riftspread
vanish
line bullets:1 delay:0 angle:180 directionType:relative
wait 50
fire riftspread
vanish
line bullets:1 delay:0 angle:270 directionType:relative
wait 50
fire riftspread
vanish
---bulletdef_riftspread---
sprite CirclePool 2
potency 150
repeat bullets:3 speed:5 angle:0 angleChange:120 directionType:absolute
aoedot
damageEvery 15
radius 2
wait 20
speed 0
wait 10
vanish
---ability_Void Spears---
Bullet Definition :: [[voidspears]]
VFX Cast :: trigger:Attack*
---bulletdef_voidspears---
sprite Custom_10
color 5
potency 200
line speed:8 bullets:3 delay:2 angle:0 directionType:relative speedChange:0.25
wait 3
line speed:8 bullets:3 delay:2 angle:180 directionType:relative speedChange:0.25
---ability_Void Pull---
Bullet Definition :: [[voidpull]]
VFX Cast :: trigger:Attack*
Max Range :: 100.0
---bulletdef_voidpull---
sprite OrangePool 3
color 5
potency 0
fire 0 relative 0
aoedot
damageFriendly
radius 3
damageEvery 20
vfx VoidPool
wait 50
fire voidpullline
vanish
---bulletdef_voidpullline---
sprite Custom_10
color 5
potency 100
nway speed:6 bullets:12 spread:360 angle:0 directionType:absolute
wait 120
vanish
---ability_Void Eruption---
Bullet Definition :: [[voideruption]]
VFX Cast :: trigger:Burst*
Max Range :: 100.0
---bulletdef_voideruption---
sprite CirclePool 2
potency 250
fire 0 relative 0
aoeexplosion
radius 2
timedFill 10
damageEvery 10
wait 10
vfx SmallBombExplosion 3
wait 1
fire eruptionspread
vanish
---bulletdef_eruptionspread---
sprite Custom_11
color 5
potency 150
repeat bullets:36 speed:6 angle:0 maxAngle:360 delay:1 directionType:absolute
lifetime 100
---script_voidweaver_Monster---
resetVars := func() {
scriptVars["phase"] = 1
scriptVars["timeSinceBarrage"] = 0.0
scriptVars["timeSinceNova"] = 0.0
scriptVars["timeSinceRift"] = 0.0
scriptVars["timeSinceSpears"] = 0.0
scriptVars["timeSincePull"] = 0.0
scriptVars["timeSinceEruption"] = 0.0
}
if !isDead {
if is_undefined(scriptVars["phase"]) {
resetVars()
}
if targetEntityId > 0 && castingAction == 0 {
scriptVars["timeSinceBarrage"] += delta
scriptVars["timeSinceNova"] += delta
scriptVars["timeSinceRift"] += delta
scriptVars["timeSinceSpears"] += delta
scriptVars["timeSincePull"] += delta
scriptVars["timeSinceEruption"] += delta
currentHealth := getPoints(myEntityId, "hp", "current")
maxHealth := getPoints(myEntityId, "hp", "max")
if currentHealth < maxHealth * 0.66 && scriptVars["phase"] == 1 {
scriptVars["phase"] = 2
} else if currentHealth < maxHealth * 0.33 && scriptVars["phase"] == 2 {
scriptVars["phase"] = 3
}
if scriptVars["phase"] == 1 {
if scriptVars["timeSinceBarrage"] > 4.0 {
useAbilityAtTarget(myEntityId, "Void Barrage", targetEntityId, 1.0)
scriptVars["timeSinceBarrage"] = 0.0
}
if scriptVars["timeSinceNova"] > 10.0 {
useAbilityAtPosition(myEntityId, "Void Nova", randomPositionInCurrentRoom(myEntityId, 3.0))
scriptVars["timeSinceNova"] = 0.0
}
if scriptVars["timeSincePull"] > 10.0 {
useAbilityAtPosition(myEntityId, "Void Pull", randomPositionInCurrentRoom(myEntityId, 3.0))
scriptVars["timeSincePull"] = 0.0
}
if scriptVars["timeSinceRift"] > 15.0 {
useAbilityAtPosition(myEntityId, "Void Rift", entityPosition(myEntityId))
scriptVars["timeSinceRift"] = 0.0
}
} else if scriptVars["phase"] == 2 {
if scriptVars["timeSinceBarrage"] > 3.0 {
useAbilityAtTarget(myEntityId, "Void Barrage", targetEntityId, 1.0)
scriptVars["timeSinceBarrage"] = 0.0
}
if scriptVars["timeSinceSpears"] > 2.5 {
useAbilityAtTarget(myEntityId, "Void Spears", targetEntityId, 0.5)
scriptVars["timeSinceSpears"] = 0.0
}
if scriptVars["timeSinceNova"] > 8.0 {
useAbilityAtPosition(myEntityId, "Void Nova", randomPositionInCurrentRoom(myEntityId, 3.0))
scriptVars["timeSinceNova"] = 0.0
}
if scriptVars["timeSincePull"] > 12.0 {
useAbilityAtPosition(myEntityId, "Void Pull", randomPositionInCurrentRoom(myEntityId, 3.0))
scriptVars["timeSincePull"] = 0.0
}
if scriptVars["timeSinceRift"] > 12.0 {
useAbilityAtPosition(myEntityId, "Void Rift", entityPosition(myEntityId))
scriptVars["timeSinceRift"] = 0.0
}
} else if scriptVars["phase"] == 3 {
if scriptVars["timeSinceBarrage"] > 2.5 {
useAbilityAtTarget(myEntityId, "Void Barrage", targetEntityId, 1.0)
scriptVars["timeSinceBarrage"] = 0.0
}
if scriptVars["timeSinceEruption"] > 3.0 {
useAbilityAtPosition(myEntityId, "Void Eruption", randomPositionInCurrentRoom(myEntityId, 2.0))
scriptVars["timeSinceEruption"] = 0.0
}
if scriptVars["timeSinceSpears"] > 2.0 {
useAbilityAtTarget(myEntityId, "Void Spears", targetEntityId, 0.5)
scriptVars["timeSinceSpears"] = 0.0
}
if scriptVars["timeSinceNova"] > 7.0 {
useAbilityAtPosition(myEntityId, "Void Nova", randomPositionInCurrentRoom(myEntityId, 3.0))
scriptVars["timeSinceNova"] = 0.0
}
if scriptVars["timeSincePull"] > 12.0 {
useAbilityAtPosition(myEntityId, "Void Pull", randomPositionInCurrentRoom(myEntityId, 3.0))
scriptVars["timeSincePull"] = 0.0
}
if scriptVars["timeSinceRift"] > 10.0 {
useAbilityAtPosition(myEntityId, "Void Rift", entityPosition(myEntityId))
scriptVars["timeSinceRift"] = 0.0
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment