Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Сombo-based unarmed combat instead of chances. #4055

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
de3cd3b
Proof of concept, combo-based combat instead of chances.
LudwigVonChesterfield Sep 26, 2019
802c3f3
Complete combat overhaul.
LudwigVonChesterfield Sep 27, 2019
602eef1
Converting simple_animals into the new combat system.
LudwigVonChesterfield Sep 27, 2019
3232d5c
Mob-type checks for combos.
LudwigVonChesterfield Sep 27, 2019
4fc0ee0
Decreasing overall hand-damage, adding Charge combo.
LudwigVonChesterfield Sep 28, 2019
c3f1ae8
Converting aliens to new combat system.
LudwigVonChesterfield Sep 28, 2019
0f0f280
Converting slimes to new combat system.
LudwigVonChesterfield Sep 28, 2019
6976fd6
Adding new moves, added a verb to show all moves and explain them.
LudwigVonChesterfield Sep 28, 2019
dd89564
Buckling while doing combos is no longer feasible.
LudwigVonChesterfield Sep 29, 2019
6834466
Correct Destroy() proc for combat_saved.
LudwigVonChesterfield Sep 29, 2019
a7f6afd
An example of a mob that can (ab)use the new combat system by forcibl…
LudwigVonChesterfield Sep 29, 2019
db68deb
Merge branch 'master' of https://github.com/TauCetiStation/TauCetiCla…
LudwigVonChesterfield Sep 29, 2019
052fbeb
Nerfing crawling people.
LudwigVonChesterfield Sep 29, 2019
e6737bd
Fixes for dropkick, grabs, animations, etc.
LudwigVonChesterfield Sep 29, 2019
038f130
(Boxing gloves can stack up help combo-elements, perhaps something sh…
LudwigVonChesterfield Sep 29, 2019
ef669ea
Progbar rework, small size-comparision additions for grabs.
LudwigVonChesterfield Sep 29, 2019
046fa58
has_head, has_arm, has_leg for finer detail of the moves.
LudwigVonChesterfield Sep 30, 2019
7593934
before_animation and after_animation procs to make coding animations …
LudwigVonChesterfield Sep 30, 2019
defa1e5
Return TRUE if no targetzone given and human has a leg/arm/head...
LudwigVonChesterfield Sep 30, 2019
053028e
Using default_transform matrix in correct places.
LudwigVonChesterfield Sep 30, 2019
5d556f0
Punching bag for very naughty spacemen.
LudwigVonChesterfield Sep 30, 2019
da85595
Alt-click combo activation instead of next attack.
LudwigVonChesterfield Sep 30, 2019
1e7420b
A bunch of smallfixes.
LudwigVonChesterfield Sep 30, 2019
fab5ad9
Merge branch 'master' of https://github.com/TauCetiStation/TauCetiCla…
LudwigVonChesterfield Oct 8, 2019
d939093
Merge branch 'master' of https://github.com/TauCetiStation/TauCetiCla…
LudwigVonChesterfield Oct 9, 2019
ba3b431
Merge branch 'master' of https://github.com/TauCetiStation/TauCetiCla…
LudwigVonChesterfield Oct 12, 2019
53c6cb4
Review-related patches.
LudwigVonChesterfield Oct 12, 2019
e5367b9
Feedback reaction.
LudwigVonChesterfield Oct 13, 2019
b3d79df
Simple animals would not hurt anybody due to a misnaming of intent.
LudwigVonChesterfield Oct 13, 2019
7b29d43
Incorrect pbag rest handling.
LudwigVonChesterfield Oct 14, 2019
aa4b55d
Nerfing mice into oblivion.
LudwigVonChesterfield Oct 14, 2019
8029150
Monkeys do not get scooped by mobs that shouldn't scoop them up
LudwigVonChesterfield Oct 17, 2019
5266bc2
Hostile mobs are now all hostile.
LudwigVonChesterfield Oct 17, 2019
b89caef
Removing non-existent params from client/Move
LudwigVonChesterfield Oct 17, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion code/__DEFINES/mob.dm
Expand Up @@ -40,6 +40,8 @@
#define O_KIDNEYS "kidneys"
#define O_APPENDIX "appendix"

#define TARGET_ZONE_ALL list(BP_CHEST, BP_GROIN, BP_HEAD, BP_L_ARM, BP_R_ARM, BP_L_LEG, BP_R_LEG, O_EYES, O_MOUTH)

#define LEFT 1
#define RIGHT 2

Expand All @@ -53,7 +55,7 @@

// intent flags
#define I_HELP "help"
#define I_DISARM "disarm"
#define I_DISARM "disarm" // TODO: rename to "I_PUSH" "push". Don't forget the icons. ~Luduk.
#define I_GRAB "grab"
#define I_HURT "hurt" // or harm? or hurt? or what?

Expand Down
11 changes: 11 additions & 0 deletions code/__HELPERS/global_lists.dm
Expand Up @@ -86,6 +86,17 @@
global.chemical_reactions_list[id] += D
break // Don't bother adding ourselves to other reagent ids, it is redundant.

global.combat_combos = list()
for(var/path in subtypesof(/datum/combat_combo))
var/datum/combat_combo/CC = new path()
var/list/hashes = CC.get_hash()
for(var/hash in hashes)
if(global.combat_combos[hash])
var/datum/combat_combo/conflict = combat_combos[hash]
world.log << "WARNING! [CC.name] IS CONFLICTING WITH [conflict.name]!"
global.combat_combos[hash] = CC
global.combat_combos_by_name[CC.name] = CC

populate_gear_list()

/proc/init_joblist() // Moved here because we need to load map config to edit jobs, called from SSjobs
Expand Down
4 changes: 2 additions & 2 deletions code/__HELPERS/mobs.dm
Expand Up @@ -190,8 +190,8 @@
if(target)
target_null = FALSE
if(target != user)
target.in_use_action = TRUE
Tloc = target.loc
target.in_use_action = TRUE

var/atom/Uloc = null
if(!can_move)
Expand Down Expand Up @@ -252,4 +252,4 @@
if(user)
user.become_not_busy(_hand = busy_hand)
if(target)
target.in_use_action = FALSE
target.in_use_action = FALSE
12 changes: 11 additions & 1 deletion code/_onclick/click.dm
Expand Up @@ -247,7 +247,17 @@
user.listed_turf = null
else
user.listed_turf = T
user.client.statpanel = T.name
// user.client.statpanel = T.name // This was very awkward because it would move us from the current statpanel. Crucial for wizards, genestealers, combo-fighters.

/mob/living/AltClick(mob/living/user)
/*
Handling combat activation after **item swipes** and changeling stings.
*/
if(!istype(user))
return ..()
if(in_range(src, user) && user.try_combo(src))
return
return ..()

/mob/proc/TurfAdjacent(turf/T)
return T.AdjacentQuick(src)
Expand Down
4 changes: 2 additions & 2 deletions code/_onclick/hud/alien.dm
Expand Up @@ -45,7 +45,7 @@
using.name = "act_intent"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_xeno.dmi'
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
using.icon_state = "intent_" + mymob.a_intent
using.screen_loc = ui_acti
using.layer = ABOVE_HUD_LAYER
using.plane = ABOVE_HUD_PLANE
Expand Down Expand Up @@ -95,7 +95,7 @@
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
using = new /obj/screen( src )
using.name = "harm"
using.name = I_HURT
using.icon = ico
using.screen_loc = ui_acti
using.layer = ABOVE_HUD_LAYER
Expand Down
98 changes: 98 additions & 0 deletions code/_onclick/hud/default_hud.dm
@@ -0,0 +1,98 @@
/datum/hud/proc/default_hud(ui_style='icons/mob/screen1_White.dmi', ui_color = "#ffffff", ui_alpha = 255)
src.adding = list()
src.other = list()
src.hotkeybuttons = list() //These can be disabled for hotkey usersx

var/obj/screen/using

using = new /obj/screen()
using.name = "act_intent"
using.icon = ui_style
using.icon_state = "intent_" + mymob.a_intent
using.screen_loc = ui_acti
using.layer = ABOVE_HUD_LAYER
using.plane = ABOVE_HUD_PLANE
src.adding += using
action_intent = using

using = new /obj/screen/inventory/craft
src.adding += using

//intent small hud objects
var/icon/ico

ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
using = new /obj/screen( src )
using.name = "help"
using.icon = ico
using.screen_loc = ui_acti
using.layer = ABOVE_HUD_LAYER
using.plane = ABOVE_HUD_PLANE
src.adding += using
help_intent = using

ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
using = new /obj/screen( src )
using.name = "disarm"
using.icon = ico
using.screen_loc = ui_acti
using.layer = ABOVE_HUD_LAYER
using.plane = ABOVE_HUD_PLANE
src.adding += using
disarm_intent = using

ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
using = new /obj/screen( src )
using.name = "grab"
using.icon = ico
using.screen_loc = ui_acti
using.layer = ABOVE_HUD_LAYER
using.plane = ABOVE_HUD_PLANE
src.adding += using
grab_intent = using

ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
using = new /obj/screen( src )
using.name = I_HURT
using.icon = ico
using.screen_loc = ui_acti
using.layer = ABOVE_HUD_LAYER
using.plane = ABOVE_HUD_PLANE
src.adding += using
hurt_intent = using

//end intent small hud objects

using = new /obj/screen()
using.name = "mov_intent"
using.icon = ui_style
using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking")
using.screen_loc = ui_movi
using.layer = ABOVE_HUD_LAYER
using.plane = ABOVE_HUD_PLANE
using.color = ui_color
using.alpha = ui_alpha
src.adding += using
move_intent = using

mymob.zone_sel = new /obj/screen/zone_sel( null )
mymob.zone_sel.icon = ui_style
mymob.zone_sel.color = ui_color
mymob.zone_sel.alpha = ui_alpha
mymob.zone_sel.overlays.Cut()
mymob.zone_sel.overlays += image('icons/mob/zone_sel.dmi', "[mymob.zone_sel.selecting]")

mymob.client.screen = list()

mymob.client.screen += list(mymob.zone_sel)
mymob.client.screen += src.adding
inventory_shown = 0

4 changes: 3 additions & 1 deletion code/_onclick/hud/hud.dm
Expand Up @@ -138,7 +138,7 @@
if(ishuman(mymob))
human_hud(ui_style, ui_color, ui_alpha) // Pass the player the UI style chosen in preferences
else if(isIAN(mymob))
ian_hud()
ian_hud(ui_style, ui_color, ui_alpha)
else if(ismonkey(mymob))
monkey_hud(ui_style)
else if(isbrain(mymob))
Expand All @@ -159,6 +159,8 @@
blob_hud()
else if(isessence(mymob))
changeling_essence_hud()
else if(isliving(mymob))
default_hud(ui_style, ui_color, ui_alpha)

if(istype(mymob.loc,/obj/mecha))
show_hud(HUD_STYLE_REDUCED)
Expand Down
6 changes: 3 additions & 3 deletions code/_onclick/hud/human.dm
Expand Up @@ -10,7 +10,7 @@
using = new /obj/screen()
using.name = "act_intent"
using.icon = ui_style
using.icon_state = "intent_"+mymob.a_intent
using.icon_state = "intent_" + mymob.a_intent
using.screen_loc = ui_acti
using.layer = ABOVE_HUD_LAYER
using.plane = ABOVE_HUD_PLANE
Expand Down Expand Up @@ -63,7 +63,7 @@
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
using = new /obj/screen( src )
using.name = "harm"
using.name = I_HURT
using.icon = ico
using.screen_loc = ui_acti
using.layer = ABOVE_HUD_LAYER
Expand All @@ -76,7 +76,7 @@
using = new /obj/screen()
using.name = "mov_intent"
using.icon = ui_style
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking")
using.screen_loc = ui_movi
using.layer = ABOVE_HUD_LAYER
using.plane = ABOVE_HUD_PLANE
Expand Down
57 changes: 54 additions & 3 deletions code/_onclick/hud/ian.dm
Expand Up @@ -53,11 +53,11 @@
IAN.lay_down()


/datum/hud/proc/ian_hud()
/datum/hud/proc/ian_hud(ui_style='icons/mob/screen1_White.dmi', ui_color = "#ffffff", ui_alpha = 255)
if(!(is_alien_whitelisted(mymob, "ian") || (mymob.client.supporter && !is_alien_whitelisted_banned(mymob, "ian"))))
return

var/ui_style = 'icons/mob/screen_corgi.dmi'
ui_style = 'icons/mob/screen_corgi.dmi'
src.adding = list()
src.other = list()

Expand All @@ -69,11 +69,62 @@
using = new
using.name = "act_intent"
using.icon = ui_style
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
using.icon_state = "intent_" + mymob.a_intent
using.screen_loc = ui_acti
src.adding += using
action_intent = using

//intent small hud objects
var/icon/ico

ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
using = new /obj/screen( src )
using.name = "help"
using.icon = ico
using.screen_loc = ui_acti
using.layer = ABOVE_HUD_LAYER
using.plane = ABOVE_HUD_PLANE
src.adding += using
help_intent = using

ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
using = new /obj/screen( src )
using.name = "disarm"
using.icon = ico
using.screen_loc = ui_acti
using.layer = ABOVE_HUD_LAYER
using.plane = ABOVE_HUD_PLANE
src.adding += using
disarm_intent = using

ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
using = new /obj/screen( src )
using.name = "grab"
using.icon = ico
using.screen_loc = ui_acti
using.layer = ABOVE_HUD_LAYER
using.plane = ABOVE_HUD_PLANE
src.adding += using
grab_intent = using

ico = new(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
using = new /obj/screen( src )
using.name = I_HURT
using.icon = ico
using.screen_loc = ui_acti
using.layer = ABOVE_HUD_LAYER
using.plane = ABOVE_HUD_PLANE
src.adding += using
hurt_intent = using

using = new
using.name = "resist"
using.icon = ui_style
Expand Down
64 changes: 63 additions & 1 deletion code/_onclick/hud/larva.dm
@@ -1,11 +1,73 @@
/datum/hud/proc/larva_hud()
/datum/hud/proc/larva_hud(ui_style='icons/mob/screen1_White.dmi', ui_color = "#ffffff", ui_alpha = 255)

src.adding = list()
src.other = list()


var/obj/screen/using
var/obj/screen/inventory/inv_box

using = new /obj/screen()
using.name = "act_intent"
using.icon = ui_style
using.icon_state = "intent_" + mymob.a_intent
using.screen_loc = ui_acti
using.layer = ABOVE_HUD_LAYER
using.plane = ABOVE_HUD_PLANE
src.adding += using
action_intent = using

//intent small hud objects
var/icon/ico

ico = new/icon(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,ico.Height()/2,ico.Width()/2,ico.Height())
using = new /obj/screen( src )
using.name = "help"
using.icon = ico
using.screen_loc = ui_acti
using.layer = ABOVE_HUD_LAYER
using.plane = ABOVE_HUD_PLANE
src.adding += using
help_intent = using

ico = new/icon(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,ico.Height()/2,ico.Width(),ico.Height())
using = new /obj/screen( src )
using.name = "disarm"
using.icon = ico
using.screen_loc = ui_acti
using.layer = ABOVE_HUD_LAYER
using.plane = ABOVE_HUD_PLANE
src.adding += using
disarm_intent = using

ico = new/icon(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),ico.Width()/2,1,ico.Width(),ico.Height()/2)
using = new /obj/screen( src )
using.name = "grab"
using.icon = ico
using.screen_loc = ui_acti
using.layer = ABOVE_HUD_LAYER
using.plane = ABOVE_HUD_PLANE
src.adding += using
grab_intent = using

ico = new/icon(ui_style, "black")
ico.MapColors(0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, -1,-1,-1,-1)
ico.DrawBox(rgb(255,255,255,1),1,1,ico.Width()/2,ico.Height()/2)
using = new /obj/screen( src )
using.name = I_HURT
using.icon = ico
using.screen_loc = ui_acti
using.layer = ABOVE_HUD_LAYER
using.plane = ABOVE_HUD_PLANE
src.adding += using
hurt_intent = using

using = new /obj/screen()
using.name = "mov_intent"
using.dir = SOUTHWEST
Expand Down