Ejemplo n.º 1
0
		bool JammedBy(TraitPair<JamsMissiles> tp)
		{
			if ((tp.Actor.CenterPosition - pos).HorizontalLengthSquared > tp.Trait.Range.LengthSquared)
				return false;

			if (!tp.Trait.DeflectionStances.HasStance(tp.Actor.Owner.Stances[args.SourceActor.Owner]))
				return false;

			return tp.Actor.World.SharedRandom.Next(100) < tp.Trait.Chance;
		}
Ejemplo n.º 2
0
        bool JammedBy(TraitPair <JamsMissiles> tp)
        {
            if ((tp.Actor.CenterPosition - pos).HorizontalLengthSquared > tp.Trait.Range * tp.Trait.Range)
            {
                return(false);
            }

            if (tp.Actor.Owner.Stances[args.SourceActor.Owner] == Stance.Ally && !tp.Trait.AlliedMissiles)
            {
                return(false);
            }

            return(tp.Actor.World.SharedRandom.Next(100 / tp.Trait.Chance) == 0);
        }
Ejemplo n.º 3
0
        bool JammedBy(TraitPair <JamsMissiles> tp)
        {
            if ((tp.Actor.CenterPosition - pos).HorizontalLengthSquared > tp.Trait.Range.LengthSquared)
            {
                return(false);
            }

            if (!tp.Trait.DeflectionStances.HasRelationship(tp.Actor.Owner.RelationshipWith(args.SourceActor.Owner)))
            {
                return(false);
            }

            return(tp.Actor.World.SharedRandom.Next(100) < tp.Trait.Chance);
        }
Ejemplo n.º 4
0
        bool JammedBy(TraitPair <JamsMissiles> tp)
        {
            if ((tp.Actor.CenterPosition - pos).HorizontalLengthSquared > tp.Trait.GetRange().LengthSquared)
            {
                return(false);
            }

            if (!tp.Trait.DeflectionStances.HasStance(tp.Actor.Owner.Stances[args.SourceActor.Owner]))
            {
                return(false);
            }

            return(tp.Actor.World.SharedRandom.Next(100 / tp.Trait.Chance) == 0);
        }
Ejemplo n.º 5
0
        bool JammedBy(TraitPair<JamsMissiles> tp)
        {
            if ((tp.Actor.CenterPosition - pos).HorizontalLengthSquared > tp.Trait.Range * tp.Trait.Range)
                return false;

            if (tp.Actor.Owner.Stances[args.SourceActor.Owner] == Stance.Ally && !tp.Trait.AlliedMissiles)
                return false;

            return tp.Actor.World.SharedRandom.Next(100 / tp.Trait.Chance) == 0;
        }
 public void AddEntry(TraitPair <AISupportPowerExplicitNotifier> entry)
 {
     active.Add(entry);
 }
Ejemplo n.º 7
0
 public void AddEntry(TraitPair <AIDeployNotifier> entry)
 {
     active.Add(entry);
 }
Ejemplo n.º 8
0
        bool JammedBy(TraitPair<JamsMissiles> tp)
        {
            if ((tp.Actor.CenterPosition - pos).HorizontalLengthSquared > tp.Trait.Range.LengthSquared)
                return false;

            if (!tp.Trait.DeflectionStances.HasStance(tp.Actor.Owner.Stances[args.SourceActor.Owner]))
                return false;

            return tp.Actor.World.SharedRandom.Next(100 / tp.Trait.Chance) == 0;
        }
Ejemplo n.º 9
0
 public void AddEntry(TraitPair <AutoDeployer> entry)
 {
     active.Add(entry);
 }