mirror of
				https://github.com/Nioux/AideDeJeu.git
				synced 2025-10-30 15:06:06 +00:00 
			
		
		
		
	yield !!!
This commit is contained in:
		
							parent
							
								
									1e48b89ca5
								
							
						
					
					
						commit
						06b6a7cdc3
					
				
					 2 changed files with 13 additions and 9 deletions
				
			
		|  | @ -14,7 +14,7 @@ namespace AideDeJeu.Tools | ||||||
|     { |     { | ||||||
|         public static IEnumerable<Spell> ToSpells(this Markdig.Syntax.MarkdownDocument document) |         public static IEnumerable<Spell> ToSpells(this Markdig.Syntax.MarkdownDocument document) | ||||||
|         { |         { | ||||||
|             var spells = new List<Spell>(); |             //var spells = new List<Spell>(); | ||||||
|             Spell spell = null; |             Spell spell = null; | ||||||
|             foreach (var block in document) |             foreach (var block in document) | ||||||
|             { |             { | ||||||
|  | @ -27,7 +27,8 @@ namespace AideDeJeu.Tools | ||||||
|                     { |                     { | ||||||
|                         if (spell != null) |                         if (spell != null) | ||||||
|                         { |                         { | ||||||
|                             spells.Add(spell); |                             //spells.Add(spell); | ||||||
|  |                             yield return spell; | ||||||
|                         } |                         } | ||||||
|                         spell = new Spell(); |                         spell = new Spell(); | ||||||
|                         spell.Name = spell.NamePHB = headingBlock.Inline.ToContainerString(); |                         spell.Name = spell.NamePHB = headingBlock.Inline.ToContainerString(); | ||||||
|  | @ -129,14 +130,15 @@ namespace AideDeJeu.Tools | ||||||
|             } |             } | ||||||
|             if (spell != null) |             if (spell != null) | ||||||
|             { |             { | ||||||
|                 spells.Add(spell); |                 yield return spell; | ||||||
|  |                 //spells.Add(spell); | ||||||
|             } |             } | ||||||
|             return spells; |             //return spells; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         public static IEnumerable<Monster> ToMonsters(this Markdig.Syntax.MarkdownDocument document) |         public static IEnumerable<Monster> ToMonsters(this Markdig.Syntax.MarkdownDocument document) | ||||||
|         { |         { | ||||||
|             var monsters = new List<Monster>(); |             //var monsters = new List<Monster>(); | ||||||
|             Monster monster = null; |             Monster monster = null; | ||||||
|             List<string> actions = new List<string>(); |             List<string> actions = new List<string>(); | ||||||
|             foreach (var block in document) |             foreach (var block in document) | ||||||
|  | @ -150,7 +152,8 @@ namespace AideDeJeu.Tools | ||||||
|                     { |                     { | ||||||
|                         if (monster != null) |                         if (monster != null) | ||||||
|                         { |                         { | ||||||
|                             monsters.Add(monster); |                             //monsters.Add(monster); | ||||||
|  |                             yield return monster; | ||||||
|                         } |                         } | ||||||
|                         monster = new Monster(); |                         monster = new Monster(); | ||||||
|                         monster.Name = monster.NamePHB = headingBlock.Inline.ToContainerString(); |                         monster.Name = monster.NamePHB = headingBlock.Inline.ToContainerString(); | ||||||
|  | @ -275,9 +278,10 @@ namespace AideDeJeu.Tools | ||||||
|             } |             } | ||||||
|             if (monster != null) |             if (monster != null) | ||||||
|             { |             { | ||||||
|                 monsters.Add(monster); |                 //monsters.Add(monster); | ||||||
|  |                 yield return monster; | ||||||
|             } |             } | ||||||
|             return monsters; |             //return monsters; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         public static string ToString(this Markdig.Syntax.SourceSpan span, string md) |         public static string ToString(this Markdig.Syntax.SourceSpan span, string md) | ||||||
|  |  | ||||||
|  | @ -49,7 +49,7 @@ L'aboleth peut effectuer 3 actions légendaires qu'il choisit parmi celles décr | ||||||
| 
 | 
 | ||||||
| # Abothid | # Abothid | ||||||
| - SizeAlignment: Aberration de taille M, loyal mauvais | - SizeAlignment: Aberration de taille M, loyal mauvais | ||||||
| - ArmorClass: CA 15 (armure naturelle) | - ArmorClass: 15 (armure naturelle) | ||||||
| - HitPoints: 104 (16d8+32) | - HitPoints: 104 (16d8+32) | ||||||
| - Speed: 9 m au sol | - Speed: 9 m au sol | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Yan Maniez
						Yan Maniez