Merge pull request #560 from Razgriz1032/Razgriz1032-Solarmoth

Razgriz1032 solarmoth
This commit is contained in:
Vollybally
2019-03-21 19:27:37 -04:00
committed by GitHub
3 changed files with 158 additions and 9 deletions
@@ -17,11 +17,11 @@ List of things solar grubs should be able to do:
icon_state = "solargrub"
icon_living = "solargrub"
icon_dead = "solargrub-dead"
var/charge = null //CHOMPEDIT The amount of power we sucked off, in K as in THOUSANDS.
var/can_evolve = 1 //CHOMPEDIT VAR to decide whether this subspecies is allowed to become a queen
var/adult_form = null //CHOMPEDIT VAR that decides what mob the queen form is. ex /mob/living/simple_animal/retaliate/solarmoth
var/adult_form = "/mob/living/simple_animal/retaliate/solarmoth" //CHOMPEDIT VAR that decides what mob the queen form is. ex /mob/living/simple_animal/retaliate/solarmoth
faction = "grubs"
maxHealth = 50 //grubs can take a lot of harm
health = 50
@@ -61,7 +61,8 @@ List of things solar grubs should be able to do:
//VARS that were previously in LIFE but why tho, im porting all comments the original coder did too.
var/apc_drain_rate = 750 //Going to see if grubs are better as a minimal bother. previous value : 4000
var/powerdraw = 100000 // previous value 150000
/mob/living/simple_animal/retaliate/solargrub/PunchTarget()
if(target_mob&& prob(emp_chance))
target_mob.emp_act(4) //The weakest strength of EMP
@@ -71,7 +72,6 @@ List of things solar grubs should be able to do:
/mob/living/simple_animal/retaliate/solargrub/Life()
. = ..()
if(!. || ai_inactive) return
if(stance == STANCE_IDLE)
//first, check for potential cables nearby to powersink
var/turf/S = loc
@@ -86,7 +86,7 @@ List of things solar grubs should be able to do:
anchored = 1
PN = attached.powernet
PN.draw_power(powerdraw)
charge = charge + powerdraw/1000 //This adds raw powerdraw to charge(Charge is in Ks as in 1 = 1000)
charge = charge + (powerdraw/1000) //This adds raw powerdraw to charge(Charge is in Ks as in 1 = 1000)
for(var/obj/machinery/power/terminal/T in PN.nodes)
if(istype(T.master, /obj/machinery/power/apc))
var/obj/machinery/power/apc/A = T.master
@@ -98,6 +98,18 @@ List of things solar grubs should be able to do:
anchored = 0
PN = null
if(prob(2) && charge >= 16000 && can_evolve == 1 && moth_amount.len <= 2) //it's reading from the moth_amount global list to determine if it can evolve.
anchored = 0
PN = attached.powernet
death_star()
/mob/living/simple_animal/retaliate/solargrub/proc/death_star()
visible_message("<span class='warning'>\The [src]'s shell rips open and evolves!</span>")
new adult_form(get_turf(src))
qdel(src)
/mob/living/simple_animal/retaliate/solargrub //active noms
vore_bump_chance = 50
vore_bump_emote = "applies minimal effort to try and slurp up"
@@ -124,4 +136,4 @@ List of things solar grubs should be able to do:
. = ..()
if(. == 0 && !is_dead())
set_light(2.5, 1, COLOR_YELLOW)
return 1
return 1
@@ -0,0 +1,136 @@
/mob/living/simple_animal/retaliate/solarmoth
name = "solarmoth"
desc = "A majestic sparkling solarmoth. Also a slight engineering hazard."
icon = 'icons/mob/solarmoth.dmi' //all of these are placeholders
icon_state = "solarmoth"
icon_living = "solarmoth"
icon_dead = "solarmoth-dead"
faction = "grubs"
maxHealth = 500
health = 500
move_to_delay = 5
melee_damage_lower = 1
melee_damage_upper = 5
speak_chance = 1
emote_see = list("flutters")
speed = 3
meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat/grubmeat
response_help = "pokes"
response_disarm = "pushes"
response_harm = "roughly pushes"
// solar moths are not affected by atmos
min_oxy = 0
max_oxy = 0
min_tox = 0
max_tox = 0
min_co2 = 0
max_co2 = 0
min_n2 = 0
max_n2 = 0
minbodytemp = 0
heat_damage_per_tick = 0 //Even if the atmos stuff doesn't work, at least it won't take any damage.
armor = list(
"melee" = 50,
"bullet" = 90,
"laser" = 100,
"energy" = 100,
"bomb" = 100,
"bio" = 100,
"rad" = 100)
var/set_temperature = T0C + 10000 //Sets the target point of 10k degrees celsius
var/heating_power = 100000 //This controls the strength at which it heats the environment.
var/emp_heavy = 2
var/emp_med = 4
var/emp_light = 7
var/emp_long = 10
var/poison_per_bite = 5 //grubs cause a shock when they bite someone
var/poison_type = "shockchem"
var/poison_chance = 50
var/emp_chance = 20 // Beware synths
isEdible = 0 //You can look, but you can't lick.
/mob/living/simple_animal/retaliate/solarmoth/PunchTarget()
if(target_mob&& prob(emp_chance))
target_mob.emp_act(4) //The weakest strength of EMP
visible_message("<span class='danger'>The moth releases a powerful shock!</span>")
..()
/mob/living/simple_animal/retaliate/solarmoth/PunchTarget()
. = ..()
if(isliving(.))
var/mob/living/L = .
if(L.reagents)
if(prob(poison_chance))
L << "<span class='warning'>You feel a shock rushing through your veins.</span>"
L.reagents.add_reagent(poison_type, poison_per_bite)
/mob/living/simple_animal/retaliate/solarmoth/Life()
. = ..()
if(icon_state != icon_dead)
var/datum/gas_mixture/env = loc.return_air() //Gets all the information on the local air.
var/transfer_moles = 0.25 * env.total_moles //The bigger the room, the harder it is to heat the room.
var/datum/gas_mixture/removed = env.remove(transfer_moles)
var/heat_transfer = removed.get_thermal_energy_change(set_temperature)
if(heat_transfer > 0 && env.temperature < T0C + 200) //This should start heating the room at a moderate pace up to 200 degrees celsius.
heat_transfer = min(heat_transfer , heating_power) //limit by the power rating of the heater
removed.add_thermal_energy(heat_transfer)
else if(heat_transfer > 0 && env.temperature < set_temperature) //Set temperature is 10,000 degrees celsius. So this thing will start cooking crazy hot between the temperatures of 200C and 10,000C.
heating_power = 9999999999999 //FLAME ON! This will make the moth heat up the room at an incredible rate.
heat_transfer = min(heat_transfer , heating_power) //limit by the power rating of the heater. Except it's hot, so yeah.
removed.add_thermal_energy(heat_transfer)
else
return
env.merge(removed)
var/global/list/moth_amount = list() //global moth list for the solargrub to read. Maybe want to transfer this to global variables file??
/mob/living/simple_animal/retaliate/solarmoth/New()
moth_amount += src //when this thing is created, it adds itself to the global list
. = ..()
/mob/living/simple_animal/retaliate/solarmoth/proc/explode()
src.anchored = 0
set_light(0)
if(empulse(src, emp_heavy, emp_med, emp_light, emp_long))
qdel(src)
return
/mob/living/simple_animal/retaliate/solarmoth/death()
explode()
..()
/mob/living/simple_animal/retaliate/solarmoth/gib() //This baby will explode no matter what you do to it.
explode()
..()
/mob/living/simple_animal/retaliate/solarmoth/handle_light()
. = ..()
if(. == 0 && !is_dead())
set_light(9.5, 1, COLOR_BLUE) //9.5 makes the brightness range super huge.
return 1
/mob/living/simple_animal/retaliate/solarmoth //active noms
vore_bump_chance = 50
vore_bump_emote = "applies minimal effort to try and slurp up"
vore_active = 1
vore_capacity = 1
vore_pounce_chance = 0 //moths only eat incapacitated targets. It's too lazy burning you to a crisp to try to pounce you
vore_default_mode = DM_DIGEST
+3 -2
View File
@@ -1874,7 +1874,6 @@
#include "code\modules\metric\department.dm"
#include "code\modules\metric\metric.dm"
#include "code\modules\mining\abandonedcrates.dm"
#include "code\modules\mining\mobcapsule_ch.dm"
#include "code\modules\mining\abandonedcrates_vr.dm"
#include "code\modules\mining\alloys.dm"
#include "code\modules\mining\coins.dm"
@@ -1889,6 +1888,7 @@
#include "code\modules\mining\mineral_effect.dm"
#include "code\modules\mining\mining_vending.dm"
#include "code\modules\mining\mint.dm"
#include "code\modules\mining\mobcapsule_ch.dm"
#include "code\modules\mining\money_bag.dm"
#include "code\modules\mining\ore.dm"
#include "code\modules\mining\ore_datum.dm"
@@ -2180,10 +2180,10 @@
#include "code\modules\mob\living\simple_animal\aliens\drone.dm"
#include "code\modules\mob\living\simple_animal\aliens\faithless.dm"
#include "code\modules\mob\living\simple_animal\aliens\hivebot.dm"
#include "code\modules\mob\living\simple_animal\aliens\zerg.dm"
#include "code\modules\mob\living\simple_animal\aliens\mimic.dm"
#include "code\modules\mob\living\simple_animal\aliens\shade.dm"
#include "code\modules\mob\living\simple_animal\aliens\statue.dm"
#include "code\modules\mob\living\simple_animal\aliens\zerg.dm"
#include "code\modules\mob\living\simple_animal\animals\bat.dm"
#include "code\modules\mob\living\simple_animal\animals\bear.dm"
#include "code\modules\mob\living\simple_animal\animals\birds_vr.dm"
@@ -2268,6 +2268,7 @@
#include "code\modules\mob\living\simple_animal\vore\solargrub.dm"
#include "code\modules\mob\living\simple_animal\vore\solargrub_larva.dm"
#include "code\modules\mob\living\simple_animal\vore\solargrub_subtype.dm"
#include "code\modules\mob\living\simple_animal\vore\solarmoth.dm"
#include "code\modules\mob\living\simple_animal\vore\wolf.dm"
#include "code\modules\mob\living\simple_animal\vore\zz_vore_overrides.dm"
#include "code\modules\mob\living\simple_animal\vore\shadekin\_defines.dm"