mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Summon Pitbulls (#25883)
* adds pitbulls and a conjure pitbull spell * spell icon * removed testing obj * Treachery mechanic, code touch up, and pitbull bark * removes the limiters, couldn't figure it out after 3 weeks fuck me * fix merge conflict * merge fixaroo this shit is like magic * re-adds pitbull icons * someday I will fix this merge conflict * but not fucking today apparently * removes a pointless comment Co-authored-by: Acrylic Mimosa <>
This commit is contained in:
82
code/modules/mob/living/simple_animal/hostile/pitbull.dm
Normal file
82
code/modules/mob/living/simple_animal/hostile/pitbull.dm
Normal file
@@ -0,0 +1,82 @@
|
||||
/mob/living/simple_animal/hostile/pitbull
|
||||
name = "pitbull"
|
||||
icon_state = "pitbull"
|
||||
icon_living = "pitbull"
|
||||
icon_dead = "pitbull_dead"
|
||||
speak_chance = 20
|
||||
emote_hear = list("growls", "barks")
|
||||
response_help = "pets"
|
||||
response_disarm = "gently pushes aside"
|
||||
response_harm = "hits"
|
||||
|
||||
health = 25
|
||||
maxHealth = 25
|
||||
turns_per_move =2//I don't know what this does
|
||||
speed = 4
|
||||
move_to_delay = 3
|
||||
|
||||
melee_damage_lower = 3
|
||||
melee_damage_upper = 5
|
||||
attacktext = "bites"
|
||||
attack_sound = 'sound/weapons/bite.ogg'
|
||||
|
||||
var/faction_original
|
||||
var/list/friends_temp = list() //a temporary list to hold the values in friends while it becomes empty during treachery
|
||||
|
||||
var/treachery_chance = 0.25
|
||||
var/treacherous = FALSE
|
||||
var/calmdown_chance = 20
|
||||
|
||||
/mob/living/simple_animal/hostile/pitbull/New()
|
||||
..()
|
||||
pitbulls_exclude_kinlist.Add(src)
|
||||
desc = pick(
|
||||
"There is no such thing as a bad dog, only bad owners.",
|
||||
"Blame the owner not the breed!",
|
||||
"My dog would never do that.",
|
||||
"He's a big baby at heart.",
|
||||
"Man's best friend.",
|
||||
"Over 4 million pitbulls did not kill or hurt anyone today. Stop the myth.",
|
||||
"Good with kids.")
|
||||
|
||||
/mob/living/simple_animal/hostile/pitbull/ListTargets()
|
||||
var/list/L = ..()
|
||||
for(var/mob/M in L)
|
||||
if(M in pitbulls_exclude_kinlist)
|
||||
L.Remove(M)
|
||||
return L
|
||||
|
||||
/mob/living/simple_animal/hostile/pitbull/Life()
|
||||
if(prob(treachery_chance))
|
||||
Treachery() //empties the friend list and faction allignment
|
||||
|
||||
if(treacherous && prob(calmdown_chance))
|
||||
Calmdown() //repopulates the friend list and realligns our faction
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/pitbull/proc/Treachery()
|
||||
faction_original = faction
|
||||
faction = ""
|
||||
friends_temp = friends.Copy()
|
||||
friends.Cut()
|
||||
treacherous = TRUE
|
||||
|
||||
/mob/living/simple_animal/hostile/pitbull/proc/Calmdown()
|
||||
faction = faction_original
|
||||
friends = friends_temp.Copy()
|
||||
if(target && ismob(target))
|
||||
var/mob/M = target
|
||||
if((M.faction == faction) || (M in src.friends))//stop chasing our friend when we calm down
|
||||
LoseTarget()
|
||||
treacherous = FALSE
|
||||
|
||||
/mob/living/simple_animal/hostile/pitbull/attackby(obj/item/I, mob/user)
|
||||
..()
|
||||
if(istype(I,/obj/item/weapon/pickaxe/shovel))
|
||||
if(prob(10))
|
||||
gib()
|
||||
else
|
||||
adjustBruteLoss(25)//instakill
|
||||
|
||||
/mob/living/simple_animal/hostile/pitbull/summoned_pitbull
|
||||
faction = "wizard"
|
||||
42
code/modules/spells/aoe_turf/conjure/pitbulls.dm
Normal file
42
code/modules/spells/aoe_turf/conjure/pitbulls.dm
Normal file
@@ -0,0 +1,42 @@
|
||||
/spell/aoe_turf/conjure/pitbull
|
||||
name = "Summon Pitbulls"
|
||||
desc = "This spell summons a group of misunderstood pitbulls. You can maintain up to 60 living pitbulls at a time."
|
||||
user_type = USER_TYPE_WIZARD
|
||||
specialization = SSOFFENSIVE
|
||||
|
||||
summon_type = list(/mob/living/simple_animal/hostile/pitbull/summoned_pitbull)
|
||||
summon_amt = 3
|
||||
|
||||
price = Sp_BASE_PRICE
|
||||
level_max = list(Sp_TOTAL = 2, Sp_SPEED = 2)
|
||||
charge_max = 300
|
||||
cooldown_reduc = 100
|
||||
cooldown_min = 100
|
||||
invocation = "GR'T W'TH K'DS"
|
||||
invocation_type = SpI_SHOUT
|
||||
spell_flags = NEEDSCLOTHES
|
||||
override_icon = 'icons/mob/animal.dmi'
|
||||
hud_state = "pitbull"
|
||||
cast_sound = 'sound/voice/pitbullbark.ogg'
|
||||
|
||||
var/list/pitbulls_exclude_kinlist = list() //all pitbulls go in here so pitbulls won't attack other pitbulls when feeling treacherous (and instead attack the wizard)
|
||||
|
||||
/spell/aoe_turf/conjure/pitbull/summon_object(var/type, var/location)
|
||||
var/mob/living/simple_animal/hostile/pitbull/summoned_pitbull/P = new type(location)
|
||||
P.friends.Add(holder)//summoner is my friend, but we have a tendency to turn on our friends
|
||||
|
||||
/spell/aoe_turf/conjure/pitbull/choose_targets(var/mob/user = usr)
|
||||
var/list/turf/locs = new
|
||||
for(var/direction in alldirs) //looking for pitbull spawns
|
||||
if(locs.len >= 3) //we found 3 locations and thats all we need
|
||||
break
|
||||
var/turf/T = get_step(user, direction) //getting a loc in that direction
|
||||
if(AStar(user.loc, T, /turf/proc/AdjacentTurfs, /turf/proc/Distance, 1)) // if a path exists, so no dense objects in the way its valid salid
|
||||
locs += T
|
||||
|
||||
if(locs.len < 3) //if we only found one location, spawn more on top of our tile so we dont get stacked pitbulls
|
||||
locs += user.loc
|
||||
return locs
|
||||
|
||||
/spell/aoe_turf/conjure/pitbull/before_cast(list/targets, user)
|
||||
return targets
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 515 KiB After Width: | Height: | Size: 519 KiB |
BIN
sound/voice/pitbullbark.ogg
Normal file
BIN
sound/voice/pitbullbark.ogg
Normal file
Binary file not shown.
Reference in New Issue
Block a user