]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Wizard Touch Spells (Smite, Cluwne's Curse, Slippery Slope) (#34531)
authorkeronshb <54602815+keronshb@users.noreply.github.com>
Sun, 2 Feb 2025 19:23:41 +0000 (14:23 -0500)
committerGitHub <noreply@github.com>
Sun, 2 Feb 2025 19:23:41 +0000 (20:23 +0100)
* Renames Smite Spells yml to Touch Spells and Renames Smite Spells region to the same

* Adds wizard clothes requirement to Smite. Adds Cluwne spell. Adds EnsureCompOnTouchSpellEvent and implements it in the magicsystem

* Adds Smite and Cluwne to the grimore and loc for them

* Adds Slippery Slope spell and SlipOnCollide

* Adds handled for comp spell event

* Removes super slippery

* Removes EnsureCompOnTouchSpell it was redundant with ChangeComponentsSpellEvent

* Makes requirement-free action for smite

* checks if we should be slipping what we touch

* Removes SlipOnCollide, adds negative speed for steptrigger

* Removes slip on collide adds negative speed for steptrigger

Content.Shared/Magic/SharedMagicSystem.cs
Content.Shared/Slippery/SlipperySystem.cs
Resources/Locale/en-US/magic/spells-actions.ftl
Resources/Locale/en-US/store/spellbook-catalog.ftl
Resources/Prototypes/Catalog/spellbook_catalog.yml
Resources/Prototypes/Entities/Mobs/NPCs/space.yml
Resources/Prototypes/Entities/Objects/Magic/books.yml
Resources/Prototypes/Magic/smite_spells.yml [deleted file]
Resources/Prototypes/Magic/touch_spells.yml [new file with mode: 0644]

index fe033f24987993e2da2d97b37f0f0a4225461956..878c4bdca4f6b638644ca0b8e4cdc9db4c4230c7 100644 (file)
@@ -7,7 +7,6 @@ using Content.Shared.Doors.Components;
 using Content.Shared.Doors.Systems;
 using Content.Shared.Hands.Components;
 using Content.Shared.Hands.EntitySystems;
-using Content.Shared.Humanoid;
 using Content.Shared.Interaction;
 using Content.Shared.Inventory;
 using Content.Shared.Lock;
@@ -15,9 +14,6 @@ using Content.Shared.Magic.Components;
 using Content.Shared.Magic.Events;
 using Content.Shared.Maps;
 using Content.Shared.Mind;
-using Content.Shared.Mind.Components;
-using Content.Shared.Mobs.Components;
-using Content.Shared.Mobs.Systems;
 using Content.Shared.Physics;
 using Content.Shared.Popups;
 using Content.Shared.Speech.Muting;
@@ -37,6 +33,10 @@ using Robust.Shared.Spawners;
 
 namespace Content.Shared.Magic;
 
+// TODO: Move BeforeCast & Prerequirements (like Wizard clothes) to action comp
+//   Alt idea - make it its own comp and split, like the Charge PR
+// TODO: Move speech to actionComp or again, its own ECS
+// TODO: Use the MagicComp just for pure backend things like spawning patterns?
 /// <summary>
 /// Handles learning and using spells (actions)
 /// </summary>
@@ -60,7 +60,6 @@ public abstract class SharedMagicSystem : EntitySystem
     [Dependency] private readonly LockSystem _lock = default!;
     [Dependency] private readonly SharedHandsSystem _hands = default!;
     [Dependency] private readonly TagSystem _tag = default!;
-    [Dependency] private readonly MobStateSystem _mobState = default!;
     [Dependency] private readonly SharedAudioSystem _audio = default!;
     [Dependency] private readonly SharedMindSystem _mind = default!;
     [Dependency] private readonly SharedStunSystem _stun = default!;
@@ -81,79 +80,6 @@ public abstract class SharedMagicSystem : EntitySystem
         SubscribeLocalEvent<RandomGlobalSpawnSpellEvent>(OnRandomGlobalSpawnSpell);
         SubscribeLocalEvent<MindSwapSpellEvent>(OnMindSwapSpell);
         SubscribeLocalEvent<VoidApplauseSpellEvent>(OnVoidApplause);
-
-        // Spell wishlist
-        //  A wishlish of spells that I'd like to implement or planning on implementing in a future PR
-
-        // TODO: InstantDoAfterSpell and WorldDoafterSpell
-        //  Both would be an action that take in an event, that passes an event to trigger once the doafter is done
-        //  This would be three events:
-        //    1 - Event that triggers from the action that starts the doafter
-        //    2 - The doafter event itself, which passes the event with it
-        //    3 - The event to trigger once the do-after finishes
-
-        // TODO: Inanimate objects to life ECS
-        //  AI sentience
-
-        // TODO: Flesh2Stone
-        //   Entity Target spell
-        //   Synergy with Inanimate object to life (detects player and allows player to move around)
-
-        // TODO: Lightning Spell
-        // Should just fire lightning, try to prevent arc back to caster
-
-        // TODO: Magic Missile (homing projectile ecs)
-        //   Instant action, target any player (except self) on screen
-
-        // TODO: Random projectile ECS for magic-carp, wand of magic
-
-        // TODO: Recall Spell
-        //  mark any item in hand to recall
-        //    ItemRecallComponent
-        //    Event adds the component if it doesn't exist and the performer isn't stored in the comp
-        //    2nd firing of the event checks to see if the recall comp has this uid, and if it does it calls it
-        //  if no free hands, summon at feet
-        //  if item deleted, clear stored item
-
-        // TODO: Jaunt (should be its own ECS)
-        // Instant action
-        //   When clicked, disappear/reappear (goes to paused map)
-        //   option to restrict to tiles
-        //   option for requiring entry/exit (blood jaunt)
-        //   speed option
-
-        // TODO: Summon Events
-        //  List of wizard events to add into the event pool that frequently activate
-        //  floor is lava
-        //  change places
-        //  ECS that when triggered, will periodically trigger a random GameRule
-        //  Would need a controller/controller entity?
-
-        // TODO: Summon Guns
-        //  Summon a random gun at peoples feet
-        //    Get every alive player (not in cryo, not a simplemob)
-        //  TODO: After Antag Rework - Rare chance of giving gun collector status to people
-
-        // TODO: Summon Magic
-        //  Summon a random magic wand at peoples feet
-        //    Get every alive player (not in cryo, not a simplemob)
-        //  TODO: After Antag Rework - Rare chance of giving magic collector status to people
-
-        // TODO: Bottle of Blood
-        //  Summons Slaughter Demon
-        //  TODO: Slaughter Demon
-        //    Also see Jaunt
-
-        // TODO: Field Spells
-        //  Should be able to specify a grid of tiles (3x3 for example) that it effects
-        //  Timed despawn - so it doesn't last forever
-        //  Ignore caster - for spells that shouldn't effect the caster (ie if timestop should effect the caster)
-
-        // TODO: Touch toggle spell
-        //  1 - When toggled on, show in hand
-        //  2 - Block hand when toggled on
-        //      - Require free hand
-        //  3 - use spell event when toggled & click
     }
 
     private void OnBeforeCastSpell(Entity<MagicComponent> ent, ref BeforeCastSpellEvent args)
@@ -446,7 +372,7 @@ public abstract class SharedMagicSystem : EntitySystem
     }
     // End Spell Helpers
     #endregion
-    #region Smite Spells
+    #region Touch Spells
     private void OnSmiteSpell(SmiteSpellEvent ev)
     {
         if (ev.Handled || !PassesSpellPrerequisites(ev.Action, ev.Performer))
@@ -465,7 +391,8 @@ public abstract class SharedMagicSystem : EntitySystem
 
         _body.GibBody(ev.Target, true, body);
     }
-    // End Smite Spells
+
+    // End Touch Spells
     #endregion
     #region Knock Spells
     /// <summary>
index 19cc19aa19c3b4a0cd104edeab1d22b1a4126468..acf120ad1ba206f255c9ca762b5fd0c451564b63 100644 (file)
@@ -19,7 +19,7 @@ using Robust.Shared.Utility;
 
 namespace Content.Shared.Slippery;
 
-[UsedImplicitly] 
+[UsedImplicitly]
 public sealed class SlipperySystem : EntitySystem
 {
     [Dependency] private readonly ISharedAdminLogManager _adminLogger = default!;
@@ -83,7 +83,7 @@ public sealed class SlipperySystem : EntitySystem
     {
         if (HasComp<SpeedModifiedByContactComponent>(args.OtherEntity))
             _speedModifier.AddModifiedEntity(args.OtherEntity);
-    } 
+    }
 
     private bool CanSlip(EntityUid uid, EntityUid toSlip)
     {
index faf5d7743696133185c169dc4218575e4f0e7d59..22160180189a9e51403043503573c6971d9d3640 100644 (file)
@@ -6,3 +6,5 @@ action-speech-spell-fireball = ONI'SOMA!
 action-speech-spell-summon-guns = YOR'NEE VES-KORFA
 action-speech-spell-summon-magic = RYGOIN FEMA-VERECO
 action-speech-spell-mind-swap = GIN'YU CAPAN!
+action-speech-spell-cluwne = !KNOH
+action-speech-spell-slip = SLEE PARRI!
index 98d19817c6754cdb154787e66fda551eda5e357e..b18cac4f9a70bd3e7ce148a62bcd317d596a2e05 100644 (file)
@@ -1,6 +1,6 @@
 # Spells
 spellbook-fireball-name = Fireball
-spellbook-fireball-desc = Get most crew exploding with rage when they see this fireball heading toward them!
+spellbook-fireball-desc = Get most crew exploding with rage when they see this fireball heading toward them! Upgradeable.
 
 spellbook-blink-name = Blink
 spellbook-blink-desc = Don't blink or you'll miss yourself teleporting away.
@@ -26,6 +26,15 @@ spellbook-ethereal-jaunt-description = Slip into the ethereal plane to slip away
 spellbook-mind-swap-name = Mind Swap
 spellbook-mind-swap-description = Exchange bodies with another person!
 
+spellbook-smite-name = Smite
+spellbook-smite-desc = Don't like them? EXPLODE them into giblets! Requires Wizard Robe & Hat.
+
+spellbook-cluwne-name = Cluwne's Curse
+spellbook-cluwne-desc = For when you really hate someone and Smite isn't enough. Requires Wizard Robe & Hat.
+
+spellbook-slip-name = Slippery Slope
+spellbook-slip-desc = Learn the ancient ways of the Janitor and curse your target to be slippery. Requires Wizard Robe & Hat.
+
 # Equipment
 
 spellbook-wand-polymorph-door-name = Wand of Entrance
index 3246117e71864b6d9e2476c1835c16d52bab4bb6..dfd171d9b277e0bd499fae8c850ff5d1420e5cd3 100644 (file)
   - !type:ListingLimitedStockCondition
     stock: 1
 
+- type: listing
+  id: SpellbookSmite
+  name: spellbook-smite-name
+  description: spellbook-smite-desc
+  productAction: ActionSmite
+  cost:
+    WizCoin: 3
+  categories:
+  - SpellbookOffensive
+  conditions:
+  - !type:ListingLimitedStockCondition
+    stock: 1
+
+- type: listing
+  id: SpellbookCluwne
+  name: spellbook-cluwne-name
+  description: spellbook-cluwne-desc
+  productAction: ActionCluwne
+  cost:
+    WizCoin: 3
+  categories:
+  - SpellbookOffensive
+  conditions:
+  - !type:ListingLimitedStockCondition
+    stock: 1
+
+- type: listing
+  id: SpellbookSlip
+  name: spellbook-slip-name
+  description: spellbook-slip-desc
+  productAction: ActionSlippery
+  cost:
+    WizCoin: 2
+  categories:
+  - SpellbookOffensive
+  conditions:
+  - !type:ListingLimitedStockCondition
+    stock: 1
+
 # Defensive
 - type: listing
   id: SpellbookForceWall
index 6cc13a00f223883db0553983fd58effa71525362..6f6fa6afb3d539fc10dcec5082124f586e181821 100644 (file)
   - type: MobStateActions
     actions:
       Alive:
-      - ActionSmite
+      - ActionSmiteNoReq
       Critical:
       - ActionCritSuccumb
       - ActionCritFakeDeath
index e47fa00c45bf5aabea01e825d49495a7ac1dfe63..d000f784290bb170c27f2f20ad59c2761e6a0b96 100644 (file)
       - state: overlay_blood
     - type: Spellbook
       spellActions:
-        ActionSmite: -1
+        ActionSmiteNoReq: -1
 
 - type: entity
   id: KnockSpellbook
diff --git a/Resources/Prototypes/Magic/smite_spells.yml b/Resources/Prototypes/Magic/smite_spells.yml
deleted file mode 100644 (file)
index 10f5bdd..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-- type: entity
-  id: ActionSmite
-  name: Smite
-  description: Instantly gibs a target.
-  components:
-  - type: EntityTargetAction
-    useDelay: 60
-    itemIconStyle: BigAction
-    whitelist:
-      components:
-      - Body
-    canTargetSelf: false
-    interactOnMiss: false
-    sound: !type:SoundPathSpecifier
-      path: /Audio/Magic/disintegrate.ogg
-    icon:
-      sprite: Objects/Magic/magicactions.rsi
-      state: gib
-    event: !type:SmiteSpellEvent
-      speech: action-speech-spell-smite
diff --git a/Resources/Prototypes/Magic/touch_spells.yml b/Resources/Prototypes/Magic/touch_spells.yml
new file mode 100644 (file)
index 0000000..deb036f
--- /dev/null
@@ -0,0 +1,83 @@
+- type: entity
+  id: ActionSmite
+  name: Smite
+  description: Instantly gibs a target.
+  components:
+  - type: EntityTargetAction
+    useDelay: 90
+    itemIconStyle: BigAction
+    whitelist:
+      components:
+      - Body
+    canTargetSelf: false
+    interactOnMiss: false
+    sound: !type:SoundPathSpecifier
+      path: /Audio/Magic/disintegrate.ogg
+    icon:
+      sprite: Objects/Magic/magicactions.rsi
+      state: gib
+    event: !type:SmiteSpellEvent
+      speech: action-speech-spell-smite
+  - type: Magic
+    requiresClothes: true
+
+# For the Snail
+- type: entity
+  id: ActionSmiteNoReq
+  parent: ActionSmite
+  name: Smite
+  description: Instantly gibs a target.
+  components:
+  - type: Magic
+
+- type: entity
+  id: ActionCluwne
+  name: Cluwne's Curse
+  description: Turns someone into a Cluwne!
+  components:
+  - type: EntityTargetAction
+    useDelay: 120
+    itemIconStyle: BigAction
+    whitelist:
+      components:
+      - Body
+    canTargetSelf: false
+    interactOnMiss: false
+    sound: !type:SoundPathSpecifier
+      path: /Audio/Items/brokenbikehorn.ogg
+    icon:
+      sprite: Clothing/Mask/cluwne.rsi
+      state: icon
+    event: !type:ChangeComponentsSpellEvent
+      speech: action-speech-spell-cluwne
+      toAdd:
+      - type: Cluwne
+  - type: Magic
+    requiresClothes: true
+
+- type: entity
+  id: ActionSlippery
+  name: Slippery Slope
+  description: Make someone slippery.
+  components:
+  - type: EntityTargetAction
+    useDelay: 60
+    itemIconStyle: BigAction
+    whitelist:
+      components:
+      - Body
+    canTargetSelf: false
+    interactOnMiss: false
+    sound: !type:SoundPathSpecifier
+      path: /Audio/Effects/slip.ogg
+    icon:
+      sprite: Objects/Specific/Janitorial/soap.rsi
+      state: omega-4
+    event: !type:ChangeComponentsSpellEvent
+      speech: action-speech-spell-slip
+      toAdd:
+      - type: Slippery
+      - type: StepTrigger
+        requiredTriggeredSpeed: -1
+  - type: Magic
+    requiresClothes: true