diff --git a/code/modules/mob/living/simple_animal/hostile/carp.dm b/code/modules/mob/living/simple_animal/hostile/carp.dm index ee4e73e4f27e..f73014eaad90 100644 --- a/code/modules/mob/living/simple_animal/hostile/carp.dm +++ b/code/modules/mob/living/simple_animal/hostile/carp.dm @@ -158,3 +158,48 @@ if(rand(0,100) < idle_snd_chance) var/list/idle_snd = list('sound/voice/polkan/idle1.ogg','sound/voice/polkan/idle2.ogg') playsound(src, pick(idle_snd), VOL_EFFECTS_MASTER, null, FALSE, null, -3) + +/mob/living/simple_animal/hostile/carp/magic + name = "magic carp" + desc = "Свирепое и клыкастое существо, напоминающее рыбу. От этой рубиновой чещуи вам хочется кричать Ei'Nath" + icon_state = "magicarp" + icon_living = "magicarp" + icon_dead = "magicarp_dead" + icon_gib = "magicarp_gib" + icon_move = "magicarp" + ranged = TRUE + retreat_distance = 2 + minimum_distance = 5 + +/mob/living/simple_animal/hostile/carp/magic/atom_init() + ..() + projectiletype = pick( + /obj/item/projectile/magic/wand/magic_missle, + /obj/item/projectile/magic/wand/blink, + /obj/item/projectile/magic/forcebolt, + /obj/item/projectile/magic/Arcane_barrage, + /obj/item/projectile/temp/icebolt, + ) + +/mob/living/simple_animal/hostile/carp/magic/carp_randomify() + return 0 + +/mob/living/simple_animal/hostile/carp/magic/chaos + name = "chaos carp" + desc = "Свирепое и клыкастое существо, напоминающее рыбу. На 50% карп, 100% хаос." + icon_state = "chaoscarp" + icon_living = "chaoscarp" + icon_dead = "chaoscarp_dead" + icon_gib = "chaoscarp_gib" + icon_move = "chaoscarp" + +/mob/living/simple_animal/hostile/carp/magic/chaos/OpenFire(target) + ..() + projectiletype = pick( + /obj/item/projectile/magic/wand/magic_missle, + /obj/item/projectile/magic/wand/blink, + /obj/item/projectile/magic/forcebolt, + /obj/item/projectile/magic/Arcane_barrage, + /obj/item/projectile/temp/icebolt, + ) + diff --git a/code/modules/projectiles/ammunition/special.dm b/code/modules/projectiles/ammunition/special.dm index aebd33ea1e5a..d97fe8e728b9 100644 --- a/code/modules/projectiles/ammunition/special.dm +++ b/code/modules/projectiles/ammunition/special.dm @@ -14,6 +14,17 @@ /obj/item/ammo_casing/magic/door projectile_type = /obj/item/projectile/magic/door + +/obj/item/ammo_casing/magic/wand/forcewall + projectile_type = /obj/item/projectile/magic/wand/forcewall + +/obj/item/ammo_casing/magic/wand/broken_mirror + projectile_type = /obj/item/projectile/magic/wand/broken_mirror + +/obj/item/ammo_casing/magic/wand/magicarp + projectile_type = /obj/item/projectile/magic/wand/magic_carp + + /* /obj/item/ammo_casing/magic/death projectile_type = /obj/item/projectile/magic/death diff --git a/code/modules/projectiles/guns/magic.dm b/code/modules/projectiles/guns/magic.dm index d1825dc3583f..6ce56f772f28 100644 --- a/code/modules/projectiles/guns/magic.dm +++ b/code/modules/projectiles/guns/magic.dm @@ -107,6 +107,7 @@ playsound(user, fire_sound, VOL_EFFECTS_MASTER, TRUE) /obj/item/weapon/gun/magic/wand/attack(mob/living/M, mob/living/user, def_zone) - if(M == user) - zap_self() - ..() + if(user.a_intent != INTENT_HARM && M == user) + zap_self(user) + else + ..() diff --git a/code/modules/projectiles/guns/magic/wand.dm b/code/modules/projectiles/guns/magic/wand.dm index 5a81b3be60b8..0817d62acfaa 100644 --- a/code/modules/projectiles/guns/magic/wand.dm +++ b/code/modules/projectiles/guns/magic/wand.dm @@ -6,13 +6,19 @@ item_state = "staffofchange" fire_delay = 120 max_charges = 1 - var/heal_power = 20 + var/heal_power = -100 + /obj/item/weapon/gun/magic/wand/healing/zap_self(mob/living/user) ..() if(isliving(user)) user.apply_damages(heal_power, heal_power, heal_power, heal_power, heal_power, heal_power) user.apply_effects(heal_power, heal_power, heal_power, heal_power, heal_power, heal_power, heal_power, heal_power) - to_chat(user, " Ты чувствуешь себя лучше! )") + if(ishuman(user)) + var/mob/living/carbon/human/S = target + for(var/obj/item/organ/internal/IO in S.organs) + if(IO.damage > 0 && IO.robotic < 2) + IO.damage = max(IO.damage - (heal_power / 4), 0) + to_chat(user, " Ты чувствуешь себя лучше!") /obj/item/weapon/gun/magic/wand/blink name = "staff of blink" @@ -20,40 +26,55 @@ ammo_type = /obj/item/ammo_casing/magic/animate icon_state = "staffofanimation" item_state = "staffofanimation" + var/blink_range = 12 + +/obj/item/weapon/gun/magic/wand/blink/zap_self(mob/living/user) + if(isliving(user)) + do_teleport(user, get_turf(user), blink_range, asoundin = 'sound/magic/blink.ogg') /obj/item/weapon/gun/magic/wand/fireball name = "wand of fireball" desc = "A useful artefact for burning those you don't like and everyone else too. Point away from face." - ammo_type = /obj/item/ammo_casing/magic/heal + ammo_type = /obj/item/ammo_casing/magic/fireball icon_state = "staffofhealing" item_state = "staffofhealing" - ammo_type = /obj/item/ammo_casing/magic/fireball + +/obj/item/weapon/gun/magic/wand/fireball/zap_self(mob/living/user) + ..() + explosion(get_turf(user), 0, 0, 1, adminlog = FALSE) /obj/item/weapon/gun/magic/wand/forcewall - name = "staff of walls" - desc = "An artefact that spits bolts of transformative magic that can create walls." - ammo_type = /obj/item/projectile/atom_create/magic + name = "Жезл магической стены" + desc = "Артефакт, способный создавать магические стены. Судя по небольшой надписи, кольцо на жезле ''служит спусковым крючком''." + ammo_type = /obj/item/ammo_casing/magic/wand/forcewall icon_state = "staffofdoor" item_state = "staffofdoor" fire_sound = 'sound/magic/Staff_Door.ogg' -/obj/item/weapon/gun/magic/wand/magic_mirror - name = "wand of mirrors" +/obj/item/weapon/gun/magic/wand/broken_mirror + name = "Жезл разбитого стекла" icon_state = "lavastaff" item_state = "lavastaff" - desc = "An artefact that contains powers of magic mirror." - ammo_type = /obj/item/ammo_casing/magic/fireball + desc = "Артефакт, способный до неузнаваимости поменять внешний вид гуманоида. Судя по небольшой надписи, кольцо на жезле ''служит спусковым крючком''." + ammo_type = /obj/item/ammo_casing/magic/wand/broken_mirror -/obj/item/weapon/gun/magic/wand/mob_alchemy/magic_carp - name = "wand of corpse melting" +/obj/item/weapon/gun/magic/wand/broken_mirror/zap_self(/mob/living/user) + ..() + if(ishuman(user)) + var/mob/living/carbon/human/T = user + T.randomize_appearance() + to_chat(user, " Ты чувствуешь себя иначе.") + +/obj/item/weapon/gun/magic/wand/magic_carp + name = "Жезл магического карпа" icon_state = "lavastaff" item_state = "lavastaff" - desc = "An artefact that turns corpses into aggresive blood cloths" - ammo_type = /obj/item/ammo_casing/magic/fireball + desc = "Артефакт, призывающий магического карпа. Судя по небольшой надписи, кольцо на жезле ''служит спусковым крючком''." + ammo_type = /obj/item/ammo_casing/magic/wand/magicarp -/obj/item/weapon/gun/magic/wand/stone - name = "wand of corpse melting" +/obj/item/weapon/gun/magic/wand/magic_missle + name = "Жезл магической ракеты" icon_state = "lavastaff" item_state = "lavastaff" - desc = "An artefact that turns corpses into aggresive blood cloths" + desc = "Артефакт, призывающий сбивающую c ног магическую ракету. Судя по небольшой надписи, кольцо на жезле ''служит спусковым крючком''" ammo_type = /obj/item/ammo_casing/magic/fireball diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 7cc912457b00..e8edd314d960 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -22,6 +22,7 @@ var/atom/original = null // the original target clicked var/turf/starting = null // the projectile's starting turf var/list/permutated = list() // we've passed through these atoms, don't try to hit them again + var/atom/original_loc = null // the original target TURF location var/p_x = 16 var/p_y = 16 // the pixel location of the tile that the player clicked. Default is the center @@ -35,6 +36,7 @@ var/fake = 0 //Fake projectile won't spam chat for admins with useless logs var/flag = BULLET //Defines what armor to use when it hits things. Must be set to bullet, laser, energy,or bomb //Cael - bio and rad are also valid var/kill_count = 50 //This will de-increment every process(). When 0, it will delete the projectile. + var/hitturf = FALSE // We want to hit "turf" and call "do_effect" after hitting var/paused = FALSE //for suspending the projectile midair //Effects var/stun = 0 @@ -103,6 +105,9 @@ return grab.affecting return H +/obj/item/projectile/proc/do_effect(target) + return(0) + /obj/item/projectile/proc/on_hit(atom/target, def_zone = BP_CHEST, blocked = 0) impact_effect(effect_transform) // generate impact effect if(!isliving(target)) @@ -190,7 +195,7 @@ permutated.Add(A) return FALSE - + do_effect(A) qdel(src) return TRUE @@ -202,7 +207,7 @@ /obj/item/projectile/process(boolet_number = 1) // we add default arg value, because there is alot of uses of projectiles without guns (e.g turrets). var/first_step = 1 - + original_loc = get_turf(original) //plot the initial trajectory setup_trajectory() @@ -219,6 +224,11 @@ if((x == 1 || x == world.maxx || y == 1 || y == world.maxy)) qdel(src) return + if(hitturf) + if(loc == original_loc) + do_effect(loc) + qdel(src) + return trajectory.increment() // increment the current location location = trajectory.return_location(location) // update the locally stored location data diff --git a/code/modules/projectiles/projectile/atom_create b/code/modules/projectiles/projectile/atom_create deleted file mode 100644 index 9ea93ffcac18..000000000000 --- a/code/modules/projectiles/projectile/atom_create +++ /dev/null @@ -1,9 +0,0 @@ -// For those cases when we need to create an ATOM at the point of impact - -/obj/item/projectile/atom_create -var/atom/effect = null //effect we want to spawn - -/obj/item/projectile/atom_create/Bump(atom/A, forced) - . = ..() - if(A == original) - bumped = TRUE diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm index 9aad290ddca9..3490aad5db85 100644 --- a/code/modules/projectiles/projectile/magic.dm +++ b/code/modules/projectiles/projectile/magic.dm @@ -267,12 +267,77 @@ T.throw_at(get_edge_target_turf(target, throwdir),10,10) return 1 -/obj/item/projectile/magic/wand/ + +//Wands + +/obj/item/projectile/magic/wand name = "bolt of nothing" icon_state = "ice_1" light_color = "#00bfff" + hitturf = TRUE -/obj/item/projectile/atom_create/magic - name = "bolt of nothing creation" +/obj/item/projectile/magic/wand/forcewall + name = "bolt of forcewall" icon_state = "ice_1" light_color = "#00bfff" + hitturf = TRUE + +/obj/item/projectile/magic/wand/forcewall/do_effect(target) + new /obj/effect/forcefield/magic(get_turf(target), target) + +/obj/item/projectile/magic/wand/heal + name = "bolt of healing" + icon_state = "ion" + light_color = "#a9e2f3" + var/heal_power = -60 + +/obj/item/projectile/magic/wand/heal/on_hit(atom/target, def_zone = BP_CHEST, blocked = 0) + if(isliving(target)) + var/mob/living/M = target + M.apply_damages(heal_power, heal_power, heal_power, heal_power, heal_power, heal_power) + M.apply_effects(heal_power, heal_power, heal_power, heal_power, heal_power, heal_power, heal_power, heal_power) + if(ishuman(M)) + var/mob/living/carbon/human/S = target + for(var/obj/item/organ/internal/IO in S.organs) + if(IO.damage > 0 && IO.robotic < 2) + IO.damage = max((IO.damage - (heal_power / 4)), 0) + + to_chat(target, " Ты чувствуешь себя лучше!") + + +/obj/item/projectile/magic/wand/blink + name = "bolt of blink" + icon_state = "bluespace" + light_color = "#00bfff" + var/blink_range = 12 + +/obj/item/projectile/magic/wand/blink/on_hit(atom/target, def_zone = BP_CHEST, blocked = 0) + if(isliving(target)) + do_teleport(target, get_turf(target), blink_range, asoundin = 'sound/magic/blink.ogg') + +/obj/item/projectile/magic/wand/broken_mirror + name = "bolt of mirrors" + icon_state = "spell" + light_color = "#629bb4" + +/obj/item/projectile/magic/wand/broken_mirror/on_hit(atom/target, def_zone = BP_CHEST, blocked = 0) + +/obj/item/projectile/magic/wand/magic_missle + name = "magic rocket" + icon_state = "magicm" + light_color = "#b63aa3" + stun = 2 + weaken = 5 + +/obj/item/projectile/magic/wand/magic_carp + name = "bolt of carps" + icon_state = "carp" + light_color = "#b63aa3" + +/obj/item/projectile/magic/wand/magic_carp/do_effect(target) + new /mob/living/simple_animal/hostile/carp/magic(get_turf(target), target) + + + + + diff --git a/icons/mob/carp.dmi b/icons/mob/carp.dmi index 4abe65cd492f..13a3ca803b82 100644 Binary files a/icons/mob/carp.dmi and b/icons/mob/carp.dmi differ diff --git a/icons/obj/projectiles.dmi b/icons/obj/projectiles.dmi index 12c18e60ae7b..c85ddc184ae0 100644 Binary files a/icons/obj/projectiles.dmi and b/icons/obj/projectiles.dmi differ