1
0
Fork 0
mirror of https://github.com/Nioux/AideDeJeu.git synced 2025-10-30 23:16:09 +00:00

Nettoyage

This commit is contained in:
Yan Maniez 2018-07-06 17:09:07 +02:00
parent 46e9de5be1
commit 11f22b2373
2 changed files with 2 additions and 462 deletions

View file

@ -650,11 +650,11 @@ namespace AideDeJeu.Tools
var title = linkInline.Title; var title = linkInline.Title;
if (!string.IsNullOrEmpty(title)) if (!string.IsNullOrEmpty(title))
{ {
add += string.Format($"[{label}]({url} \"{title}\")"); add += $"[{label}]({url} \"{title}\")";
} }
else else
{ {
add += string.Format($"[{label}]({url})"); add += $"[{label}]({url})";
} }
} }
else if (inline is Markdig.Syntax.Inlines.ContainerInline) else if (inline is Markdig.Syntax.Inlines.ContainerInline)
@ -738,119 +738,6 @@ namespace AideDeJeu.Tools
return table; return table;
} }
public static string ToMarkdownString(this IEnumerable<Spell> spells)
{
var md = string.Empty;
foreach (var spell in spells.OrderBy(s => s.Name))
{
md += spell.ToMarkdownString();
}
return md;
}
public static string ToMarkdownString(this Spell spell)
{
var md = string.Empty;
md += string.Format("# {0}\n", spell.Name);
md += string.Format("- NameVO: [{0}]\n", spell.NameVO);
md += string.Format("- CastingTime: {0}\n", spell.CastingTime);
md += string.Format("- Components: {0}\n", spell.Components);
md += string.Format("- Duration: {0}\n", spell.Duration);
md += string.Format("- LevelType: {0}\n", spell.LevelType);
md += string.Format("- Range: {0}\n", spell.Range);
var regex = new Regex("(?<source>\\(.*\\)) (?<classes>.*)");
var match = regex.Match(spell.Source);
var source = match.Groups["source"].Value;
var classes = match.Groups["classes"].Value;
md += string.Format("- Source: {0}\n", source);
md += string.Format("- Classes: {0}\n", classes.Replace(" ;", ",").Trim().Trim(','));
md += "\n";
md += "### Description\n\n";
md += spell
.DescriptionHtml
;
md += string.Format("[{0}]: spells_hd.md#{1}\n", spell.NameVO, Helpers.IdFromName(spell.NameVO));
md += "\n\n";
return md;
}
public static string ToMarkdownString(this IEnumerable<Monster> monsters)
{
var md = string.Empty;
foreach (var monster in monsters)
{
md += monster.ToMarkdownString();
}
return md;
}
public static string ToMarkdownString(this Monster monster)
{
var md = string.Empty;
md += string.Format("# {0}\n", monster.Name?.Trim());
md += string.Format("- NameVO: [{0}]\n", monster.NameVO?.Trim());
md += string.Format("- {0} {1}, {2}\n", monster.Size?.Trim(), monster.Type?.Trim(), monster.Alignment?.Trim());
if (monster.ArmorClass != null) md += string.Format("- **Armor Class** {0}\n", monster.ArmorClass?.Trim());
if (monster.HitPoints != null) md += string.Format("- **Hit Points** {0}\n", monster.HitPoints?.Trim());
if (monster.Speed != null) md += string.Format("- **Speed** {0}\n", monster.Speed?.Trim());
md += "\n";
md += "| STR | DEX | CON | INT | WIS | CHA |\n";
md += "| --- | --- | --- | --- | --- | --- |\n";
md += string.Format("|{0,7}|{1,7}|{2,7}|{3,7}|{4,7}|{5,7}|\n", monster.Strength?.Trim(), monster.Dexterity?.Trim(), monster.Constitution?.Trim(), monster.Intelligence?.Trim(), monster.Wisdom?.Trim(), monster.Charisma?.Trim());
md += "\n";
if (monster.SavingThrows != null) md += string.Format("- **Saving Throws** {0}\n", monster.SavingThrows?.Trim());
if (monster.Skills != null) md += string.Format("- **Skills** {0}\n", monster.Skills?.Trim());
if (monster.Senses != null) md += string.Format("- **Senses** {0}\n", monster.Senses?.Trim());
if (monster.Languages != null) md += string.Format("- **Languages** {0}\n", monster.Languages?.Trim());
if (monster.Challenge != null) md += string.Format("- **Challenge** {0}\n", monster.Challenge?.Trim());
if (monster.ConditionImmunities != null) md += string.Format("- **Condition Immunities** {0}\n", monster.ConditionImmunities?.Trim());
if (monster.DamageImmunities!= null) md += string.Format("- **Damage Immunities** {0}\n", monster.DamageImmunities?.Trim());
if (monster.DamageResistances != null) md += string.Format("- **Damage Resistances** {0}\n", monster.DamageResistances?.Trim());
if (monster.DamageVulnerabilities != null) md += string.Format("- **Damage Vulnerabilities** {0}\n", monster.DamageVulnerabilities?.Trim());
md += "\n";
if (monster.SpecialFeatures != null)
{
md += "### Special Features\n\n";
foreach (var specialFeature in monster.SpecialFeatures)
{
md += HtmlToMarkdownString(specialFeature);
}
}
if (monster.Actions != null)
{
md += "### Actions\n\n";
foreach (var action in monster.Actions)
{
md += HtmlToMarkdownString(action);
}
}
if (monster.Reactions != null)
{
md += "### Reactions\n\n";
foreach (var reaction in monster.Reactions)
{
md += HtmlToMarkdownString(reaction);
}
}
if (monster.LegendaryActions != null)
{
md += "### Legendary Actions\n\n";
foreach (var legendaryAction in monster.LegendaryActions)
{
md += HtmlToMarkdownString(legendaryAction);
}
}
md += string.Format("[{0}]: monsters_hd.md#{1}\n", monster.NameVO, Helpers.IdFromName(monster.NameVO));
md += "\n\n";
return md;
}
public static string HtmlToMarkdownString(string html) public static string HtmlToMarkdownString(string html)
{ {
return html return html

View file

@ -1,347 +0,0 @@
# Allosaurus
- NameVO: [Allosaure]
- Large beast, unaligned
- **Armor Class** 13 (natural armor)
- **Hit Points** 51 (6d10 + 18)
- **Speed** 60 ft.
| STR | DEX | CON | INT | WIS | CHA |
| --- | --- | --- | --- | --- | --- |
|19 (+4)|13 (+1)|17 (+3)| 2 (-4)|12 (+1)| 5 (-3)|
- **Skills** Perception +5
- **Senses** passive Perception 15
- **Languages** -
- **Challenge** 2 (450 XP)
## Special Features
**_Pounce_**. If the allosaurus moves at least 30 feet straight toward a creature and then hits it with a claw attack on the same turn, that target must succeed on a DC 13 Strength saving throw or be knocked prone. If the target is prone, the allosaurus can make one bite attack against it as a bonus action.
## Actions
**_Bite_**. Melee Weapon Attack: +6 to hit, reach 5 ft., one target.
_Hit_: 15 (2d10 + 4) piercing damage.
**_Claw_**. Melee Weapon Attack: +6 to hit, reach 5 ft., one target.
_Hit_: 8 (1d8 + 4) slashing damage.
[Allosaure]: monsters_hd.md#allosaure
# Ankylosaurus
- NameVO: [Ankylosaure]
- Huge beast, unaligned
- **Armor Class** 15 (natural armor)
- **Hit Points** 68 (8d12 + 16)
- **Speed** 30 ft.
| STR | DEX | CON | INT | WIS | CHA |
| --- | --- | --- | --- | --- | --- |
|19 (+4)|11 (+0)|15 (+2)| 2 (-4)|12 (+1)| 5 (-3)|
- **Senses** passive Perception 11
- **Languages** -
- **Challenge** 3 (700 XP)
## Special Features
**_Tail_**. Melee Weapon Attack: +7 to hit, reach 10 ft., one target.
_Hit_: 18 (4d6 + 4) bludgeoning damage. If the target is a creature, it must succeed on a DC 14 Strength saving throw or be knocked prone.
[Ankylosaure]: monsters_hd.md#ankylosaure
# Banshee
- NameVO: [Banshie]
- Medium undead, chaotic evil
- **Armor Class** 12
- **Hit Points** 58 (13d8)
- **Speed** 0 ft., fly 40 ft. (hover)
| STR | DEX | CON | INT | WIS | CHA |
| --- | --- | --- | --- | --- | --- |
| 1 (-5)|14 (+2)|10 (+0)|12 (+1)|11 (+0)|17 (+3)|
- **Saving Throws** Wis +2, Cha +5
- **Senses** darkvision 60 ft., passive Perception 10
- **Languages** Common, Elvish
- **Challenge** 4 (1100 XP)
- **Damage Immunities** cold, necrotic, poison
- **Damage Resistances** acid, fire, lightning, thunder; bludgeoning, piercing, and slashing from nonmagical attacks
## Special Features
**_Detect Life_**. The banshee can magically sense the presence of living creatures up to 5 miles away that aren't undead or constructs. She knows the general direction they're in but not their exact locations.
**_Incorporeal Movement_**. The banshee can move through other creatures and objects as if they were difficult terrain. She takes 5 (1d10) force damage if she ends her turn inside an object.
## Actions
**_Corrupting Touch_**. Melee Spell Attack: +4 to hit, reach 5 ft., one target.
_Hit_: 12 (3d6 + 2) necrotic damage.
**_Horrifying Visage_**. Each non-undead creature within 60 feet of the banshee that can see her must succeed on a DC 13 Wisdom saving throw or be frightened for 1 minute. A frightened target can repeat the saving throw at the end of each of its turns, with disadvantage if the banshee is within line of sight, ending the effect on itself on a success. If a target's saving throw is successful or the effect ends for it, the target is immune to the banshee's Horrifying Visage for the next 24 hours.
**_Wail (1/Day)_**. The banshee releases a mournful wail, provided that she isn't in sunlight. This wail has no effect on constructs and undead. All other creatures within 30 feet of her that can hear her must make a DC 13 Constitution saving throw. On a failure, a creature drops to 0 hit points. On a success, a creature takes 10 (3d6) psychic damage.
[Banshie]: monsters_hd.md#banshie
# Cyclops
- NameVO: [Cyclope]
- Huge giant, chaotic neutral
- **Armor Class** 14 (natural armor)
- **Hit Points** 138 (12d12 + 60)
- **Speed** 30 ft.
| STR | DEX | CON | INT | WIS | CHA |
| --- | --- | --- | --- | --- | --- |
|22 (+6)|11 (+0)|20 (+5)| 8 (-1)| 6 (-2)|10 (+0)|
- **Senses** passive Perception 8
- **Languages** Giant
- **Challenge** 6 (2300 XP)
## Special Features
**_Poor Depth Perception_**. The cyclops has disadvantage on any attack roll against a target more than 30 feet away.
## Actions
**_Multiattack_**. The cyclops makes two greatclub attacks.
**_Greatclub_**. Melee Weapon Attack: +9 to hit, reach 10 ft., one target.
_Hit_: 19 (3d8 + 6) bludgeoning damage.
**_Rock_**. Ranged Weapon Attack: +9 to hit, range 30/120 ft., one target.
_Hit_: 28 (4d10 + 6) bludgeoning damage.
[Cyclope]: monsters_hd.md#cyclope
# Flameskull
- NameVO: [Crânefeu]
- Tiny undead, neutral evil
- **Armor Class** 13
- **Hit Points** 40 (9d4 + 18)
- **Speed** 0 ft., fly 40 ft. (hover)
| STR | DEX | CON | INT | WIS | CHA |
| --- | --- | --- | --- | --- | --- |
| 1 (-5)|17 (+3)|14 (+2)|16 (+3)|10 (+0)|11 (+0)|
- **Skills** Arcana +5, Perception +2
- **Senses** darkvision 60 ft., passive Perception 12
- **Languages** Common
- **Challenge** 4 (1100 XP)
- **Damage Immunities** cold, fire, poison
- **Damage Resistances** lightning, necrotic, piercing
## Special Features
**_Illumination_**. The flameskull sheds either dim light in a 15-foot radius, or bright light in a 15-foot radius and dim light for an additional 15 feet. It can switch between the options as an action.
**_Magic Resistance_**. The flameskull has advantage on saving throws against spells and other magical effects.
**_Rejuvenation_**. If the flameskull is destroyed, it regains all its hit points in 1 hour unless holy water is sprinkled on its remains or a _[dispel magic]_ or _[remove curse]_ spell is cast on them.
**_Spellcasting_**. The flameskull is a 5th-level spellcaster. Its spellcasting ability is Intelligence (spell save DC 13, +5 to hit with spell attacks). It requires no somatic or material components to cast its spells. The flameskull has the following wizard spells prepared:
Cantrip (at will): _[mage hand]_
1st level (3 slots): _[magic missile], [shield]_
2nd level (2 slots): _[blur], [flaming sphere]_
3rd level (1 slot): _[fireball]_
## Actions
**_Multiattack_**. The flameskull uses Fire Ray twice.
**_Fire Ray_**. Ranged Spell Attack: +5 to hit, range 30 ft., one target.
_Hit_: 10 (3d6) fire damage.
[Crânefeu]: monsters_hd.md#crânefeu
# Mud Mephit
- NameVO: [Méphite de boue]
- Small elemental, neutral evil
- **Armor Class** 11
- **Hit Points** 27 (6d6 + 6)
- **Speed** 20 ft., fly 20 ft., swim 20 ft.
| STR | DEX | CON | INT | WIS | CHA |
| --- | --- | --- | --- | --- | --- |
| 8 (-1)|12 (+1)|12 (+1)| 9 (-1)|11 (+0)| 7 (-2)|
- **Skills** Stealth +3
- **Senses** darkvision 60 ft., passive Perception 10
- **Languages** Aquan, Terran
- **Challenge** 1/4 (50 XP)
- **Damage Immunities** poison
## Special Features
**_Death Burst_**. When the mephit dies, it explodes in a burst of sticky mud. Each Medium or smaller creature within 5 feet of it must succeed on a DC 11 Dexterity saving throw or be restrained until the end of the creature's next turn.
**_False Appearance_**. While the mephit remains motionless, it is indistinguishable from an ordinary mound of mud.
## Actions
**_Fists_**. Melee Weapon Attack: +3 to hit, reach 5 ft., one creature.
_Hit_: 4 (1d6 + 1) bludgeoning damage.
**_Mud Breath (Recharge 6)_**. The mephit belches viscid mud onto one creature within 5 feet of it. If the target is Medium or smaller, it must succeed on a DC 11 Dexterity saving throw or be restrained for 1 minute. A creature can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success.
[Méphite de boue]: monsters_hd.md#méphite-de-boue
# Pteranodon
- NameVO: [Ptéranodon]
- Medium beast, unaligned
- **Armor Class** 13 (natural armor)
- **Hit Points** 13 (3d8)
- **Speed** 10 ft., fly 60 ft.
| STR | DEX | CON | INT | WIS | CHA |
| --- | --- | --- | --- | --- | --- |
|12 (+1)|15 (+2)|10 (+0)| 2 (-4)| 9 (-1)| 5 (-3)|
- **Skills** Perception +1
- **Senses** passive Perception 11
- **Languages** -
- **Challenge** 1/4 (50 XP)
## Special Features
**_Flyby_**. The pteranodon doesn't provoke an opportunity attack when it flies out of an enemy's reach.
## Actions
**_Bite_**. Melee Weapon Attack: +3 to hit, reach 5 ft., one target.
_Hit_: 6 (2d4 + 1) piercing damage.
[Ptéranodon]: monsters_hd.md#ptéranodon
# Smoke Mephit
- Small elemental, neutral evil
- **Armor Class** 12
- **Hit Points** 22 (5d6 + 5)
- **Speed** 30 ft., fly 30 ft.
| STR | DEX | CON | INT | WIS | CHA |
| --- | --- | --- | --- | --- | --- |
| 6 (-2)|14 (+2)|12 (+1)|10 (+0)|10 (+0)|11 (+0)|
- **Skills** Perception +2, Stealth +4
- **Senses** darkvision 60 ft., passive Perception 12
- **Languages** Auran, Ignan
- **Challenge** 1/4 (50 XP)
- **Damage Immunities** fire, poison
## Special Features
**_Death Burst_**. When the mephit dies, it leaves behind a cloud of smoke that fills a 5-foot-radius sphere centered on its space. The sphere is heavily obscured. Wind disperses the cloud, which otherwise lasts for 1 minute.
**_Innate Spellcasting (1/Day)_**. The mephit can innately cast _[dancing lights]_, requiring no material components. Its innate spellcasting ability is Charisma.
## Actions
**_Claws_**. Melee Weapon Attack: +4 to hit, reach 5 ft., one creature.
_Hit_: 4 (1d4 + 2) slashing damage.
**_Cinder Breath (Recharge 6)_**. The mephit exhales a 15-foot cone of smoldering ash. Each creature in that area must succeed on a DC 10 Dexterity saving throw or be [blinded](conditions_vo.md#blinded) until the end of the mephit's next turn.
# Twig Blight
- Small plant, neutral evil
- **Armor Class** 13 (natural armor)
- **Hit Points** 4 (1d6 + 1)
- **Speed** 20 ft.
| STR | DEX | CON | INT | WIS | CHA |
| --- | --- | --- | --- | --- | --- |
| 6 (-2)|13 (+1)|12 (+1)| 4 (-3)| 8 (-1)| 3 (-4)|
- **Skills** Stealth +3
- **Senses** blindsight 60 ft. ([blind](conditions_vo.md#blinded) beyond this radius), passive Perception 9
- **Languages** understands Common but can't speak
- **Challenge** 1/8 (25 XP)
- **Damage Vulnerabilities** fire
## Special Features
**_False Appearance_**. While the blight remains motionless, it is indistinguishable from a dead shrub.
## Actions
**_Claws_**. Melee Weapon Attack: +3 to hit, reach 5 ft., one target.
_Hit_: 3 (1d4 + 1) piercing damage.
# Yeti
- NameVO: [Yéti]
- Large monstrosity, chaotic evil
- **Armor Class** 12 (natural armor)
- **Hit Points** 51 (6d10 + 18)
- **Speed** 40 ft., climb 40 ft.
| STR | DEX | CON | INT | WIS | CHA |
| --- | --- | --- | --- | --- | --- |
|18 (+4)|13 (+1)|16 (+3)| 8 (-1)|12 (+1)| 7 (-2)|
- **Skills** Perception +3, Stealth +3
- **Senses** darkvision 60 ft., passive Perception 13
- **Languages** Yeti
- **Challenge** 3 (700 XP)
- **Damage Immunities** cold
## Special Features
**_Fear of Fire_**. If the yeti takes fire damage, it has disadvantage on attack rolls and ability checks until the end of its next turn.
**_Keen Smell_**. The yeti has advantage on Wisdom (Perception) checks that rely on smell.
**_Snow Camouflage_**. The yeti has advantage on Dexterity (Stealth) checks made to hide in snowy terrain.
## Actions
**_Multiattack_**. The yeti can use its Chilling Gaze and makes two claw attacks.
**_Claw_**. Melee Weapon Attack: +6 to hit, reach 5 ft., one target.
_Hit_: 7 (1d6 + 4) slashing damage plus 3 (1d6) cold damage.
**_Chilling Gaze_**. The yeti targets one creature it can see within 30 feet of it. If the target can see the yeti, the target must succeed on a DC 13 Constitution saving throw against this magic or take 10 (3d6) cold damage and then be paralyzed for 1 minute, unless it is immune to cold damage. The target can repeat the saving throw at the end of each of its turns, ending the effect on itself on a success. If the target's saving throw is successful, or if the effect ends on it, the target is immune to the Chilling Gaze of all yetis (but not abominable yetis) for 1 hour.
[Yéti]: monsters_hd.md#yéti