Skip to content

Commit

Permalink
More fixes and improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCarnalest committed Jan 9, 2025
1 parent ec0c9bf commit 3beb407
Show file tree
Hide file tree
Showing 12 changed files with 298 additions and 296 deletions.
10 changes: 5 additions & 5 deletions code/_onclick/hud/alert.dm
Original file line number Diff line number Diff line change
Expand Up @@ -390,16 +390,16 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
to_chat(usr, "<span class='danger'><i>You will not be able to re-awaken, because you have no blood available to do so.</i></span>")
if(iscathayan(living_owner))
var/mob/living/carbon/human/vampire = living_owner
var/datum/dharma/D = vampire.mind.dharma
if (COOLDOWN_FINISHED(D, torpor_timer) && (vampire.yang_chi > 0 || vampire.yin_chi > 0))
var/datum/dharma/dharma = vampire.mind.dharma
if (COOLDOWN_FINISHED(dharma, torpor_timer) && (vampire.yang_chi > 0 || vampire.yin_chi > 0))
vampire.untorpor()
spawn()
vampire.clear_alert("succumb")
else
to_chat(usr, "<span class='purple'><i>You are in Torpor, the little death that Kuei-Jin go into when injured, or exhausted.</i></span>")
to_chat(usr, "<span class='purple'><i>You are in the Little Death, the state that Kuei-Jin go into when injured or exhausted.</i></span>")
if (vampire.yang_chi > 0 || vampire.yin_chi > 0)
to_chat(usr, "<span class='purple'><i>You will be able to awaken in <b>[DisplayTimeText(COOLDOWN_TIMELEFT(D, torpor_timer))]</b>.</i></span>")
to_chat(usr, "<span class='purple'><i>The time to re-awaken depends on your [D.name] dharma rating of [D.level].</i></span>")
to_chat(usr, "<span class='purple'><i>You will be able to awaken in <b>[DisplayTimeText(COOLDOWN_TIMELEFT(dharma, torpor_timer))]</b>.</i></span>")
to_chat(usr, "<span class='purple'><i>The time to re-awaken depends on your [vampire.max_yin_chi <= 4 ? "low" : "high"] permanent Yin Chi rating of [vampire.max_yin_chi].</i></span>")
else
to_chat(usr, "<span class='danger'><i>You will not be able to re-awaken, because you have no Chi available to do so.</i></span>")
//ALIENS
Expand Down
1 change: 0 additions & 1 deletion code/game/machinery/slotmachine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@

if(reels[1][2] + reels[2][2] + reels[3][2] + reels[4][2] + reels[5][2] == "[SEVEN][SEVEN][SEVEN][SEVEN][SEVEN]")
visible_message("<b>[src]</b> says, 'JACKPOT! You win [money] credits!'")
priority_announce("Congratulations to [user ? user.real_name : usrname] for winning the jackpot at the slot machine in [get_area(src)]!")
jackpots += 1
balance += money - give_payout(JACKPOT)
money = 0
Expand Down
67 changes: 33 additions & 34 deletions code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,10 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/dharma_type = /datum/dharma
var/dharma_level = 1
var/po_type = "Rebel"
var/po = 2
var/hun = 2
var/yang = 2
var/yin = 2
var/po = 5
var/hun = 5
var/yang = 5
var/yin = 5
var/list/chi_types = list()
var/list/chi_levels = list()

Expand All @@ -255,6 +255,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
po = initial(po)
yin = initial(yin)
yang = initial(yang)
chi_types = list()
chi_levels = list()
archetype = pick(subtypesof(/datum/archetype))
var/datum/archetype/A = new archetype()
physique = A.start_physique
Expand All @@ -280,7 +282,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
real_name = random_unique_name(gender)
save_character()

/proc/reset_shit(var/mob/M)
/proc/reset_shit(mob/M)
if(M.key)
var/datum/preferences/P = GLOB.preferences_datums[ckey(M.key)]
if(P)
Expand Down Expand Up @@ -321,7 +323,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
#define MAX_MUTANT_ROWS 4
#define ATTRIBUTE_BASE_LIMIT 5 //Highest level that a base attribute can be upgraded to. Bonus attributes can increase the actual amount past the limit.

/proc/make_font_cool(var/text)
/proc/make_font_cool(text)
if(text)
var/coolfont = "<font face='Percolator'>[text]</font>"
return coolfont
Expand Down Expand Up @@ -2296,11 +2298,13 @@ GLOBAL_LIST_EMPTY(preferences_datums)
return

true_experience -= 20
dharma_level = min(max(1, dharma_level + 1), 6)
hun = hun+1
po = po+1
yin = yin+1
yang = yang+1
dharma_level = clamp(dharma_level + 1, 1, 6)

if (dharma_level >= 6)
hun += 1
po += 1
yin += 1
yang += 1

/*
if("torpor_restore")
Expand All @@ -2317,21 +2321,20 @@ GLOBAL_LIST_EMPTY(preferences_datums)
return
var/list/dharmas = list()
for(var/i in subtypesof(/datum/dharma))
var/datum/dharma/D = i
dharmas += initial(D.name)
var/datum/dharma/dharma = i
dharmas += initial(dharma.name)
var/result = input(user, "Select Dharma", "Dharma") as null|anything in dharmas
if(result)
for(var/i in subtypesof(/datum/dharma))
var/datum/dharma/D = i
if(initial(D.name) == result)
var/datum/dharma/dharma = i
if(initial(dharma.name) == result)
dharma_type = i
dharma_level = initial(dharma_level)
hun = initial(hun)
po = initial(po)
yin = initial(yin)
yang = initial(yang)


if("potype")
if(slotlocked)
return
Expand All @@ -2341,7 +2344,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
po_type = result

if("chibalance")
var/max_limit = dharma_level*2
var/max_limit = max(10, dharma_level * 2)
var/sett = input(user, "Enter the maximum of Yin your character has:", "Yin/Yang") as num|null
if(sett)
sett = max(1, min(sett, max_limit-1))
Expand Down Expand Up @@ -3042,17 +3045,13 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/datum/vampireclane/CLN = new clane.type()
character.clane = CLN
character.clane.current_accessory = clane_accessory
character.maxbloodpool = 10+((13-generation)*3)
character.maxbloodpool = 10 + ((13 - generation) * 3)
character.bloodpool = rand(2, character.maxbloodpool)
character.generation = generation
character.yin_chi = 6+(13-generation)
character.max_yin_chi = 6+(13-generation)
character.max_yin_chi = character.maxbloodpool
character.yin_chi = character.max_yin_chi
character.clane.enlightenment = enlightenment
// if(generation < 13)
// character.maxHealth = initial(character.maxHealth)+50*(13-generation)
// character.health = initial(character.health)+50*(13-generation)
else
// character.clane.current_accessory = null
character.clane = null
character.generation = 13
character.bloodpool = character.maxbloodpool
Expand All @@ -3063,8 +3062,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
character.max_yin_chi = yin
character.max_demon_chi = po
else
character.yang_chi = 4
character.max_yang_chi = 4
character.yang_chi = 3
character.max_yang_chi = 3
character.yin_chi = 2
character.max_yin_chi = 2

Expand All @@ -3075,16 +3074,16 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if("Wendigo")
character.yin_chi = 1
character.max_yin_chi = 1
character.yang_chi = 5+(auspice_level*2)
character.max_yang_chi = 5+(auspice_level*2)
character.yang_chi = 5 + (auspice_level * 2)
character.max_yang_chi = 5 + (auspice_level * 2)
if("Glasswalkers")
character.yin_chi = 1+auspice_level
character.max_yin_chi = 1+auspice_level
character.yang_chi = 5+auspice_level
character.max_yang_chi = 5+auspice_level
character.yin_chi = 1 + auspice_level
character.max_yin_chi = 1 + auspice_level
character.yang_chi = 5 + auspice_level
character.max_yang_chi = 5 + auspice_level
if("Black Spiral Dancers")
character.yin_chi = 1+auspice_level*2
character.max_yin_chi = 1+auspice_level*2
character.yin_chi = 1 + auspice_level * 2
character.max_yin_chi = 1 + auspice_level * 2
character.yang_chi = 5
character.max_yang_chi = 5
else
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/carbon/carbon_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -463,9 +463,9 @@

if(ishuman(M))
var/mob/living/carbon/human/human = M
if(human.Myself.Lover.owner == src)
if(human.Myself?.Lover?.owner == src)
call_dharma("meet", M)
if(human.Myself.Friend.owner == src)
if(human.Myself?.Friend?.owner == src)
call_dharma("meet", M)

if(body_position == LYING_DOWN)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -417,11 +417,11 @@
if (yang_chi > 0)
yang_chi -= 1
cure_torpor()
to_chat(src, "<span class='notice'>You have awoken from your Death.</span>")
to_chat(src, "<span class='notice'>You have awoken from your Little Death.</span>")
else if (yin_chi > 0)
yin_chi -= 1
cure_torpor()
to_chat(src, "<span class='notice'>You have awoken from your Death.</span>")
to_chat(src, "<span class='notice'>You have awoken from your Little Death.</span>")
else
to_chat(src, "<span class='warning'>You have no Chi to re-awaken with...</span>")

Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/living_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -292,5 +292,5 @@
var/max_yin_chi = 1
var/demon_chi = 0
var/max_demon_chi = 0
var/last_chi_restore = 0
COOLDOWN_DECLARE(chi_restore)
var/datum/action/chi_discipline/chi_ranged
17 changes: 2 additions & 15 deletions code/modules/mob/living/status_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@
if(iskindred(src))
to_chat(src, "<span class='notice'>You have awoken from your Torpor.</span>")
if(iscathayan(src))
to_chat(src, "<span class='notice'>You have awoken from your Death.</span>")
to_chat(src, "<span class='notice'>You have awoken from your Little Death.</span>")

/mob/living/proc/torpor(source)
if (HAS_TRAIT(src, TRAIT_TORPOR))
Expand Down Expand Up @@ -527,20 +527,7 @@
if (iscathayan(src))
var/mob/living/carbon/human/cathayan = src
var/datum/dharma/dharma = cathayan.mind.dharma
var/torpor_length = 0 SECONDS
switch(dharma.level)
if(6)
torpor_length = 3 MINUTES
if(5)
torpor_length = 4 MINUTES
if(4)
torpor_length = 5 MINUTES
if(3)
torpor_length = 10 MINUTES
if(2)
torpor_length = 15 MINUTES
if(1)
torpor_length = 30 MINUTES
var/torpor_length = 1 MINUTES * max_yin_chi
COOLDOWN_START(dharma, torpor_timer, torpor_length)

///Unignores all slowdowns that lack the IGNORE_NOSLOW flag.
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/mob_movement.dm
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
if(!isliving(mob))
return mob.Move(n, direct)
if(mob.stat == DEAD)
// mob.ghostize()
mob.ghostize()
return FALSE
if(ishuman(mob))
var/mob/living/carbon/human/H = mob
Expand Down
22 changes: 15 additions & 7 deletions code/modules/vtmb/chi_disciplines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
/datum/chi_discipline/proc/check_activated(mob/living/target, mob/living/carbon/human/caster)
SHOULD_CALL_PARENT(TRUE)

if(caster.stat >= HARD_CRIT || caster.IsSleeping() || caster.IsUnconscious() || caster.IsParalyzed() || caster.IsStun() || HAS_TRAIT(caster, TRAIT_RESTRAINED) || !isturf(caster.loc))
if(caster.stat >= HARD_CRIT || caster.IsSleeping() || caster.IsUnconscious() || caster.IsParalyzed() || caster.IsStun() || HAS_TRAIT(caster, TRAIT_RESTRAINED))
return FALSE

if(!COOLDOWN_FINISHED(src, activate))
Expand Down Expand Up @@ -1950,16 +1950,19 @@
cost_yin = 1
discipline_type = "Chi"
activate_sound = 'code/modules/wod13/sounds/tapestry.ogg'
var/prev_z
//var/prev_z

/atom/movable/penumbra_ghost
//nonfunctional
/*
/obj/penumbra_ghost
COOLDOWN_DECLARE(move_ghost)
/atom/movable/penumbra_ghost/relaymove(mob/living/user, direction)
/obj/penumbra_ghost/relaymove(mob/living/user, direction)
if(COOLDOWN_FINISHED(src, move_ghost))
COOLDOWN_START(src, move_ghost, 0.5 SECONDS)
dir = direction
forceMove(get_step(src, direction))
*/

/obj/effect/anomaly/grav_kuei
name = "gravitational anomaly"
Expand Down Expand Up @@ -2030,11 +2033,15 @@
caster.client?.prefs.chat_toggles &= ~CHAT_DEAD
caster.see_invisible = initial(caster.see_invisible)
if(2)
caster.yin_chi += 1
caster.yang_chi += 1
//disabled due to bugs, sorry!
/*
var/chosen_z
var/umbra_z
var/atom/movable/penumbra_ghost/ghost
var/obj/penumbra_ghost/ghost
if(istype(caster.loc, /atom/movable/penumbra_ghost))
if(istype(caster.loc, /obj/penumbra_ghost))
ghost = caster.loc
for(var/area/vtm/interior/penumbra/penumbra in world)
Expand All @@ -2050,7 +2057,7 @@
var/turf/to_wall = locate(caster_turf.x, caster_turf.y, chosen_z)
var/area/cross_area = get_area(to_wall)
if(cross_area)
if(cross_area.wall_rating > 1)
if(cross_area.wall_rating > LOW_WALL_RATING)
to_chat(caster, "<span class='warning'><b>GAUNTLET</b> rating there is too high! You can't cross <b>PENUMBRA</b> like this...</span>")
caster.yin_chi += 1
caster.yang_chi += 1
Expand All @@ -2070,6 +2077,7 @@
ghost.alpha = 128
caster.forceMove(ghost)
playsound(get_turf(caster), 'code/modules/wod13/sounds/portal.ogg', 100, TRUE)
*/
if(3)
ADD_TRAIT(caster, TRAIT_SUPERNATURAL_LUCK, "tapestry 3")
to_chat(caster, "<b>You feel insanely lucky!</b>")
Expand Down
Loading

0 comments on commit 3beb407

Please sign in to comment.