mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-28 06:27:26 +01:00
Magic Overhaul
This commit is contained in:
@@ -26,48 +26,6 @@
|
||||
charge_cost = 100
|
||||
projectile_type = "/obj/item/projectile/energy/declone"
|
||||
|
||||
obj/item/weapon/gun/energy/staff
|
||||
name = "staff of change"
|
||||
desc = "An artefact that spits bolts of coruscating energy which cause the target's very form to reshape itself"
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_state = "staffofchange"
|
||||
item_state = "staffofchange"
|
||||
fire_sound = 'sound/weapons/emitter.ogg'
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
slot_flags = SLOT_BACK
|
||||
w_class = 4.0
|
||||
charge_cost = 200
|
||||
projectile_type = "/obj/item/projectile/change"
|
||||
origin_tech = null
|
||||
clumsy_check = 0
|
||||
var/charge_tick = 0
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
|
||||
|
||||
Del()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
|
||||
|
||||
process()
|
||||
charge_tick++
|
||||
if(charge_tick < 4) return 0
|
||||
charge_tick = 0
|
||||
if(!power_supply) return 0
|
||||
power_supply.give(200)
|
||||
return 1
|
||||
|
||||
update_icon()
|
||||
return
|
||||
/obj/item/weapon/gun/energy/staff/animate
|
||||
name = "staff of animation"
|
||||
desc = "An artefact that spits bolts of life-force which causes objects which are hit by it to animate and come to life! This magic doesn't affect machines."
|
||||
projectile_type = "/obj/item/projectile/animate"
|
||||
charge_cost = 100
|
||||
|
||||
/obj/item/weapon/gun/energy/floragun
|
||||
name = "floral somatoray"
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
/obj/item/weapon/gun/magic
|
||||
name = "staff of nothing"
|
||||
desc = "This staff is boring to watch because even though it came first you've seen everything it can do in other staves for years."
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_state = "staffofnothing"
|
||||
item_state = "staff"
|
||||
fire_sound = 'sound/weapons/emitter.ogg'
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
w_class = 5
|
||||
var/projectile_type = "/obj/item/projectile/magic"
|
||||
var/max_charges = 6
|
||||
var/charges = 0
|
||||
var/recharge_rate = 4
|
||||
var/charge_tick = 0
|
||||
var/can_charge = 1
|
||||
origin_tech = null
|
||||
clumsy_check = 0
|
||||
|
||||
/obj/item/weapon/gun/magic/emp_act(severity)
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/magic/process_chambered()
|
||||
if(in_chamber) return 1
|
||||
if(!charges) return 0
|
||||
if(!projectile_type) return 0
|
||||
in_chamber = new projectile_type(src)
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/magic/afterattack(atom/target as mob, mob/living/user as mob, flag)
|
||||
..()
|
||||
if(charges && !in_chamber && !flag) charges--
|
||||
|
||||
/obj/item/weapon/gun/magic/New()
|
||||
..()
|
||||
charges = max_charges
|
||||
if(can_charge) processing_objects.Add(src)
|
||||
|
||||
|
||||
/obj/item/weapon/gun/magic/Del()
|
||||
if(can_charge) processing_objects.Remove(src)
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/gun/magic/process()
|
||||
charge_tick++
|
||||
if(charge_tick < recharge_rate || charges >= max_charges) return 0
|
||||
charge_tick = 0
|
||||
charges++
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/magic/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/magic/shoot_with_empty_chamber(mob/living/user as mob|obj)
|
||||
user << "<span class='warning'>The [name] whizzles quietly.<span>"
|
||||
return
|
||||
@@ -0,0 +1,23 @@
|
||||
obj/item/weapon/gun/magic/staff/
|
||||
slot_flags = SLOT_BACK
|
||||
|
||||
obj/item/weapon/gun/magic/staff/change
|
||||
name = "staff of change"
|
||||
desc = "An artefact that spits bolts of coruscating energy which cause the target's very form to reshape itself"
|
||||
projectile_type = "/obj/item/projectile/magic/change"
|
||||
icon_state = "staffofchange"
|
||||
item_state = "staffofchange"
|
||||
|
||||
obj/item/weapon/gun/magic/staff/animate
|
||||
name = "staff of animation"
|
||||
desc = "An artefact that spits bolts of life-force which causes objects which are hit by it to animate and come to life! This magic doesn't affect machines."
|
||||
projectile_type = "/obj/item/projectile/magic/animate"
|
||||
icon_state = "staffofanimation"
|
||||
item_state = "staffofanimation"
|
||||
|
||||
obj/item/weapon/gun/magic/staff/healing
|
||||
name = "staff of healing"
|
||||
desc = "An artefact that spits bolts of restoring magic which can remove ailments of all kinds and even raise the dead."
|
||||
projectile_type = "/obj/item/projectile/magic/resurrection"
|
||||
icon_state = "staffofhealing"
|
||||
item_state = "staffofhealing"
|
||||
@@ -0,0 +1,135 @@
|
||||
/obj/item/weapon/gun/magic/wand/
|
||||
name = "wand of nothing"
|
||||
desc = "It's not just a stick, it's a MAGIC stick!"
|
||||
projectile_type = "/obj/item/projectile/magic"
|
||||
icon_state = "wand6"
|
||||
item_state = "wand"
|
||||
w_class = 2
|
||||
can_charge = 0
|
||||
max_charges = 100 //100, 50, 50, 34 (max charge distribution by 25%ths)
|
||||
var/variable_charges = 1
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/New()
|
||||
if(prob(75) && variable_charges) //25% chance of listed max charges, 50% chance of 1/2 max charges, 25% chance of 1/3 max charges
|
||||
if(prob(33))
|
||||
max_charges = Ceiling(max_charges / 3)
|
||||
else
|
||||
max_charges = Ceiling(max_charges / 2)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/examine()
|
||||
..()
|
||||
usr << "Has [charges] charge\s remaining."
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/attack_self(mob/living/user as mob)
|
||||
if(charges)
|
||||
zap_self(user)
|
||||
else
|
||||
user << "<span class='caution'>The [name] whizzles quietly.<span>"
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/attack(atom/target as mob, mob/living/user as mob)
|
||||
if(target == user)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/afterattack(atom/target as mob, mob/living/user as mob)
|
||||
if(target == user)
|
||||
if(charges)
|
||||
zap_self(user)
|
||||
else
|
||||
user << "<span class='caution'>The [name] whizzles quietly.<span>"
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/proc/zap_self(mob/living/user as mob)
|
||||
user.visible_message("<span class='notice'>[user] zaps \himself with [src]!</span>")
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/death
|
||||
name = "wand of death"
|
||||
desc = "This deadly wand overwhelms the victim's body with pure energy, slaying them without fail."
|
||||
projectile_type = "/obj/item/projectile/magic/death"
|
||||
icon_state = "wand4"
|
||||
max_charges = 3 //3, 2, 2, 1
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/death/zap_self(mob/living/user as mob)
|
||||
if(alert(user, "You really want to zap yourself with the wand of death?",, "Yes", "No") == "Yes" && charges && user.get_active_hand() == src && isliving(user))
|
||||
var/message ="<span class='warning'>You irradiate yourself with pure energy! "
|
||||
message += pick("Do not pass go. Do not collect 200 zorkmids.</span>","You feel more confident in your spell casting skills.</span>","You Die...</span>","Do you want your possessions identified?</span>")
|
||||
user << message
|
||||
user.adjustOxyLoss(500)
|
||||
charges--
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/resurrection
|
||||
name = "wand of resurrection"
|
||||
desc = "This wand uses healing magics to heal and revive. They are rarely utilized within the Wizard Federation for some reason."
|
||||
projectile_type = "/obj/item/projectile/magic/resurrection"
|
||||
icon_state = "wand1"
|
||||
max_charges = 3 //3, 2, 2, 1
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/resurrection/zap_self(mob/living/user as mob)
|
||||
user.setToxLoss(0)
|
||||
user.setOxyLoss(0)
|
||||
user.setCloneLoss(0)
|
||||
user.SetParalysis(0)
|
||||
user.SetStunned(0)
|
||||
user.SetWeakened(0)
|
||||
user.radiation = 0
|
||||
user.heal_overall_damage(user.getBruteLoss(), user.getFireLoss())
|
||||
user.reagents.clear_reagents()
|
||||
user << "<span class='notice'>You feel great!</span>"
|
||||
charges--
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/polymorph
|
||||
name = "wand of polymorph"
|
||||
desc = "This wand is attuned to chaos and will radically alter the victim's form."
|
||||
projectile_type = "/obj/item/projectile/magic/change"
|
||||
icon_state = "wand5"
|
||||
max_charges = 10 //10, 5, 5, 4
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/polymorph/zap_self(mob/living/user as mob)
|
||||
if(alert(user, "Your new form might not have arms to zap with... Continue?",, "Yes", "No") == "Yes" && charges && user.get_active_hand() == src && isliving(user))
|
||||
..() //because the user mob ceases to exists by the time wabbajack fully resolves
|
||||
wabbajack(user)
|
||||
charges--
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/teleport
|
||||
name = "wand of teleportation"
|
||||
desc = "This wand will wrench targets through space and time to move them somewhere else."
|
||||
projectile_type = "/obj/item/projectile/magic/teleport"
|
||||
icon_state = "wand3"
|
||||
max_charges = 10 //10, 5, 5, 4
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/teleport/zap_self(mob/living/user as mob)
|
||||
do_teleport(user, user, 10)
|
||||
var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread()
|
||||
smoke.set_up(10, 0, user.loc)
|
||||
smoke.start()
|
||||
charges--
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/door
|
||||
name = "wand of door creation"
|
||||
desc = "This particular wand can create doors in any wall for the unscrupulous wizard who shuns teleportation magics."
|
||||
projectile_type = "/obj/item/projectile/magic/door"
|
||||
icon_state = "wand0"
|
||||
max_charges = 20 //20, 10, 10, 7
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/door/zap_self()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/fireball
|
||||
name = "wand of fireball"
|
||||
desc = "This wand shoots scorching balls of fire that explode into destructive flames."
|
||||
projectile_type = "/obj/item/projectile/magic/fireball"
|
||||
icon_state = "wand2"
|
||||
max_charges = 8 //8, 4, 4, 3
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/fireball/zap_self(mob/living/user as mob)
|
||||
if(alert(user, "Zapping yourself with a wand of fireball is probably a bad idea, do it anyway?",, "Yes", "No") == "Yes" && charges && user.get_active_hand() == src && isliving(user))
|
||||
explosion(user.loc, -1, 0, 2, 3, 0, flame_range = 2)
|
||||
charges--
|
||||
..()
|
||||
Reference in New Issue
Block a user