diff --git a/_maps/map_files/stations/cerestation.dmm b/_maps/map_files/stations/cerestation.dmm index 513b0a3f8df..444827c9022 100644 --- a/_maps/map_files/stations/cerestation.dmm +++ b/_maps/map_files/stations/cerestation.dmm @@ -115524,7 +115524,7 @@ }, /area/station/security/brig) "xfB" = ( -/mob/living/simple_animal/hostile/retaliate/kangaroo{ +/mob/living/basic/kangaroo{ name = "Darwin" }, /obj/structure/disposalpipe/segment, diff --git a/_maps/map_files/stations/deltastation.dmm b/_maps/map_files/stations/deltastation.dmm index 87788c92ce0..8d588c69ddf 100644 --- a/_maps/map_files/stations/deltastation.dmm +++ b/_maps/map_files/stations/deltastation.dmm @@ -97496,7 +97496,7 @@ }, /area/station/security/main) "xIN" = ( -/mob/living/simple_animal/hostile/retaliate/kangaroo{ +/mob/living/basic/kangaroo{ name = "Darwin" }, /obj/structure/cable{ diff --git a/_maps/map_files/stations/emeraldstation.dmm b/_maps/map_files/stations/emeraldstation.dmm index 6f45bc86a31..8d31fdbc78f 100644 --- a/_maps/map_files/stations/emeraldstation.dmm +++ b/_maps/map_files/stations/emeraldstation.dmm @@ -39432,7 +39432,7 @@ /area/station/ai_monitored/storage/eva) "hOI" = ( /obj/structure/bed/dogbed/runtime, -/mob/living/simple_animal/hostile/retaliate/kangaroo{ +/mob/living/basic/kangaroo{ name = "Darwin" }, /obj/machinery/firealarm/directional/south, diff --git a/code/datums/ai/basic_mobs/generic_controllers/hostile_controllers.dm b/code/datums/ai/basic_mobs/generic_controllers/hostile_controllers.dm index 132515881c8..8d285a38c08 100644 --- a/code/datums/ai/basic_mobs/generic_controllers/hostile_controllers.dm +++ b/code/datums/ai/basic_mobs/generic_controllers/hostile_controllers.dm @@ -46,3 +46,11 @@ /datum/ai_planning_subtree/find_and_hunt_target/prowl, /datum/ai_planning_subtree/attack_obstacle_in_path/prowl, ) + +/// Fight back if attacked +/datum/ai_controller/basic_controller/simple/retaliate + ai_traits = AI_FLAG_STOP_MOVING_WHEN_PULLED + planning_subtrees = list( + /datum/ai_planning_subtree/target_retaliate, + /datum/ai_planning_subtree/basic_melee_attack_subtree, + ) diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/kangaroo.dm b/code/modules/mob/living/basic/retaliate/kangaroo.dm similarity index 73% rename from code/modules/mob/living/simple_animal/hostile/retaliate/kangaroo.dm rename to code/modules/mob/living/basic/retaliate/kangaroo.dm index fc7339b4b14..ed265ec5848 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/kangaroo.dm +++ b/code/modules/mob/living/basic/retaliate/kangaroo.dm @@ -1,4 +1,4 @@ -/mob/living/simple_animal/hostile/retaliate/kangaroo +/mob/living/basic/kangaroo name = "Kangaroo" real_name = "Kangaroo" desc = "A large marsupial herbivore. It has powerful hind legs, with nails that resemble long claws." @@ -7,29 +7,33 @@ icon_dead = "kangaroo_dead" icon_gib = "kangaroo_dead" mob_biotypes = MOB_ORGANIC | MOB_BEAST - turns_per_move = 8 - response_help = "pets" - emote_hear = list("bark") + response_help_simple = "pet" + response_help_continuous = "pets" + speak_emote = list("barks") maxHealth = 150 health = 150 butcher_results = list(/obj/item/food/meat/kangaroo = 6) melee_damage_lower = 5 // avg damage 12.5 without kick, (12.5+12.5+60)/3=25 with kick melee_damage_upper = 20 - attacktext = "slashes" + melee_attack_cooldown_min = 1.5 SECONDS + melee_attack_cooldown_max = 2.5 SECONDS + attack_verb_simple = "slash" + attack_verb_continuous = "slashes" attack_sound = 'sound/weapons/bladeslice.ogg' // they have nails that work like claws, so, slashing sound atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 2, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0) - move_to_delay = 4 // at 20ticks/sec, this is 5 tile/sec movespeed, about the same as a 'fast human'. speed = -1 // '-1' converts to 1.5 total move delay, or 6.6 tiles/sec movespeed var/attack_cycles = 0 var/attack_cycles_max = 3 - footstep_type = FOOTSTEP_MOB_SHOE + step_type = FOOTSTEP_MOB_SHOE + ai_controller = /datum/ai_controller/basic_controller/simple/retaliate -/mob/living/simple_animal/hostile/retaliate/kangaroo/Initialize(mapload) +/mob/living/basic/kangaroo/Initialize(mapload) . = ..() + AddElement(/datum/element/ai_retaliate) // Leap spell, player-only usage AddSpell(new /datum/spell/leap) -/mob/living/simple_animal/hostile/retaliate/kangaroo/AttackingTarget() +/mob/living/basic/kangaroo/melee_attack(atom/target, list/modifiers, ignore_cooldown) if(client && a_intent != INTENT_HARM) return ..() // Do not allow player-controlled roos on non-attack intents to 'prime' their kick by nuzzling people. @@ -47,7 +51,8 @@ // ... but, every attack_cycles_max attacks on a living mob, do a powerful disemboweling kick instead attack_cycles = 0 - attacktext = "VICIOUSLY KICKS" + attack_verb_simple = "VICIOUSLY KICK" + attack_verb_continuous = "VICIOUSLY KICKS" melee_damage_lower = 60 melee_damage_upper = 60 . = ..() @@ -57,7 +62,8 @@ L.visible_message("[L] is kicked hard!", "The kangaroo kick sends you flying mate!") L.throw_at(general_direction, 10, 2) - attacktext = initial(attacktext) + attack_verb_simple = initial(attack_verb_simple) + attack_verb_continuous = initial(attack_verb_continuous) melee_damage_lower = initial(melee_damage_lower) melee_damage_upper = initial(melee_damage_upper) diff --git a/code/modules/projectiles/projectile/magic_projectiles.dm b/code/modules/projectiles/projectile/magic_projectiles.dm index d3b31286f50..f804db3fe60 100644 --- a/code/modules/projectiles/projectile/magic_projectiles.dm +++ b/code/modules/projectiles/projectile/magic_projectiles.dm @@ -198,9 +198,9 @@ GLOBAL_LIST_INIT(wabbajack_hostile_animals, list( "statue" = /mob/living/simple_animal/hostile/statue, "bat" = /mob/living/basic/scarybat, "goat" = /mob/living/simple_animal/hostile/retaliate/goat, + "kangaroo" = /mob/living/basic/kangaroo, "tomato" = /mob/living/basic/killertomato, "gorilla" = /mob/living/basic/gorilla, - "kangaroo" = /mob/living/simple_animal/hostile/retaliate/kangaroo, )) GLOBAL_LIST_INIT(wabbajack_docile_animals, list( diff --git a/paradise.dme b/paradise.dme index 3652dd0a255..e8d667cc0a8 100644 --- a/paradise.dme +++ b/paradise.dme @@ -2444,6 +2444,7 @@ #include "code\modules\mob\living\basic\minebots\minebot_abilities.dm" #include "code\modules\mob\living\basic\minebots\minebot_ai.dm" #include "code\modules\mob\living\basic\minebots\minebot_upgrades.dm" +#include "code\modules\mob\living\basic\retaliate\kangaroo.dm" #include "code\modules\mob\living\basic\nether_mobs\blankbody.dm" #include "code\modules\mob\living\basic\nether_mobs\faithless.dm" #include "code\modules\mob\living\basic\nether_mobs\migo.dm" @@ -2676,7 +2677,6 @@ #include "code\modules\mob\living\simple_animal\hostile\mining\elites\pandora.dm" #include "code\modules\mob\living\simple_animal\hostile\retaliate\combat_drone.dm" #include "code\modules\mob\living\simple_animal\hostile\retaliate\fish.dm" -#include "code\modules\mob\living\simple_animal\hostile\retaliate\kangaroo.dm" #include "code\modules\mob\living\simple_animal\hostile\retaliate\retaliate.dm" #include "code\modules\mob\living\simple_animal\hostile\retaliate\undead.dm" #include "code\modules\mob\living\simple_animal\hostile\terror_spiders\actions.dm"