Vampire Gamemode Developement Test

The Vampire gamemode, as ported right now. The gamemode is in, as well
as creating a vampire through the traitor panel. All abilities seem to
function, unable to test enthrall however (though I have a feeling it
will have to be redone). Enthralling someone without a CKey will give
you the correct response, however.

Any abilities having to do with lums will need to be redone. Vamphud as
well.

If looking over this and pointing out errors/fixing is faster than
simply porting it yourself, then feel free to do so!
This commit is contained in:
Ryan784
2016-01-20 22:14:21 -05:00
parent ec73203bd5
commit 5f655dbbdb
19 changed files with 999 additions and 11 deletions

View File

@@ -302,7 +302,7 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
output += "<option value='[j]'>[j]</option>"
for(var/j in nonhuman_positions)
output += "<option value='[j]'>[j]</option>"
var/list/bantypes = list("traitor","changeling","operative","revolutionary","cultist","wizard") //For legacy bans.
var/list/bantypes = list("traitor","changeling","vampire","operative","revolutionary","cultist","wizard") //For legacy bans.
for(var/antag_type in all_antag_types) // Grab other bans.
var/datum/antagonist/antag = all_antag_types[antag_type]
bantypes |= antag.bantype

View File

@@ -19,7 +19,8 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
"raider" = IS_MODE_COMPILED("heist"), // 11
"diona" = 1, // 12
"loyalist" = IS_MODE_COMPILED("revolution"), // 13
"pAI candidate" = 1, // -- TLE // 14
"vampire" = IS_MODE_COMPILED("vampire"), // 14
"pAI candidate" = 1, // -- TLE // 15
)
//used for alternate_option

View File

@@ -79,6 +79,8 @@
stat(null, "Suit charge: [cell_status]")
if(mind)
if(mind.vampire)
stat("Blood", mind.vampire.bloodusable)
if(mind.changeling)
stat("Chemical Storage", mind.changeling.chem_charges)
stat("Genetic Damage Time", mind.changeling.geneticdamage)

View File

@@ -108,6 +108,31 @@
return 1
if(I_HURT)
//Vampire code
if(H.zone_sel && M.zone_sel.selecting == "head")
if(H.mind && H.mind.vampire && !H.mind.vampire.draining)
if((head && (head.flags & HEADCOVERSMOUTH)) || (wear_mask && (wear_mask.flags & MASKCOVERSMOUTH)))
H << "\red Remove their mask!"
return 0
if((H.head && (H.head.flags & HEADCOVERSMOUTH)) || (H.wear_mask && (H.wear_mask.flags & MASKCOVERSMOUTH)))
H << "\red Remove your mask!"
return 0
if(mind && mind.vampire)
H << "\red Your fangs fail to pierce [src.name]'s cold flesh"
return 0
if(get_species() == "Machine")
H << "\red They have no blood"
return 0
//we're good to suck the blood, blaah
//and leave an attack log
H.attack_log += text("\[[time_stamp()]\] <font color='red'>Bit [src.name] ([src.ckey]) in the neck and draining their blood</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been bit in the neck by [H.name] ([H.ckey])</font>")
msg_admin_attack("[key_name_admin(H)] bit [key_name_admin(src)] in the neck - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[M.x];Y=[M.y];Z=[M.z]'>JMP</a>")
H.handle_bloodsucking(src)
// var/datum/organ/external/affecting = get_organ(src.zone_sel.selecting)
// affecting.take_damage(10,0,1,0,"dual puncture marks") //this does not work and causes runtimes.
return
//end vampire codes
if(!istype(H))
attack_generic(H,rand(1,3),"punched")

View File

@@ -130,6 +130,8 @@
for(var/obj/item/weapon/grab/G in src)
G.process()
if(mind && mind.vampire)
handle_vampire()
// Calculate how vulnerable the human is to under- and overpressure.
// Returns 0 (equals 0 %) if sealed in an undamaged suit, 1 if unprotected (equals 100%).
// Suitdamage can modifiy this in 10% steps.
@@ -366,14 +368,14 @@
get_breath_from_environment(var/volume_needed=BREATH_VOLUME)
var/datum/gas_mixture/breath = ..()
if(breath)
//exposure to extreme pressures can rupture lungs
var/check_pressure = breath.return_pressure()
if(check_pressure < ONE_ATMOSPHERE / 5 || check_pressure > ONE_ATMOSPHERE * 5)
if(!is_lung_ruptured() && prob(5))
rupture_lung()
return breath
handle_breath(datum/gas_mixture/breath)
@@ -1022,6 +1024,12 @@
if( prob(2) && health && !hal_crit )
spawn(0)
emote("snore")
if(mind)
if(mind.vampire)
if(istype(loc, /obj/structure/closet/coffin))
adjustBruteLoss(-1)
adjustFireLoss(-1)
adjustToxLoss(-1)
//CONSCIOUS
else
stat = CONSCIOUS
@@ -1240,6 +1248,14 @@
see_in_dark = species.darksight
see_invisible = see_in_dark>2 ? SEE_INVISIBLE_LEVEL_ONE : SEE_INVISIBLE_LIVING
if(mind && mind.vampire)
if((VAMP_VISION in mind.vampire.powers) && !(VAMP_FULL in mind.vampire.powers))
sight |= SEE_MOBS
if((VAMP_FULL in mind.vampire.powers))
sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
see_in_dark = 8
see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
if(XRAY in mutations)
sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS
see_in_dark = 8

View File

@@ -211,6 +211,15 @@
if(ishuman(M)) // Any location
if(M.mind && cult.is_antagonist(M.mind) && prob(10))
cult.remove_antagonist(M.mind)
if(M.mind.vampire && (!(VAMP_FULL in M.mind.vampire.powers)))
if(!M) M = holder.my_atom
M.adjustFireLoss(6)
M.adjust_fire_stacks(1)
M.IgniteMob()
//M.take_organ_damage(0, 1*REM)
if(prob(20))
for (var/mob/V in viewers(src))
V.show_message(text("\red []'s skin sizzles and burns.", M), 1)
/datum/reagent/water/holywater/touch_turf(var/turf/T)
if(volume >= 5)

View File

@@ -38,6 +38,35 @@
if(10 to 50) icon_state = "half"
if(51 to INFINITY) icon_state = "full"
/obj/item/weapon/reagent_containers/blood/attack(mob/living/carbon/human/M as mob, mob/living/carbon/human/user as mob)
if (user == M && (user.mind.vampire))
if (reagents.get_reagent_amount("blood"))
user.visible_message("\red [user] raises \the [src] up to \his mouth and bites into it.", "\blue You raise \the [src] up to your mouth and bite into it, starting to drain its contents.")
while (do_after(user, 25, 5, 1))
var/blood_taken = 0
var/need_to_break = 0
if (reagents.get_reagent_amount("blood") > 10)
blood_taken = 10
else
blood_taken = reagents.get_reagent_amount("blood")
need_to_break = 1
reagents.remove_reagent("blood", blood_taken)
user.mind.vampire.bloodtotal += blood_taken
user.check_vampire_upgrade(user.mind)
if (blood_taken)
user << "\blue <b>You have accumulated [user.mind.vampire.bloodtotal] [user.mind.vampire.bloodtotal > 1 ? "units" : "unit"] of blood and have [user.mind.vampire.bloodusable] left to use."
if (need_to_break)
break
user.visible_message("\red [user] licks \his fangs dry, lowering \the [src].", "\blue You lick your fangs clean of the tasteless blood.")
else
..()
/obj/item/weapon/reagent_containers/blood/APlus
blood_type = "A+"
@@ -59,4 +88,4 @@
/obj/item/weapon/reagent_containers/blood/empty
name = "Empty BloodPack"
desc = "Seems pretty useless... Maybe if there were a way to fill it?"
icon_state = "empty"
icon_state = "empty"

View File

@@ -13,7 +13,7 @@
compatible_mobs = list(/mob/living/carbon/human) //which types of mobs are affected by the spell. NOTE: change at your own risk
// TODO: Update to new antagonist system.
var/list/protected_roles = list("Wizard","Changeling","Cultist") //which roles are immune to the spell
var/list/protected_roles = list("Wizard","Changeling","Cultist", "Vampire") //which roles are immune to the spell
var/msg_wait = 500 //how long in deciseconds it waits before telling that body doesn't feel right or mind swap robbed of a spell
amt_paralysis = 20 //how much the victim is paralysed for after the spell

View File

@@ -161,6 +161,8 @@
C.status |= ORGAN_DEAD
H.update_body(1)
mob.adjustToxLoss(15*multiplier)
vampire
stage = 3
deactivate(var/mob/living/carbon/mob,var/multiplier)
if(istype(mob, /mob/living/carbon/human))