Skip to content

Commit

Permalink
Bug Fixes
Browse files Browse the repository at this point in the history
- Factions are now enabled if VvV is disabled, and vice versa
- Removed smart spawning from spawners on build world
- Riding swipe now works properly
- Infused Throw now works properly
- Scrolls removed from special scroll books no longer stay locked down
- Added Crystal Teleporter, derives from new ClickTeleporter, which derives from the Teleporter class.
- Added Crystal teleporter/spawner in Sorcerer's Dungeon for create world. Existing shards need to manually add these.
- Arcane empowerment now shows sdi bonus on status bar
- Insane dryad should no longer attack eachother
- WIldfire no longer follows the target around
-
  • Loading branch information
kevin-10 committed Feb 6, 2018
1 parent 3b7ac19 commit f7117d4
Show file tree
Hide file tree
Showing 34 changed files with 7,109 additions and 6,924 deletions.
5 changes: 3 additions & 2 deletions Config/Factions.cfg
Expand Up @@ -2,5 +2,6 @@
# Moonglow Island will be used instead of the old location in the Magincia
# Parlament Building.
NewCoMLocation=True
Enabled=False
# New VvV Systems replaces factions

# New VvV Systems replaces factions. If VvV is enabled, Factions are disabled, and vice versa.
# If you want to disable both, you need to find Enabled field in Factions.cs and mark it false
2 changes: 2 additions & 0 deletions Config/VvV.cfg
Expand Up @@ -2,3 +2,5 @@

Enabled=True
StartSilver=2000

# Enabling VvV disabled factions, and vice versa
7 changes: 6 additions & 1 deletion Data/Decoration/Ilshenar/_sorcerers.cfg
Expand Up @@ -107,10 +107,15 @@ Static 0x0753 (Hue=0x835)
Static 0x1F19
279 6 -22
279 34 -22
248 70 -22
249 70 -22
250 70 -22

CrystalTeleporter 0x1F19 (PointDest=(236, 113, -28); MapDestination=Ilshenar)
248 70 -22

Teleporter 0x1BC3 (PointDest=(248, 71, -28); MapDestination=Ilshenar)
236 113 -28

# stone stairs
Static 0x0753 (Hue=0x848)
273 141 -18
Expand Down
1 change: 0 additions & 1 deletion Data/teleporters.csv
Expand Up @@ -831,7 +831,6 @@
155,88,-16,Ilshenar,357,40,-31,Ilshenar,False
155,89,-16,Ilshenar,357,41,-31,Ilshenar,False
155,90,-16,Ilshenar,357,42,-31,Ilshenar,False
259,90,-28,Ilshenar,236,113,-28,Ilshenar,True
938,494,-40,Ilshenar,83,749,-23,Ilshenar,True
939,494,-40,Ilshenar,84,749,-23,Ilshenar,True
940,494,-40,Ilshenar,85,749,-23,Ilshenar,True
Expand Down
32 changes: 25 additions & 7 deletions Scripts/Abilities/Dismount.cs
Expand Up @@ -46,7 +46,7 @@ public override void OnHit(Mobile attacker, Mobile defender, int damage)
if (defender is ChaosDragoon || defender is ChaosDragoonElite)
return;

if ((attacker.Mounted || attacker.Flying) && (!(attacker.Weapon is Lance) && !(defender.Weapon is Lance) && !(attacker.Weapon is GargishLance) && !(defender.Weapon is GargishLance))) // TODO: Should there be a message here?
if (CheckMountedNoLance(attacker, defender)) // TODO: Should there be a message here?
return;

ClearCurrentAbility(attacker);
Expand All @@ -69,13 +69,23 @@ public override void OnHit(Mobile attacker, Mobile defender, int damage)
return; //Lesser Hiryu have an 80% chance of missing this attack
}

attacker.SendLocalizedMessage(1060082); // The force of your attack has dislodged them from their mount!

defender.PlaySound(0x140);
defender.FixedParticles(0x3728, 10, 15, 9955, EffectLayer.Waist);

int delay = Core.TOL && attacker.Weapon is BaseRanged ? 8 : 10;

DoDismount(attacker, defender, mount, delay, false);

if (!attacker.Mounted)
{
AOS.Damage(defender, attacker, Utility.RandomMinMax(15, 25), 100, 0, 0, 0, 0);
}
}

public static void DoDismount(Mobile attacker, Mobile defender, IMount mount, int delay, bool ridingSwipe)
{
attacker.SendLocalizedMessage(1060082); // The force of your attack has dislodged them from their mount!

if (defender is PlayerMobile)
{
if (Core.ML && Server.Spells.Ninjitsu.AnimalForm.UnderTransformation(defender))
Expand All @@ -91,7 +101,7 @@ public override void OnHit(Mobile attacker, Mobile defender, int damage)
defender.SendLocalizedMessage(1060083); // You fall off of your mount and take damage!
}

((PlayerMobile)defender).SetMountBlock(BlockMountType.Dazed, TimeSpan.FromSeconds(delay), true);
((PlayerMobile)defender).SetMountBlock(ridingSwipe ? BlockMountType.RidingSwipe : BlockMountType.Dazed, TimeSpan.FromSeconds(delay), true);
}
else if (mount != null)
{
Expand All @@ -100,7 +110,7 @@ public override void OnHit(Mobile attacker, Mobile defender, int damage)

if (attacker is PlayerMobile)
{
((PlayerMobile)attacker).SetMountBlock(BlockMountType.DismountRecovery, TimeSpan.FromSeconds(delay), false);
((PlayerMobile)attacker).SetMountBlock(BlockMountType.DismountRecovery, TimeSpan.FromSeconds(Core.TOL && attacker.Weapon is BaseRanged ? 8 : 10), false);
}
else if (Core.ML && attacker is BaseCreature)
{
Expand All @@ -113,11 +123,19 @@ public override void OnHit(Mobile attacker, Mobile defender, int damage)
pm.SetMountBlock(BlockMountType.DismountRecovery, TimeSpan.FromSeconds(delay), false);
}
}
}

if (!attacker.Mounted)
private bool CheckMountedNoLance(Mobile attacker, Mobile defender)
{
if (!attacker.Mounted && !attacker.Flying)
return false;

if ((attacker.Weapon is Lance || attacker.Weapon is GargishLance) && (defender.Weapon is Lance || defender.Weapon is GargishLance))
{
AOS.Damage(defender, attacker, Utility.RandomMinMax(15, 25), 100, 0, 0, 0, 0);
return false;
}

return true;
}
}
}
62 changes: 11 additions & 51 deletions Scripts/Abilities/InfusedThrow.cs
Expand Up @@ -9,76 +9,36 @@ namespace Server.Items
// The target will be hit with chaos damage regardless of whether they were dismounted or paralyzed.
public class InfusedThrow : WeaponAbility
{
public override int BaseMana
{
get
{
return 15;
}
}
public override int BaseMana { get { return 25; } }

public override void OnHit(Mobile attacker, Mobile defender, int damage)
{
if (!this.CheckMana(attacker, true))
if (!CheckMana(attacker, true))
return;

ClearCurrentAbility(attacker);

attacker.SendLocalizedMessage(1149563); //The infused projectile strikes a target!
defender.SendLocalizedMessage(1149564); //You are struck by the infused projectile and take damage!

AOS.Damage(defender, attacker, 15, false, 0, 0, 0, 0, 0, 100, 0, false);

IMount mount = defender.Mount;

if (mount != null && !(defender is ChaosDragoon || defender is ChaosDragoonElite))
if ((defender.Mounted || defender.Flying || Server.Spells.Ninjitsu.AnimalForm.UnderTransformation(defender)) && !attacker.Mounted && !attacker.Flying && !(defender is ChaosDragoon) && !(defender is ChaosDragoonElite))
{
defender.SendLocalizedMessage(1062315); // You fall off your mount!

defender.PlaySound(0x140);
defender.FixedParticles(0x3728, 10, 15, 9955, EffectLayer.Waist);

mount.Rider = null;

BaseMount.SetMountPrevention(defender, BlockMountType.Dazed, TimeSpan.FromSeconds(10.0));

if (Core.ML && attacker is BaseCreature && ((BaseCreature)attacker).ControlMaster != null)
BaseMount.SetMountPrevention(((BaseCreature)attacker).ControlMaster, BlockMountType.DismountRecovery, TimeSpan.FromSeconds(3.0));
else
BaseMount.SetMountPrevention(attacker, BlockMountType.DismountRecovery, TimeSpan.FromSeconds(3.0));
Server.Items.Dismount.DoDismount(attacker, defender, mount, 10, false);
}
else
{
//if ( WeaponAbility.ParalyzingBlow.IsImmune( defender ) )
//{
//attacker.SendLocalizedMessage( 1070804 ); // Your target resists paralysis.
//defender.SendLocalizedMessage( 1070813 ); // You resist paralysis.
//}
//else
//{
defender.FixedEffect(0x376A, 9, 32);
defender.PlaySound(0x204);
attacker.SendLocalizedMessage(1060163); // You deliver a paralyzing blow!
defender.SendLocalizedMessage(1060164); // The attack has temporarily paralyzed you!

TimeSpan duration = defender.Player ? TimeSpan.FromSeconds(3.0) : TimeSpan.FromSeconds(6.0);
defender.Paralyze(duration);
//WeaponAbility.ParalyzingBlow.BeginImmunity( defender, duration + TimeSpan.FromSeconds( 8.0 ) );
//}
}

int amount = 15;

switch( Utility.Random(5) )
{
case 0:
AOS.Damage(defender, attacker, amount, 100, 0, 0, 0, 0);
break;
case 1:
AOS.Damage(defender, attacker, amount, 0, 100, 0, 0, 0);
break;
case 2:
AOS.Damage(defender, attacker, amount, 0, 0, 100, 0, 0);
break;
case 3:
AOS.Damage(defender, attacker, amount, 0, 0, 0, 100, 0);
break;
case 4:
AOS.Damage(defender, attacker, amount, 0, 0, 0, 0, 100);
break;
}
}
}
Expand Down
43 changes: 3 additions & 40 deletions Scripts/Abilities/RidingSwipe.cs
Expand Up @@ -59,28 +59,10 @@ public override void OnHit(Mobile attacker, Mobile defender, int damage)
if (!attacker.Mounted)
{
IMount mount = defender.Mount;
Server.Items.Dismount.DoDismount(attacker, defender, mount, 600, true);

if (mount != null || defender.Flying || (Core.ML && Server.Spells.Ninjitsu.AnimalForm.UnderTransformation(defender)))
{
BaseMount.Dismount(defender);

if (mount is Mobile)
{
AOS.Damage((Mobile)mount, attacker, amount, 100, 0, 0, 0, 0);

if (!m_MountPrevented.Contains((Mobile)mount))
m_MountPrevented.Add((Mobile)mount);
}
else
{
AOS.Damage(defender, attacker, amount, 100, 0, 0, 0, 0);
}

attacker.SendLocalizedMessage(1060082); // The force of your attack has dislodged them from their mount!

defender.PlaySound(0x140);
defender.FixedParticles(0x3728, 10, 15, 9955, EffectLayer.Waist);
}
defender.PlaySound(0x140);
defender.FixedParticles(0x3728, 10, 15, 9955, EffectLayer.Waist);
}
else
{
Expand All @@ -98,24 +80,5 @@ public override void OnHit(Mobile attacker, Mobile defender, int damage)
}
}
}

public static List<Mobile> MountPrevented { get { return m_MountPrevented; } }
private static List<Mobile> m_MountPrevented = new List<Mobile>();

public static bool CanMount(Mobile mount)
{
if (m_MountPrevented.Contains(mount))
{
if (mount.Hits == mount.HitsMax)
{
m_MountPrevented.Remove(mount);
return true;
}
else
return false;
}

return true;
}
}
}
12 changes: 11 additions & 1 deletion Scripts/Items/Books/SpecialScrollBooks/BaseSpecialScrollBook.cs
Expand Up @@ -104,7 +104,17 @@ public virtual void Construct(Mobile m, SkillName sk, double value)
}
else
{
scroll.Movable = true;
BaseHouse house = BaseHouse.FindHouseAt(this);

if (house != null && house.LockDowns.ContainsKey(scroll))
{
house.Release(m, scroll);
}
else
{
scroll.Movable = true;
}

m.SendLocalizedMessage(RemoveMessage);
}
}
Expand Down
51 changes: 51 additions & 0 deletions Scripts/Items/Internal/CrystalTeleporter.cs
@@ -0,0 +1,51 @@
#region Header
// **********
// ServUO - Teleporter.cs
// **********
#endregion

#region References
using System;
using System.Collections.Generic;
using System.Text;

using Server.Mobiles;
using Server.Network;
using Server.Spells;
#endregion

namespace Server.Items
{
public class CrystalTeleporter : ClickTeleporter
{
public override int LabelNumber { get { return 1027961; } } // magical crystal

[Constructable]
public CrystalTeleporter()
: this(0x1F19, new Point3D(0, 0, 0), null)
{ }

[Constructable]
public CrystalTeleporter(int itemID, Point3D pointDest, Map mapDest)
: base(itemID, pointDest, mapDest)
{
}

public CrystalTeleporter(Serial serial)
: base(serial)
{
}

public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0); // version
}

public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

0 comments on commit f7117d4

Please sign in to comment.