Skip to content

Commit

Permalink
start_point
Browse files Browse the repository at this point in the history
  • Loading branch information
Ro2tCrab committed Sep 13, 2024
1 parent 4707498 commit efaf44c
Show file tree
Hide file tree
Showing 9 changed files with 179 additions and 35 deletions.
45 changes: 45 additions & 0 deletions code/modules/mob/living/simple_animal/hostile/carp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

11 changes: 11 additions & 0 deletions code/modules/projectiles/ammunition/special.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions code/modules/projectiles/guns/magic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
..()
57 changes: 39 additions & 18 deletions code/modules/projectiles/guns/magic/wand.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,54 +6,75 @@
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, "<span class='notice'> Ты чувствуешь себя лучше! )</span>")
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, "<span class='notice'> Ты чувствуешь себя лучше!</span>")

/obj/item/weapon/gun/magic/wand/blink
name = "staff of blink"
desc = "An artefact that makes no qualms about depositing teleportees in space, fires, or the center of a black hole."
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, "<span class='notice'> Ты чувствуешь себя иначе.</span>")

/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
14 changes: 12 additions & 2 deletions code/modules/projectiles/projectile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -190,7 +195,7 @@
permutated.Add(A)

return FALSE

do_effect(A)
qdel(src)
return TRUE

Expand All @@ -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()

Expand All @@ -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

Expand Down
9 changes: 0 additions & 9 deletions code/modules/projectiles/projectile/atom_create

This file was deleted.

71 changes: 68 additions & 3 deletions code/modules/projectiles/projectile/magic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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, "<span class='notice'> Ты чувствуешь себя лучше!</span>")


/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)





Binary file modified icons/mob/carp.dmi
Binary file not shown.
Binary file modified icons/obj/projectiles.dmi
Binary file not shown.

0 comments on commit efaf44c

Please sign in to comment.