port 2
This commit is contained in:
10
code/__DEFINES/melee.dm
Normal file
10
code/__DEFINES/melee.dm
Normal file
@@ -0,0 +1,10 @@
|
||||
//Martial arts defines
|
||||
|
||||
#define MARTIALART_BOXING "boxing"
|
||||
#define MARTIALART_WRESTLING "wrestling"
|
||||
#define MARTIALART_SLEEPINGCARP "sleeping carp"
|
||||
#define MARTIALART_PSYCHOBRAWL "psychotic brawling"
|
||||
#define MARTIALART_MUSHPUNCH "mushroom punch"
|
||||
#define MARTIALART_KRAVMAGA "krav maga"
|
||||
#define MARTIALART_CQC "CQC"
|
||||
#define MARTIALART_PLASMAFIST "plasma fist"
|
||||
@@ -2,6 +2,7 @@
|
||||
var/name = "Martial Art"
|
||||
var/streak = ""
|
||||
var/max_streak_length = 6
|
||||
var/id = "" //ID, used by mind/has_martialartcode\game\objects\items\granters.dm:345:error: user.mind.has_martialart: undefined proccode\game\objects\items\granters.dm:345:error: user.mind.has_martialart: undefined proccode\game\objects\items\granters.dm:345:error: user.mind.has_martialart: undefined proccode\game\objects\items\granters.dm:345:error: user.mind.has_martialart: undefined proccode\game\objects\items\granters.dm:345:error: user.mind.has_martialart: undefined proc
|
||||
var/current_target
|
||||
var/datum/martial_art/base // The permanent style. This will be null unless the martial art is temporary
|
||||
var/deflection_chance = 0 //Chance to deflect projectiles
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/datum/martial_art/boxing
|
||||
name = "Boxing"
|
||||
id = MARTIALART_BOXING
|
||||
|
||||
/datum/martial_art/boxing/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
to_chat(A, "<span class='warning'>Can't disarm while boxing!</span>")
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
/datum/martial_art/cqc
|
||||
name = "CQC"
|
||||
id = MARTIALART_CQC
|
||||
help_verb = /mob/living/carbon/human/proc/CQC_help
|
||||
block_chance = 75
|
||||
var/just_a_cook = FALSE
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/datum/martial_art/krav_maga
|
||||
name = "Krav Maga"
|
||||
id = MARTIALART_KRAVMAGA
|
||||
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()
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/datum/martial_art/mushpunch
|
||||
name = "Mushroom Punch"
|
||||
id = MARTIALART_MUSHPUNCH
|
||||
|
||||
/datum/martial_art/mushpunch/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
var/atk_verb
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
/datum/martial_art/plasma_fist
|
||||
name = "Plasma Fist"
|
||||
id = MARTIALART_PLASMAFIST
|
||||
help_verb = /mob/living/carbon/human/proc/plasma_fist_help
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/datum/martial_art/psychotic_brawling
|
||||
name = "Psychotic Brawling"
|
||||
id = MARTIALART_PSYCHOBRAWL
|
||||
|
||||
/datum/martial_art/psychotic_brawling/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
return psycho_attack(A,D)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
/datum/martial_art/the_sleeping_carp
|
||||
name = "The Sleeping Carp"
|
||||
id = MARTIALART_SLEEPINGCARP
|
||||
deflection_chance = 100
|
||||
reroute_deflection = TRUE
|
||||
no_guns = TRUE
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
/datum/martial_art/wrestling
|
||||
name = "Wrestling"
|
||||
id = MARTIALART_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()
|
||||
|
||||
@@ -781,6 +781,11 @@
|
||||
mind_initialize() //updates the mind (or creates and initializes one if one doesn't exist)
|
||||
mind.active = 1 //indicates that the mind is currently synced with a client
|
||||
|
||||
/datum/mind/proc/has_martialart(var/string)
|
||||
if(martial_art && martial_art.id == string)
|
||||
return martial_art
|
||||
return FALSE
|
||||
|
||||
/mob/dead/new_player/sync_mind()
|
||||
return
|
||||
|
||||
|
||||
@@ -41,8 +41,6 @@
|
||||
if(reading)
|
||||
to_chat(user, "<span class='warning'>You're already reading this!</span>")
|
||||
return FALSE
|
||||
if(!user.can_read(src))
|
||||
return FALSE
|
||||
if(already_known(user))
|
||||
return FALSE
|
||||
if(used && oneuse)
|
||||
@@ -84,6 +82,31 @@
|
||||
G.Grant(user)
|
||||
onlearned(user)
|
||||
|
||||
/obj/item/book/granter/action/drink_fling
|
||||
granted_action = /datum/action/innate/drink_fling
|
||||
name = "Tapper: This One's For You"
|
||||
desc = "A seminal work on the dying art of booze sliding."
|
||||
icon_state = "barbook"
|
||||
actionname = "drink flinging"
|
||||
oneuse = FALSE
|
||||
remarks = list("The trick is keeping a low center of gravity it seems...", "The viscosity of the liquid is important...", "Accounting for crosswinds... really?", "Drag coefficients of various popular drinking glasses...", "What the heck is laminar flow and why does it matter here?", "Greasing the bar seems like it'd be cheating...", "I don't think I'll be working with superfluids...")
|
||||
|
||||
/datum/action/innate/drink_fling
|
||||
name = "Drink Flinging"
|
||||
desc = "Toggles your ability to satisfyingly throw glasses without spilling them."
|
||||
button_icon_state = "drinkfling_off"
|
||||
check_flags = 0
|
||||
|
||||
/datum/action/innate/drink_fling/Activate()
|
||||
button_icon_state = "drinkfling_on"
|
||||
active = TRUE
|
||||
UpdateButtonIcon()
|
||||
|
||||
/datum/action/innate/drink_fling/Deactivate()
|
||||
button_icon_state = "drinkfling_off"
|
||||
active = FALSE
|
||||
UpdateButtonIcon()
|
||||
|
||||
/obj/item/book/granter/action/origami
|
||||
granted_action = /datum/action/innate/origami
|
||||
name = "The Art of Origami"
|
||||
@@ -181,9 +204,9 @@
|
||||
..()
|
||||
to_chat(user,"<span class='caution'>Your stomach rumbles...</span>")
|
||||
if(user.nutrition)
|
||||
user.set_nutrition(200)
|
||||
user.nutrition = 200
|
||||
if(user.nutrition <= 0)
|
||||
user.set_nutrition(0)
|
||||
user.nutrition = 0
|
||||
|
||||
/obj/item/book/granter/spell/blind
|
||||
spell = /obj/effect/proc_holder/spell/targeted/trigger/blind
|
||||
@@ -315,7 +338,6 @@
|
||||
var/martialname = "bug jitsu"
|
||||
var/greet = "You feel like you have mastered the art in breaking code. Nice work, jackass."
|
||||
|
||||
|
||||
/obj/item/book/granter/martial/already_known(mob/user)
|
||||
if(!martial)
|
||||
return TRUE
|
||||
@@ -408,4 +430,4 @@
|
||||
for(var/crafting_recipe_type in crafting_recipe_types)
|
||||
var/datum/crafting_recipe/R = crafting_recipe_type
|
||||
user.mind.teach_crafting_recipe(crafting_recipe_type)
|
||||
to_chat(user,"<span class='notice'>You learned how to make [initial(R.name)].</span>")
|
||||
to_chat(user,"<span class='notice'>You learned how to make [initial(R.name)].</span>")
|
||||
@@ -21,7 +21,7 @@
|
||||
return
|
||||
if(!H.mind)
|
||||
return
|
||||
if(istype(H.mind.martial_art, /datum/martial_art/krav_maga))
|
||||
if(H.mind.has_martialart(MARTIALART_KRAVMAGA))
|
||||
style.remove(H)
|
||||
else
|
||||
style.teach(H,1)
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
#include "code\__DEFINES\maths.dm"
|
||||
#include "code\__DEFINES\MC.dm"
|
||||
#include "code\__DEFINES\medal.dm"
|
||||
#include "code\__DEFINES\melee.dm"
|
||||
#include "code\__DEFINES\menu.dm"
|
||||
#include "code\__DEFINES\misc.dm"
|
||||
#include "code\__DEFINES\mobs.dm"
|
||||
|
||||
Reference in New Issue
Block a user