mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
Fixes fireballs not exploding when hitting turf, and fixes homing fireball/toolbox not being blocked by the nazar (#29760)
* Update magic_projectiles.dm * rescopes, also fixes homing toolbox not being blocked * 1080p remove commented out code challenge * Update code/modules/projectiles/projectile/magic_projectiles.dm Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> Signed-off-by: 1080pCat <96908085+1080pCat@users.noreply.github.com> * Update code/modules/projectiles/projectile/magic_projectiles.dm Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> Signed-off-by: Charlie Nolan <funnyman3595@gmail.com> --------- Signed-off-by: 1080pCat <96908085+1080pCat@users.noreply.github.com> Signed-off-by: Charlie Nolan <funnyman3595@gmail.com> Co-authored-by: PollardTheDragon <144391971+PollardTheDragon@users.noreply.github.com> Co-authored-by: Charlie Nolan <funnyman3595@gmail.com>
This commit is contained in:
co-authored by
PollardTheDragon
Charlie Nolan
parent
fbc1ecdef8
commit
deac51eeff
@@ -30,6 +30,8 @@
|
||||
nodamage = 1
|
||||
armour_penetration_percentage = 100
|
||||
flag = MAGIC
|
||||
antimagic_flags = MAGIC_RESISTANCE
|
||||
antimagic_charge_cost = 1
|
||||
|
||||
/obj/item/projectile/homing/magic/toolbox
|
||||
name = "magic toolbox"
|
||||
@@ -68,6 +70,9 @@
|
||||
|
||||
/obj/item/projectile/homing/magic/homing_fireball/on_hit(mob/living/target)
|
||||
. = ..()
|
||||
if(ismob(target))
|
||||
if(!.)
|
||||
return .
|
||||
explosion(get_turf(target), explosion_devastate, explosion_heavy, explosion_light, explosion_flash, 0, flame_range = explosion_fire, cause = "Homing Fireball")
|
||||
if(istype(target)) //multiple flavors of pain
|
||||
target.adjustFireLoss(10) // does 20 brute, and 10 burn + explosion. Pretty brutal.
|
||||
|
||||
@@ -6,28 +6,8 @@
|
||||
nodamage = 1
|
||||
armour_penetration_percentage = 100
|
||||
flag = MAGIC
|
||||
/// determines what type of antimagic can block the spell projectile
|
||||
var/antimagic_flags = MAGIC_RESISTANCE
|
||||
/// determines the drain cost on the antimagic item
|
||||
var/antimagic_charge_cost = 1
|
||||
|
||||
/obj/item/projectile/magic/prehit(atom/target)
|
||||
if(isliving(target))
|
||||
var/mob/living/victim = target
|
||||
if(victim.can_block_magic(antimagic_flags, antimagic_charge_cost))
|
||||
visible_message("<span class='warning'>[src] fizzles on contact with [victim]!</span>")
|
||||
damage = 0
|
||||
nodamage = 1
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/obj/item/projectile/magic/on_hit(atom/target, blocked, hit_zone)
|
||||
if(isliving(target))
|
||||
var/mob/living/victim = target
|
||||
if(victim.can_block_magic(antimagic_flags, antimagic_charge_cost)) // Yes we have to check this twice welcome to bullet hell code
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
antimagic_flags = MAGIC_RESISTANCE
|
||||
antimagic_charge_cost = 1
|
||||
|
||||
/obj/item/projectile/magic/death
|
||||
name = "bolt of death"
|
||||
@@ -46,21 +26,6 @@
|
||||
impact_light_range = 2.5
|
||||
impact_light_color_override = LIGHT_COLOR_PURPLE
|
||||
|
||||
/obj/item/projectile/magic/fireball
|
||||
name = "bolt of fireball"
|
||||
icon_state = "fireball"
|
||||
damage = 10
|
||||
damage_type = BRUTE
|
||||
nodamage = 0
|
||||
immolate = 6
|
||||
|
||||
//explosion values
|
||||
var/exp_devastate = -1
|
||||
var/exp_heavy = 0
|
||||
var/exp_light = 2
|
||||
var/exp_flash = 3
|
||||
var/exp_fire = 2
|
||||
|
||||
/obj/item/projectile/magic/death/on_hit(mob/living/carbon/target)
|
||||
. = ..()
|
||||
if(!.)
|
||||
@@ -79,6 +44,21 @@
|
||||
|
||||
target.visible_message("<span class='danger'>[target] topples backwards as the death bolt impacts [target.p_them()]!</span>")
|
||||
|
||||
/obj/item/projectile/magic/fireball
|
||||
name = "bolt of fireball"
|
||||
icon_state = "fireball"
|
||||
damage = 10
|
||||
damage_type = BRUTE
|
||||
nodamage = 0
|
||||
immolate = 6
|
||||
|
||||
// explosion values
|
||||
var/exp_devastate = -1
|
||||
var/exp_heavy = 0
|
||||
var/exp_light = 2
|
||||
var/exp_flash = 3
|
||||
var/exp_fire = 2
|
||||
|
||||
/obj/item/projectile/magic/fireball/Range()
|
||||
var/turf/T1 = get_step(src,turn(dir, -45))
|
||||
var/turf/T2 = get_step(src,turn(dir, 45))
|
||||
@@ -99,13 +79,13 @@
|
||||
|
||||
/obj/item/projectile/magic/fireball/on_hit(target)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return .
|
||||
var/turf/T = get_turf(target)
|
||||
explosion(T, exp_devastate, exp_heavy, exp_light, exp_flash, 0, flame_range = exp_fire, cause = name)
|
||||
if(ismob(target))
|
||||
if(!.)
|
||||
return .
|
||||
explosion(get_turf(target), exp_devastate, exp_heavy, exp_light, exp_flash, 0, flame_range = exp_fire, cause = name)
|
||||
if(ismob(target)) //multiple flavors of pain
|
||||
var/mob/living/M = target
|
||||
M.take_overall_damage(0,10) //between this 10 burn, the 10 brute, the explosion brute, and the onfire burn, your at about 65 damage if you stop drop and roll immediately
|
||||
M.adjustFireLoss(10) // between this 10 burn, the 10 brute, the explosion brute, and the onfire burn, your at about 65 damage if you stop drop and roll immediately
|
||||
|
||||
|
||||
/obj/item/projectile/magic/fireball/infernal
|
||||
|
||||
@@ -135,6 +135,11 @@
|
||||
/// Can our ricochet autoaim hit our firer?
|
||||
var/ricochet_shoots_firer = TRUE
|
||||
|
||||
/// determines what type of antimagic can block the spell projectile
|
||||
var/antimagic_flags
|
||||
/// determines the drain cost on the antimagic item
|
||||
var/antimagic_charge_cost
|
||||
|
||||
/obj/item/projectile/New()
|
||||
return ..()
|
||||
|
||||
@@ -160,12 +165,23 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/item/projectile/proc/prehit(atom/target)
|
||||
if(isliving(target))
|
||||
var/mob/living/victim = target
|
||||
if(victim.can_block_magic(antimagic_flags, antimagic_charge_cost))
|
||||
visible_message("<span class='warning'>[src] fizzles on contact with [victim]!</span>")
|
||||
damage = 0
|
||||
nodamage = 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/projectile/proc/on_hit(atom/target, blocked = 0, hit_zone)
|
||||
var/turf/target_loca = get_turf(target)
|
||||
var/hitx
|
||||
var/hity
|
||||
if(isliving(target))
|
||||
var/mob/living/victim = target
|
||||
if(victim.can_block_magic(antimagic_flags, antimagic_charge_cost)) // Yes we have to check this twice welcome to bullet hell code
|
||||
return FALSE
|
||||
if(target == original)
|
||||
hitx = target.pixel_x + p_x - 16
|
||||
hity = target.pixel_y + p_y - 16
|
||||
|
||||
Reference in New Issue
Block a user