forked from tgstation/tgstation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* actual phobia created * (LAST ATTEMPT) Adds Snakes π Togopal add: Snakes! They hunt vermin on the station! add: They can be purchased in cargo. /π Mice can be a problem in late round random events, and I figured releasing a bunch of snakes in maintenance would be a more long-term solution than constantly running around with a crowbar when you hear them. Now with updated sprites! (I apologize heavily for uploading this three times. I was unaware I was using an older fork, as this was my first attempt at modifying the code.) * curator gets trauma! and fixes to snek trauma * fixes the travis error silly frog * Reduces the cost of a normal snake crate in Cargo. Adds retaliation to snakes upon being attacked, removes venom from regular snakes. I A * quick fix * quick fix 2 * fixes the cargo contains = list * go away TRAVIS * changes the name of the snake cargo crate of regular snakes to avoid confusion * Updates how some snake mechanics works Makes them actually retaliate, code is still sort of buggy though * Some orange fixes * Fix snakes on this motherfucking plane * The thing oranges said
- Loading branch information
1 parent
4e77a06
commit 458c681
Showing
7 changed files
with
88 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/mob/living/simple_animal/hostile/retaliate/poison | ||
var/poison_per_bite = 0 | ||
var/poison_type = "toxin" | ||
|
||
/mob/living/simple_animal/hostile/retaliate/poison/AttackingTarget() | ||
. = ..() | ||
if(. && isliving(target)) | ||
var/mob/living/L = target | ||
if(L.reagents && !poison_per_bite == 0) | ||
L.reagents.add_reagent(poison_type, poison_per_bite) | ||
return . | ||
|
||
/mob/living/simple_animal/hostile/retaliate/poison/snake | ||
name = "snake" | ||
desc = "A slithery snake. These legless reptiles are the bane of mice and adventurers alike." | ||
icon_state = "snake" | ||
icon_living = "snake" | ||
icon_dead = "snake_dead" | ||
speak_emote = list("hisses") | ||
health = 20 | ||
maxHealth = 20 | ||
attacktext = "bites" | ||
melee_damage_lower = 5 | ||
melee_damage_upper = 6 | ||
response_help = "pets" | ||
response_disarm = "shoos" | ||
response_harm = "steps on" | ||
faction = list("hostile") | ||
ventcrawler = VENTCRAWLER_ALWAYS | ||
density = FALSE | ||
pass_flags = PASSTABLE | PASSMOB | ||
mob_size = MOB_SIZE_SMALL | ||
gold_core_spawnable = FRIENDLY_SPAWN | ||
obj_damage = 0 | ||
environment_smash = ENVIRONMENT_SMASH_NONE | ||
|
||
|
||
/mob/living/simple_animal/hostile/retaliate/poison/snake/ListTargets(atom/the_target) | ||
. = oview(vision_range, targets_from) //get list of things in vision range | ||
var/list/living_mobs = list() | ||
var/list/mice = list() | ||
for (var/HM in .) | ||
//Yum a tasty mouse | ||
if(istype(HM, /mob/living/simple_animal/mouse)) | ||
mice += HM | ||
if(isliving(HM)) | ||
living_mobs += HM | ||
|
||
// if no tasty mice to chase, lets chase any living mob enemies in our vision range | ||
if(length(mice) == 0) | ||
//Filter living mobs (in range mobs) by those we consider enemies (retaliate behaviour) | ||
return living_mobs & enemies | ||
return mice | ||
|
||
/mob/living/simple_animal/hostile/retaliate/poison/snake/AttackingTarget() | ||
if(istype(target, /mob/living/simple_animal/mouse)) | ||
visible_message("<span class='notice'>[name] consumes [target] in a single gulp!</span>", "<span class='notice'>You consume [target] in a single gulp!</span>") | ||
QDEL_NULL(target) | ||
adjustBruteLoss(-2) | ||
else | ||
return ..() |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters