mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
Bloodsucker additional levelling system. (#1140)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable. --> <!-- You can view Contributing.MD for a detailed description of the pull request process. --> ## About The Pull Request This system adds a new way for bloodsuckers to level in addition to their ordinary one, thus rewarding bloodsuckers for actually engaging in combat and doing antagonistic behaviours rather than playing extremely passive. Bloodsuckers that drink blood from creatures with a mind (has been or is controlled by a player) get that blood tracked and added to a new system, this blood can be used to purchase level ups. The blood consumed is taken out of your actual blood volume, meaning that you still need to spend your blood for this level up. Furthermore, whilst the blood per level starts at 30% of your max blood, it increases by 5% per level you gain with this feature, capping out at 90%. Before you ask, no you can't farm vassals for unlimited levels. I've set the points you get towards a level to be quartered from drinking from a vassal and if you remember, you cannot (currently) drink past your blood cap. Thus if i drink myself from 0 blood to 1000 blood on vassals alone, that's not enough for a single level. Furthermore, the usual blood drinking penalties apply (dead, non-human, mindless) No, you can't drink a bunch of blood, buy levels with the points (because it's theoretically cheaper to buy them whilst you are a lower level bloodsucker) and then spend them. The system is designed to auto spend normal levels first before later offering you the ability to buy a level in your coffin. <!-- Describe The Pull Request. Please be sure every change is documented or this can delay review and even discourage maintainers from merging your PR! --> <!-- Please make sure to actually test your PRs. If you have not tested your PR mention it. --> ## Why It's Good For The Game Bloodsucker right now is an antagonist that is played extremely passively due to all clans except tremere and ventrue having no way to scale that involves combat. Thus you are better to just sit on your laurels and do nothing, waiting for levels to come to you rather than actually doing antagonist things <!-- Argue for the merits of your changes and how they benefit the game, especially if they are controversial and/or far reaching. If you can't actually explain WHY what you are doing will improve the game, then it probably isn't good for the game in the first place. --> ## Proof Of Testing Tested with @Arturlang, the code works as intended. https://www.youtube.com/watch?v=RWxp5fozlvc <!-- Compile and run your code locally. Make sure it works. This is the place to show off your changes! We are not responsible for testing your features. --> ## Changelog <!-- If your PR modifies aspects of the game that can be concretely observed by players or admins you should add a changelog. If your change does NOT meet this description, remove this section. Be sure to properly mark your PRs to prevent unnecessary GBP loss. You can read up on GBP and it's effects on PRs in the tgstation guides for contributors. Please note that maintainers freely reserve the right to remove and add tags should they deem it appropriate. You can attempt to finagle the system all you want, but it's best to shoot for clear communication right off the bat. --> 🆑 add: Added a new way for bloodsuckers to earn levels removed: Blood sucker passive levels no longer cost blood to attain. /🆑 <!-- Both 🆑's are required for the changelog to work! You can put your name to the right of the first 🆑 if you want to overwrite your GitHub username as author ingame. --> <!-- You can use multiple of the same prefix (they're only used for the icon ingame) and delete the unneeded ones. Despite some of the tags, changelogs should generally represent how a player might be affected by the changes rather than a summary of the PR's contents. --> <!-- By opening a pull request. You have read and understood the repository rules located on the main README.md on this project. --> --------- Co-authored-by: projectkepler-RU <99981766+projectkepler-ru@users.noreply.github.com> Co-authored-by: Swift <jackwars4@gmail.com>
This commit is contained in:
co-authored by
projectkepler-RU
Swift
parent
4bf6a608f3
commit
d7148f5bc0
@@ -26,7 +26,9 @@
|
||||
#define HUMANITY_LOST_MAXIMUM 50
|
||||
|
||||
/// Level up blood cost define, max_blood * this = blood cost
|
||||
#define BLOODSUCKER_LEVELUP_PERCENTAGE 0.15
|
||||
#define BLOODSUCKER_LEVELUP_PERCENTAGE 0
|
||||
/// Upper bound for Blood cost increase; used for blood thickening
|
||||
#define BLOOD_LEVEL_GAIN_MAX 0.9
|
||||
|
||||
///The level when at a bloodsucker becomes snobby about who they drink from and gain their non-fledling reputation
|
||||
#define BLOODSUCKER_HIGH_LEVEL 4
|
||||
|
||||
@@ -65,6 +65,10 @@
|
||||
var/obj/structure/closet/crate/coffin
|
||||
var/total_blood_drank = 0
|
||||
|
||||
/// Used for Bloodsuckers gaining levels from drinking blood
|
||||
var/blood_level_gain = 0
|
||||
var/blood_level_gain_amount = 0
|
||||
|
||||
///Blood display HUD
|
||||
var/atom/movable/screen/bloodsucker/blood_counter/blood_display
|
||||
///Vampire level display HUD
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
. += ""
|
||||
. += "Blood Drank: [bloodsuckerdatum.total_blood_drank]"
|
||||
. += "Maximum blood: [bloodsuckerdatum.max_blood_volume]"
|
||||
. += "Blood Thickening: [bloodsuckerdatum.blood_level_gain] / [bloodsuckerdatum.get_level_cost()]"
|
||||
if(bloodsuckerdatum.frenzied)
|
||||
. += "Frenzy exit blood threshold: [bloodsuckerdatum.frenzy_exit_threshold()]"
|
||||
else
|
||||
|
||||
@@ -102,6 +102,11 @@
|
||||
target.reagents.trans_to(owner.current, INGEST, 1) // Run transfer of 1 unit of reagent from them to me.
|
||||
owner.current.playsound_local(null, 'sound/effects/singlebeat.ogg', 40, 1) // Play THIS sound for user only. The "null" is where turf would go if a location was needed. Null puts it right in their head.
|
||||
total_blood_drank += blood_taken
|
||||
if(target.mind) // Checks if the target has a mind
|
||||
if(IS_VASSAL(target)) // Checks if the target is a vassal
|
||||
blood_level_gain += blood_taken / 4
|
||||
else
|
||||
blood_level_gain += blood_taken
|
||||
return blood_taken
|
||||
|
||||
/**
|
||||
|
||||
@@ -165,6 +165,24 @@
|
||||
//returnString += "\n" Don't need spacers. Using . += "" in examine.dm does this on its own.
|
||||
return returnIcon + returnString
|
||||
|
||||
// Blood level gain is used to give Bloodsuckers more levels if they are being agressive and drinking from real, sentient people.
|
||||
// The maximum blood that counts towards this
|
||||
/datum/antagonist/bloodsucker/proc/blood_level_gain()
|
||||
var/level_cost = get_level_cost()
|
||||
if(blood_level_gain >= level_cost && bloodsucker_blood_volume >= level_cost) // Checks if we have drunk enough blood from the living to allow us to gain a level up as well as checking if we have enough blood to actually use on the level up
|
||||
switch(tgui_alert(owner.current, "You have drunk enough blood from the living to thicken your blood, this will cost you [level_cost] blood and give you another level", "Thicken your blood?.", list("Yes", "No"))) //asks user if they want to spend their blood on a level
|
||||
if("Yes")
|
||||
AdjustUnspentRank(1) // gives level
|
||||
blood_level_gain -= level_cost // Subtracts the cost from the pool of drunk blood
|
||||
AdjustBloodVolume(-level_cost) // Subtracts the cost from the bloodsucker's actual blood
|
||||
blood_level_gain_amount += 1 // Increments the variable that makes future levels more expensive
|
||||
|
||||
/datum/antagonist/bloodsucker/proc/get_level_cost()
|
||||
var/level_cost = (0.3 + (0.05 * blood_level_gain_amount))
|
||||
level_cost = min(level_cost, BLOOD_LEVEL_GAIN_MAX)
|
||||
level_cost = max_blood_volume * level_cost
|
||||
return level_cost
|
||||
|
||||
|
||||
/datum/antagonist/bloodsucker/proc/max_vassals()
|
||||
return bloodsucker_level
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
to_chat(bloodsuckerdatum.owner.current, span_notice("You grow more ancient by the night!"))
|
||||
else
|
||||
// Give them the UI to purchase a power.
|
||||
var/choice = tgui_input_list(human_user, "You have the opportunity to grow more ancient. Spend [round(blood_cost, 1)] blood to advance your rank", "Your Blood Thickens...", options)
|
||||
var/choice = tgui_input_list(human_user, "You have the opportunity to grow more ancient.[blood_cost > 0 ? " Spend [round(blood_cost, 1)] blood to advance your rank" : ""]", "Your Blood Thickens...", options)
|
||||
// Prevent Bloodsuckers from closing/reopning their coffin to spam Levels.
|
||||
if(cost_rank && bloodsuckerdatum.GetUnspentRank() <= 0)
|
||||
return
|
||||
|
||||
@@ -221,10 +221,11 @@
|
||||
if(!bloodsuckerdatum.my_clan)
|
||||
user.balloon_alert("enter a clan!")
|
||||
to_chat(user, span_notice("You must enter a Clan to rank up. Do it in the antag menu, which you can see by pressing the action button in the top left."))
|
||||
else
|
||||
else if(!bloodsuckerdatum.frenzied)
|
||||
if(bloodsuckerdatum.GetUnspentRank() < 1)
|
||||
bloodsuckerdatum.blood_level_gain()
|
||||
// Level ups cost 30% of your max blood volume, which scales with your rank.
|
||||
if(!bloodsuckerdatum.frenzied)
|
||||
bloodsuckerdatum.SpendRank(blood_cost = bloodsuckerdatum.max_blood_volume * BLOODSUCKER_LEVELUP_PERCENTAGE)
|
||||
bloodsuckerdatum.SpendRank(blood_cost = bloodsuckerdatum.max_blood_volume * BLOODSUCKER_LEVELUP_PERCENTAGE)
|
||||
bloodsuckerdatum.check_begin_torpor(TORPOR_SKIP_CHECK_DAMAGE)
|
||||
return TRUE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user