mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
Add Colossus, add outdoors variable to areas and update fireball targeting
This commit is contained in:
@@ -188,3 +188,9 @@
|
||||
//Behavior for magazines
|
||||
/obj/item/ammo_box/magazine/proc/ammo_count()
|
||||
return stored_ammo.len
|
||||
|
||||
/obj/item/ammo_box/magazine/proc/empty_magazine()
|
||||
var/turf_mag = get_turf(src)
|
||||
for(var/obj/item/ammo in stored_ammo)
|
||||
ammo.forceMove(turf_mag)
|
||||
stored_ammo -= ammo
|
||||
@@ -0,0 +1,98 @@
|
||||
/obj/item/weapon/gun/projectile/bow
|
||||
name = "bow"
|
||||
desc = "A sturdy bow made out of wood and reinforced with iron."
|
||||
icon_state = "bow_unloaded"
|
||||
item_state = "bow"
|
||||
fire_sound = 'sound/weapons/grenadelaunch.ogg'
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/bow
|
||||
flags = HANDSLOW
|
||||
weapon_weight = WEAPON_HEAVY
|
||||
var/draw_sound = 'sound/weapons/draw_bow.ogg'
|
||||
var/ready_to_fire = 0
|
||||
var/slowdown_when_ready = 2
|
||||
|
||||
/obj/item/weapon/gun/projectile/bow/update_icon()
|
||||
if(magazine.ammo_count() && !ready_to_fire)
|
||||
icon_state = "bow_loaded"
|
||||
else if(ready_to_fire)
|
||||
icon_state = "bow_firing"
|
||||
slowdown = slowdown_when_ready
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
slowdown = initial(slowdown)
|
||||
|
||||
/obj/item/weapon/gun/projectile/bow/dropped(mob/user)
|
||||
if(magazine && magazine.ammo_count())
|
||||
magazine.empty_magazine()
|
||||
ready_to_fire = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/projectile/bow/attack_self(mob/living/user)
|
||||
if(!ready_to_fire && magazine.ammo_count())
|
||||
ready_to_fire = TRUE
|
||||
playsound(user, draw_sound, 100, 1)
|
||||
update_icon()
|
||||
else
|
||||
ready_to_fire = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/projectile/bow/attackby(obj/item/A, mob/user, params)
|
||||
var/num_loaded = magazine.attackby(A, user, params, 1)
|
||||
if(num_loaded)
|
||||
user << "<span class='notice'>You ready \the [A] into \the [src].</span>"
|
||||
update_icon()
|
||||
chamber_round()
|
||||
|
||||
/obj/item/weapon/gun/projectile/bow/can_shoot()
|
||||
. = ..()
|
||||
if(!ready_to_fire)
|
||||
return FALSE
|
||||
|
||||
/obj/item/weapon/gun/projectile/bow/shoot_with_empty_chamber(mob/living/user as mob|obj)
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/bow/process_chamber(eject_casing = 0, empty_chamber = 1)
|
||||
. = ..()
|
||||
ready_to_fire = FALSE
|
||||
update_icon()
|
||||
|
||||
// ammo
|
||||
/obj/item/ammo_box/magazine/internal/bow
|
||||
name = "bow internal magazine"
|
||||
ammo_type = /obj/item/ammo_casing/caseless/arrow
|
||||
caliber = "arrow"
|
||||
max_ammo = 1
|
||||
|
||||
|
||||
/obj/item/projectile/bullet/reusable/arrow
|
||||
name = "arrow"
|
||||
icon_state = "arrow"
|
||||
ammo_type = /obj/item/ammo_casing/caseless/arrow
|
||||
range = 10
|
||||
damage = 25
|
||||
damage_type = BRUTE
|
||||
|
||||
/obj/item/ammo_casing/caseless/arrow
|
||||
name = "arrow"
|
||||
desc = "Stab, stab, stab."
|
||||
icon_state = "arrow"
|
||||
force = 10
|
||||
sharp = 1
|
||||
projectile_type = /obj/item/projectile/bullet/reusable/arrow
|
||||
caliber = "arrow"
|
||||
|
||||
//quiver
|
||||
/obj/item/weapon/storage/backpack/quiver
|
||||
name = "quiver"
|
||||
desc = "A quiver for holding arrows."
|
||||
icon_state = "quiver"
|
||||
item_state = "quiver"
|
||||
storage_slots = 20
|
||||
can_hold = list(
|
||||
/obj/item/ammo_casing/caseless/arrow
|
||||
)
|
||||
|
||||
/obj/item/weapon/storage/backpack/quiver/full/New()
|
||||
..()
|
||||
for(var/i in 1 to storage_slots)
|
||||
new /obj/item/ammo_casing/caseless/arrow(src)
|
||||
@@ -20,15 +20,26 @@
|
||||
damage = 10
|
||||
damage_type = BRUTE
|
||||
nodamage = 0
|
||||
|
||||
//explosion values
|
||||
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))
|
||||
var/turf/T3 = get_step(src,dir)
|
||||
var/mob/living/L = locate(/mob/living) in T1 //if there's a mob alive in our front right diagonal, we hit it.
|
||||
if(L && L.stat != DEAD)
|
||||
Bump(L) //Magic Bullet #teachthecontroversy
|
||||
return
|
||||
L = locate(/mob/living) in T2
|
||||
if(L && L.stat != DEAD)
|
||||
Bump(L)
|
||||
return
|
||||
L = locate(/mob/living) in T3
|
||||
if(L && L.stat != DEAD)
|
||||
Bump(L)
|
||||
return
|
||||
@@ -41,6 +52,14 @@
|
||||
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
|
||||
|
||||
|
||||
/obj/item/projectile/magic/fireball/infernal
|
||||
name = "infernal fireball"
|
||||
exp_heavy = -1
|
||||
exp_light = -1
|
||||
exp_flash = 4
|
||||
exp_fire= 5
|
||||
|
||||
/obj/item/projectile/magic/resurrection
|
||||
name = "bolt of resurrection"
|
||||
|
||||
Reference in New Issue
Block a user