diff --git a/DBInitializer.cs b/DBInitializer.cs index 5775a31..6f5008f 100644 --- a/DBInitializer.cs +++ b/DBInitializer.cs @@ -194,15 +194,13 @@ private static async Task TransferAbilities(ApplicationDbContext context, PokeAp : Item.Name; var Name_DE = Item.Names.FirstOrDefault(n => n.Language.Name == "de")?.Name; var Effect = Item.EffectEntries.FirstOrDefault(n => n.Language.Name == "en") != null - ? Item.EffectEntries.FirstOrDefault(n => n.Language.Name == "en").Effect.Replace("one stage", "2") - .Replace("two stages", "4").Replace("three stages", "6") + ? Item.EffectEntries.FirstOrDefault(n => n.Language.Name == "en").Effect : Item.FlavorTextEntries.FirstOrDefault(n => n.Language.Name == "en") != null ? Item.FlavorTextEntries.FirstOrDefault(n => n.Language.Name == "en").FlavorText : "No Entry"; var ShortEffect = Item.EffectEntries.FirstOrDefault(n => n.Language.Name == "en") != null - ? Item.EffectEntries.FirstOrDefault(n => n.Language.Name == "en").ShortEffect.Replace("one stage", "2") - .Replace("two stages", "4").Replace("three stages", "6") + ? Item.EffectEntries.FirstOrDefault(n => n.Language.Name == "en").ShortEffect : Item.FlavorTextEntries.FirstOrDefault(n => n.Language.Name == "en") != null ? Item.FlavorTextEntries.FirstOrDefault(n => n.Language.Name == "en").FlavorText : "No Entry"; @@ -289,9 +287,8 @@ private static async Task TransferMoves(ApplicationDbContext context, PokeApiCli ? m.EffectEntries.FirstOrDefault(n => n.Language.Name == "de").Effect : m.EffectEntries.FirstOrDefault(n => n.Language.Name == "en") != null ? m.EffectEntries.FirstOrDefault(n => n.Language.Name == "en").Effect - .Replace("$effect_chance", $"{m.EffectChance}").Replace("1/16", "gradD4") + .Replace("1/16", "gradD4") .Replace("1/8", "(2*Grad)D4") - .Replace("user's max HP", "").Replace("max HP", "") : m.FlavorTextEntries.FirstOrDefault(n => n.Language.Name == "en") != null ? m.FlavorTextEntries.FirstOrDefault(n => n.Language.Name == "en").FlavorText : "No Data"; @@ -306,9 +303,8 @@ private static async Task TransferMoves(ApplicationDbContext context, PokeApiCli ? m.EffectEntries.FirstOrDefault(n => n.Language.Name == "de").ShortEffect : m.EffectEntries.FirstOrDefault(n => n.Language.Name == "en") != null ? m.EffectEntries.FirstOrDefault(n => n.Language.Name == "en").ShortEffect - .Replace("$effect_chance", $"{m.EffectChance}").Replace("1/16", "gradD4") + .Replace("1/16", "gradD4") .Replace("1/8", "(2*Grad)D4") - .Replace("user's max HP", "").Replace("max HP", "") : m.FlavorTextEntries.FirstOrDefault(n => n.Language.Name == "en") != null ? m.FlavorTextEntries.FirstOrDefault(n => n.Language.Name == "en").FlavorText : "No Data"; diff --git a/Pages/LearnSet/Index.cshtml b/Pages/LearnSet/Index.cshtml new file mode 100644 index 0000000..56c7f21 --- /dev/null +++ b/Pages/LearnSet/Index.cshtml @@ -0,0 +1,47 @@ +@page +@model pkmnWildLife.Pages.LearnSet.IndexModel + +@{ + ViewData["Title"] = "Index"; +} + +
+ Create New +
+Who | +What | + ++ @Html.DisplayNameFor(model => model.Learnset[0].how) + | ++ @Html.DisplayNameFor(model => model.Learnset[0].level) + | ++ |
---|---|---|---|---|
@item.mon.Name | +@item.move.Name | ++ @Html.DisplayFor(modelItem => item.how) + | ++ @Html.DisplayFor(modelItem => item.level) + | ++ Edit | + Details | + Delete + | +
+ Create New +
++ @Html.DisplayNameFor(model => model.Pokemon[0].Name) + | +HP | +ATK | +DEF | +SpATK | +SpDEF | +Speed | + + ++ Typen + | +
---|---|---|---|---|---|---|---|
+ + @if (!string.IsNullOrEmpty(item.Form_DE)) + { + @Html.Raw($"{item.Form_DE}") + } + else if (!string.IsNullOrEmpty(item.Form)) + { + @Html.Raw($"{item.Form}") + } + else if (!string.IsNullOrEmpty(item.Name_DE)) + { + @Html.Raw(item.Name_DE) + } + else + { + @Html.DisplayFor(modelItem => item.Name) + } + + + + | + +@item.HEALTH | +@item.ATK | +@item.DEF | +@item.SP_ATK | +@item.SP_DEF | +@item.SPEED | + + + +