initial commit - cross reference with 5th port - obviously has compile errors

This commit is contained in:
LetterJay
2016-07-03 02:17:19 -05:00
commit 35a1723e98
4355 changed files with 2221257 additions and 0 deletions
+171
View File
@@ -0,0 +1,171 @@
/datum/martial_art/krav_maga
name = "Krav Maga"
var/datum/action/neck_chop/neckchop = new/datum/action/neck_chop()
var/datum/action/leg_sweep/legsweep = new/datum/action/leg_sweep()
var/datum/action/lung_punch/lungpunch = new/datum/action/lung_punch()
/datum/action/neck_chop
name = "Neck Chop - Injures the neck, stopping the victim from speaking for a while."
button_icon_state = "neckchop"
/datum/action/neck_chop/Trigger()
if(owner.incapacitated())
owner << "<span class='warning'>You can't use Krav Maga while you're incapacitated.</span>"
return
owner.visible_message("<span class='danger'>[owner] assumes the Neck Chop stance!</span>", "<b><i>Your next attack will be a Neck Chop.</i></b>")
var/mob/living/carbon/human/H = owner
H.martial_art.streak = "neck_chop"
/datum/action/leg_sweep
name = "Leg Sweep - Trips the victim, rendering them prone and unable to move for a short time."
button_icon_state = "legsweep"
/datum/action/leg_sweep/Trigger()
if(owner.incapacitated())
owner << "<span class='warning'>You can't use Krav Maga while you're incapacitated.</span>"
return
owner.visible_message("<span class='danger'>[owner] assumes the Leg Sweep stance!</span>", "<b><i>Your next attack will be a Leg Sweep.</i></b>")
var/mob/living/carbon/human/H = owner
H.martial_art.streak = "leg_sweep"
/datum/action/lung_punch//referred to internally as 'quick choke'
name = "Lung Punch - Delivers a strong punch just above the victim's abdomen, constraining the lungs. The victim will be unable to breathe for a short time."
button_icon_state = "lungpunch"
/datum/action/lung_punch/Trigger()
if(owner.incapacitated())
owner << "<span class='warning'>You can't use Krav Maga while you're incapacitated.</span>"
return
owner.visible_message("<span class='danger'>[owner] assumes the Lung Punch stance!</span>", "<b><i>Your next attack will be a Lung Punch.</i></b>")
var/mob/living/carbon/human/H = owner
H.martial_art.streak = "quick_choke"//internal name for lung punch
/datum/martial_art/krav_maga/teach(var/mob/living/carbon/human/H,var/make_temporary=0)
..()
H << "<span class = 'userdanger'>You know the arts of Krav Maga!</span>"
H << "<span class = 'danger'>Place your cursor over a move at the top of the screen to see what it does.</span>"
neckchop.Grant(H)
legsweep.Grant(H)
lungpunch.Grant(H)
/datum/martial_art/krav_maga/remove(var/mob/living/carbon/human/H)
..()
H << "<span class = 'userdanger'>You suddenly forget the arts of Krav Maga...</span>"
neckchop.Remove(H)
legsweep.Remove(H)
lungpunch.Remove(H)
/datum/martial_art/krav_maga/proc/check_streak(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
switch(streak)
if("neck_chop")
streak = ""
neck_chop(A,D)
return 1
if("leg_sweep")
streak = ""
leg_sweep(A,D)
return 1
if("quick_choke")//is actually lung punch
streak = ""
quick_choke(A,D)
return 1
return 0
/datum/martial_art/krav_maga/proc/leg_sweep(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
if(D.stat || D.weakened)
return 0
D.visible_message("<span class='warning'>[A] leg sweeps [D]!</span>", \
"<span class='userdanger'>[A] leg sweeps you!</span>")
playsound(get_turf(A), 'sound/effects/hit_kick.ogg', 50, 1, -1)
D.apply_damage(5, BRUTE)
D.Weaken(2)
return 1
/datum/martial_art/krav_maga/proc/quick_choke(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)//is actually lung punch
D.visible_message("<span class='warning'>[A] pounds [D] on the chest!</span>", \
"<span class='userdanger'>[A] slams your chest! You can't breathe!</span>")
playsound(get_turf(A), 'sound/effects/hit_punch.ogg', 50, 1, -1)
D.losebreath += 5
D.adjustOxyLoss(10)
return 1
/datum/martial_art/krav_maga/proc/neck_chop(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
D.visible_message("<span class='warning'>[A] karate chops [D]'s neck!</span>", \
"<span class='userdanger'>[A] karate chops your neck, rendering you unable to speak!</span>")
playsound(get_turf(A), 'sound/effects/hit_punch.ogg', 50, 1, -1)
D.apply_damage(5, BRUTE)
D.silent += 10
return 1
datum/martial_art/krav_maga/grab_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
if(check_streak(A,D))
return 1
..()
/datum/martial_art/krav_maga/harm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
if(check_streak(A,D))
return 1
add_logs(A, D, "punched")
A.do_attack_animation(D)
var/picked_hit_type = pick("punches", "kicks")
var/bonus_damage = 10
if(D.weakened || D.resting || D.lying)
bonus_damage += 5
picked_hit_type = "stomps on"
D.apply_damage(bonus_damage, BRUTE)
if(picked_hit_type == "kicks" || picked_hit_type == "stomps")
playsound(get_turf(D), 'sound/effects/hit_kick.ogg', 50, 1, -1)
else
playsound(get_turf(D), 'sound/effects/hit_punch.ogg', 50, 1, -1)
D.visible_message("<span class='danger'>[A] [picked_hit_type] [D]!</span>", \
"<span class='userdanger'>[A] [picked_hit_type] you!</span>")
return 1
/datum/martial_art/krav_maga/disarm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
if(check_streak(A,D))
return 1
if(prob(60))
if(D.hand)
if(istype(D.l_hand, /obj/item))
var/obj/item/I = D.l_hand
D.drop_item()
A.put_in_hands(I)
else
if(istype(D.r_hand, /obj/item))
var/obj/item/I = D.r_hand
D.drop_item()
A.put_in_hands(I)
D.visible_message("<span class='danger'>[A] has disarmed [D]!</span>", \
"<span class='userdanger'>[A] has disarmed [D]!</span>")
playsound(D, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
else
D.visible_message("<span class='danger'>[A] attempted to disarm [D]!</span>", \
"<span class='userdanger'>[A] attempted to disarm [D]!</span>")
playsound(D, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
return 1
//Krav Maga Gloves
/obj/item/clothing/gloves/color/black/krav_maga
can_be_cut = 0
var/datum/martial_art/krav_maga/style = new
/obj/item/clothing/gloves/color/black/krav_maga/equipped(mob/user, slot)
if(!ishuman(user))
return
if(slot == slot_gloves)
var/mob/living/carbon/human/H = user
style.teach(H,1)
/obj/item/clothing/gloves/color/black/krav_maga/dropped(mob/user)
if(!ishuman(user))
return
var/mob/living/carbon/human/H = user
if(H.get_item_by_slot(slot_gloves) == src)
style.remove(H)
/obj/item/clothing/gloves/color/black/krav_maga/sec//more obviously named, given to sec
name = "krav maga gloves"
desc = "These gloves can teach you to perform Krav Maga using nanochips."
icon_state = "fightgloves"
item_state = "fightgloves"
+421
View File
@@ -0,0 +1,421 @@
/datum/martial_art/wrestling
name = "Wrestling"
var/datum/action/slam/slam = new/datum/action/slam()
var/datum/action/throw_wrassle/throw_wrassle = new/datum/action/throw_wrassle()
var/datum/action/kick/kick = new/datum/action/kick()
var/datum/action/strike/strike = new/datum/action/strike()
var/datum/action/drop/drop = new/datum/action/drop()
/datum/martial_art/wrestling/proc/check_streak(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
switch(streak)
if("drop")
streak = ""
drop(A,D)
return 1
if("strike")
streak = ""
strike(A,D)
return 1
if("kick")
streak = ""
kick(A,D)
return 1
if("throw")
streak = ""
throw_wrassle(A,D)
return 1
if("slam")
streak = ""
slam(A,D)
return 1
return 0
/datum/action/slam
name = "Slam (Cinch) - Slam a grappled opponent into the floor."
button_icon_state = "wrassle_slam"
/datum/action/slam/Trigger()
if(owner.incapacitated())
owner << "<span class='warning'>You can't WRESTLE while you're OUT FOR THE COUNT.</span>"
return
owner.visible_message("<span class='danger'>[owner] prepares to BODY SLAM!</span>", "<b><i>Your next attack will be a BODY SLAM.</i></b>")
var/mob/living/carbon/human/H = owner
H.martial_art.streak = "slam"
/datum/action/throw_wrassle
name = "Throw (Cinch) - Spin a cinched opponent around and throw them."
button_icon_state = "wrassle_throw"
/datum/action/throw_wrassle/Trigger()
if(owner.incapacitated())
owner << "<span class='warning'>You can't WRESTLE while you're OUT FOR THE COUNT.</span>"
return
owner.visible_message("<span class='danger'>[owner] prepares to THROW!</span>", "<b><i>Your next attack will be a THROW.</i></b>")
var/mob/living/carbon/human/H = owner
H.martial_art.streak = "throw"
/datum/action/kick
name = "Kick - A powerful kick, sends people flying away from you. Also useful for escaping from bad situations."
button_icon_state = "wrassle_kick"
/datum/action/kick/Trigger()
if(owner.incapacitated())
owner << "<span class='warning'>You can't WRESTLE while you're OUT FOR THE COUNT.</span>"
return
owner.visible_message("<span class='danger'>[owner] prepares to KICK!</span>", "<b><i>Your next attack will be a KICK.</i></b>")
var/mob/living/carbon/human/H = owner
H.martial_art.streak = "kick"
/datum/action/strike
name = "Strike - Hit a neaby opponent with a quick attack."
button_icon_state = "wrassle_strike"
/datum/action/strike/Trigger()
if(owner.incapacitated())
owner << "<span class='warning'>You can't WRESTLE while you're OUT FOR THE COUNT.</span>"
return
owner.visible_message("<span class='danger'>[owner] prepares to STRIKE!</span>", "<b><i>Your next attack will be a STRIKE.</i></b>")
var/mob/living/carbon/human/H = owner
H.martial_art.streak = "strike"
/datum/action/drop
name = "Drop - Smash down onto an opponent."
button_icon_state = "wrassle_drop"
/datum/action/drop/Trigger()
if(owner.incapacitated())
owner << "<span class='warning'>You can't WRESTLE while you're OUT FOR THE COUNT.</span>"
return
owner.visible_message("<span class='danger'>[owner] prepares to LEG DROP!</span>", "<b><i>Your next attack will be a LEG DROP.</i></b>")
var/mob/living/carbon/human/H = owner
H.martial_art.streak = "drop"
/datum/martial_art/wrestling/teach(var/mob/living/carbon/human/H,var/make_temporary=0)
..()
H << "<span class = 'userdanger'>SNAP INTO A THIN TIM!</span>"
H << "<span class = 'danger'>Place your cursor over a move at the top of the screen to see what it does.</span>"
drop.Grant(H)
kick.Grant(H)
slam.Grant(H)
throw_wrassle.Grant(H)
strike.Grant(H)
/datum/martial_art/wrestling/remove(var/mob/living/carbon/human/H)
..()
H << "<span class = 'userdanger'>You no longer feel that the tower of power is too sweet to be sour...</span>"
drop.Remove(H)
kick.Remove(H)
slam.Remove(H)
throw_wrassle.Remove(H)
strike.Remove(H)
/datum/martial_art/wrestling/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
if(check_streak(A,D))
return 1
..()
/datum/martial_art/wrestling/proc/throw_wrassle(mob/living/carbon/human/A, mob/living/carbon/human/D)
if(!D)
return
if(!A.pulling || A.pulling != D)
A << "You need to have [D] in a cinch!"
return
D.forceMove(A.loc)
D.setDir(get_dir(D, A))
D.Stun(4)
A.visible_message("<span class = 'danger'><B>[A] starts spinning around with [D]!</B></span>")
A.emote("scream")
for (var/i = 0, i < 20, i++)
var/delay = 5
switch (i)
if (17 to INFINITY)
delay = 0.25
if (14 to 16)
delay = 0.5
if (9 to 13)
delay = 1
if (5 to 8)
delay = 2
if (0 to 4)
delay = 3
if (A && D)
if (get_dist(A, D) > 1)
A << "[D] is too far away!"
return 0
if (!isturf(A.loc) || !isturf(D.loc))
A << "You can't throw [D] from here!"
return 0
A.setDir(turn(A.dir, 90))
var/turf/T = get_step(A, A.dir)
var/turf/S = D.loc
if ((S && isturf(S) && S.Exit(D)) && (T && isturf(T) && T.Enter(A)))
D.forceMove(T)
D.setDir(get_dir(D, A))
else
return 0
sleep(delay)
if (A && D)
// These are necessary because of the sleep call.
if (get_dist(A, D) > 1)
A << "[D] is too far away!"
return 0
if (!isturf(A.loc) || !isturf(D.loc))
A << "You can't throw [D] from here!"
return 0
D.forceMove(A.loc) // Maybe this will help with the wallthrowing bug.
A.visible_message("<span class = 'danger'><B>[A] throws [D]!</B></span>")
playsound(A.loc, "swing_hit", 50, 1)
var/turf/T = get_edge_target_turf(A, A.dir)
if (T && isturf(T))
if (!D.stat)
D.emote("scream")
D.throw_at(T, 10, 4)
D.Weaken(2)
return 0
/datum/martial_art/wrestling/proc/slam(mob/living/carbon/human/A, mob/living/carbon/human/D)
if(!D)
return
if(!A.pulling || A.pulling != D)
A << "You need to have [D] in a cinch!"
return
D.forceMove(A.loc)
A.setDir(get_dir(A, D))
D.setDir(get_dir(D, A))
A.visible_message("<span class = 'danger'><B>[A] lifts [D] up!</B></span>")
spawn (0)
if (D)
animate(D, transform = matrix(180, MATRIX_ROTATE), time = 1, loop = 0)
sleep (15)
if (D)
animate(D, transform = null, time = 1, loop = 0)
for (var/i = 0, i < 3, i++)
if (A && D)
A.pixel_y += 3
D.pixel_y += 3
A.setDir(turn(A.dir, 90))
D.setDir(turn(D.dir, 90))
switch (A.dir)
if (NORTH)
D.pixel_x = A.pixel_x
if (SOUTH)
D.pixel_x = A.pixel_x
if (EAST)
D.pixel_x = A.pixel_x - 8
if (WEST)
D.pixel_x = A.pixel_x + 8
if (get_dist(A, D) > 1)
A << "[D] is too far away!"
A.pixel_x = 0
A.pixel_y = 0
D.pixel_x = 0
D.pixel_y = 0
return 0
if (!isturf(A.loc) || !isturf(D.loc))
A << "You can't slam [D] here!"
A.pixel_x = 0
A.pixel_y = 0
D.pixel_x = 0
D.pixel_y = 0
return 0
else
if (A)
A.pixel_x = 0
A.pixel_y = 0
if (D)
D.pixel_x = 0
D.pixel_y = 0
return 0
sleep (1)
if (A && D)
A.pixel_x = 0
A.pixel_y = 0
D.pixel_x = 0
D.pixel_y = 0
if (get_dist(A, D) > 1)
A << "[D] is too far away!"
return 0
if (!isturf(A.loc) || !isturf(D.loc))
A << "You can't slam [D] here!"
return 0
D.forceMove(A.loc)
var/fluff = "body-slam"
switch(pick(2,3))
if (2)
fluff = "turbo [fluff]"
if (3)
fluff = "atomic [fluff]"
A.visible_message("<span class = 'danger'><B>[A] [fluff] [D]!</B></span>")
playsound(A.loc, "swing_hit", 50, 1)
if (!D.stat)
D.emote("scream")
D.weakened += 2
D.stunned += 2
switch(rand(1,3))
if (2)
D.adjustBruteLoss(rand(20,30))
if (3)
D.ex_act(3)
else
D.adjustBruteLoss(rand(10,20))
else
D.ex_act(3)
else
if (A)
A.pixel_x = 0
A.pixel_y = 0
if (D)
D.pixel_x = 0
D.pixel_y = 0
return 0
/datum/martial_art/wrestling/proc/strike(mob/living/carbon/human/A, mob/living/carbon/human/D)
if(!D)
return
var/turf/T = get_turf(A)
if (T && isturf(T) && D && isturf(D.loc))
for (var/i = 0, i < 4, i++)
A.setDir(turn(A.dir, 90))
A.forceMove(D.loc)
spawn (4)
if (A && (T && isturf(T) && get_dist(A, T) <= 1))
A.forceMove(T)
A.visible_message("<span class = 'danger'><b>[A] headbutts [D]!</b></span>")
D.adjustBruteLoss(rand(10,20))
playsound(A.loc, "swing_hit", 50, 1)
D.Paralyse(1)
/datum/martial_art/wrestling/proc/kick(mob/living/carbon/human/A, mob/living/carbon/human/D)
if(!D)
return
A.emote("scream")
A.emote("flip")
A.setDir(turn(A.dir, 90))
A.visible_message("<span class = 'danger'><B>[A] roundhouse-kicks [D]!</B></span>")
playsound(A.loc, "swing_hit", 50, 1)
D.adjustBruteLoss(rand(10,20))
var/turf/T = get_edge_target_turf(A, get_dir(A, get_step_away(D, A)))
if (T && isturf(T))
D.Weaken(1)
D.throw_at(T, 3, 2)
/datum/martial_art/wrestling/proc/drop(mob/living/carbon/human/A, mob/living/carbon/human/D)
if(!D)
return
var/obj/surface = null
var/turf/ST = null
var/falling = 0
for (var/obj/O in oview(1, A))
if (O.density == 1)
if (O == A) continue
if (O == D) continue
if (O.opacity) continue
else
surface = O
ST = get_turf(O)
break
if (surface && (ST && isturf(ST)))
A.forceMove(ST)
A.visible_message("<span class = 'danger'><B>[A] climbs onto [surface]!</b></span>")
A.pixel_y = 10
falling = 1
sleep(10)
if (A && D)
// These are necessary because of the sleep call.
if ((falling == 0 && get_dist(A, D) > 1) || (falling == 1 && get_dist(A, D) > 2)) // We climbed onto stuff.
A.pixel_y = 0
if (falling == 1)
A.visible_message("<span class = 'danger'><B>...and dives head-first into the ground, ouch!</b></span>")
A.adjustBruteLoss(rand(10,20))
A.Weaken(3)
A << "[D] is too far away!"
return 0
if (!isturf(A.loc) || !isturf(D.loc))
A.pixel_y = 0
A << "You can't drop onto [D] from here!"
return 0
if(A)
animate(A, transform = matrix(90, MATRIX_ROTATE), time = 1, loop = 0)
sleep(10)
if(A)
animate(A, transform = null, time = 1, loop = 0)
A.forceMove(D.loc)
A.visible_message("<span class = 'danger'><B>[A] leg-drops [D]!</B></span>")
playsound(A.loc, "swing_hit", 50, 1)
A.emote("scream")
if (falling == 1)
if (prob(33) || D.stat)
D.ex_act(3)
else
D.adjustBruteLoss(rand(20,30))
else
D.adjustBruteLoss(rand(20,30))
D.Weaken(1)
D.Stun(2)
A.pixel_y = 0
else
if (A)
A.pixel_y = 0
return
/datum/martial_art/wrestling/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
if(check_streak(A,D))
return 1
..()
/datum/martial_art/wrestling/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
if(check_streak(A,D))
return 1
if(A.pulling == D)
return 1
A.start_pulling(D)
D.visible_message("<span class='danger'>[A] gets [D] in a cinch!</span>", \
"<span class='userdanger'>[A] gets [D] in a cinch!</span>")
D.Stun(rand(3,5))
return 1