Grab bag of unstaged changes

This commit is contained in:
Megan Edwards
2023-10-30 03:18:09 -04:00
parent e96e7839e4
commit 5d676e7e1c
9 changed files with 71 additions and 63 deletions

View File

@@ -333,6 +333,11 @@ namespace PkmnFoundations.Structures
{
return new ValidationSummary() { IsValid = false }; // form not in pokedex
}
// todo: Hardcoded checks don't belong here, but in the database.
// We need a Form.Generation and Form.CompatibleGeneration field
// to denote which generation a form was introduced in, and which
// generation it's broadly compatible with for trading.
//if (thePokemon.Form.CompatibleGeneration > Generations.Generation4) return new ValidationSummary() { IsValid = false };
if (thePokemon.SpeciesID == 479 && thePokemon.FormID != 0) return new ValidationSummary() { IsValid = false }; // rotoms
if (thePokemon.SpeciesID == 487 && thePokemon.FormID != 0) return new ValidationSummary() { IsValid = false }; // origin giratina
if (thePokemon.SpeciesID == 492 && thePokemon.FormID != 0) return new ValidationSummary() { IsValid = false }; // sky shaymin

View File

@@ -8,5 +8,8 @@ namespace PkmnFoundations.Support
public struct ValidationSummary
{
public bool IsValid { get; set; }
// todo: Put reasons validation failed here, such as out-of-range values, bad egg, EVs > 510, etc.
// public bool TooMuchEvs {get; set;}
}
}

View File

@@ -110,6 +110,13 @@ namespace PkmnFoundations.Wfc
ValidationSummary summary = Pokemon.Validate();
if (!summary.IsValid) return false;
// pkhex check:
// https://github.com/mm201/pkmn-classic-framework/pull/71
//var decrypted = PKX.DecryptArray45(DataActual);
//var la = new LegalityAnalysis(decrypted);
//report = la.Report();
//if (report != "Legal!") return false;
return true;
}

View File

@@ -0,0 +1,31 @@
NatDex Name No ribbon including Wiimmfi events No ribbon full legal Any including ribbons
251 Celebi 7 7 7
493 Arceus 4 8 6
494 Victini x x x
643 Reshiram 6 6 6
644 Zekrom 6 6 6
647 Keldeo x x x
648 Meloetta x x x
649 Genesect x x 5
716 Xerneas 7 7 6
717 Yveltal 7 7 6
718 Zygarde 8 8 7
719 Diancie x x 6
720 Hoopa x x x
721 Volcanion x x x
785 Tapu Koko 8 8 7
786 Tapu Lele 8 8 7
787 Tapu Bulu 8 8 7
788 Tapu Fini 8 8 7
789 Cosmog x x x
790 Cosmoem x x x
791 Solgaleo 8 8 7
792 Lunala 8 8 7
800 Necrozma 8 8 7
801 Magearna x x 8
802 Marshadow x x x
807 Zeraora x x 8
Cap pikas other than Partner Cap are shiny locked.
Ash Greninja is shiny locked.
Event Vivillons are shiny locked until Fancy in SV.

View File

@@ -1,4 +1,4 @@
<%@ Page Title="Poké Classic Network" Language="C#" MasterPageFile="~/masters/ThreeColumn.master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="PkmnFoundations.GTS.Default" %>
<%@ Page Title="Poké Classic Network" Language="C#" MasterPageFile="~/masters/MasterPage.master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="PkmnFoundations.GTS.Default" %>
<%@ Register TagPrefix="pf" Namespace="PkmnFoundations.Web" Assembly="PkmnFoundations.Web" %>
<%@ Register TagPrefix="pf" TagName="LabelTextBox" Src="~/controls/LabelTextBox.ascx" %>
<%@ Register TagPrefix="pf" TagName="DnsAddress" Src="~/controls/DnsAddress.ascx" %>
@@ -7,9 +7,7 @@
<pf:HeaderColour ID="HeaderColour1" CssClass="home" runat="server" />
</asp:Content>
<asp:Content ID="conHeadingArea" ContentPlaceHolderID="cpHeadingArea" runat="server">
</asp:Content>
<%--
<asp:Content ID="conLeft" ContentPlaceHolderID="cpLeft" runat="server">
&nbsp;
<pf:RequireCss Key="login" CssUrl="~/css/login.css" After="main" runat="server" />
@@ -26,15 +24,7 @@
</asp:PlaceHolder>
</asp:Content>
<asp:Content ID="conRight" ContentPlaceHolderID="cpRight" runat="server">
<div class="gtsSection gtsTwitter">
<a class="twitter-timeline" data-width="236" data-height="600" href="https://twitter.com/pcnstatus?ref_src=twsrc%5Etfw">Tweets by pcnstatus</a> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
<script>!function (d, s, id) { var js, fjs = d.getElementsByTagName(s)[0], p = /^http:/.test(d.location) ? 'http' : 'https'; if (!d.getElementById(id)) { js = d.createElement(s); js.id = id; js.src = p + "://platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js, fjs); } }(document, "script", "twitter-wjs");</script>
</div>
</asp:Content>
%--%>
<asp:Content ID="conMain" ContentPlaceHolderID="cpMain" runat="server">

View File

@@ -7,11 +7,13 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace PkmnFoundations.GTS {
public partial class Default {
namespace PkmnFoundations.GTS
{
public partial class Default
{
/// <summary>
/// HeaderColour1 control.
/// </summary>
@@ -20,50 +22,5 @@ namespace PkmnFoundations.GTS {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::PkmnFoundations.Web.HeaderColour HeaderColour1;
/// <summary>
/// theForm control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm theForm;
/// <summary>
/// txtUsername control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::PkmnFoundations.GTS.controls.LabelTextBox txtUsername;
/// <summary>
/// txtPassword control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::PkmnFoundations.GTS.controls.LabelTextBox txtPassword;
/// <summary>
/// btnSubmit control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnSubmit;
/// <summary>
/// hlRegister control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HyperLink hlRegister;
}
}

View File

@@ -119,6 +119,11 @@
<td class="pfFormValue"><asp:Literal ID="litVersion" runat="server" />
</td>
</tr>
<tr class="pfFormPair">
<th class="pfFormKey">Hax check</th>
<td class="pfFormValue"><asp:Literal ID="litHaxCheck" runat="server" />
</td>
</tr>
</table>
</div>

View File

@@ -139,6 +139,7 @@ namespace PkmnFoundations.Web.gts
litNature.Text = pkmn.Nature.ToString(); // todo: i18n
litAbility.Text = pkmn.Ability == null ? "" : pkmn.Ability.Name.ToString();
litVersion.Text = pkmn.Version.ToString();
litHaxCheck.Text = pkmn.Validate().IsValid ? "Pass" : "Fail";
// xxx: loop
litHpCurr.Text = pkmn.HP.ToString();

View File

@@ -248,6 +248,15 @@ namespace PkmnFoundations.Web.gts
/// </remarks>
protected global::System.Web.UI.WebControls.Literal litVersion;
/// <summary>
/// litHaxCheck control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal litHaxCheck;
/// <summary>
/// litHpIv control.
/// </summary>