diff --git a/Content.Shared/_CP14/Skill/Restrictions/SpeciesBlacklist.cs b/Content.Shared/_CP14/Skill/Restrictions/SpeciesBlacklist.cs new file mode 100644 index 0000000000..0abb1670d9 --- /dev/null +++ b/Content.Shared/_CP14/Skill/Restrictions/SpeciesBlacklist.cs @@ -0,0 +1,27 @@ +using Content.Shared._CP14.Skill.Prototypes; +using Content.Shared.Humanoid; +using Content.Shared.Humanoid.Prototypes; +using Robust.Shared.Prototypes; + +namespace Content.Shared._CP14.Skill.Restrictions; + +public sealed partial class SpeciesBlacklist : CP14SkillRestriction +{ + [DataField(required: true)] + public ProtoId Species = new(); + + public override bool Check(IEntityManager entManager, EntityUid target, CP14SkillPrototype skill) + { + if (!entManager.TryGetComponent(target, out var appearance)) + return false; + + return appearance.Species != Species; + } + + public override string GetDescription(IEntityManager entManager, IPrototypeManager protoManager) + { + var species = protoManager.Index(Species); + + return Loc.GetString("cp14-skill-req-notspecies", ("name", Loc.GetString(species.Name))); + } +} diff --git a/Resources/Locale/en-US/_CP14/skill/requirements.ftl b/Resources/Locale/en-US/_CP14/skill/requirements.ftl index 0e15c7f90e..b07b767839 100644 --- a/Resources/Locale/en-US/_CP14/skill/requirements.ftl +++ b/Resources/Locale/en-US/_CP14/skill/requirements.ftl @@ -1,5 +1,6 @@ cp14-skill-req-prerequisite = Skill "{$name}" must be learned cp14-skill-req-species = You must be the race of “{$name}” +cp14-skill-req-notspecies = You must not be the race of “{$name}” cp14-skill-req-researched = A study needs to be done on the research table cp14-skill-req-impossible = Unable to explore during a round at the current moment cp14-skill-req-god-follower-percentage = The number of your followers should be more than {$count}% \ No newline at end of file diff --git a/Resources/Locale/en-US/_CP14/species/species.ftl b/Resources/Locale/en-US/_CP14/species/species.ftl index af37bcfd6e..269c0afadf 100644 --- a/Resources/Locale/en-US/_CP14/species/species.ftl +++ b/Resources/Locale/en-US/_CP14/species/species.ftl @@ -4,4 +4,5 @@ cp14-species-name-dwarf = Dwarf cp14-species-name-elf = Elf cp14-species-name-goblin = Goblin cp14-species-name-silva = Silva -cp14-species-name-carcat = Carcat \ No newline at end of file +cp14-species-name-carcat = Carcat +cp14-species-name-skeleton = Skeleton \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_CP14/skill/requirements.ftl b/Resources/Locale/ru-RU/_CP14/skill/requirements.ftl index 1eede4ac12..27c79bc9dd 100644 --- a/Resources/Locale/ru-RU/_CP14/skill/requirements.ftl +++ b/Resources/Locale/ru-RU/_CP14/skill/requirements.ftl @@ -1,5 +1,6 @@ cp14-skill-req-prerequisite = Навык "{$name}" должен быть изучен cp14-skill-req-species = Вы должны быть расы "{$name}" +cp14-skill-req-notspecies = Вы не должны быть расы "{$name}" cp14-skill-req-researched = Необходимо провести исследование на исследовательском столе cp14-skill-req-impossible = Невозможно изучить во время раунда на текущий момент cp14-skill-req-god-follower-percentage = Количество ваших последователей должно быть больше {$count}% \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_CP14/species/species.ftl b/Resources/Locale/ru-RU/_CP14/species/species.ftl index ff9caae3bb..e88c11c145 100644 --- a/Resources/Locale/ru-RU/_CP14/species/species.ftl +++ b/Resources/Locale/ru-RU/_CP14/species/species.ftl @@ -4,4 +4,5 @@ cp14-species-name-dwarf = Дварф cp14-species-name-elf = Эльф cp14-species-name-goblin = Гоблин cp14-species-name-silva = Сильва -cp14-species-name-carcat = Каркат \ No newline at end of file +cp14-species-name-carcat = Каркат +cp14-species-name-skeleton = Скелет \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Mobs/Player/DemiplaneAntag/Skeletons/T2.yml b/Resources/Prototypes/_CP14/Entities/Mobs/Player/DemiplaneAntag/Skeletons/T2.yml index 43f56d693b..c00622e738 100644 --- a/Resources/Prototypes/_CP14/Entities/Mobs/Player/DemiplaneAntag/Skeletons/T2.yml +++ b/Resources/Prototypes/_CP14/Entities/Mobs/Player/DemiplaneAntag/Skeletons/T2.yml @@ -1,6 +1,6 @@ - type: entity id: CP14MobUndeadSkeletonDemiplaneT2 - parent: CP14MobUndeadSkeletonDemiplaneT1 + parent: CP14MobUndeadSkeletonDemiplaneT1 name: skeleton abstract: true components: @@ -92,9 +92,12 @@ - CP14MobSkeletonWizardT2 - type: CP14MagicEnergyContainer magicAlert: CP14MagicEnergy - maxEnergy: 100 - energy: 100 + maxEnergy: 200 + energy: 200 unsafeSupport: true + - type: CP14MagicEnergyDraw + energy: 1 + delay: 5 - type: PassiveDamage allowedStates: - Alive @@ -104,27 +107,21 @@ - type: CP14SkillStorage skillPoints: Memory: - max: 5 + max: 4 freeLearnedSkills: - SwordMastery - RapierMastery - SkimitarMastery + - HydrosophistryT1 + - HydrosophistryT2 - MetamagicT1 - MetamagicT2 + - PyrokineticT1 - CP14ActionSpellManaConsume - CP14ActionSpellManaGift - CP14ActionSpellManaConsumeElf - CP14ActionSpellManaGiftElf - CP14ActionSpellMagicSplitting - - CP14ActionSpellManaTrance - availableSkillTrees: - - Hydrosophistry - - Illusion - - Metamagic - - Electromancy - - Athletic - - MartialArts - - Craftsmanship - type: entity id: CP14MobUndeadSkeletonBardT2 parent: CP14MobUndeadSkeletonDemiplaneT2 diff --git a/Resources/Prototypes/_CP14/Entities/Mobs/Player/TownRaids/undead.yml b/Resources/Prototypes/_CP14/Entities/Mobs/Player/TownRaids/undead.yml index 962eb8e130..3d4a26355d 100644 --- a/Resources/Prototypes/_CP14/Entities/Mobs/Player/TownRaids/undead.yml +++ b/Resources/Prototypes/_CP14/Entities/Mobs/Player/TownRaids/undead.yml @@ -53,27 +53,22 @@ - type: CP14SkillStorage skillPoints: Memory: - max: 5 + max: 4 freeLearnedSkills: - SwordMastery - RapierMastery - SkimitarMastery - MetamagicT1 - MetamagicT2 + - HydrosophistryT1 + - HydrosophistryT2 + - PyrokineticT1 + - PyrokineticT2 - CP14ActionSpellManaConsume - CP14ActionSpellManaGift - CP14ActionSpellManaConsumeElf - CP14ActionSpellManaGiftElf - CP14ActionSpellMagicSplitting - - CP14ActionSpellManaTrance - availableSkillTrees: - - Hydrosophistry - - Illusion - - Metamagic - - Electromancy - - Athletic - - MartialArts - - Craftsmanship - type: Loadout prototypes: - CP14MobSkeletonWizardTownRaid diff --git a/Resources/Prototypes/_CP14/Skill/Basic/healing.yml b/Resources/Prototypes/_CP14/Skill/Basic/healing.yml index f53439ee07..1433d7b28e 100644 --- a/Resources/Prototypes/_CP14/Skill/Basic/healing.yml +++ b/Resources/Prototypes/_CP14/Skill/Basic/healing.yml @@ -23,6 +23,8 @@ restrictions: - !type:NeedPrerequisite prerequisite: HealingT1 + - !type:SpeciesBlacklist + species: CP14Skeleton - type: cp14Skill id: CP14ActionSpellPlantGrowth @@ -98,6 +100,8 @@ restrictions: - !type:NeedPrerequisite prerequisite: HealingT2 + - !type:SpeciesBlacklist + species: CP14Skeleton - type: cp14Skill id: CP14ActionSpellCureWounds @@ -112,6 +116,8 @@ restrictions: - !type:NeedPrerequisite prerequisite: HealingT2 + - !type:SpeciesBlacklist + species: CP14Skeleton # T3 diff --git a/Resources/Prototypes/_CP14/Skill/Basic/pyrokinetic.yml b/Resources/Prototypes/_CP14/Skill/Basic/pyrokinetic.yml index f74c20b0d1..5f811e8597 100644 --- a/Resources/Prototypes/_CP14/Skill/Basic/pyrokinetic.yml +++ b/Resources/Prototypes/_CP14/Skill/Basic/pyrokinetic.yml @@ -23,6 +23,8 @@ restrictions: - !type:NeedPrerequisite prerequisite: PyrokineticT1 + - !type:SpeciesBlacklist + species: CP14Skeleton - type: cp14Skill id: CP14ActionSpellHeat @@ -102,6 +104,8 @@ restrictions: - !type:NeedPrerequisite prerequisite: PyrokineticT2 + - !type:SpeciesBlacklist + species: CP14Skeleton - type: cp14Skill id: CP14ActionSpellFirewave diff --git a/Resources/Prototypes/_CP14/Species/skeleton.yml b/Resources/Prototypes/_CP14/Species/skeleton.yml index f59443f137..99cdf8d49c 100644 --- a/Resources/Prototypes/_CP14/Species/skeleton.yml +++ b/Resources/Prototypes/_CP14/Species/skeleton.yml @@ -1,6 +1,6 @@ - type: species id: CP14Skeleton - name: cp14-species-name-human + name: cp14-species-name-skeleton roundStart: false prototype: CP14BaseMobSkeleton sprites: CP14MobSkeletonSprites