Eye of Marble Behavior[FSOD]
Is Worked in FSOD. i not test in other sources
in wServer.logic.behaviors Create File AoeEffect.cs and paste this
in Wserver.logic.db Create File BehaviorDb.EyeofMarble.cs and paste this
if you get an error. I will not help you.
in wServer.logic.behaviors Create File AoeEffect.cs and paste this
AoeEffect.cs
using System.Linq;
using wServer.realm;
using wServer.realm.entities.player;
namespace wServer.logic.behaviors
{
public class AoeEffect : Behavior
{
//State storage: nothing
private readonly float radius;
private readonly int duration;
private readonly ConditionEffectIndex effect;
public AoeEffect(double radius, int duration, ConditionEffectIndex effect)
{
this.radius = (float)radius;
this.effect = effect;
this.duration = duration;
}
protected override void TickCore(Entity host, RealmTime time, ref object state)
{
foreach (Player i in host.Owner.PlayersCollision.HitTest(host.X, host.Y, radius).OfType<Player>())
{
i.ApplyConditionEffect(new ConditionEffect
{
Effect = effect,
DurationMS = duration
});
}
}
}
}
using wServer.realm;
using wServer.realm.entities.player;
namespace wServer.logic.behaviors
{
public class AoeEffect : Behavior
{
//State storage: nothing
private readonly float radius;
private readonly int duration;
private readonly ConditionEffectIndex effect;
public AoeEffect(double radius, int duration, ConditionEffectIndex effect)
{
this.radius = (float)radius;
this.effect = effect;
this.duration = duration;
}
protected override void TickCore(Entity host, RealmTime time, ref object state)
{
foreach (Player i in host.Owner.PlayersCollision.HitTest(host.X, host.Y, radius).OfType<Player>())
{
i.ApplyConditionEffect(new ConditionEffect
{
Effect = effect,
DurationMS = duration
});
}
}
}
}
in Wserver.logic.db Create File BehaviorDb.EyeofMarble.cs and paste this
BehaviorDb.EyeofMarble.cs
#region
using wServer.logic.behaviors;
#endregion
namespace wServer.logic
{
partial class BehaviorDb
{
private _ EyeofMarble = () => Behav()
.Init("Eye of Marble",
new State(
new State("Idle",
new AoeEffect(3, 1, ConditionEffectIndex.Armored),
new AoeEffect(3, 1, ConditionEffectIndex.Damaging),
new TimedTransition(4500, "die")
),
new State("die",
new Decoy(0)
)
)
);
}
}
using wServer.logic.behaviors;
#endregion
namespace wServer.logic
{
partial class BehaviorDb
{
private _ EyeofMarble = () => Behav()
.Init("Eye of Marble",
new State(
new State("Idle",
new AoeEffect(3, 1, ConditionEffectIndex.Armored),
new AoeEffect(3, 1, ConditionEffectIndex.Damaging),
new TimedTransition(4500, "die")
),
new State("die",
new Decoy(0)
)
)
);
}
}
if you get an error. I will not help you.
HAHAHA