diff --git a/AideDeJeu/AideDeJeuCmd/Program.cs b/AideDeJeu/AideDeJeuCmd/Program.cs index 50edcb4c..3fac1f3a 100644 --- a/AideDeJeu/AideDeJeuCmd/Program.cs +++ b/AideDeJeu/AideDeJeuCmd/Program.cs @@ -265,9 +265,17 @@ namespace AideDeJeuCmd var name = resname.Substring(15, resname.Length - 18); var md = await Helpers.GetResourceStringAsync(resname); allmds.Add(name, md); - allanchors.Add(name, GetMarkdownAnchors(md).ToList()); - alllinks.Add(name, GetMarkdownLinks(md)); - allnames.Add(name, GetMarkdownAnchorNames(md)); + var anchors = GetMarkdownAnchors(md).ToList(); + allanchors.Add(name, anchors); + var links = GetMarkdownLinks(md).ToList(); + alllinks.Add(name, links); + var names = GetMarkdownAnchorNames(md).ToList(); + allnames.Add(name, names); + var unlinkedrefs = GetMarkdownUnlinkedRefs(md).ToList(); + foreach(var unlinkedref in unlinkedrefs) + { + Console.WriteLine($"{name} {unlinkedref}"); + } } } @@ -326,6 +334,24 @@ namespace AideDeJeuCmd } } + public static IEnumerable GetMarkdownUnlinkedRefs(string md) + { + var regex = new Regex("\\[(?.+?)\\]", RegexOptions.IgnoreCase); + var matches = regex.Matches(md); + md = md.ToLower(); + foreach (Match match in matches) + { + var rref = match.Groups["ref"].Value; + var lref = rref.ToLower(); + if (!md.Contains($"[{lref}]:") && + !md.Contains($"[{lref}](") && + !lref.Contains("]")) + { + yield return rref; + } + } + } + public static IEnumerable GetMarkdownAnchors(string md) { foreach (var name in GetMarkdownAnchorNames(md)) diff --git a/Data/spells_hd.md b/Data/spells_hd.md index d573fddf..15f91241 100644 --- a/Data/spells_hd.md +++ b/Data/spells_hd.md @@ -9043,7 +9043,7 @@ Le sort indique simplement qu'il y a un piège ; il ne précise pas où, mais vo - AltName: [Find the Path](spells_vo.md#find-the-path) - **Temps d'incantation :** 1 minute -- **Composantes :** V, S, M (un ensemble d'instruments de divination [comme des os, des bâtonnets en ivoire, des cartes, des dents ou des runes gravées] d'une valeur de 100 po et un objet venant de l'endroit que vous cherchez) +- **Composantes :** V, S, M (un ensemble d'instruments de divination comme des os, des bâtonnets en ivoire, des cartes, des dents ou des runes gravées d'une valeur de 100 po et un objet venant de l'endroit que vous cherchez) - **Durée :** concentration, jusqu'à 1 jour - LevelType: Divination de niveau 6 - **Portée :** personnelle diff --git a/Data/spells_vo.md b/Data/spells_vo.md index 67d6696d..d112a2ad 100644 --- a/Data/spells_vo.md +++ b/Data/spells_vo.md @@ -5837,7 +5837,7 @@ This spell's damage increases by 1d12 when you reach 5th level (2d12), 11th leve ### Description -This spell transforms a creature that you can see [and that have at least 1 hit point] within range into a new form. An unwilling creature must make a Wisdom saving throw to avoid the effect. A shapechanger automatically succeeds on this saving throw. +This spell transforms a creature that you can see and that have at least 1 hit point within range into a new form. An unwilling creature must make a Wisdom saving throw to avoid the effect. A shapechanger automatically succeeds on this saving throw. The transformation lasts for the duration, or until the target drops to 0 hit points or dies. The new form can be any beast whose challenge rating is equal to or less than the target's (or the target's level, if it doesn't have a challenge rating). The target's game statistics, including mental ability scores, are replaced by the statistics of the chosen beast. It retains its alignment and personality.