Initial commit
This commit is contained in:
+48
@@ -0,0 +1,48 @@
|
||||
using Server.Custom.RumorMill.Items;
|
||||
|
||||
namespace Server.Custom.RumorMill.Rumors
|
||||
{
|
||||
internal class GoldenCompassRumor : IRumor
|
||||
{
|
||||
private GoldenCompass compass;
|
||||
|
||||
public Map RumorMap { get; private set; }
|
||||
|
||||
public Point3D RumorLocation { get; private set; }
|
||||
|
||||
public void InitRumor()
|
||||
{
|
||||
compass = new GoldenCompass();
|
||||
|
||||
RumorMap = RumorUtility.GetRandomMap();
|
||||
|
||||
RumorLocation = RumorUtility.GetLandLocation(RumorMap);
|
||||
|
||||
compass.MoveToWorld(RumorLocation, RumorMap);
|
||||
}
|
||||
|
||||
public void SpreadRumor(Mobile from, Mobile to)
|
||||
{
|
||||
if (compass != null && compass.Location == RumorLocation)
|
||||
{
|
||||
RumorUtility.RunMessage(this, from, to, "a golden compass");
|
||||
}
|
||||
else
|
||||
{
|
||||
RumorCore.ResetRumor(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void EndRumor()
|
||||
{
|
||||
if (compass.Location == RumorLocation)
|
||||
{
|
||||
compass.Delete();
|
||||
}
|
||||
|
||||
compass = null;
|
||||
|
||||
RumorLocation = Point3D.Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Custom.RumorMill.Rumors
|
||||
{
|
||||
internal class LostGoldRumor : IRumor
|
||||
{
|
||||
private Gold gold;
|
||||
|
||||
public Map RumorMap { get; private set; }
|
||||
|
||||
public Point3D RumorLocation { get; private set; }
|
||||
|
||||
public void InitRumor()
|
||||
{
|
||||
if (Utility.RandomDouble() < 0.05)
|
||||
{
|
||||
gold = new Gold(Utility.RandomMinMax(5000, 50000));
|
||||
}
|
||||
else
|
||||
{
|
||||
gold = new Gold(Utility.RandomMinMax(50, 5000));
|
||||
}
|
||||
|
||||
RumorMap = RumorUtility.GetRandomMap();
|
||||
|
||||
RumorLocation = RumorUtility.GetLandLocation(RumorMap);
|
||||
|
||||
gold.MoveToWorld(RumorLocation, RumorMap);
|
||||
}
|
||||
|
||||
public void SpreadRumor(Mobile from, Mobile to)
|
||||
{
|
||||
if (gold != null && gold.Location == RumorLocation)
|
||||
{
|
||||
RumorUtility.RunMessage(this, from, to, "lost gold");
|
||||
}
|
||||
else
|
||||
{
|
||||
RumorCore.ResetRumor(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void EndRumor()
|
||||
{
|
||||
if (gold.Location == RumorLocation)
|
||||
{
|
||||
gold.Delete();
|
||||
}
|
||||
|
||||
gold = null;
|
||||
|
||||
RumorLocation = Point3D.Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Custom.RumorMill.Rumors
|
||||
{
|
||||
internal class LostTreasureRumor : IRumor
|
||||
{
|
||||
private Item treasure;
|
||||
|
||||
public Map RumorMap { get; private set; }
|
||||
|
||||
public Point3D RumorLocation { get; private set; }
|
||||
|
||||
public void InitRumor()
|
||||
{
|
||||
if (Utility.RandomDouble() < 0.05)
|
||||
{
|
||||
treasure = new LargeTreasureBag();
|
||||
}
|
||||
else
|
||||
{
|
||||
treasure = new TreasureBag();
|
||||
}
|
||||
|
||||
RumorMap = RumorUtility.GetRandomMap();
|
||||
|
||||
RumorLocation = RumorUtility.GetAnyLocation(RumorMap);
|
||||
|
||||
treasure.MoveToWorld(RumorLocation, RumorMap);
|
||||
}
|
||||
|
||||
public void SpreadRumor(Mobile from, Mobile to)
|
||||
{
|
||||
if (treasure != null && treasure.Location == RumorLocation)
|
||||
{
|
||||
RumorUtility.RunMessage(this, from, to, "lost treasure");
|
||||
}
|
||||
else
|
||||
{
|
||||
RumorCore.ResetRumor(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void EndRumor()
|
||||
{
|
||||
if (treasure.Location == RumorLocation)
|
||||
{
|
||||
treasure.Delete();
|
||||
}
|
||||
|
||||
treasure = null;
|
||||
|
||||
RumorLocation = Point3D.Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
using Server.Custom.RumorMill.Mobiles;
|
||||
|
||||
namespace Server.Custom.RumorMill.Rumors
|
||||
{
|
||||
internal class MissingNPCRumor : IRumor
|
||||
{
|
||||
private MissingNPC npc;
|
||||
|
||||
public Map RumorMap { get; private set; }
|
||||
|
||||
public Point3D RumorLocation { get; private set; }
|
||||
|
||||
public void InitRumor()
|
||||
{
|
||||
npc = new MissingNPC();
|
||||
|
||||
RumorMap = RumorUtility.GetRandomMap();
|
||||
|
||||
RumorLocation = RumorUtility.GetLandLocation(RumorMap);
|
||||
|
||||
npc.MoveToWorld(RumorLocation, RumorMap);
|
||||
}
|
||||
|
||||
public void SpreadRumor(Mobile from, Mobile to)
|
||||
{
|
||||
if (npc != null && !npc.Deleted)
|
||||
{
|
||||
RumorUtility.RunMessage(this, from, to, "a lost person");
|
||||
}
|
||||
else
|
||||
{
|
||||
RumorCore.ResetRumor(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void EndRumor()
|
||||
{
|
||||
if (!npc.Deleted)
|
||||
{
|
||||
npc.Delete();
|
||||
}
|
||||
|
||||
npc = null;
|
||||
|
||||
RumorLocation = Point3D.Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Custom.RumorMill.Rumors
|
||||
{
|
||||
internal class PhoenixRumor : IRumor
|
||||
{
|
||||
private Phoenix phoenix;
|
||||
|
||||
public Map RumorMap { get; private set; } = Map.Felucca;
|
||||
|
||||
public Point3D RumorLocation { get; private set; }
|
||||
|
||||
public void InitRumor()
|
||||
{
|
||||
phoenix = new Phoenix();
|
||||
|
||||
RumorLocation = RumorUtility.GetLandLocation(RumorMap);
|
||||
|
||||
phoenix.MoveToWorld(RumorLocation, RumorMap);
|
||||
}
|
||||
|
||||
public void SpreadRumor(Mobile from, Mobile to)
|
||||
{
|
||||
if (phoenix != null && !phoenix.Controlled && !phoenix.Deleted)
|
||||
{
|
||||
RumorUtility.RunMessage(this, from, to, "a phoenix");
|
||||
}
|
||||
else
|
||||
{
|
||||
RumorCore.ResetRumor(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void EndRumor()
|
||||
{
|
||||
if (!phoenix.Controlled && !phoenix.Deleted)
|
||||
{
|
||||
phoenix.Delete();
|
||||
}
|
||||
|
||||
phoenix = null;
|
||||
|
||||
RumorLocation = Point3D.Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Custom.RumorMill.Rumors
|
||||
{
|
||||
internal class SeaHorseRumor : IRumor
|
||||
{
|
||||
private SeaHorse seaHorse;
|
||||
|
||||
public Map RumorMap { get; private set; } = Map.Trammel;
|
||||
|
||||
public Point3D RumorLocation { get; private set; }
|
||||
|
||||
public void InitRumor()
|
||||
{
|
||||
seaHorse = new SeaHorse();
|
||||
|
||||
RumorLocation = RumorUtility.GetWaterLocation(RumorMap);
|
||||
|
||||
seaHorse.MoveToWorld(RumorLocation, RumorMap);
|
||||
}
|
||||
|
||||
public void SpreadRumor(Mobile from, Mobile to)
|
||||
{
|
||||
if (seaHorse != null && !seaHorse.Controlled && !seaHorse.Deleted)
|
||||
{
|
||||
RumorUtility.RunMessage(this, from, to, "a sea horse");
|
||||
}
|
||||
else
|
||||
{
|
||||
RumorCore.ResetRumor(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void EndRumor()
|
||||
{
|
||||
if (!seaHorse.Controlled && !seaHorse.Deleted)
|
||||
{
|
||||
seaHorse.Delete();
|
||||
}
|
||||
|
||||
seaHorse = null;
|
||||
|
||||
RumorLocation = Point3D.Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Custom.RumorMill.Rumors
|
||||
{
|
||||
internal class UnicornRumor : IRumor
|
||||
{
|
||||
private Unicorn unicorn;
|
||||
|
||||
public Map RumorMap { get; private set; } = Map.Ilshenar;
|
||||
|
||||
public Point3D RumorLocation { get; private set; }
|
||||
|
||||
public void InitRumor()
|
||||
{
|
||||
unicorn = new Unicorn();
|
||||
|
||||
RumorLocation = RumorUtility.GetLandLocation(RumorMap);
|
||||
|
||||
unicorn.MoveToWorld(RumorLocation, RumorMap);
|
||||
}
|
||||
|
||||
public void SpreadRumor(Mobile from, Mobile to)
|
||||
{
|
||||
if (unicorn != null && !unicorn.Controlled && !unicorn.Deleted)
|
||||
{
|
||||
RumorUtility.RunMessage(this, from, to, "a unicorn");
|
||||
}
|
||||
else
|
||||
{
|
||||
RumorCore.ResetRumor(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void EndRumor()
|
||||
{
|
||||
if (!unicorn.Controlled && !unicorn.Deleted)
|
||||
{
|
||||
unicorn.Delete();
|
||||
}
|
||||
|
||||
unicorn = null;
|
||||
|
||||
RumorLocation = Point3D.Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user