Exemplo n.º 1
0
 public void PurifyInfluenceKind(Person person, Influence i, Applier applier, int applierID, bool excludePersonal)
 {
     if (this.Type == InfluenceType.个人 && !excludePersonal)
     {
         PurifyInfluenceKind(person);
     }
     if (this.Type == InfluenceType.战斗 || this.Type == InfluenceType.建筑战斗)
     {
         ApplyingTroop t = new ApplyingTroop(person.LocationTroop, applier, applierID);
         if (person.LocationTroop != null && i.appliedTroop.Contains(t))
         {
             i.appliedTroop.Remove(t);
             PurifyInfluenceKind(person.LocationTroop, i, applier, applierID);
         }
     }
     if (this.Type == InfluenceType.建筑 || this.Type == InfluenceType.建筑战斗)
     {
         ApplyingArchitecture t = new ApplyingArchitecture(person.LocationArchitecture, applier, applierID);
         if (person.LocationTroop != null && i.appliedArch.Contains(t))
         {
             i.appliedArch.Remove(t);
             PurifyInfluenceKind(person.LocationArchitecture, i, applier, applierID);
         }
     }
 }
Exemplo n.º 2
0
 public void ApplyInfluenceKind(Faction faction, Influence i, Applier applier, int applierID)
 {
     if (this.Type == InfluenceType.势力)
     {
         ApplyInfluenceKind(faction);
         foreach (Architecture a in faction.Architectures)
         {
             ApplyingArchitecture z = new ApplyingArchitecture(a, applier, applierID);
             if (!i.appliedArch.Contains(z))
             {
                 i.appliedArch.Add(z);
                 ApplyInfluenceKind(a, i, applier, applierID);
             }
         }
         foreach (Troop t in faction.Troops)
         {
             ApplyingTroop a = new ApplyingTroop(t, applier, applierID);
             if (!i.appliedTroop.Contains(a))
             {
                 i.appliedTroop.Add(a);
                 ApplyInfluenceKind(t, i, applier, applierID);
             }
         }
     }
 }
Exemplo n.º 3
0
 public void ApplyInfluenceKind(Person person, Influence i, Applier applier, int applierID, bool excludePersonal)
 {
     if (this.Type == InfluenceType.个人 && !excludePersonal)
     {
         ApplyInfluenceKind(person);
     }
     if (this.Type == InfluenceType.战斗 || this.Type == InfluenceType.建筑战斗)
     {
         if (person.LocationTroop != null)
         {
             ApplyingTroop z = new ApplyingTroop(person.LocationTroop, applier, applierID);
             if (!i.appliedTroop.Contains(z))
             {
                 i.appliedTroop.Add(z);
                 person.LocationTroop.InfluencesApplying.Add(i);
                 ApplyInfluenceKind(person.LocationTroop, i, applier, applierID);
             }
         }
     }
     if (this.Type == InfluenceType.建筑 || this.Type == InfluenceType.建筑战斗)
     {
         if (person.LocationArchitecture != null)
         {
             ApplyingArchitecture z = new ApplyingArchitecture(person.LocationArchitecture, applier, applierID);
             if (!i.appliedArch.Contains(z))
             {
                 i.appliedArch.Add(z);
                 ApplyInfluenceKind(person.LocationArchitecture, i, applier, applierID);
             }
         }
     }
 }
Exemplo n.º 4
0
 public void PurifyInfluenceKind(Person person, Influence i, Applier applier, int applierID)
 {
     if (this.Type == InfluenceType.个人)
     {
         PurifyInfluenceKind(person);
     }
     if (this.Type == InfluenceType.战斗 || this.Type == InfluenceType.建筑战斗)
     {
         ApplyingTroop t = new ApplyingTroop(person.LocationTroop, applier, applierID);
         if (person.LocationTroop != null && i.appliedTroop.Contains(t))
         {
             i.appliedTroop.RemoveWhere((a2) => { return(t.Equals(a2)); });
             PurifyInfluenceKind(person.LocationTroop, i, applier, applierID);
         }
     }
     if (this.Type == InfluenceType.建筑 || this.Type == InfluenceType.建筑战斗)
     {
         ApplyingArchitecture t = new ApplyingArchitecture(person.LocationArchitecture, applier, applierID);
         if (person.LocationTroop != null && i.appliedArch.Contains(t))
         {
             i.appliedArch.RemoveWhere((a2) => { return(t.Equals(a2)); });
             PurifyInfluenceKind(person.LocationArchitecture, i, applier, applierID);
         }
     }
 }
Exemplo n.º 5
0
        public void ApplyInfluence(Architecture architecture, Applier applier, int applierID)
        {
            ApplyingArchitecture a = new ApplyingArchitecture(architecture, applier, applierID);

            this.Kind.InitializeParameter(this.Parameter);
            this.Kind.InitializeParameter2(this.Parameter2);
            try
            {
                this.Kind.ApplyInfluenceKind(architecture, this, applier, applierID);
            }
            catch
            {
            }
        }
Exemplo n.º 6
0
 public void ApplyInfluence(Architecture architecture, Applier applier, int applierID)
 {
     ApplyingArchitecture a = new ApplyingArchitecture(architecture, applier, applierID);
     if (appliedArch.Contains(a)) return;
     appliedArch.Add(a);
     this.Kind.InitializeParameter(this.Parameter);
     this.Kind.InitializeParameter2(this.Parameter2);
     try
     {
         this.Kind.ApplyInfluenceKind(architecture, this, applier, applierID);
     }
     catch
     {
     }
 }
Exemplo n.º 7
0
 public void ApplyInfluenceKind(Faction faction, Influence i, Applier applier, int applierID)
 {
     if (this.Type == InfluenceType.势力)
     {
         ApplyInfluenceKind(faction);
     }
     if (this.Type == InfluenceType.建筑 || this.Type == InfluenceType.建筑战斗)
     {
         foreach (Architecture a in faction.Architectures)
         {
             ApplyingArchitecture z = new ApplyingArchitecture(a, applier, applierID);
             if (!i.appliedArch.Contains(z))
             {
                 i.appliedArch.Add(z);
                 ApplyInfluenceKind(a, i, applier, applierID);
             }
         }
     }
     if (this.Type == InfluenceType.战斗 || this.Type == InfluenceType.建筑战斗)
     {
         foreach (Troop t in faction.Troops)
         {
             ApplyingTroop a = new ApplyingTroop(t, applier, applierID);
             if (!i.appliedTroop.Contains(a))
             {
                 i.appliedTroop.Add(a);
                 t.InfluencesApplying.Add(i);
                 ApplyInfluenceKind(t, i, applier, applierID);
             }
         }
     }
     if (this.Type == InfluenceType.个人)
     {
         foreach (Person p in faction.Persons)
         {
             ApplyingPerson a = new ApplyingPerson(p, applier, applierID);
             if (!i.appliedPerson.Contains(a))
             {
                 i.appliedPerson.Add(a);
                 ApplyInfluenceKind(p, i, applier, applierID, false);
             }
         }
     }
 }
Exemplo n.º 8
0
 public void ApplyInfluenceKind(Faction faction, Influence i, Applier applier, int applierID)
 {
     if (this.Type == InfluenceType.势力)
     {
         ApplyInfluenceKind(faction);
     }
     if (this.Type == InfluenceType.建筑 || this.Type == InfluenceType.建筑战斗)
     {
         foreach (Architecture a in faction.Architectures)
         {
             ApplyingArchitecture z = new ApplyingArchitecture(a, applier, applierID);
             if (!i.appliedArch.Contains(z))
             {
                 i.appliedArch.Add(z);
                 ApplyInfluenceKind(a, i, applier, applierID);
             }
         }
     }
     if (this.Type == InfluenceType.战斗 || this.Type == InfluenceType.建筑战斗)
     {
         foreach (Troop t in faction.Troops)
         {
             ApplyingTroop a = new ApplyingTroop(t, applier, applierID);
             if (!i.appliedTroop.Contains(a))
             {
                 i.appliedTroop.Add(a);
                 t.InfluencesApplying.Add(i);
                 ApplyInfluenceKind(t, i, applier, applierID);
             }
         }
     }
     if (this.Type == InfluenceType.个人)
     {
         foreach (Person p in faction.Persons)
         {
             ApplyingPerson a = new ApplyingPerson(p, applier, applierID);
             if (!i.appliedPerson.Contains(a))
             {
                 i.appliedPerson.Add(a);
                 ApplyInfluenceKind(p, i, applier, applierID, false);
             }
         }
     }
 }
Exemplo n.º 9
0
        public void PurifyInfluence(Architecture architecture, Applier applier, int applierID)
        {
            ApplyingArchitecture a = new ApplyingArchitecture(architecture, applier, applierID);

            if (!appliedArch.Contains(a))
            {
                return;
            }
            appliedArch.Remove(a);
            this.Kind.InitializeParameter(this.Parameter);
            this.Kind.InitializeParameter2(this.Parameter2);
            try
            {
                this.Kind.PurifyInfluenceKind(architecture, this, applier, applierID);
            }
            catch
            {
            }
        }
Exemplo n.º 10
0
 public void PurifyInfluence(Architecture architecture, Applier applier, int applierID)
 {
     ApplyingArchitecture a = new ApplyingArchitecture(architecture, applier, applierID);
     if (!appliedArch.Contains(a)) return;
     appliedArch.RemoveWhere((x) => { return x.Equals(a); });
     this.Kind.InitializeParameter(this.Parameter);
     this.Kind.InitializeParameter2(this.Parameter2);
     try
     {
         this.Kind.PurifyInfluenceKind(architecture, this, applier, applierID);
     }
     catch
     {
     }
 }
Exemplo n.º 11
0
 public void PurifyInfluenceKind(Person person, Influence i, Applier applier, int applierID, bool excludePersonal)
 {
     if (this.Type == InfluenceType.个人 && !excludePersonal)
     {
         PurifyInfluenceKind(person);
     }
     if (this.Type == InfluenceType.战斗 || this.Type == InfluenceType.建筑战斗)
     {
         ApplyingTroop t = new ApplyingTroop(person.LocationTroop, applier, applierID);
         if (person.LocationTroop != null && i.appliedTroop.Contains(t))
         {
             i.appliedTroop.Remove(t);
             PurifyInfluenceKind(person.LocationTroop, i, applier, applierID);
         }
     }
     if (this.Type == InfluenceType.建筑 || this.Type == InfluenceType.建筑战斗)
     {
         ApplyingArchitecture t = new ApplyingArchitecture(person.LocationArchitecture, applier, applierID);
         if (person.LocationTroop != null && i.appliedArch.Contains(t))
         {
             i.appliedArch.Remove(t);
             PurifyInfluenceKind(person.LocationArchitecture, i, applier, applierID);
         }
     }
 }
Exemplo n.º 12
0
 public void ApplyInfluenceKind(Person person, Influence i, Applier applier, int applierID, bool excludePersonal)
 {
     if (this.Type == InfluenceType.个人 && !excludePersonal)
     {
         ApplyInfluenceKind(person);
     }
     if (this.Type == InfluenceType.战斗 || this.Type == InfluenceType.建筑战斗)
     {
         if (person.LocationTroop != null)
         {
             ApplyingTroop z = new ApplyingTroop(person.LocationTroop, applier, applierID);
             if (!i.appliedTroop.Contains(z))
             {
                 i.appliedTroop.Add(z);
                 person.LocationTroop.InfluencesApplying.Add(i);
                 ApplyInfluenceKind(person.LocationTroop, i, applier, applierID);
             }
         }
     }
     if (this.Type == InfluenceType.建筑 || this.Type == InfluenceType.建筑战斗)
     {
         if (person.LocationArchitecture != null)
         {
             ApplyingArchitecture z = new ApplyingArchitecture(person.LocationArchitecture, applier, applierID);
             if (!i.appliedArch.Contains(z))
             {
                 i.appliedArch.Add(z);
                 ApplyInfluenceKind(person.LocationArchitecture, i, applier, applierID);
             }
         }
     }
 }
Exemplo n.º 13
0
 public void ApplyInfluenceKind(Faction faction, Influence i, Applier applier, int applierID)
 {
     if (this.Type == InfluenceType.势力)
     {
         ApplyInfluenceKind(faction);
         foreach (Architecture a in faction.Architectures)
         {
             ApplyingArchitecture z = new ApplyingArchitecture(a, applier, applierID);
             if (!i.appliedArch.Contains(z))
             {
                 i.appliedArch.Add(z);
                 ApplyInfluenceKind(a, i, applier, applierID);
             }
         }
         foreach (Troop t in faction.Troops)
         {
             ApplyingTroop a = new ApplyingTroop(t, applier, applierID);
             if (!i.appliedTroop.Contains(a))
             {
                 i.appliedTroop.Add(a);
                 ApplyInfluenceKind(t, i, applier, applierID);
             }
         }
     }
 }
Exemplo n.º 14
0
 public void PurifyInfluenceKind(Person person, Influence i, Applier applier, int applierID)
 {
     if (this.Type == InfluenceType.个人)
     {
         PurifyInfluenceKind(person);
     }
     if (this.Type == InfluenceType.战斗 || this.Type == InfluenceType.建筑战斗)
     {
         ApplyingTroop t = new ApplyingTroop(person.LocationTroop, applier, applierID);
         if (person.LocationTroop != null && i.appliedTroop.Contains(t))
         {
             i.appliedTroop.RemoveWhere((a2) => { return t.Equals(a2); });
             PurifyInfluenceKind(person.LocationTroop, i, applier, applierID);
         }
     }
     if (this.Type == InfluenceType.建筑 || this.Type == InfluenceType.建筑战斗)
     {
         ApplyingArchitecture t = new ApplyingArchitecture(person.LocationArchitecture, applier, applierID);
         if (person.LocationTroop != null && i.appliedArch.Contains(t))
         {
             i.appliedArch.RemoveWhere((a2) => { return t.Equals(a2); });
             PurifyInfluenceKind(person.LocationArchitecture, i, applier, applierID);
         }
     }
 }