Exemplo n.º 1
0
        public Injured(string name, IHasStats owner, double severity, InjuryRegion region, IInjurySystem system) : base(owner)
        {
            Severity     = severity;
            Region       = region;
            IsPrefix     = false;
            InjurySystem = system;

            BaseStats[Stat.Fight] = -0.5 * severity;
            Name = name;

            BaseBehaviours.Add(new InjuredBehaviour(this));
        }
Exemplo n.º 2
0
        internal void HandleSpreading(IInjured injured, IInjurySystem injurySystem, IUserinterface ui, Guid round)
        {
            if (injured.Owner is IRoom p)
            {
                if (RoomsToRooms)
                {
                    foreach (var adjacent in p.World.Map.GetAdjacentRooms(p, false))
                    {
                        injurySystem.Apply(new SystemArgs(p.World, ui, 1, null, adjacent.Value, round));
                    }
                }

                if (RoomsToActors)
                {
                    foreach (var actor in p.Actors)
                    {
                        injurySystem.Apply(new SystemArgs(p.World, ui, 1, null, actor, round));
                    }
                }
            }

            if (injured.Owner is IActor a)
            {
                var world = a.CurrentLocation.World;

                if (ActorsToActors)
                {
                    foreach (var actor in a.GetCurrentLocationSiblings(false))
                    {
                        injurySystem.Apply(new SystemArgs(world, ui, 1, null, actor, round));
                    }
                }

                if (ActorsToRooms)
                {
                    injurySystem.Apply(new SystemArgs(world, ui, 1, null, a.CurrentLocation, round));
                }
            }
        }
Exemplo n.º 3
0
 public FightFrame(IActor performedBy, IActor fightTarget, IAction action, IInjurySystem injurySystem, double attitude) : base(performedBy, action, attitude)
 {
     TargetIfAny  = fightTarget;
     InjurySystem = injurySystem;
 }