diff --git a/Content.Server/_White/Wizard/Magic/WizardSpellsSystem.cs b/Content.Server/_White/Wizard/Magic/WizardSpellsSystem.cs index c696b82902..9119c482a1 100644 --- a/Content.Server/_White/Wizard/Magic/WizardSpellsSystem.cs +++ b/Content.Server/_White/Wizard/Magic/WizardSpellsSystem.cs @@ -17,6 +17,7 @@ using Content.Server.EUI; using Content.Server.Lightning; using Content.Server.Magic; using Content.Server.Mind; +using Content.Server.Polymorph.Systems; using Content.Server.Singularity.EntitySystems; using Content.Server.Standing; using Content.Server.Weapons.Ranged.Systems; @@ -33,6 +34,7 @@ using Content.Shared.Cluwne; using Content.Shared.Coordinates.Helpers; using Content.Shared.Damage; using Content.Shared.Damage.Prototypes; +using Content.Shared.Eye.Blinding.Components; using Content.Shared.Hands.Components; using Content.Shared.Hands.EntitySystems; using Content.Shared.Humanoid; @@ -44,7 +46,10 @@ using Content.Shared.Magic; using Content.Shared.Maps; using Content.Shared.Mobs; using Content.Shared.Mobs.Components; +using Content.Shared.Mobs.Systems; +using Content.Shared.Movement.Components; using Content.Shared.Physics; +using Content.Shared.Polymorph; using Content.Shared.Popups; using Content.Shared.Revolutionary.Components; using Content.Shared.StatusEffect; @@ -90,6 +95,8 @@ public sealed class WizardSpellsSystem : EntitySystem [Dependency] private readonly ActionContainerSystem _actionContainer = default!; [Dependency] private readonly ChargingSystem _charging = default!; [Dependency] private readonly SharedStunSystem _stun = default!; + [Dependency] private readonly PolymorphSystem _polymorph = default!; + [Dependency] private readonly MobStateSystem _mobState = default!; #endregion @@ -113,6 +120,9 @@ public sealed class WizardSpellsSystem : EntitySystem SubscribeLocalEvent(OnFireballSpell); SubscribeLocalEvent(OnForceSpell); SubscribeLocalEvent(OnArcSpell); + SubscribeLocalEvent(OnRodFormSpell); + SubscribeLocalEvent(OnBlindSpell); + SubscribeAllEvent(OnMutateSpell); SubscribeLocalEvent(OnBeforeCastSpell); } @@ -838,6 +848,86 @@ public sealed class WizardSpellsSystem : EntitySystem #endregion + #region Rod Form + + private void OnRodFormSpell(RodFormSpellEvent msg) + { + if (!CanCast(msg)) + return; + + var config = new PolymorphConfiguration + { + Entity = "ImmovableRodWizard", + Duration = 2, + Forced = true, + TransferDamage = true + }; + + var rod = _polymorph.PolymorphEntity(msg.Performer, config); + var angle = _transformSystem.GetWorldRotation(msg.Performer).ToWorldVec(); + + if (rod.HasValue) + { + RemComp(rod.Value); + _throwingSystem.TryThrow(rod.Value, angle, 20, msg.Performer); + } + + Cast(msg); + } + + #endregion + + #region Blind + + private void OnBlindSpell(BlindSpellEvent msg) + { + if (!CanCast(msg)) + return; + + foreach (var e in _lookup.GetEntitiesInRange(msg.Performer, 8)) + { + var wizardQuery = GetEntityQuery(); + var humanoidQuery = GetEntityQuery(); + + if (!humanoidQuery.HasComponent(e) || !_mobState.IsAlive(e) || + wizardQuery.HasComponent(e)) + continue; + + _statusEffectsSystem.TryAddStatusEffect(e, "TemporaryBlindness", + TimeSpan.FromSeconds(5), false); + + _chat.TryEmoteWithChat(e, "Scream"); + } + + Cast(msg); + } + + #endregion + + #region Mutate + + private void OnMutateSpell(MutateSpellEvent msg) + { + if (!CanCast(msg)) + return; + + var config = new PolymorphConfiguration + { + Entity = "MobHulk", + Duration = 30, + Forced = true, + TransferDamage = true + }; + + _polymorph.PolymorphEntity(msg.Performer, config); + + Cast(msg); + } + + + #endregion + + #region Helpers private void TurnOffShield(EntityUid uid) diff --git a/Content.Shared/_White/Wizard/WizardEvents.cs b/Content.Shared/_White/Wizard/WizardEvents.cs index aee755f6a8..1627b7ec42 100644 --- a/Content.Shared/_White/Wizard/WizardEvents.cs +++ b/Content.Shared/_White/Wizard/WizardEvents.cs @@ -202,4 +202,22 @@ public sealed partial class ArcaneBarrageSpellEvent : InstantActionEvent, ISpeak public string? Speech { get; private set; } } +public sealed partial class RodFormSpellEvent : InstantActionEvent, ISpeakSpell +{ + [DataField("speech")] + public string? Speech { get; private set; } +} + +public sealed partial class BlindSpellEvent : InstantActionEvent, ISpeakSpell +{ + [DataField("speech")] + public string? Speech { get; private set; } +} + +public sealed partial class MutateSpellEvent : InstantActionEvent, ISpeakSpell +{ + [DataField("speech")] + public string? Speech { get; private set; } +} + #endregion diff --git a/Resources/Audio/Effects/hulk_attack.ogg b/Resources/Audio/Effects/hulk_attack.ogg new file mode 100644 index 0000000000..dd55065e4b Binary files /dev/null and b/Resources/Audio/Effects/hulk_attack.ogg differ diff --git a/Resources/Audio/Effects/hulk_step.ogg b/Resources/Audio/Effects/hulk_step.ogg new file mode 100644 index 0000000000..f54c544f73 Binary files /dev/null and b/Resources/Audio/Effects/hulk_step.ogg differ diff --git a/Resources/Locale/ru-RU/_white/wizard/scrolls.ftl b/Resources/Locale/ru-RU/_white/wizard/scrolls.ftl index 5845ad0088..755707ce8f 100644 --- a/Resources/Locale/ru-RU/_white/wizard/scrolls.ftl +++ b/Resources/Locale/ru-RU/_white/wizard/scrolls.ftl @@ -19,6 +19,9 @@ scroll-component-smite = кару scroll-component-mindswap = подмену сознания scroll-component-timestop = остановку времени scroll-component-barrage = магический залп +scroll-component-rodform = форму стержня +scroll-component-blind = ослепление +scroll-component-mutate = мутацию ent-BaseScroll = магический свиток .desc = Этот древний пергамент, ставший реликвией в арканных преданиях, хранит в себе бесчисленные мистические заклятия и забытые заклинания. @@ -58,3 +61,7 @@ ent-ScrollTimestop = свиток остановки времени .desc = { ent-BaseScroll.desc } ent-ScrollArcaneBarrage = свиток магического залпа .desc = { ent-BaseScroll.desc } +ent-ScrollRodForm = свиток формы стержня + .desc = { ent-BaseScroll.desc } +ent-ScrollBlind = свиток ослепления + .desc = { ent-BaseScroll.desc } diff --git a/Resources/Locale/ru-RU/_white/wizard/spellbook.ftl b/Resources/Locale/ru-RU/_white/wizard/spellbook.ftl index 45e09dcc68..212fcd1d6a 100644 --- a/Resources/Locale/ru-RU/_white/wizard/spellbook.ftl +++ b/Resources/Locale/ru-RU/_white/wizard/spellbook.ftl @@ -49,6 +49,15 @@ spellbook-timestop-desc = { ent-ActionTimestopSpell.desc } spellbook-barrage-name = { ent-ActionArcaneBarrageSpell } spellbook-barrage-desc = { ent-ActionArcaneBarrageSpell.desc } +spellbook-rod-name = {ent-ActionRodFormSpell} +spellbook-rod-desc = {ent-ActionRodFormSpell.desc} + +spellbook-blind-name = {ent-ActionBlindSpell} +spellbook-blind-desc = {ent-ActionBlindSpell.desc} + +spellbook-mutate-name = {ent-ActionMutateSpell} +spellbook-mutate-desc = {ent-ActionMutateSpell.desc} + spellbook-hardsuit-name = Скафандр волшебника spellbook-hardsuit-desc = Украшенный магическими драгоценными камнями скафандр, функционирующий так же, как и обычная мантия волшебника, но в то же время является пригодным для использования в космосе и бронированным. Небольшое замедление. Теперь вы можете произносить заклинания в космосе и местах с низкой температурой! Имеет функцию энергетического щита,который защищает от всех снарядов. Щит разряжается при получении урона и автоматически заряжается. diff --git a/Resources/Locale/ru-RU/_white/wizard/spells.ftl b/Resources/Locale/ru-RU/_white/wizard/spells.ftl index bba48bccdc..72aca1438f 100644 --- a/Resources/Locale/ru-RU/_white/wizard/spells.ftl +++ b/Resources/Locale/ru-RU/_white/wizard/spells.ftl @@ -51,3 +51,12 @@ ent-ActionTimestopSpell = Остановка времени ent-ActionArcaneBarrageSpell = Магический залп .desc = Выстрелите потоком магической энергии в ваших врагов с помощью этого мощного заклинания. Для использования требуются обе свободные руки. Не работает без волшебной мантии и шляпы. + +ent-ActionRodFormSpell = Форма стержня + .desc = Превращает вас в неостановимый стержень, который разрушает все на своем пути и наносит тяжёлые повреждения любым живым существам. Будьте осторожны с ипользованием, вы не сможете поменять направление движения до окончания заклинания. + +ent-ActionBlindSpell = Ослепление + .desc = Ослепляет всех живых существ в небольшом радиусе от вас. Не действует на других магов. + +ent-ActionMutateSpell = Мутация + .desc = Ненадолго преврашает вас в халка, который может стрелять лазерами из глаз. diff --git a/Resources/Prototypes/Magic/white.yml b/Resources/Prototypes/Magic/white.yml index 59f4b17ebb..0144117b52 100644 --- a/Resources/Prototypes/Magic/white.yml +++ b/Resources/Prototypes/Magic/white.yml @@ -383,3 +383,54 @@ state: arcane_barrage event: !type:ArcaneBarrageSpellEvent prototype: ArcaneBarrage + +- type: entity + id: ActionRodFormSpell + name: Rod Form + noSpawn: true + components: + - type: Magic + requiresClothes: true + - type: InstantAction + useDelay: 60 + itemIconStyle: BigAction + checkCanInteract: false + icon: + sprite: Objects/Magic/magicactions.rsi + state: rod_form + event: !type:RodFormSpellEvent + speech: "CLANG!" + +- type: entity + id: ActionBlindSpell + name: Blind + noSpawn: true + components: + - type: Magic + requiresClothes: true + - type: InstantAction + useDelay: 30 + itemIconStyle: BigAction + checkCanInteract: false + icon: + sprite: Objects/Magic/magicactions.rsi + state: blind + event: !type:BlindSpellEvent + speech: "STI KALY!" + +- type: entity + id: ActionMutateSpell + name: Mutate + noSpawn: true + components: + - type: Magic + requiresClothes: true + - type: InstantAction + useDelay: 120 + itemIconStyle: BigAction + checkCanInteract: false + icon: + sprite: Objects/Magic/magicactions.rsi + state: mutate + event: !type:MutateSpellEvent + speech: "BIRUZ BENNAR!!" diff --git a/Resources/Prototypes/_White/Entities/Mobs/Animal/mobs.yml b/Resources/Prototypes/_White/Entities/Mobs/Animal/mobs.yml index 53ec558d27..2da6687b4b 100644 --- a/Resources/Prototypes/_White/Entities/Mobs/Animal/mobs.yml +++ b/Resources/Prototypes/_White/Entities/Mobs/Animal/mobs.yml @@ -7,3 +7,74 @@ - type: NpcFactionMember factions: - Changeling + +- type: entity + name: Hulk + id: MobHulk + parent: SimpleSpaceMobBase + description: Green + components: + - type: NpcFactionMember + factions: + - Wizard + - type: Speech + speechVerb: LargeMob + - type: Sprite + drawdepth: Mobs + sprite: White/Mobs/Aliens/hulk.rsi + state: hulk + noRot: true + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeCircle + radius: 0.45 + density: 100 + mask: + - MobMask + layer: + - MobLayer + - type: MobThresholds + thresholds: + 0: Alive + 350: Dead + - type: MovementSpeedModifier + baseWalkSpeed: 2 + baseSprintSpeed: 5 + - type: Tag + tags: + - FootstepSound + - type: ProjectileBatteryAmmoProvider + proto: BulletTrailLaserLight + fireCost: 50 + - type: BatterySelfRecharger + autoRecharge: true + autoRechargeRate: 50 + - type: Battery + maxCharge: 1000 + startingCharge: 1000 + - type: Gun + projectileSpeed: 48 + fireRate: 1 + ShotsPerBurst: 2 + useKey: false + selectedMode: Burst + availableModes: + - Burst + soundGunshot: /Audio/Weapons/Guns/Gunshots/laser_cannon.ogg + - type: CombatMode + - type: MeleeWeapon + angle: 0 + animation: WeaponArcSmash + soundHit: + path: /Audio/Effects/hulk_attack.ogg + soundNoDamage: + path: /Audio/Effects/hulk_attack.ogg + damage: + types: + Blunt: 40 + Structural: 40 + - type: FootstepModifier + footstepSoundCollection: + path: /Audio/Effects/hulk_step.ogg diff --git a/Resources/Prototypes/_White/Objects/Scrolls/scrolls.yml b/Resources/Prototypes/_White/Objects/Scrolls/scrolls.yml index 2acf9f759d..4744c1a23b 100644 --- a/Resources/Prototypes/_White/Objects/Scrolls/scrolls.yml +++ b/Resources/Prototypes/_White/Objects/Scrolls/scrolls.yml @@ -178,3 +178,30 @@ - type: Scroll actionId: ActionArcaneBarrageSpell learnPopup: scroll-component-barrage + +- type: entity + id: ScrollRodForm + parent: BaseScroll + name: "Rod form scroll" + components: + - type: Scroll + actionId: ActionRodFormSpell + learnPopup: scroll-component-rodform + +- type: entity + id: ScrollBlind + parent: BaseScroll + name: "Blind scroll" + components: + - type: Scroll + actionId: ActionBlindSpell + learnPopup: scroll-component-blind + +- type: entity + id: ScrollMutate + parent: BaseScroll + name: "Mutate scroll" + components: + - type: Scroll + actionId: ActionMutateSpell + learnPopup: scroll-component-mutate diff --git a/Resources/Prototypes/_White/Wizard/spellbook_catalog.yml b/Resources/Prototypes/_White/Wizard/spellbook_catalog.yml index 590c75e38d..6ca825b0fc 100644 --- a/Resources/Prototypes/_White/Wizard/spellbook_catalog.yml +++ b/Resources/Prototypes/_White/Wizard/spellbook_catalog.yml @@ -321,3 +321,51 @@ conditions: - !type:ListingLimitedStockCondition stock: 1 + +- type: listing + id: SpellBookRodForm + name: spellbook-rod-name + description: spellbook-rod-desc + productEntity: ScrollRodForm + icon: + sprite: Objects/Magic/magicactions.rsi + state: rod_form + cost: + SpellPoint: 4 + categories: + - UtilitySpells + conditions: + - !type:ListingLimitedStockCondition + stock: 1 + +- type: listing + id: SpellBookBlind + name: spellbook-blind-name + description: spellbook-blind-desc + productEntity: ScrollBlind + icon: + sprite: Objects/Magic/magicactions.rsi + state: blind + cost: + SpellPoint: 1 + categories: + - UtilitySpells + conditions: + - !type:ListingLimitedStockCondition + stock: 1 + +- type: listing + id: SpellBookMutate + name: spellbook-mutate-name + description: spellbook-mutate-desc + productEntity: ScrollMutate + icon: + sprite: Objects/Magic/magicactions.rsi + state: mutate + cost: + SpellPoint: 3 + categories: + - AttackSpells + conditions: + - !type:ListingLimitedStockCondition + stock: 1 diff --git a/Resources/Textures/Objects/Magic/magicactions.rsi/blind.png b/Resources/Textures/Objects/Magic/magicactions.rsi/blind.png new file mode 100644 index 0000000000..613be8efa9 Binary files /dev/null and b/Resources/Textures/Objects/Magic/magicactions.rsi/blind.png differ diff --git a/Resources/Textures/Objects/Magic/magicactions.rsi/meta.json b/Resources/Textures/Objects/Magic/magicactions.rsi/meta.json index c651117d7d..b445693376 100644 --- a/Resources/Textures/Objects/Magic/magicactions.rsi/meta.json +++ b/Resources/Textures/Objects/Magic/magicactions.rsi/meta.json @@ -66,6 +66,15 @@ }, { "name": "arcane_barrage" + }, + { + "name": "rod_form" + }, + { + "name": "blind" + }, + { + "name": "mutate" } ] } diff --git a/Resources/Textures/Objects/Magic/magicactions.rsi/mutate.png b/Resources/Textures/Objects/Magic/magicactions.rsi/mutate.png new file mode 100644 index 0000000000..5b6e778ae4 Binary files /dev/null and b/Resources/Textures/Objects/Magic/magicactions.rsi/mutate.png differ diff --git a/Resources/Textures/Objects/Magic/magicactions.rsi/rod_form.png b/Resources/Textures/Objects/Magic/magicactions.rsi/rod_form.png new file mode 100644 index 0000000000..f35f3b7135 Binary files /dev/null and b/Resources/Textures/Objects/Magic/magicactions.rsi/rod_form.png differ diff --git a/Resources/Textures/White/Mobs/Aliens/hulk.rsi/hulk.png b/Resources/Textures/White/Mobs/Aliens/hulk.rsi/hulk.png new file mode 100644 index 0000000000..40f98927a3 Binary files /dev/null and b/Resources/Textures/White/Mobs/Aliens/hulk.rsi/hulk.png differ diff --git a/Resources/Textures/White/Mobs/Aliens/hulk.rsi/meta.json b/Resources/Textures/White/Mobs/Aliens/hulk.rsi/meta.json new file mode 100644 index 0000000000..7b55252f7a --- /dev/null +++ b/Resources/Textures/White/Mobs/Aliens/hulk.rsi/meta.json @@ -0,0 +1,15 @@ +{ + "version": 1, + "license": null, + "copyright": null, + "size": { + "x": 31, + "y": 44 + }, + "states": [ + { + "name": "hulk", + "directions": 4 + } + ] +} \ No newline at end of file