Vampire antag (#988)

* new blood types

* vampire systems setup

* death under sun

* vampire blood nutrition

* alerts

* autolearn skills

* base bite actions

* suck blood spell

* polish

* Update blood.yml

* unshitcode

* vampire hunger visual

* nerf speed

* hypnosis + map update

* darkness demiplane warning
This commit is contained in:
Ed
2025-03-07 14:52:43 +03:00
committed by GitHub
parent cea7d93d12
commit 0b5712ce97
62 changed files with 3640 additions and 2003 deletions

View File

@@ -11,6 +11,10 @@
Food:
effects:
- !type:SatiateHunger
conditions:
- !type:OrganType
type: CP14Vampire
shouldHave: false
plantMetabolism:
- !type:PlantAdjustNutrition
amount: 1.5
@@ -39,6 +43,10 @@
- !type:ModifyBleedAmount
amount: -0.25
- !type:SatiateHunger #Numbers are balanced with this in mind + it helps limit how much healing you can get from food
conditions:
- !type:OrganType
type: CP14Vampire
shouldHave: false
# Lets plants benefit too
plantMetabolism:
- !type:PlantAdjustNutrition
@@ -66,6 +74,10 @@
- !type:ModifyBloodLevel
amount: 1 # weaker than iron but pretty good all things considered
- !type:SatiateHunger
conditions:
- !type:OrganType
type: CP14Vampire
shouldHave: false
pricePerUnit: 3
- type: reagent
@@ -85,6 +97,9 @@
- !type:ReagentThreshold #Only satiates when eaten with nutriment
reagent: Nutriment
min: 0.1
- !type:OrganType
type: CP14Vampire
shouldHave: false
factor: 1
plantMetabolism:
- !type:PlantAdjustNutrition

View File

@@ -28,4 +28,22 @@
name: cp14-alerts-magic-energy-name
description: cp14-alerts-magic-energy-desc
minSeverity: 0
maxSeverity: 11
maxSeverity: 11
- type: alert
id: CP14VampireStarving
category: Hunger
icons:
- sprite: /Textures/_CP14/Interface/Alerts/vampire_hunger.rsi
state: starving
name: alerts-starving-name
description: alerts-starving-desc
- type: alert
id: CP14VampirePeckish
category: Hunger
icons:
- sprite: /Textures/_CP14/Interface/Alerts/vampire_hunger.rsi
state: peckish
name: alerts-hunger-name
description: alerts-hunger-desc

View File

@@ -1,3 +1,7 @@
- type: metabolizerType
id: CP14Dwarf
name: metabolizer-type-dwarf
- type: metabolizerType
id: CP14Vampire
name: cp14-roles-antag-vampire-name

View File

@@ -38,6 +38,10 @@
Slash: -1
- !type:SatiateThirst
factor: 3
conditions:
- !type:OrganType
type: CP14Vampire
shouldHave: false
- !type:SatiateHunger
factor: 3
- !type:CP14PlantResourceModify

View File

@@ -0,0 +1,62 @@
- type: entity
id: CP14ActionVampireBite
name: Vampire bite
description: You sink your fangs into your victim, draining them of a lot of blood.
components:
- type: Sprite
sprite: _CP14/Actions/Spells/vampire.rsi
state: bite
- type: CP14MagicEffectCastSlowdown
speedMultiplier: 0.3
- type: CP14MagicEffect
telegraphyEffects:
- !type:CP14SpellSpawnEntityOnTarget
spawns:
- CP14ImpactEffectVampireBite
- !type:CP14SpellApplyEntityEffect
effects:
- !type:Jitter
effects:
- !type:CP14SpellSuckBlood
- !type:CP14SpellSpawnEntityOnTarget
spawns:
- CP14ImpactEffectVampireBite
- !type:CP14SpellApplyEntityEffect
effects:
- !type:Jitter
- !type:ModifyBloodLevel
amount: -15
- type: EntityTargetAction
repeat: true
whitelist:
components:
- MobState
range: 1
itemIconStyle: BigAction
canTargetSelf: false
interactOnMiss: false
sound: !type:SoundPathSpecifier
path: /Audio/_CP14/Effects/vampire_bite.ogg
icon:
sprite: _CP14/Actions/Spells/vampire.rsi
state: bite
event: !type:CP14DelayedEntityTargetActionEvent
cooldown: 1
castDelay: 1
- type: entity
id: CP14ImpactEffectVampireBite
parent: CP14SnowEffect
categories: [ HideSpawnMenu ]
components:
- type: Sprite
layers:
- state: snow1
map: [ "random" ]
color: red
- type: RandomSprite
cP14InheritBaseColor: red #Dont eat red snow baby
available:
- random:
snow1: Inherit
snow2: Inherit

View File

@@ -0,0 +1,71 @@
- type: entity
id: CP14ActionSpellVampireHypnosis
name: Hypnosis
description: You look at the victim with your OWN gaze, shutting down their consciousness and putting them to sleep.
components:
- type: Sprite
sprite: _CP14/Actions/Spells/vampire.rsi
state: blood_moon
- type: CP14MagicEffectCastSlowdown
speedMultiplier: 0.5
- type: CP14MagicEffect
telegraphyEffects:
- !type:CP14SpellSpawnEntityOnTarget
spawns:
- CP14ImpactEffectVampireHypnosis
effects:
- !type:CP14SpellSpawnEntityOnTarget
spawns:
- CP14ImpactEffectVampireHypnosis
- !type:CP14SpellApplyEntityEffect
effects:
- !type:Jitter
- !type:GenericStatusEffect
key: ForcedSleep
time: 20
component: ForcedSleeping
type: Add
- type: CP14MagicEffectCastingVisual
proto: CP14RuneVampireHypnosis
- type: EntityTargetAction
whitelist:
components:
- MobState
range: 5
itemIconStyle: BigAction
canTargetSelf: false
interactOnMiss: false
sound: !type:SoundPathSpecifier
path: /Audio/Magic/rumble.ogg
icon:
sprite: _CP14/Actions/Spells/vampire.rsi
state: blood_moon
event: !type:CP14DelayedEntityTargetActionEvent
cooldown: 30
castDelay: 1.5
breakOnMove: false
- type: entity
id: CP14RuneVampireHypnosis
parent: CP14BaseMagicRune
categories: [ HideSpawnMenu ]
components:
- type: PointLight
color: red
- type: Sprite
layers:
- state: double_outer
color: red
shader: unshaded
- type: entity
id: CP14ImpactEffectVampireHypnosis
parent: CP14BaseMagicImpact
categories: [ HideSpawnMenu ]
components:
- type: Sprite
sprite: Effects/electricity.rsi
layers:
- state: electrified
color: red
shader: unshaded

View File

@@ -71,7 +71,7 @@
amount: 2
- type: Bloodstream
bloodMaxVolume: 50
bloodReagent: CP14Blood
bloodReagent: CP14BloodAnimal
- type: InteractionPopup
successChance: 0.5
interactSuccessString: cp14-petting-success-rabbit
@@ -157,7 +157,7 @@
prob: 0.3
- type: Bloodstream
bloodMaxVolume: 150
bloodReagent: CP14Blood
bloodReagent: CP14BloodAnimal
- type: Grammar
attributes:
gender: epicene
@@ -309,7 +309,7 @@
- type: CanEscapeInventory
- type: Bloodstream
bloodMaxVolume: 30
bloodReagent: CP14Blood
bloodReagent: CP14BloodAnimal
- type: Tag
tags:
- CP14Mosquito
@@ -408,8 +408,8 @@
- id: CP14String # As long as there are no mechanics to shearing wool, the only way to get string.
amount: 4
- type: Bloodstream
bloodMaxVolume: 200
bloodReagent: CP14Blood
bloodMaxVolume: 150
bloodReagent: CP14BloodAnimal
- type: InteractionPopup
successChance: 0.5
interactSuccessString: petting-success-goat

View File

@@ -30,7 +30,7 @@
Dead:
Base: dead
- type: Bloodstream
bloodReagent: CP14Blood
bloodReagent: CP14BloodAnimal
- type: Tag
tags:
- FootstepSound

View File

@@ -77,7 +77,7 @@
prob: 0.7
- type: Bloodstream
bloodMaxVolume: 200
bloodReagent: CP14Blood
bloodReagent: CP14BloodAnimal
- type: Grammar
attributes:
gender: epicene

View File

@@ -83,7 +83,7 @@
prob: 0.6
- type: Bloodstream
bloodMaxVolume: 200
bloodReagent: CP14Blood
bloodReagent: CP14BloodAnimal
- type: Grammar
attributes:
gender: epicene

View File

@@ -15,6 +15,10 @@
- map: [ "enum.HumanoidVisualLayers.Head" ]
- map: [ "enum.HumanoidVisualLayers.Snout" ]
- map: [ "enum.HumanoidVisualLayers.Eyes" ]
- map: [ "vampire_fangs" ]
sprite: _CP14/Mobs/Species/Vampire/fangs.rsi
state: human
visible: false
- map: [ "enum.HumanoidVisualLayers.RArm" ]
- map: [ "enum.HumanoidVisualLayers.LArm" ]
- map: [ "enum.HumanoidVisualLayers.RLeg" ]

View File

@@ -4,6 +4,58 @@
name: Mr. Goblin
abstract: true
components:
- type: Sprite
layers:
- map: [ "enum.HumanoidVisualLayers.Chest" ]
- map: [ "enum.HumanoidVisualLayers.Head" ]
- map: [ "enum.HumanoidVisualLayers.Snout" ]
- map: [ "enum.HumanoidVisualLayers.Eyes" ]
- map: [ "vampire_fangs" ]
sprite: _CP14/Mobs/Species/Vampire/fangs.rsi
state: goblin # Goblin fangs state
visible: false
- map: [ "enum.HumanoidVisualLayers.RArm" ]
- map: [ "enum.HumanoidVisualLayers.LArm" ]
- map: [ "enum.HumanoidVisualLayers.RLeg" ]
- map: [ "enum.HumanoidVisualLayers.LLeg" ]
- shader: StencilClear
sprite: _CP14/Mobs/Species/Human/parts.rsi
state: l_leg
- shader: StencilMask
map: [ "enum.HumanoidVisualLayers.StencilMask" ]
sprite: Mobs/Customization/masking_helpers.rsi
state: unisex_full
visible: false
- map: [ "enum.HumanoidVisualLayers.LFoot" ]
- map: [ "enum.HumanoidVisualLayers.RFoot" ]
- map: [ "pants" ]
- map: [ "shoes" ]
- map: [ "shirt" ]
- map: [ "enum.HumanoidVisualLayers.LHand" ]
- map: [ "enum.HumanoidVisualLayers.RHand" ]
- map: [ "gloves" ]
- map: [ "ears" ]
- map: [ "outerClothing" ]
- map: [ "cloak" ]
- map: [ "eyes" ]
- map: [ "belt1" ]
- map: [ "belt2" ]
- map: [ "neck" ]
- map: [ "back" ]
- map: [ "enum.HumanoidVisualLayers.FacialHair" ]
- map: [ "enum.HumanoidVisualLayers.Hair" ]
- map: [ "enum.HumanoidVisualLayers.HeadSide" ]
- map: [ "enum.HumanoidVisualLayers.HeadTop" ]
- map: [ "enum.HumanoidVisualLayers.Tail" ]
- map: [ "mask" ]
- map: [ "head" ]
- map: [ "pocket1" ]
- map: [ "pocket2" ]
- map: ["enum.HumanoidVisualLayers.Handcuffs"]
color: "#ffffff"
sprite: Objects/Misc/handcuffs.rsi
state: body-overlay-2
visible: false
- type: HumanoidAppearance
species: CP14Goblin
- type: Hunger
@@ -36,7 +88,7 @@
shape:
!type:PhysShapeCircle
radius: 0.25
density: 100
density: 185
restitution: 0.0
mask:
- MobMask

View File

@@ -11,6 +11,10 @@
- map: [ "enum.HumanoidVisualLayers.Snout" ]
- map: [ "enum.HumanoidVisualLayers.Eyes" ]
shader: unshaded # Gloving eyes
- map: [ "vampire_fangs" ]
sprite: _CP14/Mobs/Species/Vampire/fangs.rsi
state: human
visible: false
- map: [ "enum.HumanoidVisualLayers.RArm" ]
- map: [ "enum.HumanoidVisualLayers.LArm" ]
- map: [ "enum.HumanoidVisualLayers.RLeg" ]

View File

@@ -14,6 +14,10 @@
- map: [ "enum.HumanoidVisualLayers.Head" ]
- map: [ "enum.HumanoidVisualLayers.Snout" ]
- map: [ "enum.HumanoidVisualLayers.Eyes" ]
- map: [ "vampire_fangs" ]
sprite: _CP14/Mobs/Species/Vampire/fangs.rsi
state: human
visible: false #Skeleton vampire? Lol?
- map: [ "enum.HumanoidVisualLayers.RArm" ]
- map: [ "enum.HumanoidVisualLayers.LArm" ]
- map: [ "enum.HumanoidVisualLayers.RLeg" ]

View File

@@ -16,6 +16,10 @@
- map: [ "enum.HumanoidVisualLayers.Head" ]
- map: [ "enum.HumanoidVisualLayers.Snout" ]
- map: [ "enum.HumanoidVisualLayers.Eyes" ]
- map: [ "vampire_fangs" ]
sprite: _CP14/Mobs/Species/Vampire/fangs.rsi
state: human
visible: false #Zombie vampire?
- map: [ "enum.HumanoidVisualLayers.RArm" ]
- map: [ "enum.HumanoidVisualLayers.LArm" ]
- map: [ "enum.HumanoidVisualLayers.RLeg" ]

View File

@@ -6,6 +6,15 @@
- type: GameRule
cP14Allowed: true
- type: entity
parent: CP14BaseGameRule
id: CP14SubGamemodesRule
components:
- type: SubGamemodes
rules:
- id: CP14Vampire
prob: 0.5
- type: entity
id: CP14RoundObjectivesRule
parent: CP14BaseGameRule

View File

@@ -0,0 +1,48 @@
- type: entity
parent: CP14BaseGameRule
id: CP14Vampire
components:
- type: CP14VampireRule
#- type: AntagObjectives
# objectives:
# - TODO: SURVIVE
- type: GameRule
minPlayers: 0 #Increase in future
- type: AntagSelection
definitions:
- prefRoles: [ CP14Vampire ]
max: 5
playerRatio: 10
multiAntagSetting: NotExclusive
lateJoinAdditional: true
allowNonHumans: true
mindRoles:
- CP14MindRoleVampire
components:
- type: CP14Vampire
- type: CP14AutoLearnAction
actions:
- CP14ActionVampireBite
- CP14ActionSpellVampireHypnosis
- type: Hunger
baseDecayRate: 0.03
starvationDamage:
types:
Cold: 0.25
Bloodloss: 0.25
hungerThresholdAlerts:
Peckish: CP14VampirePeckish
Starving: CP14VampireStarving
Dead: CP14VampireStarving
starvingSlowdownModifier: 1.1 #Speed Up when hunger!
- type: PassiveDamage
allowedStates:
- Alive
- Critical
damage:
groups:
Brute: -1
briefing:
text: cp14-roles-antag-vampire-briefing
color: "#630f24"
sound: "/Audio/_CP14/Ambience/Antag/bandit_start.ogg"

View File

@@ -0,0 +1,4 @@
- type: roleLoadout
id: CP14VampireSpells
groups:
- CP14GeneralSpells

View File

@@ -7,6 +7,7 @@
generationWeight: 2
categories:
MapLight: 1
name: cp14-modifier-night
components:
- type: MapLight
ambientLightColor: "#000000"
@@ -18,6 +19,7 @@
- 3
categories:
MapLight: 1
name: cp14-modifier-night
components:
- type: MapLight
ambientLightColor: "#0f0104"
@@ -28,6 +30,7 @@
- 1
categories:
MapLight: 1
name: cp14-modifier-night
components:
- type: MapLight
ambientLightColor: "#09010f"
@@ -38,6 +41,7 @@
- 1
categories:
MapLight: 1
name: cp14-modifier-night
components:
- type: MapLight
ambientLightColor: "#000502"
@@ -50,6 +54,7 @@
- 3
categories:
MapLight: 1
name: cp14-modifier-night
components:
- type: MapLight
ambientLightColor: "#010714"

View File

@@ -12,6 +12,70 @@
collection: FootstepBlood
params:
volume: 6
metabolisms:
Food:
effects:
- !type:SatiateHunger
conditions:
- !type:OrganType
type: CP14Vampire
- !type:SatiateThirst
conditions:
- !type:OrganType
type: CP14Vampire
Medicine:
effects:
- !type:HealthChange
conditions:
- !type:OrganType
type: CP14Vampire
damage:
groups:
Brute: -5
Burn: -5
- type: reagent
id: CP14BloodAnimal
group: CP14Precurser
name: cp14-reagent-name-blood-animal
desc: cp14-reagent-desc-blood-animal
flavor: CP14Metallic
color: "#802020"
recognizable: true
physicalDesc: cp14-reagent-physical-desc-ferrous
slippery: false
footstepSound:
collection: FootstepBlood
params:
volume: 6
metabolisms:
Food:
effects:
- !type:SatiateHunger
factor: 1
conditions:
- !type:OrganType
type: CP14Vampire
- !type:SatiateThirst
factor: 1
conditions:
- !type:OrganType
type: CP14Vampire
- type: reagent
id: CP14BloodVampire
group: CP14Precurser
name: cp14-reagent-name-blood-vampire
desc: cp14-reagent-desc-blood-vampire
flavor: CP14Metallic
color: "#800000"
recognizable: true
physicalDesc: cp14-reagent-physical-desc-ferrous
slippery: false
footstepSound:
collection: FootstepBlood
params:
volume: 6
- type: reagent
id: CP14BloodTiefling
@@ -27,6 +91,41 @@
collection: FootstepBlood
params:
volume: 6
metabolisms:
Food:
effects:
- !type:SatiateHunger
conditions:
- !type:OrganType
type: CP14Vampire
- !type:SatiateThirst
conditions:
- !type:OrganType
type: CP14Vampire
Medicine:
effects:
- !type:HealthChange
conditions:
- !type:OrganType
type: CP14Vampire
damage:
groups:
Brute: -3
Burn: -3
- !type:FlammableReaction
conditions:
- !type:OrganType
type: CP14Vampire
multiplier: 1
- !type:AdjustTemperature
conditions:
- !type:OrganType
type: CP14Vampire
amount: 1000
- !type:Ignite
conditions:
- !type:OrganType
type: CP14Vampire
- type: reagent
id: CP14BloodElf
@@ -42,6 +141,33 @@
collection: FootstepBlood
params:
volume: 6
metabolisms:
Food:
effects:
- !type:SatiateHunger
conditions:
- !type:OrganType
type: CP14Vampire
- !type:SatiateThirst
conditions:
- !type:OrganType
type: CP14Vampire
Medicine:
effects:
- !type:CP14ManaChange
manaDelta: 10
conditions:
- !type:OrganType
type: CP14Vampire
safe: true
- !type:HealthChange
conditions:
- !type:OrganType
type: CP14Vampire
damage:
groups:
Brute: -3
Burn: -3
- type: reagent
id: CP14BloodGoblin
@@ -56,4 +182,32 @@
footstepSound:
collection: FootstepBlood
params:
volume: 6
volume: 6
metabolisms:
Food:
effects:
- !type:SatiateHunger
conditions:
- !type:OrganType
type: CP14Vampire
- !type:SatiateThirst
conditions:
- !type:OrganType
type: CP14Vampire
Medicine:
effects:
- !type:HealthChange
conditions:
- !type:OrganType
type: CP14Vampire
damage:
groups:
Brute: -3
Burn: -3
- !type:MovespeedModifier
conditions:
- !type:OrganType
type: CP14Vampire
walkSpeedModifier: 1.1
sprintSpeedModifier: 1.1
statusLifetime: 1.5

View File

@@ -242,6 +242,10 @@
effects:
- !type:SatiateHunger
factor: 15
conditions:
- !type:OrganType
type: CP14Vampire
shouldHave: false
- type: reagent
id: CP14BasicEffectSatiateThirst

View File

@@ -61,4 +61,17 @@
amount: 1
products:
CP14EssenceChaos: 1
CP14EssenceLife: 1
CP14EssenceLife: 1
#- type: reaction
# id: CP14BloodFlowerVampireSplitting
# requiredMixerCategories:
# - CP14MagicSplitting
# reactants:
# CP14BloodFlowerSap:
# amount: 1
# CP14BloodVampire:
# amount: 1
# products:
# CP14EssenceChaos: 1 #TODO: need some advanced essences first
# CP14EssenceLife: 1

View File

@@ -0,0 +1,10 @@
- type: antag
id: CP14Vampire
name: cp14-roles-antag-vampire-name
antagonist: true
setPreference: true
objective: cp14-roles-antag-vampire-objective
requirements:
- !type:OverallPlaytimeRequirement
time: 7200 # 2h
#guides: TODO

View File

@@ -6,3 +6,17 @@
- type: MindRole
roleType: CP14DemiplaneAntagonist
antagPrototype: CP14DemiplaneAntag
- type: entity
parent: BaseMindRoleAntag
id: CP14MindRoleVampire
categories: [ ForkFiltered ]
name: Vampire Role
components:
- type: MindRole
antagPrototype: CP14Vampire
roleType: SoloAntagonist
exclusiveAntag: true
- type: CP14VampireRole
- type: RoleBriefing
briefing: cp14-roles-antag-vampire-briefing

View File

@@ -17,6 +17,7 @@
showInVote: true
cP14Allowed: true
rules:
- CP14SubGamemodesRule
- CP14RoundObjectivesRule
- CP14BasicStationEventScheduler
@@ -29,6 +30,6 @@
showInVote: true # For playtest period only
cP14Allowed: true
rules:
- Sandbox
- CP14RoundObjectivesRule
- CP14BasicStationEventScheduler
- Sandbox