Exemplo n.º 1
0
        public void RemoveTags(string key, MatchKind keyMatchKind)
        {
            var tagKeys = string.Join(", ", m_tags.Where(x => MatchKindUtility.IsMatch(x.Key, key, keyMatchKind, false)).Select(x => x.Key));

            Log.Info($"Removing tag from {Owner.RenderForLog()}: '{tagKeys}'.");

            m_tags.RemoveAll(x => MatchKindUtility.IsMatch(x.Key, key, keyMatchKind, false));
        }
 protected override void ApplyEffectsCore(AttackState state, TagCollection target)
 {
     foreach (var tag in state.GetTags(TagScope))
     {
         if (MatchKindUtility.IsMatch(tag.Key, TagKey, TagKeyMatchKind, false))
         {
             var newTag = tag.CloneWithKey(NewTagKey);
             target.AddTag(newTag, ConflictResolution);
         }
     }
 }
Exemplo n.º 3
0
 public override bool IsTrue(AttackState state)
 {
     return(state.GetTags(MatchScopes)
            .Where(x => MatchKindUtility.IsMatch(x.Key, MatchKey, KeyMatchKind, false))
            .Any(IsTagValueMatch));
 }
Exemplo n.º 4
0
 public static IEnumerable <TagBase> GetTags(this IEnumerable <TagBase> tags, string match, MatchKind matchKind)
 {
     return(tags.EmptyIfNull().Where(x => MatchKindUtility.IsMatch(x.Key, match, matchKind, false)));
 }