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

@@ -0,0 +1,31 @@
using Content.Shared._CP14.Vampire;
using Content.Shared.Humanoid;
using Robust.Client.GameObjects;
namespace Content.Client._CP14.Vampire;
public sealed class CP14ClientVampireVisualsSystem : CP14SharedVampireVisualsSystem
{
protected override void OnVampireVisualsInit(Entity<CP14VampireVisualsComponent> vampire, ref ComponentInit args)
{
base.OnVampireVisualsInit(vampire, ref args);
if (!EntityManager.TryGetComponent(vampire, out SpriteComponent? sprite))
return;
if (sprite.LayerMapTryGet(vampire.Comp.FangsMap, out var fangsLayerIndex))
sprite.LayerSetVisible(fangsLayerIndex, true);
}
protected override void OnVampireVisualsShutdown(Entity<CP14VampireVisualsComponent> vampire, ref ComponentShutdown args)
{
base.OnVampireVisualsShutdown(vampire, ref args);
if (!EntityManager.TryGetComponent(vampire, out SpriteComponent? sprite))
return;
if (sprite.LayerMapTryGet(vampire.Comp.FangsMap, out var fangsLayerIndex))
sprite.LayerSetVisible(fangsLayerIndex, false);
}
}

View File

@@ -1,3 +1,4 @@
using Content.Server._CP14.GameTicking.Rules.Components;
using Content.Server.Administration.Commands;
using Content.Server.Antag;
using Content.Server.GameTicking.Rules.Components;
@@ -36,6 +37,11 @@ public sealed partial class AdminVerbSystem
[ValidatePrototypeId<StartingGearPrototype>]
private const string PirateGearId = "PirateGear";
//CP14
[ValidatePrototypeId<EntityPrototype>]
private const string CP14VampireRule = "CP14Vampire";
//CP14 end
// All antag verbs have names so invokeverb works.
private void AddAntagVerbs(GetVerbsEvent<Verb> args)
{
@@ -52,6 +58,21 @@ public sealed partial class AdminVerbSystem
var targetPlayer = targetActor.PlayerSession;
Verb vampire = new()
{
Text = Loc.GetString("cp14-admin-verb-text-make-vampire"),
Category = VerbCategory.Antag,
Icon = new SpriteSpecifier.Rsi(new ResPath("/Textures/_CP14/Actions/Spells/vampire.rsi"),
"bite"),
Act = () =>
{
_antag.ForceMakeAntag<CP14VampireRuleComponent>(targetPlayer, CP14VampireRule);
},
Impact = LogImpact.High,
Message = Loc.GetString("cp14-admin-verb-make-vampire"),
};
args.Verbs.Add(vampire);
/* CP14 disable default antags
Verb traitor = new()
{

View File

@@ -0,0 +1,97 @@
using Content.Server._CP14.DayCycle;
using Content.Server._CP14.GameTicking.Rules.Components;
using Content.Server._CP14.Vampire;
using Content.Server.Atmos.Components;
using Content.Server.Atmos.EntitySystems;
using Content.Server.Body.Components;
using Content.Server.Body.Systems;
using Content.Server.GameTicking.Rules;
using Content.Server.Temperature.Components;
using Content.Server.Temperature.Systems;
using Content.Shared._CP14.Vampire;
using Content.Shared.Nutrition.Components;
using Content.Shared.Nutrition.EntitySystems;
using Content.Shared.Popups;
using Robust.Shared.Timing;
namespace Content.Server._CP14.GameTicking.Rules;
public sealed class CP14VampireRuleSystem : GameRuleSystem<CP14VampireRuleComponent>
{
[Dependency] private readonly BloodstreamSystem _bloodstream = default!;
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly TemperatureSystem _temperature = default!;
[Dependency] private readonly SharedPopupSystem _popup = default!;
[Dependency] private readonly CP14DayCycleSystem _dayCycle = default!;
[Dependency] private readonly FlammableSystem _flammable = default!;
[Dependency] private readonly BodySystem _body = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<CP14VampireComponent, MapInitEvent>(OnVampireInit);
SubscribeLocalEvent<CP14VampireComponent, CP14HungerChangedEvent>(OnVampireHungerChanged);
}
private void OnVampireHungerChanged(Entity<CP14VampireComponent> ent, ref CP14HungerChangedEvent args)
{
if (args.NewThreshold == HungerThreshold.Starving || args.NewThreshold == HungerThreshold.Dead)
{
RevealVampire(ent);
}
else
{
HideVampire(ent);
}
}
private void RevealVampire(Entity<CP14VampireComponent> ent)
{
EnsureComp<CP14VampireVisualsComponent>(ent);
}
private void HideVampire(Entity<CP14VampireComponent> ent)
{
RemCompDeferred<CP14VampireVisualsComponent>(ent);
}
public override void Update(float frameTime)
{
base.Update(frameTime);
var query = EntityQueryEnumerator<CP14VampireComponent, TemperatureComponent, FlammableComponent>();
while (query.MoveNext(out var uid, out var vampire, out var temperature, out var flammable))
{
if (_timing.CurTime < vampire.NextHeatTime)
continue;
vampire.NextHeatTime = _timing.CurTime + vampire.HeatFrequency;
if (!_dayCycle.TryDaylightThere(uid))
continue;
_temperature.ChangeHeat(uid, vampire.HeatUnderSunTemperature);
_popup.PopupEntity(Loc.GetString("cp14-heat-under-sun"), uid, uid, PopupType.SmallCaution);
if (temperature.CurrentTemperature > vampire.IgniteThreshold && !flammable.OnFire)
{
_flammable.AdjustFireStacks(uid, 1, flammable);
_flammable.Ignite(uid, uid, flammable);
}
}
}
private void OnVampireInit(Entity<CP14VampireComponent> ent, ref MapInitEvent args)
{
_bloodstream.ChangeBloodReagent(ent, ent.Comp.NewBloodReagent);
foreach (var (organUid, _) in _body.GetBodyOrgans(ent))
{
if (TryComp<MetabolizerComponent>(organUid, out var metabolizer) && metabolizer.MetabolizerTypes is not null)
{
metabolizer.MetabolizerTypes.Add(ent.Comp.MetabolizerType);
}
}
}
}

View File

@@ -0,0 +1,7 @@
namespace Content.Server._CP14.GameTicking.Rules.Components;
/// <summary>
/// Stores data for <see cref="CP14VampireRuleSystem"/>.
/// </summary>
[RegisterComponent, Access(typeof(CP14VampireRuleSystem))]
public sealed partial class CP14VampireRuleComponent : Component;

View File

@@ -0,0 +1,10 @@
using Robust.Shared.Prototypes;
namespace Content.Server._CP14.MagicSpell;
[RegisterComponent]
public sealed partial class CP14AutoLearnActionComponent : Component
{
[DataField(required: true)]
public HashSet<EntProtoId> Actions = new();
}

View File

@@ -7,6 +7,7 @@ using Content.Shared._CP14.MagicSpell;
using Content.Shared._CP14.MagicSpell.Components;
using Content.Shared._CP14.MagicSpell.Events;
using Content.Shared._CP14.MagicSpell.Spells;
using Content.Shared.Actions;
using Content.Shared.FixedPoint;
using Content.Shared.Projectiles;
using Content.Shared.Throwing;
@@ -25,6 +26,7 @@ public sealed partial class CP14MagicSystem : CP14SharedMagicSystem
[Dependency] private readonly EntityLookupSystem _lookup = default!;
[Dependency] private readonly EntityWhitelistSystem _whitelist = default!;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly SharedActionsSystem _action = default!;
public override void Initialize()
{
@@ -43,6 +45,17 @@ public sealed partial class CP14MagicSystem : CP14SharedMagicSystem
SubscribeLocalEvent<CP14MagicEffectManaCostComponent, CP14MagicEffectConsumeResourceEvent>(OnManaConsume);
SubscribeLocalEvent<CP14MagicEffectRequiredMusicToolComponent, CP14CastMagicEffectAttemptEvent>(OnMusicCheck);
SubscribeLocalEvent<CP14AutoLearnActionComponent, MapInitEvent>(OnAutoLearnAction);
}
private void OnAutoLearnAction(Entity<CP14AutoLearnActionComponent> ent, ref MapInitEvent args)
{
foreach (var action in ent.Comp.Actions)
{
_action.AddAction(ent, action);
}
RemCompDeferred<CP14AutoLearnActionComponent>(ent);
}
private void OnProjectileHit(Entity<CP14SpellEffectOnHitComponent> ent, ref ThrowDoHitEvent args)

View File

@@ -0,0 +1,11 @@
using Content.Shared.Roles;
namespace Content.Server._CP14.Roles;
/// <summary>
/// Added to mind role entities to tag that they are a Vampire.
/// </summary>
[RegisterComponent]
public sealed partial class CP14VampireRoleComponent : BaseMindRoleComponent
{
}

View File

@@ -0,0 +1,29 @@
using Content.Server._CP14.GameTicking.Rules;
using Content.Shared.Body.Prototypes;
using Content.Shared.Chemistry.Reagent;
using Robust.Shared.Prototypes;
namespace Content.Server._CP14.Vampire;
[RegisterComponent]
[Access(typeof(CP14VampireRuleSystem))]
public sealed partial class CP14VampireComponent : Component
{
[DataField]
public ProtoId<ReagentPrototype> NewBloodReagent = "CP14BloodVampire";
[DataField]
public ProtoId<MetabolizerTypePrototype> MetabolizerType = "CP14Vampire";
[DataField]
public float HeatUnderSunTemperature = 12000f;
[DataField]
public TimeSpan HeatFrequency = TimeSpan.FromSeconds(1);
[DataField]
public TimeSpan NextHeatTime = TimeSpan.Zero;
[DataField]
public float IgniteThreshold = 350f;
}

View File

@@ -0,0 +1,7 @@
using Content.Shared._CP14.Vampire;
namespace Content.Server._CP14.Vampire;
public sealed class CP14VampireVisualsSystem : CP14SharedVampireVisualsSystem
{
}

View File

@@ -134,6 +134,11 @@ public sealed class HungerSystem : EntitySystem
if (calculatedHungerThreshold == component.CurrentThreshold)
return;
//CP14 Raise hunger event for vampire
var ev = new CP14HungerChangedEvent(component.CurrentThreshold, calculatedHungerThreshold);
RaiseLocalEvent(uid, ev);
//CP14 Raise hunger event for vampire end
component.CurrentThreshold = calculatedHungerThreshold;
DoHungerThresholdEffects(uid, component);
}
@@ -277,3 +282,10 @@ public sealed class HungerSystem : EntitySystem
}
}
}
public sealed class CP14HungerChangedEvent(HungerThreshold oldThreshold, HungerThreshold newThreshold) : EntityEventArgs
{
public HungerThreshold OldThreshold { get; } = oldThreshold;
public HungerThreshold NewThreshold { get; } = newThreshold;
}

View File

@@ -0,0 +1,30 @@
using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.FixedPoint;
namespace Content.Shared._CP14.MagicSpell.Spells;
public sealed partial class CP14SpellSuckBlood : CP14SpellEffect
{
[DataField]
public FixedPoint2 SuckAmount = 25;
public override void Effect(EntityManager entManager, CP14SpellEffectBaseArgs args)
{
if (args.Target is null)
return;
if (args.User is null)
return;
var solutionContainerSystem = entManager.System<SharedSolutionContainerSystem>();
if (!solutionContainerSystem.TryGetSolution(args.Target.Value, "bloodstream", out var targetBloodstreamSolution))
return;
if (!solutionContainerSystem.TryGetSolution(args.User.Value, "chemicals", out var userSolution))
return;
solutionContainerSystem.TryTransferSolution(userSolution.Value,
targetBloodstreamSolution.Value.Comp.Solution,
SuckAmount);
}
}

View File

@@ -0,0 +1,43 @@
using Content.Shared.Examine;
using Content.Shared.Humanoid;
namespace Content.Shared._CP14.Vampire;
public abstract class CP14SharedVampireVisualsSystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<CP14VampireVisualsComponent, ExaminedEvent>(OnVampireExamine);
SubscribeLocalEvent<CP14VampireVisualsComponent, ComponentInit>(OnVampireVisualsInit);
SubscribeLocalEvent<CP14VampireVisualsComponent, ComponentShutdown>(OnVampireVisualsShutdown);
}
protected virtual void OnVampireVisualsShutdown(Entity<CP14VampireVisualsComponent> vampire, ref ComponentShutdown args)
{
if (!EntityManager.TryGetComponent(vampire, out HumanoidAppearanceComponent? humanoidAppearance))
return;
humanoidAppearance.EyeColor = vampire.Comp.OriginalEyesColor;
Dirty(vampire, humanoidAppearance);
}
protected virtual void OnVampireVisualsInit(Entity<CP14VampireVisualsComponent> vampire, ref ComponentInit args)
{
if (!EntityManager.TryGetComponent(vampire, out HumanoidAppearanceComponent? humanoidAppearance))
return;
vampire.Comp.OriginalEyesColor = humanoidAppearance.EyeColor;
humanoidAppearance.EyeColor = vampire.Comp.EyesColor;
Dirty(vampire, humanoidAppearance);
}
private void OnVampireExamine(Entity<CP14VampireVisualsComponent> ent, ref ExaminedEvent args)
{
args.PushMarkup(Loc.GetString("cp14-vampire-examine"));
}
}

View File

@@ -0,0 +1,16 @@
using Robust.Shared.GameStates;
namespace Content.Shared._CP14.Vampire;
[RegisterComponent, NetworkedComponent]
public sealed partial class CP14VampireVisualsComponent : Component
{
[DataField]
public Color EyesColor = Color.Red;
[DataField]
public Color OriginalEyesColor = Color.White;
[DataField]
public string FangsMap = "vampire_fangs";
}

View File

@@ -63,8 +63,12 @@
copyright: 'by SpaceLife on Freesound.org'
source: "https://freesound.org/people/SpaceLife/sounds/545938/"
- files: ["essence_consume.ogg"]
license: "CC0-1.0"
copyright: 'by DustyWind on Freesound.org'
source: "https://freesound.org/people/DustyWind/sounds/715784/"
- files: ["vampire_bite.ogg"]
license: "CC0-1.0"
copyright: 'by magnuswaker on Freesound.org'
source: "https://freesound.org/people/magnuswaker/sounds/563491/"

Binary file not shown.

View File

@@ -0,0 +1,2 @@
cp14-admin-verb-text-make-vampire = Make vampire
cp14-admin-verb-make-vampire = Add to target antagonist role “Vampire”

View File

@@ -0,0 +1,3 @@
cp14-roles-antag-vampire-name = Vampire
cp14-roles-antag-vampire-objective = You are a parasite on the body of society, hated by those around you, burned by the sun, and eternally hungry. You need to feed on the blood of the sentient to survive. And finding those who will volunteer to be your feeder is not easy...
cp14-roles-antag-vampire-briefing = You are a parasite on society. It hates and fears you, but the blood of the living is your only food. Nature destroys you with sunlight, so you have to hide in the shadows. It's like the whole world is trying to destroy you, but your will to live is stronger than all of that. SURVIVE. That's all you have to do.

View File

@@ -22,4 +22,5 @@ cp14-modifier-sheeps = sheeps
cp14-modifier-chasm = bottomless chasms
cp14-modifier-air-lily = air lilies
cp14-modifier-time-limit-10 = temporary disintegration (10 minutes)
cp14-modifier-shadow-kudzu = spreading darkness
cp14-modifier-shadow-kudzu = spreading astral haze
cp14-modifier-night = darkness

View File

@@ -1,3 +1,9 @@
cp14-reagent-name-blood-animal = Animal blood
cp14-reagent-desc-blood-animal = The life energy of a living unintelligent being.
cp14-reagent-name-blood-vampire = Vampire blood
cp14-reagent-desc-blood-vampire = The life energy of a powerful blood-vampire.
cp14-reagent-name-blood = Blood
cp14-reagent-desc-blood = The life energy of a living warm-blooded creatures.

View File

@@ -0,0 +1,3 @@
cp14-heat-under-sun = The sunlight stings unbearably...
cp14-vampire-examine = [color=red]Bright red eyes and long fangs tell you that you are facing a very dangerous vampire. Your instincts are telling you to run or fight![/color]

View File

@@ -0,0 +1,2 @@
cp14-admin-verb-text-make-vampire = Сделать вампиром
cp14-admin-verb-make-vampire = Добавить цели роль "Вампир"

View File

@@ -0,0 +1,3 @@
cp14-roles-antag-vampire-name = Вампир
cp14-roles-antag-vampire-objective = Вы - паразит на теле общества, ненавидимый окружающими, сгораемый под солнцем и вечно голодный. Вам необходимо питаться кровью разумных, чтобы выжить. И найти тех, кто добровольно будет готов стать вашей кормушкой непросто...
cp14-roles-antag-vampire-briefing = Вы - паразит на теле общества. Оно вас ненавидит и боится, но кровь живых - ваша единственная пища. Природа уничтожает вас солнечным светом, и вам приходится скрываться в тени. Словно весь мир пытается вас уничтожить, но ваше желание жить сильнее всего этого. ВЫЖИВИТЕ. Это все что от вас требуется.

View File

@@ -22,4 +22,5 @@ cp14-modifier-invisible-whistler = невидимых свистунов
cp14-modifier-chasm = бездонных пропастей
cp14-modifier-air-lily = воздушных лилий
cp14-modifier-time-limit-10 = временного распада (10 минут)
cp14-modifier-shadow-kudzu = распространяющейся тьмы
cp14-modifier-shadow-kudzu = распространяющгося астрального мрака
cp14-modifier-night = темноты

View File

@@ -1,3 +1,9 @@
cp14-reagent-name-blood-animal = Кровь животного
cp14-reagent-desc-blood-animal = Жизненная энергия живого неразумного существа.
cp14-reagent-name-blood-vampire = Кровь вампира
cp14-reagent-desc-blood-vampire = Жизненная энергия могущественного кровопийпы.
cp14-reagent-name-blood = Кровь
cp14-reagent-desc-blood = Жизненная энергия живого теплокровного существа.

View File

@@ -0,0 +1,3 @@
cp14-heat-under-sun = Солнечый свет нестерпимо жжется...
cp14-vampire-examine = [color=red]Ярко красные глаза и длинные клыки говорят вам что перед вами опаснейший вампир. Ваши инстинкты кричат вам бежать или сражаться![/color]

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -78,6 +78,7 @@ entities:
parent: 1
- type: BecomesStation
id: Dev
- type: Roof
- type: MapGrid
chunks:
0,0:

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 B

View File

@@ -0,0 +1,17 @@
{
"version": 1,
"size": {
"x": 32,
"y": 32
},
"license": "All right reserved",
"copyright": "Created by TheShuEd",
"states": [
{
"name": "bite"
},
{
"name": "blood_moon"
}
]
}

View File

@@ -0,0 +1,30 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Created by TheShuEd",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "peckish",
"directions": 1,
"delays": [
[
1
]
]
},
{
"name": "starving",
"directions": 1,
"delays": [
[
0.5,
0.5
]
]
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 860 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

View File

@@ -0,0 +1,19 @@
{
"version": 1,
"license": "CC-BY-SA-4.0",
"copyright": "Created by TheShuEd (Github)",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "human",
"directions": 4
},
{
"name": "goblin",
"directions": 4
}
]
}