diff --git a/code/datums/action.dm b/code/datums/action.dm index 9e25d0e3f3..369bad00b2 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -793,6 +793,10 @@ small_icon = 'icons/mob/lavaland/lavaland_monsters.dmi' small_icon_state = "ash_whelp" +/datum/action/small_sprite/spacedragon + small_icon = 'icons/mob/animal.dmi' + small_icon_state = "carp" + /datum/action/small_sprite/Trigger() ..() if(!small) diff --git a/code/modules/antagonists/space_dragon/space_dragon.dm b/code/modules/antagonists/space_dragon/space_dragon.dm new file mode 100644 index 0000000000..97f45bba53 --- /dev/null +++ b/code/modules/antagonists/space_dragon/space_dragon.dm @@ -0,0 +1,31 @@ +/datum/antagonist/space_dragon + name = "Space Dragon" + show_in_antagpanel = FALSE + show_name_in_check_antagonists = TRUE + +/datum/antagonist/space_dragon/greet() + to_chat(owner, "I am Space Dragon, ex-space carp, and defender of the secrets of constellation, Draco.") + to_chat(owner, "Fabulous secret powers were revealed to me the day I held aloft a wizard's staff of change and said 'By the power of Draco, I have the power!'") + to_chat(owner, "The wizard was turned into the short-lived Pastry Cat while I became Space Dragon, the most powerful beast in the universe.") + to_chat(owner, "Clicking a tile will shoot fire onto that tile.") + to_chat(owner, "Alt-clicking will let me do a tail swipe, knocking down entities in a tile radius around me.") + to_chat(owner, "Attacking dead bodies will allow me to gib them to restore health.") + to_chat(owner, "From the wizard's writings, he had been studying this station and its hierarchy. From this, I know who leads the station, and will kill them so the station underlings see me as their new leader.") + owner.announce_objectives() + SEND_SOUND(owner.current, sound('sound/magic/demon_attack1.ogg')) + +/datum/antagonist/space_dragon/proc/forge_objectives() + var/current_heads = SSjob.get_all_heads() + var/datum/objective/assassinate/killchosen = new + killchosen.owner = owner + var/datum/mind/selected = pick(current_heads) + killchosen.target = selected + killchosen.update_explanation_text() + objectives += killchosen + var/datum/objective/survive/survival = new + survival.owner = owner + objectives += survival + +/datum/antagonist/space_dragon/on_gain() + forge_objectives() + . = ..() diff --git a/code/modules/events/space_dragon.dm b/code/modules/events/space_dragon.dm new file mode 100644 index 0000000000..e6e197f5aa --- /dev/null +++ b/code/modules/events/space_dragon.dm @@ -0,0 +1,45 @@ +/datum/round_event_control/space_dragon + name = "Spawn Space Dragon" + typepath = /datum/round_event/ghost_role/space_dragon + max_occurrences = 1 + weight = 8 + earliest_start = 70 MINUTES + min_players = 20 + +/datum/round_event/ghost_role/space_dragon + minimum_required = 1 + role_name = "Space Dragon" + fakeable = FALSE + +/datum/round_event/ghost_role/space_dragon/announce(fake) + priority_announce("It appears a lifeform with magical traces is approaching [station_name()], please stand-by.", "Lifesign Alert") + + +/datum/round_event/ghost_role/space_dragon/spawn_role() + var/list/candidates = get_candidates(ROLE_ALIEN, null, ROLE_ALIEN) + if(!candidates.len) + return NOT_ENOUGH_PLAYERS + + var/mob/dead/selected = pick(candidates) + + var/datum/mind/player_mind = new /datum/mind(selected.key) + player_mind.active = TRUE + + var/list/spawn_locs = list() + for(var/obj/effect/landmark/carpspawn/C in GLOB.landmarks_list) + spawn_locs += (C.loc) + if(!spawn_locs.len) + message_admins("No valid spawn locations found, aborting...") + return MAP_ERROR + + var/mob/living/simple_animal/hostile/megafauna/dragon/space_dragon/S = new ((pick(spawn_locs))) + player_mind.transfer_to(S) + player_mind.assigned_role = "Space Dragon" + player_mind.special_role = "Space Dragon" + player_mind.add_antag_datum(/datum/antagonist/space_dragon) + playsound(S, 'sound/magic/ethereal_exit.ogg', 50, 1, -1) + message_admins("[ADMIN_LOOKUPFLW(S)] has been made into a Space Dragon by an event.") + log_game("[key_name(S)] was spawned as a Space Dragon by an event.") + spawned_mobs += S + return SUCCESSFUL_SPAWN + diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm index 6c1e9eef6e..fb1b5d2ef1 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/drake.dm @@ -543,3 +543,75 @@ Difficulty: Medium hit_list += M M.take_damage(45, BRUTE, "melee", 1) sleep(1.5) + + +/mob/living/simple_animal/hostile/megafauna/dragon/space_dragon + name = "space dragon" + maxHealth = 250 + health = 250 + faction = list("neutral") + desc = "A space carp turned dragon by vile magic. Has the same ferocity of a space carp, but also a much more enabling body." + icon = 'icons/mob/spacedragon.dmi' + icon_state = "spacedragon" + icon_living = "spacedragon" + icon_dead = "spacedragon_dead" + obj_damage = 80 + melee_damage_upper = 35 + melee_damage_lower = 35 + speed = 0 + mouse_opacity = MOUSE_OPACITY_ICON + loot = list() + crusher_loot = list() + butcher_results = list(/obj/item/stack/ore/diamond = 5, /obj/item/stack/sheet/sinew = 5, /obj/item/stack/sheet/bone = 30) + move_force = MOVE_FORCE_NORMAL + move_resist = MOVE_FORCE_NORMAL + pull_force = MOVE_FORCE_NORMAL + deathmessage = "screeches as its wings turn to dust and it collapses on the floor, life estinguished." + var/datum/action/small_sprite/carpsprite = new/datum/action/small_sprite/spacedragon() + +/mob/living/simple_animal/hostile/megafauna/dragon/space_dragon/grant_achievement(medaltype,scoretype) + return + +/mob/living/simple_animal/hostile/megafauna/dragon/space_dragon/Initialize() + carpsprite.Grant(src) + mob_spell_list += new /obj/effect/proc_holder/spell/aoe_turf/repulse/spacedragon(src) + . = ..() + smallsprite.Remove(src) + +/mob/living/simple_animal/hostile/megafauna/dragon/space_dragon/proc/fire_stream(var/atom/at = target) + playsound(get_turf(src),'sound/magic/fireball.ogg', 200, 1) + if(QDELETED(src) || stat == DEAD) // we dead no fire + return + var/range = 20 + var/list/turfs = list() + turfs = line_target(0, range, at) + INVOKE_ASYNC(src, .proc/fire_line, turfs) + +/mob/living/simple_animal/hostile/megafauna/dragon/space_dragon/OpenFire() + if(swooping) + return + ranged_cooldown = world.time + ranged_cooldown_time + fire_stream() + +/obj/effect/proc_holder/spell/aoe_turf/repulse/spacedragon + name = "Tail Sweep" + desc = "Throw back attackers with a sweep of your tail." + sound = 'sound/magic/tail_swing.ogg' + charge_max = 150 + clothes_req = FALSE + antimagic_allowed = TRUE + range = 1 + cooldown_min = 150 + invocation_type = "none" + sparkle_path = /obj/effect/temp_visual/dir_setting/tailsweep + action_icon = 'icons/mob/actions/actions_xeno.dmi' + action_icon_state = "tailsweep" + action_background_icon_state = "bg_alien" + anti_magic_check = FALSE + +/obj/effect/proc_holder/spell/aoe_turf/repulse/spacedragon/cast(list/targets,mob/user = usr) + if(iscarbon(user)) + var/mob/living/carbon/C = user + playsound(C.loc,'sound/effects/hit_punch.ogg', 80, 1, 1) + C.spin(6,1) + ..(targets, user, 60) diff --git a/icons/mob/spacedragon.dmi b/icons/mob/spacedragon.dmi new file mode 100644 index 0000000000..98f20ea885 Binary files /dev/null and b/icons/mob/spacedragon.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 2e5bd87e51..9c09703fe8 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -1733,6 +1733,7 @@ #include "code\modules\antagonists\slaughter\slaughter.dm" #include "code\modules\antagonists\slaughter\slaughter_antag.dm" #include "code\modules\antagonists\slaughter\slaughterevent.dm" +#include "code\modules\antagonists\space_dragon\space_dragon.dm" #include "code\modules\antagonists\survivalist\survivalist.dm" #include "code\modules\antagonists\swarmer\swarmer.dm" #include "code\modules\antagonists\swarmer\swarmer_event.dm" @@ -2097,6 +2098,7 @@ #include "code\modules\events\radiation_storm.dm" #include "code\modules\events\sentience.dm" #include "code\modules\events\shuttle_loan.dm" +#include "code\modules\events\space_dragon.dm" #include "code\modules\events\spacevine.dm" #include "code\modules\events\spider_infestation.dm" #include "code\modules\events\spontaneous_appendicitis.dm"