* rod form spell

* blind spell

* mutate spell
This commit is contained in:
RinKeeper
2024-08-09 22:10:42 +03:00
committed by GitHub
parent 06f3d92a6f
commit 3acbcaf41e
17 changed files with 354 additions and 0 deletions

View File

@@ -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<FireballSpellEvent>(OnFireballSpell);
SubscribeLocalEvent<ForceSpellEvent>(OnForceSpell);
SubscribeLocalEvent<ArcSpellEvent>(OnArcSpell);
SubscribeLocalEvent<RodFormSpellEvent>(OnRodFormSpell);
SubscribeLocalEvent<BlindSpellEvent>(OnBlindSpell);
SubscribeAllEvent<MutateSpellEvent>(OnMutateSpell);
SubscribeLocalEvent<MagicComponent, BeforeCastSpellEvent>(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<InputMoverComponent>(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<WizardComponent>();
var humanoidQuery = GetEntityQuery<HumanoidAppearanceComponent>();
if (!humanoidQuery.HasComponent(e) || !_mobState.IsAlive(e) ||
wizardQuery.HasComponent(e))
continue;
_statusEffectsSystem.TryAddStatusEffect<TemporaryBlindnessComponent>(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)

View File

@@ -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

Binary file not shown.

Binary file not shown.

View File

@@ -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 }

View File

@@ -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 = Украшенный магическими драгоценными камнями скафандр, функционирующий так же, как и обычная мантия волшебника, но в то же время является пригодным для использования в космосе и бронированным. Небольшое замедление. Теперь вы можете произносить заклинания в космосе и местах с низкой температурой! Имеет функцию энергетического щита,который защищает от всех снарядов. Щит разряжается при получении урона и автоматически заряжается.

View File

@@ -51,3 +51,12 @@ ent-ActionTimestopSpell = Остановка времени
ent-ActionArcaneBarrageSpell = Магический залп
.desc = Выстрелите потоком магической энергии в ваших врагов с помощью этого мощного заклинания. Для использования требуются обе свободные руки. Не работает без волшебной мантии и шляпы.
ent-ActionRodFormSpell = Форма стержня
.desc = Превращает вас в неостановимый стержень, который разрушает все на своем пути и наносит тяжёлые повреждения любым живым существам. Будьте осторожны с ипользованием, вы не сможете поменять направление движения до окончания заклинания.
ent-ActionBlindSpell = Ослепление
.desc = Ослепляет всех живых существ в небольшом радиусе от вас. Не действует на других магов.
ent-ActionMutateSpell = Мутация
.desc = Ненадолго преврашает вас в халка, который может стрелять лазерами из глаз.

View File

@@ -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!!"

View File

@@ -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

View File

@@ -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

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 B

View File

@@ -66,6 +66,15 @@
},
{
"name": "arcane_barrage"
},
{
"name": "rod_form"
},
{
"name": "blind"
},
{
"name": "mutate"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@@ -0,0 +1,15 @@
{
"version": 1,
"license": null,
"copyright": null,
"size": {
"x": 31,
"y": 44
},
"states": [
{
"name": "hulk",
"directions": 4
}
]
}