Commit 072e531a authored by nanahira's avatar nanahira

Merge branch 'Android' of https://github.com/Unicorn369/YGOPro2_Droid into Android

parents 827b2770 75088ad9
...@@ -41,6 +41,7 @@ AI_core_vs2017solution/build/android/libs/ ...@@ -41,6 +41,7 @@ AI_core_vs2017solution/build/android/libs/
AI_core_vs2017solution/build/android/obj/ AI_core_vs2017solution/build/android/obj/
# ygopro # ygopro
ai/
cdb/ cdb/
config/ config/
deck/ deck/
......
...@@ -5,8 +5,6 @@ VisualStudioVersion = 15.0.26403.3 ...@@ -5,8 +5,6 @@ VisualStudioVersion = 15.0.26403.3
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ocgcore", "ocgcore\ocgcore.vcxproj", "{63635A2D-8303-46F7-8C8B-D1C36655F820}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ocgcore", "ocgcore\ocgcore.vcxproj", "{63635A2D-8303-46F7-8C8B-D1C36655F820}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "coreWrapper", "coreWrapper\coreWrapper.csproj", "{5448596E-A4D2-4011-B8C1-5228260040D1}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
...@@ -27,20 +25,11 @@ Global ...@@ -27,20 +25,11 @@ Global
{63635A2D-8303-46F7-8C8B-D1C36655F820}.Release|x64.Build.0 = Release|x64 {63635A2D-8303-46F7-8C8B-D1C36655F820}.Release|x64.Build.0 = Release|x64
{63635A2D-8303-46F7-8C8B-D1C36655F820}.Release|x86.ActiveCfg = Release|Win32 {63635A2D-8303-46F7-8C8B-D1C36655F820}.Release|x86.ActiveCfg = Release|Win32
{63635A2D-8303-46F7-8C8B-D1C36655F820}.Release|x86.Build.0 = Release|Win32 {63635A2D-8303-46F7-8C8B-D1C36655F820}.Release|x86.Build.0 = Release|Win32
{5448596E-A4D2-4011-B8C1-5228260040D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5448596E-A4D2-4011-B8C1-5228260040D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5448596E-A4D2-4011-B8C1-5228260040D1}.Debug|x64.ActiveCfg = Debug|x64
{5448596E-A4D2-4011-B8C1-5228260040D1}.Debug|x64.Build.0 = Debug|x64
{5448596E-A4D2-4011-B8C1-5228260040D1}.Debug|x86.ActiveCfg = Debug|Any CPU
{5448596E-A4D2-4011-B8C1-5228260040D1}.Debug|x86.Build.0 = Debug|Any CPU
{5448596E-A4D2-4011-B8C1-5228260040D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5448596E-A4D2-4011-B8C1-5228260040D1}.Release|Any CPU.Build.0 = Release|Any CPU
{5448596E-A4D2-4011-B8C1-5228260040D1}.Release|x64.ActiveCfg = Release|x64
{5448596E-A4D2-4011-B8C1-5228260040D1}.Release|x64.Build.0 = Release|x64
{5448596E-A4D2-4011-B8C1-5228260040D1}.Release|x86.ActiveCfg = Release|Any CPU
{5448596E-A4D2-4011-B8C1-5228260040D1}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6B0513E2-BC41-4C0B-91E8-E596BD9336CF}
EndGlobalSection
EndGlobal EndGlobal
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("Precy")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Precy")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
//将 ComVisible 设置为 false 将使此程序集中的类型
//对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("5448596e-a4d2-4011-b8c1-5228260040d1")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{5448596E-A4D2-4011-B8C1-5228260040D1}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Percy</RootNamespace>
<AssemblyName>System.Servicemodel.Faltexception</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="coreWrapper.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<StartAction>Project</StartAction>
<StartProgram>D:\yugioh\ygopro2.exe</StartProgram>
</PropertyGroup>
</Project>
\ No newline at end of file
...@@ -6,7 +6,7 @@ using UnityEditor; ...@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaBendEditor : MegaModifierEditor public class MegaBendEditor : MegaModifierEditor
{ {
public override string GetHelpString() { return "Bend Modifier by Chris West"; } public override string GetHelpString() { return "Bend Modifier by Chris West"; }
public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers\\bend_help.png"); } public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers/bend_help.png"); }
public override bool Inspector() public override bool Inspector()
{ {
......
...@@ -6,7 +6,7 @@ using UnityEditor; ...@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaBubbleEditor : MegaModifierEditor public class MegaBubbleEditor : MegaModifierEditor
{ {
public override string GetHelpString() { return "Bubble Modifier by Chris West"; } public override string GetHelpString() { return "Bubble Modifier by Chris West"; }
public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers\\bubble_help.png"); } public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers/bubble_help.png"); }
public override bool Inspector() public override bool Inspector()
{ {
......
...@@ -6,7 +6,7 @@ using UnityEditor; ...@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaDisplaceEditor : MegaModifierEditor public class MegaDisplaceEditor : MegaModifierEditor
{ {
public override string GetHelpString() { return "Displace Modifier by Chris West"; } public override string GetHelpString() { return "Displace Modifier by Chris West"; }
//public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers\\bend_web.png"); } //public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers/bend_web.png"); }
public override bool Inspector() public override bool Inspector()
{ {
......
...@@ -6,7 +6,7 @@ public class MegaFFDEditor : MegaModifierEditor ...@@ -6,7 +6,7 @@ public class MegaFFDEditor : MegaModifierEditor
{ {
Vector3 pm = new Vector3(); Vector3 pm = new Vector3();
public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers\\ffd_help.png"); } public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers/ffd_help.png"); }
bool showpoints = true; bool showpoints = true;
......
...@@ -6,7 +6,7 @@ using UnityEditor; ...@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaHumpEditor : MegaModifierEditor public class MegaHumpEditor : MegaModifierEditor
{ {
public override string GetHelpString() { return "Hump Modifier by Chris West"; } public override string GetHelpString() { return "Hump Modifier by Chris West"; }
public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers\\hump_help.png"); } public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers/hump_help.png"); }
public override bool Inspector() public override bool Inspector()
{ {
......
...@@ -6,7 +6,7 @@ using UnityEditor; ...@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaMeltEditor : MegaModifierEditor public class MegaMeltEditor : MegaModifierEditor
{ {
public override string GetHelpString() { return "Melt Modifier by Chris West"; } public override string GetHelpString() { return "Melt Modifier by Chris West"; }
//public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers\\bend_help.png"); } //public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers/bend_help.png"); }
public override bool Inspector() public override bool Inspector()
{ {
......
...@@ -6,7 +6,7 @@ using UnityEditor; ...@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaNoiseEditor : MegaModifierEditor public class MegaNoiseEditor : MegaModifierEditor
{ {
public override string GetHelpString() { return "Noise Modifier by Chris West"; } public override string GetHelpString() { return "Noise Modifier by Chris West"; }
public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers\\noise_help.png"); } public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers/noise_help.png"); }
public override bool Inspector() public override bool Inspector()
{ {
......
...@@ -6,7 +6,7 @@ using UnityEngine; ...@@ -6,7 +6,7 @@ using UnityEngine;
public class MegaPageFlipEditor : MegaModifierEditor public class MegaPageFlipEditor : MegaModifierEditor
{ {
public override string GetHelpString() { return "Page Flip Modifier by Chris West"; } public override string GetHelpString() { return "Page Flip Modifier by Chris West"; }
//public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers\\bend_help.png"); } //public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers/bend_help.png"); }
bool advanced = false; bool advanced = false;
......
...@@ -6,7 +6,7 @@ using UnityEditor; ...@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaPushEditor : MegaModifierEditor public class MegaPushEditor : MegaModifierEditor
{ {
public override string GetHelpString() { return "Push Modifier by Chris West"; } public override string GetHelpString() { return "Push Modifier by Chris West"; }
public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers\\push_help.png"); } public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers/push_help.png"); }
public override bool Inspector() public override bool Inspector()
{ {
......
...@@ -6,7 +6,7 @@ using UnityEditor; ...@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaRadialSkewEditor : MegaModifierEditor public class MegaRadialSkewEditor : MegaModifierEditor
{ {
public override string GetHelpString() { return "Radial Skew Modifier by Chris West"; } public override string GetHelpString() { return "Radial Skew Modifier by Chris West"; }
public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers\\skew_help.png"); } public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers/skew_help.png"); }
public override bool Inspector() public override bool Inspector()
{ {
......
...@@ -6,7 +6,7 @@ using UnityEditor; ...@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaRubberEditor : MegaModifierEditor public class MegaRubberEditor : MegaModifierEditor
{ {
public override string GetHelpString() { return "Rubber Modifier by Chris West"; } public override string GetHelpString() { return "Rubber Modifier by Chris West"; }
public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers\\bend_help.png"); } public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers/bend_help.png"); }
public override bool DisplayCommon() { return false; } public override bool DisplayCommon() { return false; }
public override bool Inspector() public override bool Inspector()
......
...@@ -7,7 +7,7 @@ using UnityEditor; ...@@ -7,7 +7,7 @@ using UnityEditor;
public class MegaSelectionEditor : MegaModifierEditor public class MegaSelectionEditor : MegaModifierEditor
{ {
public override string GetHelpString() { return "Selection Modifier by Chris West"; } public override string GetHelpString() { return "Selection Modifier by Chris West"; }
//public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers\\bend_help.png"); } //public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers/bend_help.png"); }
public override bool DisplayCommon() { return false; } public override bool DisplayCommon() { return false; }
......
...@@ -5,7 +5,7 @@ using UnityEditor; ...@@ -5,7 +5,7 @@ using UnityEditor;
public class MegaSimpleEditor : MegaModifierEditor public class MegaSimpleEditor : MegaModifierEditor
{ {
public override string GetHelpString() { return "Simple Modifier by Chris West"; } public override string GetHelpString() { return "Simple Modifier by Chris West"; }
public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers\\bend_help.png"); } public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers/bend_help.png"); }
public override bool Inspector() public override bool Inspector()
{ {
......
...@@ -6,7 +6,7 @@ using UnityEditor; ...@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaSinusCurveEditor : MegaModifierEditor public class MegaSinusCurveEditor : MegaModifierEditor
{ {
public override string GetHelpString() { return "Sinus Curve Modifier by Unity"; } public override string GetHelpString() { return "Sinus Curve Modifier by Unity"; }
//public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers\\bend_help.png"); } //public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers/bend_help.png"); }
public override bool Inspector() public override bool Inspector()
{ {
......
...@@ -6,7 +6,7 @@ using UnityEditor; ...@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaSqueezeEditor : MegaModifierEditor public class MegaSqueezeEditor : MegaModifierEditor
{ {
public override string GetHelpString() { return "Squeeze Modifier by Chris West"; } public override string GetHelpString() { return "Squeeze Modifier by Chris West"; }
//public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers\\taper_help.png"); } //public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers/taper_help.png"); }
public override bool Inspector() public override bool Inspector()
{ {
......
...@@ -6,7 +6,7 @@ using UnityEditor; ...@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaStretchEditor : MegaModifierEditor public class MegaStretchEditor : MegaModifierEditor
{ {
public override string GetHelpString() { return "Stretch Modifier by Chris West"; } public override string GetHelpString() { return "Stretch Modifier by Chris West"; }
public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers\\stretch_help.png"); } public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers/stretch_help.png"); }
public override bool Inspector() public override bool Inspector()
{ {
......
...@@ -6,7 +6,7 @@ using UnityEditor; ...@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaTaperEditor : MegaModifierEditor public class MegaTaperEditor : MegaModifierEditor
{ {
public override string GetHelpString() { return "Taper Modifier by Chris West"; } public override string GetHelpString() { return "Taper Modifier by Chris West"; }
public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers\\taper_help.png"); } public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers/taper_help.png"); }
public override bool Inspector() public override bool Inspector()
{ {
......
...@@ -6,7 +6,7 @@ using UnityEditor; ...@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaTwistEditor : MegaModifierEditor public class MegaTwistEditor : MegaModifierEditor
{ {
public override string GetHelpString() { return "Twist Modifier by Chris West"; } public override string GetHelpString() { return "Twist Modifier by Chris West"; }
public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers\\twist_help.png"); } public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers/twist_help.png"); }
public override bool Inspector() public override bool Inspector()
{ {
......
...@@ -6,7 +6,7 @@ using UnityEditor; ...@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaVertColSelectEditor : MegaModifierEditor public class MegaVertColSelectEditor : MegaModifierEditor
{ {
public override string GetHelpString() { return "Vertex Color Select Modifier by Chris West"; } public override string GetHelpString() { return "Vertex Color Select Modifier by Chris West"; }
//public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers\\bend_help.png"); } //public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers/bend_help.png"); }
public override bool DisplayCommon() { return false; } public override bool DisplayCommon() { return false; }
......
...@@ -6,7 +6,7 @@ using UnityEditor; ...@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaVertNoiseEditor : MegaModifierEditor public class MegaVertNoiseEditor : MegaModifierEditor
{ {
public override string GetHelpString() { return "Vertical Noise Modifier by Chris West"; } public override string GetHelpString() { return "Vertical Noise Modifier by Chris West"; }
public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers\\noise_help.png"); } public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers/noise_help.png"); }
public override bool Inspector() public override bool Inspector()
{ {
......
...@@ -6,7 +6,7 @@ using UnityEditor; ...@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaVolSelectEditor : MegaModifierEditor public class MegaVolSelectEditor : MegaModifierEditor
{ {
public override string GetHelpString() { return "Vol Select Modifier by Chris West"; } public override string GetHelpString() { return "Vol Select Modifier by Chris West"; }
//public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers\\bend_help.png"); } //public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers/bend_help.png"); }
public override bool DisplayCommon() { return false; } public override bool DisplayCommon() { return false; }
......
...@@ -6,7 +6,7 @@ using UnityEditor; ...@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaWaveEditor : MegaModifierEditor public class MegaWaveEditor : MegaModifierEditor
{ {
public override string GetHelpString() { return "Wave Modifier by Chris West"; } public override string GetHelpString() { return "Wave Modifier by Chris West"; }
public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers\\wave_help.png"); } public override Texture LoadImage() { return (Texture)EditorGUIUtility.LoadRequired("MegaFiers/wave_help.png"); }
public override bool Inspector() public override bool Inspector()
{ {
......
fileFormatVersion: 2
guid: 73132aa60cb2f2a4fb89f09c6777b7f5
timeCreated: 1476610278
licenseType: Pro
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Any:
second:
enabled: 1
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
data:
first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using YGOSharp.OCGWrapper.Enums;
public class Book : WindowServant2D public class Book : WindowServant2D
{ {
...@@ -102,15 +103,15 @@ public class Book : WindowServant2D ...@@ -102,15 +103,15 @@ public class Book : WindowServant2D
} }
foreach (var item in Program.I().ocgcore.cards) foreach (var item in Program.I().ocgcore.cards)
{ {
if (item.p.location == (UInt32)game_location.search) if (item.p.location == (UInt32)CardLocation.Search)
{ {
continue; continue;
} }
if (item.p.location == (UInt32)game_location.LOCATION_UNKNOWN) if (item.p.location == (UInt32)CardLocation.Unknown)
{ {
continue; continue;
} }
if (item.p.location == (UInt32)game_location.LOCATION_DECK) if (item.p.location == (UInt32)CardLocation.Deck)
{ {
continue; continue;
} }
...@@ -132,7 +133,7 @@ public class Book : WindowServant2D ...@@ -132,7 +133,7 @@ public class Book : WindowServant2D
master = new MultiStringMaster(); master = new MultiStringMaster();
foreach (var item in Program.I().ocgcore.cards) foreach (var item in Program.I().ocgcore.cards)
{ {
if (item.p.location == (UInt32)game_location.search) if (item.p.location == (UInt32)CardLocation.Search)
{ {
continue; continue;
} }
...@@ -169,11 +170,11 @@ public class Book : WindowServant2D ...@@ -169,11 +170,11 @@ public class Book : WindowServant2D
bool died = false; bool died = false;
foreach (var item in Program.I().ocgcore.cards) foreach (var item in Program.I().ocgcore.cards)
{ {
if (item.p.location == (UInt32)game_location.search) if (item.p.location == (UInt32)CardLocation.Search)
{ {
continue; continue;
} }
if (item.p.location == (UInt32)game_location.LOCATION_UNKNOWN) if (item.p.location == (UInt32)CardLocation.Unknown)
{ {
continue; continue;
} }
...@@ -181,15 +182,15 @@ public class Book : WindowServant2D ...@@ -181,15 +182,15 @@ public class Book : WindowServant2D
{ {
if (item.p.controller == i) if (item.p.controller == i)
{ {
if (item.p.location == (UInt32)game_location.LOCATION_MZONE || item.p.location == (UInt32)game_location.LOCATION_SZONE) if (item.p.location == (UInt32)CardLocation.MonsterZone || item.p.location == (UInt32)CardLocation.SpellZone)
{ {
fieldCards[i]++; fieldCards[i]++;
} }
if (item.p.location == (UInt32)game_location.LOCATION_HAND) if (item.p.location == (UInt32)CardLocation.Hand)
{ {
handCards[i]++; handCards[i]++;
} }
if (item.p.location == (UInt32)game_location.LOCATION_GRAVE || item.p.location == (UInt32)game_location.LOCATION_REMOVED) if (item.p.location == (UInt32)CardLocation.Grave || item.p.location == (UInt32)CardLocation.Removed)
{ {
resourceCards[i]++; resourceCards[i]++;
} }
......
using UnityEngine; using UnityEngine;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using YGOSharp.OCGWrapper.Enums;
public class CardDescription : Servant public class CardDescription : Servant
{ {
...@@ -251,30 +252,30 @@ public class CardDescription : Servant ...@@ -251,30 +252,30 @@ public class CardDescription : Servant
{ {
if (gps.controller == 0) if (gps.controller == 0)
{ {
if ((gps.location & (UInt32)game_location.LOCATION_GRAVE) > 0) if ((gps.location & (UInt32)CardLocation.Grave) > 0)
{ {
myGrave.Add(curCard); myGrave.Add(curCard);
} }
if ((gps.location & (UInt32)game_location.LOCATION_REMOVED) > 0) if ((gps.location & (UInt32)CardLocation.Removed) > 0)
{ {
myBanished.Add(curCard); myBanished.Add(curCard);
} }
if ((gps.location & (UInt32)game_location.LOCATION_EXTRA) > 0) if ((gps.location & (UInt32)CardLocation.Extra) > 0)
{ {
myExtra.Add(curCard); myExtra.Add(curCard);
} }
} }
else else
{ {
if ((gps.location & (UInt32)game_location.LOCATION_GRAVE) > 0) if ((gps.location & (UInt32)CardLocation.Grave) > 0)
{ {
opGrave.Add(curCard); opGrave.Add(curCard);
} }
if ((gps.location & (UInt32)game_location.LOCATION_REMOVED) > 0) if ((gps.location & (UInt32)CardLocation.Removed) > 0)
{ {
opBanished.Add(curCard); opBanished.Add(curCard);
} }
if ((gps.location & (UInt32)game_location.LOCATION_EXTRA) > 0) if ((gps.location & (UInt32)CardLocation.Extra) > 0)
{ {
opExtra.Add(curCard); opExtra.Add(curCard);
} }
......
...@@ -105,72 +105,72 @@ public static class TcpHelper ...@@ -105,72 +105,72 @@ public static class TcpHelper
{ {
MemoryStream memoryStream = new MemoryStream(datas[i]); MemoryStream memoryStream = new MemoryStream(datas[i]);
BinaryReader r = new BinaryReader(memoryStream); BinaryReader r = new BinaryReader(memoryStream);
var ms = (YGOSharp.Network.Enums.StocMessage)(r.ReadByte()); var ms = (StocMessage)(r.ReadByte());
switch (ms) switch (ms)
{ {
case YGOSharp.Network.Enums.StocMessage.GameMsg: case StocMessage.GameMsg:
((Room)Program.I().room).StocMessage_GameMsg(r); Program.I().room.StocMessage_GameMsg(r);
break; break;
case YGOSharp.Network.Enums.StocMessage.ErrorMsg: case StocMessage.ErrorMsg:
((Room)Program.I().room).StocMessage_ErrorMsg(r); Program.I().room.StocMessage_ErrorMsg(r);
break; break;
case YGOSharp.Network.Enums.StocMessage.SelectHand: case StocMessage.SelectHand:
((Room)Program.I().room).StocMessage_SelectHand(r); Program.I().room.StocMessage_SelectHand(r);
break; break;
case YGOSharp.Network.Enums.StocMessage.SelectTp: case StocMessage.SelectTp:
((Room)Program.I().room).StocMessage_SelectTp(r); Program.I().room.StocMessage_SelectTp(r);
break; break;
case YGOSharp.Network.Enums.StocMessage.HandResult: case StocMessage.HandResult:
((Room)Program.I().room).StocMessage_HandResult(r); Program.I().room.StocMessage_HandResult(r);
break; break;
case YGOSharp.Network.Enums.StocMessage.TpResult: case StocMessage.TpResult:
((Room)Program.I().room).StocMessage_TpResult(r); Program.I().room.StocMessage_TpResult(r);
break; break;
case YGOSharp.Network.Enums.StocMessage.ChangeSide: case StocMessage.ChangeSide:
((Room)Program.I().room).StocMessage_ChangeSide(r); Program.I().room.StocMessage_ChangeSide(r);
TcpHelper.SaveRecord(); TcpHelper.SaveRecord();
break; break;
case YGOSharp.Network.Enums.StocMessage.WaitingSide: case StocMessage.WaitingSide:
((Room)Program.I().room).StocMessage_WaitingSide(r); Program.I().room.StocMessage_WaitingSide(r);
TcpHelper.SaveRecord(); TcpHelper.SaveRecord();
break; break;
case YGOSharp.Network.Enums.StocMessage.CreateGame: case StocMessage.CreateGame:
((Room)Program.I().room).StocMessage_CreateGame(r); Program.I().room.StocMessage_CreateGame(r);
break; break;
case YGOSharp.Network.Enums.StocMessage.JoinGame: case StocMessage.JoinGame:
((Room)Program.I().room).StocMessage_JoinGame(r); Program.I().room.StocMessage_JoinGame(r);
break; break;
case YGOSharp.Network.Enums.StocMessage.TypeChange: case StocMessage.TypeChange:
((Room)Program.I().room).StocMessage_TypeChange(r); Program.I().room.StocMessage_TypeChange(r);
break; break;
case YGOSharp.Network.Enums.StocMessage.LeaveGame: case StocMessage.LeaveGame:
((Room)Program.I().room).StocMessage_LeaveGame(r); Program.I().room.StocMessage_LeaveGame(r);
break; break;
case YGOSharp.Network.Enums.StocMessage.DuelStart: case StocMessage.DuelStart:
((Room)Program.I().room).StocMessage_DuelStart(r); Program.I().room.StocMessage_DuelStart(r);
break; break;
case YGOSharp.Network.Enums.StocMessage.DuelEnd: case StocMessage.DuelEnd:
((Room)Program.I().room).StocMessage_DuelEnd(r); Program.I().room.StocMessage_DuelEnd(r);
TcpHelper.SaveRecord(); TcpHelper.SaveRecord();
break; break;
case YGOSharp.Network.Enums.StocMessage.Replay: case StocMessage.Replay:
((Room)Program.I().room).StocMessage_Replay(r); Program.I().room.StocMessage_Replay(r);
TcpHelper.SaveRecord(); TcpHelper.SaveRecord();
break; break;
case YGOSharp.Network.Enums.StocMessage.TimeLimit: case StocMessage.TimeLimit:
((Ocgcore)Program.I().ocgcore).StocMessage_TimeLimit(r); Program.I().ocgcore.StocMessage_TimeLimit(r);
break; break;
case YGOSharp.Network.Enums.StocMessage.Chat: case StocMessage.Chat:
((Room)Program.I().room).StocMessage_Chat(r); Program.I().room.StocMessage_Chat(r);
break; break;
case YGOSharp.Network.Enums.StocMessage.HsPlayerEnter: case StocMessage.HsPlayerEnter:
((Room)Program.I().room).StocMessage_HsPlayerEnter(r); Program.I().room.StocMessage_HsPlayerEnter(r);
break; break;
case YGOSharp.Network.Enums.StocMessage.HsPlayerChange: case StocMessage.HsPlayerChange:
((Room)Program.I().room).StocMessage_HsPlayerChange(r); Program.I().room.StocMessage_HsPlayerChange(r);
break; break;
case YGOSharp.Network.Enums.StocMessage.HsWatchChange: case StocMessage.HsWatchChange:
((Room)Program.I().room).StocMessage_HsWatchChange(r); Program.I().room.StocMessage_HsWatchChange(r);
break; break;
case YGOSharp.Network.Enums.StocMessage.RoomList: case YGOSharp.Network.Enums.StocMessage.RoomList:
((Room)Program.I().room).StocMessage_RoomList(r); ((Room)Program.I().room).StocMessage_RoomList(r);
...@@ -274,21 +274,21 @@ public static class TcpHelper ...@@ -274,21 +274,21 @@ public static class TcpHelper
deck = deckFor; deck = deckFor;
Package message = new Package(); Package message = new Package();
message.Fuction = (int)CtosMessage.UpdateDeck; message.Fuction = (int)CtosMessage.UpdateDeck;
message.Data.writer.Write((int)deckFor.Main.Count + deckFor.Extra.Count); message.Data.writer.Write(deckFor.Main.Count + deckFor.Extra.Count);
message.Data.writer.Write((int)deckFor.Side.Count); message.Data.writer.Write(deckFor.Side.Count);
for (int i = 0; i < deckFor.Main.Count; i++) for (int i = 0; i < deckFor.Main.Count; i++)
{ {
message.Data.writer.Write((int)deckFor.Main[i]); message.Data.writer.Write(deckFor.Main[i]);
var c = YGOSharp.CardsManager.Get((int)deckFor.Main[i]); var c = YGOSharp.CardsManager.Get(deckFor.Main[i]);
deckStrings.Add(c.Name); deckStrings.Add(c.Name);
} }
for (int i = 0; i < deckFor.Extra.Count; i++) for (int i = 0; i < deckFor.Extra.Count; i++)
{ {
message.Data.writer.Write((int)deckFor.Extra[i]); message.Data.writer.Write(deckFor.Extra[i]);
} }
for (int i = 0; i < deckFor.Side.Count; i++) for (int i = 0; i < deckFor.Side.Count; i++)
{ {
message.Data.writer.Write((int)deckFor.Side[i]); message.Data.writer.Write(deckFor.Side[i]);
} }
Send(message); Send(message);
} }
...@@ -338,7 +338,7 @@ public static class TcpHelper ...@@ -338,7 +338,7 @@ public static class TcpHelper
message.Data.writer.Write((Int16)Config.ClientVersion); message.Data.writer.Write((Int16)Config.ClientVersion);
message.Data.writer.Write((byte)204); message.Data.writer.Write((byte)204);
message.Data.writer.Write((byte)204); message.Data.writer.Write((byte)204);
message.Data.writer.Write((Int32)0); message.Data.writer.Write(0);
message.Data.writer.WriteUnicode(psw, 20); message.Data.writer.WriteUnicode(psw, 20);
Send(message); Send(message);
} }
...@@ -472,12 +472,12 @@ public static class TcpHelper ...@@ -472,12 +472,12 @@ public static class TcpHelper
i++; i++;
try try
{ {
if (item.Fuction == (int)YGOSharp.OCGWrapper.Enums.GameMessage.Start) if (item.Fuction == (int)GameMessage.Start)
{ {
write = true; write = true;
startI = i; startI = i;
} }
if (item.Fuction == (int)YGOSharp.OCGWrapper.Enums.GameMessage.ReloadField) if (item.Fuction == (int)GameMessage.ReloadField)
{ {
write = true; write = true;
startI = i; startI = i;
...@@ -646,7 +646,7 @@ public static class BinaryExtensions ...@@ -646,7 +646,7 @@ public static class BinaryExtensions
a.controller = (UInt32)Program.I().ocgcore.localPlayer(reader.ReadByte()); a.controller = (UInt32)Program.I().ocgcore.localPlayer(reader.ReadByte());
a.location = reader.ReadByte(); a.location = reader.ReadByte();
a.sequence = reader.ReadByte(); a.sequence = reader.ReadByte();
a.position = (int)game_position.POS_FACEUP_ATTACK; a.position = (int)CardPosition.FaceUpAttack;
return a; return a;
} }
......
...@@ -4,6 +4,8 @@ using System.Collections.Generic; ...@@ -4,6 +4,8 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using UnityEngine; using UnityEngine;
using YGOSharp.OCGWrapper.Enums;
public static class UIHelper public static class UIHelper
{ {
[DllImport("user32")] [DllImport("user32")]
...@@ -980,31 +982,31 @@ public static class UIHelper ...@@ -980,31 +982,31 @@ public static class UIHelper
{ {
res += InterString.Get("对方"); res += InterString.Get("对方");
} }
if ((p1.location & (UInt32)game_location.LOCATION_DECK) > 0) if ((p1.location & (UInt32)CardLocation.Deck) > 0)
{ {
res += InterString.Get("卡组"); res += InterString.Get("卡组");
} }
if ((p1.location & (UInt32)game_location.LOCATION_EXTRA) > 0) if ((p1.location & (UInt32)CardLocation.Extra) > 0)
{ {
res += InterString.Get("额外"); res += InterString.Get("额外");
} }
if ((p1.location & (UInt32)game_location.LOCATION_GRAVE) > 0) if ((p1.location & (UInt32)CardLocation.Grave) > 0)
{ {
res += InterString.Get("墓地"); res += InterString.Get("墓地");
} }
if ((p1.location & (UInt32)game_location.LOCATION_HAND) > 0) if ((p1.location & (UInt32)CardLocation.Hand) > 0)
{ {
res += InterString.Get("手牌"); res += InterString.Get("手牌");
} }
if ((p1.location & (UInt32)game_location.LOCATION_MZONE) > 0) if ((p1.location & (UInt32)CardLocation.MonsterZone) > 0)
{ {
res += InterString.Get("前场"); res += InterString.Get("前场");
} }
if ((p1.location & (UInt32)game_location.LOCATION_REMOVED) > 0) if ((p1.location & (UInt32)CardLocation.Removed) > 0)
{ {
res += InterString.Get("除外"); res += InterString.Get("除外");
} }
if ((p1.location & (UInt32)game_location.LOCATION_SZONE) > 0) if ((p1.location & (UInt32)CardLocation.SpellZone) > 0)
{ {
res += InterString.Get("后场"); res += InterString.Get("后场");
} }
...@@ -1014,41 +1016,41 @@ public static class UIHelper ...@@ -1014,41 +1016,41 @@ public static class UIHelper
//internal static string getGPSstringPosition(GPS p1) //internal static string getGPSstringPosition(GPS p1)
//{ //{
// string res = ""; // string res = "";
// if ((p1.location & (UInt32)game_location.LOCATION_OVERLAY) > 0) // if ((p1.location & (UInt32)CardLocation.Overlay) > 0)
// { // {
// res += InterString.Get("(被叠放)"); // res += InterString.Get("(被叠放)");
// } // }
// else // else
// { // {
// if ((p1.position & (UInt32)game_position.POS_FACEUP_ATTACK) > 0) // if ((p1.position & (UInt32)CardPosition.FaceUpAttack) > 0)
// { // {
// res += InterString.Get("(表侧攻击)"); // res += InterString.Get("(表侧攻击)");
// } // }
// else if ((p1.position & (UInt32)game_position.POS_FACEUP_DEFENSE) > 0) // else if ((p1.position & (UInt32)CardPosition.FaceUp_DEFENSE) > 0)
// { // {
// res += InterString.Get("(表侧防御)"); // res += InterString.Get("(表侧防御)");
// } // }
// else if ((p1.position & (UInt32)game_position.POS_FACEDOWN_ATTACK) > 0) // else if ((p1.position & (UInt32)CardPosition.FaceDownAttack) > 0)
// { // {
// res += InterString.Get("(里侧攻击)"); // res += InterString.Get("(里侧攻击)");
// } // }
// else if ((p1.position & (UInt32)game_position.POS_FACEDOWN_DEFENSE) > 0) // else if ((p1.position & (UInt32)CardPosition.FaceDown_DEFENSE) > 0)
// { // {
// res += InterString.Get("(里侧防御)"); // res += InterString.Get("(里侧防御)");
// } // }
// else if ((p1.position & (UInt32)game_position.POS_ATTACK) > 0) // else if ((p1.position & (UInt32)CardPosition.Attack) > 0)
// { // {
// res += InterString.Get("(攻击)"); // res += InterString.Get("(攻击)");
// } // }
// else if ((p1.position & (UInt32)game_position.POS_DEFENSE) > 0) // else if ((p1.position & (UInt32)CardPosition.POS_DEFENSE) > 0)
// { // {
// res += InterString.Get("(防御)"); // res += InterString.Get("(防御)");
// } // }
// else if ((p1.position & (UInt32)game_position.POS_FACEUP) > 0) // else if ((p1.position & (UInt32)CardPosition.FaceUp) > 0)
// { // {
// res += InterString.Get("(表侧)"); // res += InterString.Get("(表侧)");
// } // }
// else if ((p1.position & (UInt32)game_position.POS_DEFENSE) > 0) // else if ((p1.position & (UInt32)CardPosition.POS_DEFENSE) > 0)
// { // {
// res += InterString.Get("(里侧)"); // res += InterString.Get("(里侧)");
// } // }
...@@ -1096,4 +1098,13 @@ public static class UIHelper ...@@ -1096,4 +1098,13 @@ public static class UIHelper
foreach (Transform achild in Transforms) foreach (Transform achild in Transforms)
achild.gameObject.layer = parent.layer; achild.gameObject.layer = parent.layer;
} }
internal static Vector3 get_close(Vector3 input_vector, Camera cam, float l)
{
Vector3 o = Vector3.zero;
Vector3 scr = cam.WorldToScreenPoint(input_vector);
scr.z -= l;
o = cam.ScreenToWorldPoint(scr);
return o;
}
} }
...@@ -3,6 +3,7 @@ using System.Collections; ...@@ -3,6 +3,7 @@ using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using UnityEngine; using UnityEngine;
using YGOSharp.OCGWrapper.Enums;
public enum gameCardCondition public enum gameCardCondition
{ {
...@@ -288,7 +289,7 @@ public class gameCard : OCGobject ...@@ -288,7 +289,7 @@ public class gameCard : OCGobject
Vector3 worldposition = Camera.main.ScreenToWorldPoint(new Vector3(screenposition.x, screenposition.y, screenposition.z - 5)); Vector3 worldposition = Camera.main.ScreenToWorldPoint(new Vector3(screenposition.x, screenposition.y, screenposition.z - 5));
obj_number.transform.position = worldposition; obj_number.transform.position = worldposition;
} }
if (disabled == true && (((p.location & (UInt32)game_location.LOCATION_MZONE) > 0) || ((p.location & (UInt32)game_location.LOCATION_SZONE) > 0))) if (disabled == true && (((p.location & (UInt32)CardLocation.MonsterZone) > 0) || ((p.location & (UInt32)CardLocation.SpellZone) > 0)))
{ {
if (nagaSign == null) if (nagaSign == null)
{ {
...@@ -566,7 +567,7 @@ public class gameCard : OCGobject ...@@ -566,7 +567,7 @@ public class gameCard : OCGobject
if (opMonsterWithBackGroundCard) if (opMonsterWithBackGroundCard)
{ {
Vector3 vector_of_begin = Vector3.zero; Vector3 vector_of_begin = Vector3.zero;
if ((p.position & (UInt32)game_position.POS_ATTACK) > 0) if ((p.position & (UInt32)CardPosition.Attack) > 0)
{ {
vector_of_begin = gameObject_face.transform.position + new Vector3(0, 0, -2f); vector_of_begin = gameObject_face.transform.position + new Vector3(0, 0, -2f);
} }
...@@ -598,7 +599,7 @@ public class gameCard : OCGobject ...@@ -598,7 +599,7 @@ public class gameCard : OCGobject
if (VerticleCollider == null) if (VerticleCollider == null)
{ {
Vector3 vector_of_begin; Vector3 vector_of_begin;
if ((p.position & (UInt32)game_position.POS_ATTACK) > 0) if ((p.position & (UInt32)CardPosition.Attack) > 0)
{ {
vector_of_begin = gameObject_face.transform.position + new Vector3(0, 0, 2); vector_of_begin = gameObject_face.transform.position + new Vector3(0, 0, 2);
} }
...@@ -772,13 +773,13 @@ public class gameCard : OCGobject ...@@ -772,13 +773,13 @@ public class gameCard : OCGobject
{ {
TweenTo(gived_position, gived_rotation); TweenTo(gived_position, gived_rotation);
if ( if (
Program.I().ocgcore.currentMessage == YGOSharp.OCGWrapper.Enums.GameMessage.Move Program.I().ocgcore.currentMessage == GameMessage.Move
|| ||
Program.I().ocgcore.currentMessage == YGOSharp.OCGWrapper.Enums.GameMessage.Swap Program.I().ocgcore.currentMessage == GameMessage.Swap
|| ||
Program.I().ocgcore.currentMessage == YGOSharp.OCGWrapper.Enums.GameMessage.PosChange Program.I().ocgcore.currentMessage == GameMessage.PosChange
|| ||
Program.I().ocgcore.currentMessage == YGOSharp.OCGWrapper.Enums.GameMessage.FlipSummoning Program.I().ocgcore.currentMessage == GameMessage.FlipSummoning
) )
{ {
Program.I().ocgcore.Sleep((int)(30f * time)); Program.I().ocgcore.Sleep((int)(30f * time));
...@@ -910,11 +911,11 @@ public class gameCard : OCGobject ...@@ -910,11 +911,11 @@ public class gameCard : OCGobject
private void UA_reloadCardHintPosition() private void UA_reloadCardHintPosition()
{ {
if ((p.location & (UInt32)game_location.LOCATION_MZONE) > 0 && (p.location & (UInt32)game_location.LOCATION_OVERLAY) == 0) if ((p.location & (UInt32)CardLocation.MonsterZone) > 0 && (p.location & (UInt32)CardLocation.Overlay) == 0)
{ {
if (p.controller == 0) if (p.controller == 0)
{ {
if ((p.position & (UInt32)game_position.POS_ATTACK) > 0) if ((p.position & (UInt32)CardPosition.Attack) > 0)
{ {
cardHint.gameObject.transform.localPosition = new Vector3(0, 0, -2.5f); cardHint.gameObject.transform.localPosition = new Vector3(0, 0, -2.5f);
cardHint.gameObject.transform.localEulerAngles = new Vector3(60, 0, 0); cardHint.gameObject.transform.localEulerAngles = new Vector3(60, 0, 0);
...@@ -927,7 +928,7 @@ public class gameCard : OCGobject ...@@ -927,7 +928,7 @@ public class gameCard : OCGobject
} }
else else
{ {
if ((p.position & (UInt32)game_position.POS_ATTACK) > 0) if ((p.position & (UInt32)CardPosition.Attack) > 0)
{ {
cardHint.gameObject.transform.localPosition = new Vector3(0, 0, 2.5f); cardHint.gameObject.transform.localPosition = new Vector3(0, 0, 2.5f);
cardHint.gameObject.transform.localEulerAngles = new Vector3(40, 180, 0); cardHint.gameObject.transform.localEulerAngles = new Vector3(40, 180, 0);
...@@ -1036,35 +1037,35 @@ public class gameCard : OCGobject ...@@ -1036,35 +1037,35 @@ public class gameCard : OCGobject
loaded_controller = (int)p.controller; loaded_controller = (int)p.controller;
loaded_location = (int)p.location; loaded_location = (int)p.location;
set_text(""); set_text("");
if (p.controller == 0 && (p.location & (UInt32)game_location.LOCATION_DECK) > 0) if (p.controller == 0 && (p.location & (UInt32)CardLocation.Deck) > 0)
{ {
set_text(GameStringHelper.kazu); set_text(GameStringHelper.kazu);
} }
if (p.controller == 0 && (p.location & (UInt32)game_location.LOCATION_EXTRA) > 0) if (p.controller == 0 && (p.location & (UInt32)CardLocation.Extra) > 0)
{ {
set_text(GameStringHelper.ewai); set_text(GameStringHelper.ewai);
} }
if (p.controller == 0 && (p.location & (UInt32)game_location.LOCATION_GRAVE) > 0) if (p.controller == 0 && (p.location & (UInt32)CardLocation.Grave) > 0)
{ {
set_text(GameStringHelper.mudi); set_text(GameStringHelper.mudi);
} }
if (p.controller == 0 && (p.location & (UInt32)game_location.LOCATION_REMOVED) > 0) if (p.controller == 0 && (p.location & (UInt32)CardLocation.Removed) > 0)
{ {
set_text(GameStringHelper.chuwai); set_text(GameStringHelper.chuwai);
} }
if (p.controller == 1 && (p.location & (UInt32)game_location.LOCATION_DECK) > 0) if (p.controller == 1 && (p.location & (UInt32)CardLocation.Deck) > 0)
{ {
set_text("<#ff8888>" + GameStringHelper.kazu + "</color>"); set_text("<#ff8888>" + GameStringHelper.kazu + "</color>");
} }
if (p.controller == 1 && (p.location & (UInt32)game_location.LOCATION_EXTRA) > 0) if (p.controller == 1 && (p.location & (UInt32)CardLocation.Extra) > 0)
{ {
set_text("<#ff8888>" + GameStringHelper.ewai + "</color>"); set_text("<#ff8888>" + GameStringHelper.ewai + "</color>");
} }
if (p.controller == 1 && (p.location & (UInt32)game_location.LOCATION_GRAVE) > 0) if (p.controller == 1 && (p.location & (UInt32)CardLocation.Grave) > 0)
{ {
set_text("<#ff8888>" + GameStringHelper.mudi + "</color>"); set_text("<#ff8888>" + GameStringHelper.mudi + "</color>");
} }
if (p.controller == 1 && (p.location & (UInt32)game_location.LOCATION_REMOVED) > 0) if (p.controller == 1 && (p.location & (UInt32)CardLocation.Removed) > 0)
{ {
set_text("<#ff8888>" + GameStringHelper.chuwai + "</color>"); set_text("<#ff8888>" + GameStringHelper.chuwai + "</color>");
} }
...@@ -1097,7 +1098,7 @@ public class gameCard : OCGobject ...@@ -1097,7 +1098,7 @@ public class gameCard : OCGobject
Vector3 screenposition = Program.camera_game_main.WorldToScreenPoint(gameObject.transform.position); Vector3 screenposition = Program.camera_game_main.WorldToScreenPoint(gameObject.transform.position);
game_object_monster_cloude.transform.position = Camera.main.ScreenToWorldPoint(new Vector3(screenposition.x, screenposition.y, screenposition.z + 3)); game_object_monster_cloude.transform.position = Camera.main.ScreenToWorldPoint(new Vector3(screenposition.x, screenposition.y, screenposition.z + 3));
game_object_monster_cloude_ParticleSystem.startSize = UnityEngine.Random.Range(3f, 3f + (20f - 3f) * (float)(Mathf.Clamp(data.Attack,0,3000)) / 3000f); game_object_monster_cloude_ParticleSystem.startSize = UnityEngine.Random.Range(3f, 3f + (20f - 3f) * (float)(Mathf.Clamp(data.Attack,0,3000)) / 3000f);
if (GameStringHelper.differ(data.Attribute, (long)game_attributes.ATTRIBUTE_EARTH)) if (GameStringHelper.differ(data.Attribute, (long)CardAttribute.Earth))
{ {
game_object_monster_cloude_ParticleSystem.startColor = game_object_monster_cloude_ParticleSystem.startColor =
new Color( new Color(
...@@ -1105,7 +1106,7 @@ public class gameCard : OCGobject ...@@ -1105,7 +1106,7 @@ public class gameCard : OCGobject
80f / 255f + UnityEngine.Random.Range(-0.2f, 0.2f), 80f / 255f + UnityEngine.Random.Range(-0.2f, 0.2f),
0f / 255f + UnityEngine.Random.Range(-0.2f, 0.2f)); 0f / 255f + UnityEngine.Random.Range(-0.2f, 0.2f));
} }
if (GameStringHelper.differ(data.Attribute, (long)game_attributes.ATTRIBUTE_WATER)) if (GameStringHelper.differ(data.Attribute, (long)CardAttribute.Water))
{ {
game_object_monster_cloude_ParticleSystem.startColor = game_object_monster_cloude_ParticleSystem.startColor =
new Color( new Color(
...@@ -1113,7 +1114,7 @@ public class gameCard : OCGobject ...@@ -1113,7 +1114,7 @@ public class gameCard : OCGobject
0f / 255f + UnityEngine.Random.Range(-0.2f, 0.2f), 0f / 255f + UnityEngine.Random.Range(-0.2f, 0.2f),
255f / 255f + UnityEngine.Random.Range(-0.2f, 0.2f)); 255f / 255f + UnityEngine.Random.Range(-0.2f, 0.2f));
} }
if (GameStringHelper.differ(data.Attribute, (long)game_attributes.ATTRIBUTE_FIRE)) if (GameStringHelper.differ(data.Attribute, (long)CardAttribute.Fire))
{ {
game_object_monster_cloude_ParticleSystem.startColor = game_object_monster_cloude_ParticleSystem.startColor =
new Color( new Color(
...@@ -1121,7 +1122,7 @@ public class gameCard : OCGobject ...@@ -1121,7 +1122,7 @@ public class gameCard : OCGobject
0f / 255f + UnityEngine.Random.Range(-0.2f, 0.2f), 0f / 255f + UnityEngine.Random.Range(-0.2f, 0.2f),
0f / 255f + UnityEngine.Random.Range(-0.2f, 0.2f)); 0f / 255f + UnityEngine.Random.Range(-0.2f, 0.2f));
} }
if (GameStringHelper.differ(data.Attribute, (long)game_attributes.ATTRIBUTE_WIND)) if (GameStringHelper.differ(data.Attribute, (long)CardAttribute.Wind))
{ {
game_object_monster_cloude_ParticleSystem.startColor = game_object_monster_cloude_ParticleSystem.startColor =
new Color( new Color(
...@@ -1129,7 +1130,7 @@ public class gameCard : OCGobject ...@@ -1129,7 +1130,7 @@ public class gameCard : OCGobject
140f / 255f + UnityEngine.Random.Range(-0.2f, 0.2f), 140f / 255f + UnityEngine.Random.Range(-0.2f, 0.2f),
0f / 255f + UnityEngine.Random.Range(-0.2f, 0.2f)); 0f / 255f + UnityEngine.Random.Range(-0.2f, 0.2f));
} }
if (GameStringHelper.differ(data.Attribute, (long)game_attributes.ATTRIBUTE_DARK)) if (GameStringHelper.differ(data.Attribute, (long)CardAttribute.Dark))
{ {
game_object_monster_cloude_ParticleSystem.startColor = game_object_monster_cloude_ParticleSystem.startColor =
new Color( new Color(
...@@ -1137,7 +1138,7 @@ public class gameCard : OCGobject ...@@ -1137,7 +1138,7 @@ public class gameCard : OCGobject
0f / 255f + UnityEngine.Random.Range(-0.2f, 0.2f), 0f / 255f + UnityEngine.Random.Range(-0.2f, 0.2f),
158f / 255f + UnityEngine.Random.Range(-0.2f, 0.2f)); 158f / 255f + UnityEngine.Random.Range(-0.2f, 0.2f));
} }
if (GameStringHelper.differ(data.Attribute, (long)game_attributes.ATTRIBUTE_LIGHT)) if (GameStringHelper.differ(data.Attribute, (long)CardAttribute.Light))
{ {
game_object_monster_cloude_ParticleSystem.startColor = game_object_monster_cloude_ParticleSystem.startColor =
new Color( new Color(
...@@ -1145,7 +1146,7 @@ public class gameCard : OCGobject ...@@ -1145,7 +1146,7 @@ public class gameCard : OCGobject
140f / 255f + UnityEngine.Random.Range(-0.2f, 0.2f), 140f / 255f + UnityEngine.Random.Range(-0.2f, 0.2f),
0f / 255f + UnityEngine.Random.Range(-0.2f, 0.2f)); 0f / 255f + UnityEngine.Random.Range(-0.2f, 0.2f));
} }
if (GameStringHelper.differ(data.Attribute, (long)game_attributes.ATTRIBUTE_DEVINE)) if (GameStringHelper.differ(data.Attribute, (long)CardAttribute.Divine))
{ {
game_object_monster_cloude_ParticleSystem.startColor = game_object_monster_cloude_ParticleSystem.startColor =
new Color( new Color(
...@@ -1274,16 +1275,16 @@ public class gameCard : OCGobject ...@@ -1274,16 +1275,16 @@ public class gameCard : OCGobject
int color = 0; int color = 0;
if ((data.Type & (int)game_type.TYPE_TUNER) > 0) if ((data.Type & (int)CardType.Tuner) > 0)
{ {
color = 1; color = 1;
} }
if ((data.Type & (int)game_type.TYPE_XYZ) > 0) if ((data.Type & (int)CardType.Xyz) > 0)
{ {
color = 2; color = 2;
} }
if ((data.Type & (int)game_type.link) > 0) if ((data.Type & (int)CardType.Link) > 0)
{ {
color = 3; color = 3;
data.Level = 0; data.Level = 0;
...@@ -1365,7 +1366,7 @@ public class gameCard : OCGobject ...@@ -1365,7 +1366,7 @@ public class gameCard : OCGobject
loaded_verticaldef = data.Defense; loaded_verticaldef = data.Defense;
loaded_verticalpos = p.position; loaded_verticalpos = p.position;
loaded_verticalcon = (int)p.controller; loaded_verticalcon = (int)p.controller;
if ((data.Type&(uint)game_type.link)>0) if ((data.Type&(uint)CardType.Link)>0)
{ {
string raw = ""; string raw = "";
YGOSharp.Card data_raw = YGOSharp.CardsManager.Get(data.Id); YGOSharp.Card data_raw = YGOSharp.CardsManager.Get(data.Id);
...@@ -1391,7 +1392,7 @@ public class gameCard : OCGobject ...@@ -1391,7 +1392,7 @@ public class gameCard : OCGobject
{ {
string raw = ""; string raw = "";
YGOSharp.Card data_raw = YGOSharp.CardsManager.Get(data.Id); YGOSharp.Card data_raw = YGOSharp.CardsManager.Get(data.Id);
if ((loaded_verticalpos & (int)game_position.POS_ATTACK) > 0) if ((loaded_verticalpos & (int)CardPosition.Attack) > 0)
{ {
if (data.Attack > data_raw.Attack) if (data.Attack > data_raw.Attack)
{ {
...@@ -1458,7 +1459,7 @@ public class gameCard : OCGobject ...@@ -1458,7 +1459,7 @@ public class gameCard : OCGobject
//{ //{
// if (condition== gameCardCondition.verticle_clickable) // if (condition== gameCardCondition.verticle_clickable)
// { // {
// if ((p.position & (UInt32)game_position.POS_ATTACK) > 0) // if ((p.position & (UInt32)CardPosition.Attack) > 0)
// { // {
// ability = data.Attack; // ability = data.Attack;
// } // }
...@@ -1588,16 +1589,16 @@ public class gameCard : OCGobject ...@@ -1588,16 +1589,16 @@ public class gameCard : OCGobject
} }
} }
int special_hint = 0; int special_hint = 0;
if ((p.position & (int)game_position.POS_FACEDOWN) > 0) if ((p.position & (int)CardPosition.FaceDown) > 0)
{ {
if ((p.location & (int)game_location.LOCATION_REMOVED) > 0) if ((p.location & (int)CardLocation.Removed) > 0)
{ {
special_hint = 1; special_hint = 1;
} }
} }
if ((p.position & (int)game_position.POS_FACEUP) > 0) if ((p.position & (int)CardPosition.FaceUp) > 0)
{ {
if ((p.location & (int)game_location.LOCATION_EXTRA) > 0) if ((p.location & (int)CardLocation.Extra) > 0)
{ {
special_hint = 2; special_hint = 2;
} }
...@@ -1657,19 +1658,19 @@ public class gameCard : OCGobject ...@@ -1657,19 +1658,19 @@ public class gameCard : OCGobject
public bool isHided() public bool isHided()
{ {
if ((p.location & (int)game_location.LOCATION_DECK) > 0) if ((p.location & (int)CardLocation.Deck) > 0)
{ {
return true; return true;
} }
if ((p.location & (int)game_location.LOCATION_EXTRA) > 0) if ((p.location & (int)CardLocation.Extra) > 0)
{ {
return true; return true;
} }
if ((p.location & (int)game_location.LOCATION_REMOVED) > 0) if ((p.location & (int)CardLocation.Removed) > 0)
{ {
return true; return true;
} }
if ((p.location & (int)game_location.LOCATION_GRAVE) > 0) if ((p.location & (int)CardLocation.Grave) > 0)
{ {
return true; return true;
} }
...@@ -1686,31 +1687,31 @@ public class gameCard : OCGobject ...@@ -1686,31 +1687,31 @@ public class gameCard : OCGobject
{ {
int re = 0; int re = 0;
// //
if (GameStringHelper.differ(data.Attribute, (long)game_attributes.ATTRIBUTE_EARTH)) if (GameStringHelper.differ(data.Attribute, (long)CardAttribute.Earth))
{ {
re = 0; re = 0;
} }
if (GameStringHelper.differ(data.Attribute, (long)game_attributes.ATTRIBUTE_WATER)) if (GameStringHelper.differ(data.Attribute, (long)CardAttribute.Water))
{ {
re = 3; re = 3;
} }
if (GameStringHelper.differ(data.Attribute, (long)game_attributes.ATTRIBUTE_FIRE)) if (GameStringHelper.differ(data.Attribute, (long)CardAttribute.Fire))
{ {
re = 5; re = 5;
} }
if (GameStringHelper.differ(data.Attribute, (long)game_attributes.ATTRIBUTE_WIND)) if (GameStringHelper.differ(data.Attribute, (long)CardAttribute.Wind))
{ {
re = 2; re = 2;
} }
if (GameStringHelper.differ(data.Attribute, (long)game_attributes.ATTRIBUTE_DARK)) if (GameStringHelper.differ(data.Attribute, (long)CardAttribute.Dark))
{ {
re = 4; re = 4;
} }
if (GameStringHelper.differ(data.Attribute, (long)game_attributes.ATTRIBUTE_LIGHT)) if (GameStringHelper.differ(data.Attribute, (long)CardAttribute.Light))
{ {
re = 1; re = 1;
} }
if (GameStringHelper.differ(data.Attribute, (long)game_attributes.ATTRIBUTE_DEVINE)) if (GameStringHelper.differ(data.Attribute, (long)CardAttribute.Divine))
{ {
re = 1; re = 1;
} }
...@@ -1936,27 +1937,27 @@ public class gameCard : OCGobject ...@@ -1936,27 +1937,27 @@ public class gameCard : OCGobject
public void add_one_overlay_light() public void add_one_overlay_light()
{ {
GameObject mod = Program.I().mod_ocgcore_ol_light; GameObject mod = Program.I().mod_ocgcore_ol_light;
if (GameStringHelper.differ(data.Attribute, (long)game_attributes.ATTRIBUTE_EARTH)) if (GameStringHelper.differ(data.Attribute, (long)CardAttribute.Earth))
{ {
mod = Program.I().mod_ocgcore_ol_earth; mod = Program.I().mod_ocgcore_ol_earth;
} }
if (GameStringHelper.differ(data.Attribute, (long)game_attributes.ATTRIBUTE_WATER)) if (GameStringHelper.differ(data.Attribute, (long)CardAttribute.Water))
{ {
mod = Program.I().mod_ocgcore_ol_water; mod = Program.I().mod_ocgcore_ol_water;
} }
if (GameStringHelper.differ(data.Attribute, (long)game_attributes.ATTRIBUTE_FIRE)) if (GameStringHelper.differ(data.Attribute, (long)CardAttribute.Fire))
{ {
mod = Program.I().mod_ocgcore_ol_fire; mod = Program.I().mod_ocgcore_ol_fire;
} }
if (GameStringHelper.differ(data.Attribute, (long)game_attributes.ATTRIBUTE_WIND)) if (GameStringHelper.differ(data.Attribute, (long)CardAttribute.Wind))
{ {
mod = Program.I().mod_ocgcore_ol_wind; mod = Program.I().mod_ocgcore_ol_wind;
} }
if (GameStringHelper.differ(data.Attribute, (long)game_attributes.ATTRIBUTE_DARK)) if (GameStringHelper.differ(data.Attribute, (long)CardAttribute.Dark))
{ {
mod = Program.I().mod_ocgcore_ol_dark; mod = Program.I().mod_ocgcore_ol_dark;
} }
if (GameStringHelper.differ(data.Attribute, (long)game_attributes.ATTRIBUTE_LIGHT)) if (GameStringHelper.differ(data.Attribute, (long)CardAttribute.Light))
{ {
mod = Program.I().mod_ocgcore_ol_light; mod = Program.I().mod_ocgcore_ol_light;
} }
...@@ -2540,7 +2541,7 @@ public class gameCard : OCGobject ...@@ -2540,7 +2541,7 @@ public class gameCard : OCGobject
if (ballChain!=null) if (ballChain!=null)
{ {
del_all_decoration_by_string("chaining"); del_all_decoration_by_string("chaining");
Vector3 pos = ui_helper.get_close(gameObject.transform.position, Program.camera_game_main, 5); Vector3 pos = UIHelper.get_close(gameObject.transform.position, Program.camera_game_main, 5);
if (Program.I().setting.setting.Vchain.value == true) if (Program.I().setting.setting.Vchain.value == true)
{ {
MonoBehaviour.Destroy((GameObject)MonoBehaviour.Instantiate(Program.I().mod_ocgcore_cs_end, pos, Quaternion.identity), 5f); MonoBehaviour.Destroy((GameObject)MonoBehaviour.Instantiate(Program.I().mod_ocgcore_cs_end, pos, Quaternion.identity), 5f);
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using UnityEngine; using UnityEngine;
using YGOSharp.OCGWrapper.Enums;
public class GameField : OCGobject public class GameField : OCGobject
{ {
...@@ -90,14 +91,14 @@ public class GameField : OCGobject ...@@ -90,14 +91,14 @@ public class GameField : OCGobject
Program.I().ocgcore.AddUpdateAction_s(Update); Program.I().ocgcore.AddUpdateAction_s(Update);
gameHiddenButtons.Add(new gameHiddenButton(game_location.LOCATION_DECK, 0)); gameHiddenButtons.Add(new gameHiddenButton(CardLocation.Deck, 0));
gameHiddenButtons.Add(new gameHiddenButton(game_location.LOCATION_EXTRA, 0)); gameHiddenButtons.Add(new gameHiddenButton(CardLocation.Extra, 0));
gameHiddenButtons.Add(new gameHiddenButton(game_location.LOCATION_GRAVE, 0)); gameHiddenButtons.Add(new gameHiddenButton(CardLocation.Grave, 0));
gameHiddenButtons.Add(new gameHiddenButton(game_location.LOCATION_REMOVED, 0)); gameHiddenButtons.Add(new gameHiddenButton(CardLocation.Removed, 0));
gameHiddenButtons.Add(new gameHiddenButton(game_location.LOCATION_DECK, 1)); gameHiddenButtons.Add(new gameHiddenButton(CardLocation.Deck, 1));
gameHiddenButtons.Add(new gameHiddenButton(game_location.LOCATION_EXTRA, 1)); gameHiddenButtons.Add(new gameHiddenButton(CardLocation.Extra, 1));
gameHiddenButtons.Add(new gameHiddenButton(game_location.LOCATION_GRAVE, 1)); gameHiddenButtons.Add(new gameHiddenButton(CardLocation.Grave, 1));
gameHiddenButtons.Add(new gameHiddenButton(game_location.LOCATION_REMOVED, 1)); gameHiddenButtons.Add(new gameHiddenButton(CardLocation.Removed, 1));
LOCATION_DECK_0 = create(Program.I().new_ui_textMesh, Vector3.zero, new Vector3(60, 0, 0)).GetComponent<TMPro.TextMeshPro>(); LOCATION_DECK_0 = create(Program.I().new_ui_textMesh, Vector3.zero, new Vector3(60, 0, 0)).GetComponent<TMPro.TextMeshPro>();
LOCATION_EXTRA_0 = create(Program.I().new_ui_textMesh, Vector3.zero, new Vector3(60, 0, 0)).GetComponent<TMPro.TextMeshPro>(); LOCATION_EXTRA_0 = create(Program.I().new_ui_textMesh, Vector3.zero, new Vector3(60, 0, 0)).GetComponent<TMPro.TextMeshPro>();
...@@ -260,15 +261,15 @@ public class GameField : OCGobject ...@@ -260,15 +261,15 @@ public class GameField : OCGobject
rightT.transform.localScale = new Vector3(1f / Program.fieldSize, 1f / Program.fieldSize, 1f / Program.fieldSize); rightT.transform.localScale = new Vector3(1f / Program.fieldSize, 1f / Program.fieldSize, 1f / Program.fieldSize);
rightT.transform.localPosition = new Vector3(((1f - 1f / Program.fieldSize) * (float)(rightT.width)) / 3.5f, 0, 0); rightT.transform.localPosition = new Vector3(((1f - 1f / Program.fieldSize) * (float)(rightT.width)) / 3.5f, 0, 0);
relocateTextMesh(LOCATION_DECK_0, 0, game_location.LOCATION_DECK, new Vector3(0, 0, -3f)); relocateTextMesh(LOCATION_DECK_0, 0, CardLocation.Deck, new Vector3(0, 0, -3f));
relocateTextMesh(LOCATION_EXTRA_0, 0, game_location.LOCATION_EXTRA, new Vector3(0, 0, -3f)); relocateTextMesh(LOCATION_EXTRA_0, 0, CardLocation.Extra, new Vector3(0, 0, -3f));
relocateTextMesh(LOCATION_REMOVED_0, 0, game_location.LOCATION_REMOVED, new Vector3(0, 0, -3f)); relocateTextMesh(LOCATION_REMOVED_0, 0, CardLocation.Removed, new Vector3(0, 0, -3f));
relocateTextMesh(LOCATION_GRAVE_0, 0, game_location.LOCATION_GRAVE, new Vector3(0, 0, -3f)); relocateTextMesh(LOCATION_GRAVE_0, 0, CardLocation.Grave, new Vector3(0, 0, -3f));
relocateTextMesh(LOCATION_DECK_1, 1, game_location.LOCATION_DECK, new Vector3(0, 0, -3f)); relocateTextMesh(LOCATION_DECK_1, 1, CardLocation.Deck, new Vector3(0, 0, -3f));
relocateTextMesh(LOCATION_EXTRA_1, 1, game_location.LOCATION_EXTRA, new Vector3(0, 0, -3f)); relocateTextMesh(LOCATION_EXTRA_1, 1, CardLocation.Extra, new Vector3(0, 0, -3f));
relocateTextMesh(LOCATION_REMOVED_1, 1, game_location.LOCATION_REMOVED, new Vector3(0, 0, -3f)); relocateTextMesh(LOCATION_REMOVED_1, 1, CardLocation.Removed, new Vector3(0, 0, -3f));
relocateTextMesh(LOCATION_GRAVE_1, 1, game_location.LOCATION_GRAVE, new Vector3(0, 0, -3f)); relocateTextMesh(LOCATION_GRAVE_1, 1, CardLocation.Grave, new Vector3(0, 0, -3f));
label.transform.localPosition = new Vector3(-5f * (Program.fieldSize - 1), 0, -15.5f * Program.fieldSize); label.transform.localPosition = new Vector3(-5f * (Program.fieldSize - 1), 0, -15.5f * Program.fieldSize);
...@@ -277,7 +278,7 @@ public class GameField : OCGobject ...@@ -277,7 +278,7 @@ public class GameField : OCGobject
prelong = isLong; prelong = isLong;
for (int i = 0; i < field_disabled_containers.Count; i++) for (int i = 0; i < field_disabled_containers.Count; i++)
{ {
if (field_disabled_containers[i].p.location == (UInt32)game_location.LOCATION_SZONE) if (field_disabled_containers[i].p.location == (UInt32)CardLocation.SpellZone)
{ {
if (field_disabled_containers[i].p.controller == 1) if (field_disabled_containers[i].p.controller == 1)
{ {
...@@ -400,7 +401,7 @@ public class GameField : OCGobject ...@@ -400,7 +401,7 @@ public class GameField : OCGobject
} }
private static void relocateTextMesh(TMPro.TextMeshPro obj, uint con, game_location loc, Vector3 poi) private static void relocateTextMesh(TMPro.TextMeshPro obj, uint con, CardLocation loc, Vector3 poi)
{ {
obj.transform.position = UIHelper.getCamGoodPosition(Program.I().ocgcore.get_point_worldposition(new GPS obj.transform.position = UIHelper.getCamGoodPosition(Program.I().ocgcore.get_point_worldposition(new GPS
{ {
...@@ -610,7 +611,7 @@ public class GameField : OCGobject ...@@ -610,7 +611,7 @@ public class GameField : OCGobject
if (Program.I().ocgcore.MasterRule >= 4) if (Program.I().ocgcore.MasterRule >= 4)
{ {
if (gps.location == (int)game_location.LOCATION_SZONE) if (gps.location == (int)CardLocation.SpellZone)
{ {
if (gps.position == 0 || gps.position == 4) if (gps.position == 0 || gps.position == 4)
{ {
......
using System; using System;
using UnityEngine; using UnityEngine;
using YGOSharp.OCGWrapper.Enums;
public class gameHiddenButton : OCGobject public class gameHiddenButton : OCGobject
{ {
public game_location location; public CardLocation location;
public int player; public int player;
...@@ -11,7 +12,7 @@ public class gameHiddenButton : OCGobject ...@@ -11,7 +12,7 @@ public class gameHiddenButton : OCGobject
GPS ps; GPS ps;
public gameHiddenButton(game_location l, int p) public gameHiddenButton(CardLocation l, int p)
{ {
ps = new GPS(); ps = new GPS();
ps.controller = (UInt32)p; ps.controller = (UInt32)p;
...@@ -107,7 +108,7 @@ public class gameHiddenButton : OCGobject ...@@ -107,7 +108,7 @@ public class gameHiddenButton : OCGobject
{ {
if (player == 0) if (player == 0)
{ {
if (location == game_location.LOCATION_DECK) if (location == CardLocation.Deck)
{ {
if (Program.I().book.lab != null) if (Program.I().book.lab != null)
{ {
...@@ -120,7 +121,7 @@ public class gameHiddenButton : OCGobject ...@@ -120,7 +121,7 @@ public class gameHiddenButton : OCGobject
} }
if (player == 1) if (player == 1)
{ {
if (location == game_location.LOCATION_DECK) if (location == CardLocation.Deck)
{ {
if (Program.I().book.labop != null) if (Program.I().book.labop != null)
{ {
...@@ -173,7 +174,7 @@ public class gameHiddenButton : OCGobject ...@@ -173,7 +174,7 @@ public class gameHiddenButton : OCGobject
{ {
if (player == 0) if (player == 0)
{ {
if (location == game_location.LOCATION_DECK) if (location == CardLocation.Deck)
{ {
if (Program.I().book.lab != null) if (Program.I().book.lab != null)
{ {
...@@ -201,7 +202,7 @@ public class gameHiddenButton : OCGobject ...@@ -201,7 +202,7 @@ public class gameHiddenButton : OCGobject
if (player == 1) if (player == 1)
{ {
if (location == game_location.LOCATION_DECK) if (location == CardLocation.Deck)
{ {
if (Program.I().book.labop != null) if (Program.I().book.labop != null)
{ {
......
...@@ -77,39 +77,39 @@ public class Ocgcore : ServantWithCardDescription ...@@ -77,39 +77,39 @@ public class Ocgcore : ServantWithCardDescription
gameCardCondition get_point_worldcondition(GPS p) gameCardCondition get_point_worldcondition(GPS p)
{ {
gameCardCondition return_value = gameCardCondition.floating_clickable; gameCardCondition return_value = gameCardCondition.floating_clickable;
if ((p.location & (UInt32)game_location.LOCATION_DECK) > 0) if ((p.location & (UInt32)CardLocation.Deck) > 0)
{ {
return_value = gameCardCondition.still_unclickable; return_value = gameCardCondition.still_unclickable;
} }
if ((p.location & (UInt32)game_location.LOCATION_EXTRA) > 0) if ((p.location & (UInt32)CardLocation.Extra) > 0)
{ {
return_value = gameCardCondition.still_unclickable; return_value = gameCardCondition.still_unclickable;
} }
if ((p.location & (UInt32)game_location.LOCATION_MZONE) > 0) if ((p.location & (UInt32)CardLocation.MonsterZone) > 0)
{ {
return_value = gameCardCondition.floating_clickable; return_value = gameCardCondition.floating_clickable;
if ((p.position & (UInt32)game_position.POS_FACEUP) > 0) if ((p.position & (UInt32)CardPosition.FaceUp) > 0)
{ {
return_value = gameCardCondition.verticle_clickable; return_value = gameCardCondition.verticle_clickable;
} }
} }
if ((p.location & (UInt32)game_location.LOCATION_SZONE) > 0) if ((p.location & (UInt32)CardLocation.SpellZone) > 0)
{ {
return_value = gameCardCondition.floating_clickable; return_value = gameCardCondition.floating_clickable;
} }
if ((p.location & (UInt32)game_location.LOCATION_GRAVE) > 0) if ((p.location & (UInt32)CardLocation.Grave) > 0)
{ {
return_value = gameCardCondition.still_unclickable; return_value = gameCardCondition.still_unclickable;
} }
if ((p.location & (UInt32)game_location.LOCATION_HAND) > 0) if ((p.location & (UInt32)CardLocation.Hand) > 0)
{ {
return_value = gameCardCondition.floating_clickable; return_value = gameCardCondition.floating_clickable;
} }
if ((p.location & (UInt32)game_location.LOCATION_REMOVED) > 0) if ((p.location & (UInt32)CardLocation.Removed) > 0)
{ {
return_value = gameCardCondition.still_unclickable; return_value = gameCardCondition.still_unclickable;
} }
if ((p.location & (UInt32)game_location.LOCATION_OVERLAY) > 0) if ((p.location & (UInt32)CardLocation.Overlay) > 0)
{ {
return_value = gameCardCondition.still_unclickable; return_value = gameCardCondition.still_unclickable;
} }
...@@ -120,7 +120,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -120,7 +120,7 @@ public class Ocgcore : ServantWithCardDescription
{ {
Vector3 return_value = Vector3.zero; Vector3 return_value = Vector3.zero;
float real = (Program.fieldSize - 1) * 0.9f + 1f; float real = (Program.fieldSize - 1) * 0.9f + 1f;
if ((p.location & (UInt32)game_location.LOCATION_DECK) > 0) if ((p.location & (UInt32)CardLocation.Deck) > 0)
{ {
if (p.controller==0) if (p.controller==0)
{ {
...@@ -132,7 +132,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -132,7 +132,7 @@ public class Ocgcore : ServantWithCardDescription
} }
return_value.y += p.sequence * 0.03f; return_value.y += p.sequence * 0.03f;
} }
if ((p.location & (UInt32)game_location.LOCATION_EXTRA) > 0) if ((p.location & (UInt32)CardLocation.Extra) > 0)
{ {
if (p.controller == 0) if (p.controller == 0)
{ {
...@@ -144,7 +144,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -144,7 +144,7 @@ public class Ocgcore : ServantWithCardDescription
} }
return_value.y += p.sequence * 0.03f; return_value.y += p.sequence * 0.03f;
} }
if ((p.location & (UInt32)game_location.LOCATION_GRAVE) > 0) if ((p.location & (UInt32)CardLocation.Grave) > 0)
{ {
if (MasterRule >= 4) if (MasterRule >= 4)
{ {
...@@ -171,7 +171,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -171,7 +171,7 @@ public class Ocgcore : ServantWithCardDescription
return_value.y += p.sequence * 0.03f; return_value.y += p.sequence * 0.03f;
} }
if ((p.location & (UInt32)game_location.LOCATION_REMOVED) > 0) if ((p.location & (UInt32)CardLocation.Removed) > 0)
{ {
if (MasterRule >= 4) if (MasterRule >= 4)
{ {
...@@ -198,7 +198,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -198,7 +198,7 @@ public class Ocgcore : ServantWithCardDescription
return_value.y += p.sequence * 0.03f; return_value.y += p.sequence * 0.03f;
} }
if ((p.location & (UInt32)game_location.LOCATION_MZONE) > 0) if ((p.location & (UInt32)CardLocation.MonsterZone) > 0)
{ {
UInt32 realIndex = p.sequence; UInt32 realIndex = p.sequence;
if (p.controller==0) if (p.controller==0)
...@@ -252,7 +252,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -252,7 +252,7 @@ public class Ocgcore : ServantWithCardDescription
} }
return_value.x *= real; return_value.x *= real;
} }
if ((p.location & (UInt32)game_location.LOCATION_SZONE) > 0) if ((p.location & (UInt32)CardLocation.SpellZone) > 0)
{ {
if (p.sequence < 5 || ((p.sequence == 6 || p.sequence == 7) && MasterRule >= 4)) if (p.sequence < 5 || ((p.sequence == 6 || p.sequence == 7) && MasterRule >= 4))
{ {
...@@ -367,7 +367,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -367,7 +367,7 @@ public class Ocgcore : ServantWithCardDescription
} }
} }
} }
if ((p.location & (UInt32)game_location.LOCATION_OVERLAY) > 0) if ((p.location & (UInt32)CardLocation.Overlay) > 0)
{ {
if (c != null) if (c != null)
{ {
...@@ -409,10 +409,10 @@ public class Ocgcore : ServantWithCardDescription ...@@ -409,10 +409,10 @@ public class Ocgcore : ServantWithCardDescription
Program.go(1, () => Program.go(1, () =>
{ {
MHS_creatBundle(60, localPlayer(0), game_location.LOCATION_DECK); MHS_creatBundle(60, localPlayer(0), CardLocation.Deck);
MHS_creatBundle(15, localPlayer(0), game_location.LOCATION_EXTRA); MHS_creatBundle(15, localPlayer(0), CardLocation.Extra);
MHS_creatBundle(60, localPlayer(1), game_location.LOCATION_DECK); MHS_creatBundle(60, localPlayer(1), CardLocation.Deck);
MHS_creatBundle(15, localPlayer(1), game_location.LOCATION_EXTRA); MHS_creatBundle(15, localPlayer(1), CardLocation.Extra);
for (int i = 0; i < cards.Count; i++) for (int i = 0; i < cards.Count; i++)
{ {
cards[i].hide(); cards[i].hide();
...@@ -1210,7 +1210,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -1210,7 +1210,7 @@ public class Ocgcore : ServantWithCardDescription
public void forceMSquit() public void forceMSquit()
{ {
Package p = new Package(); Package p = new Package();
p.Fuction = (int)YGOSharp.OCGWrapper.Enums.GameMessage.sibyl_quit; p.Fuction = (int)GameMessage.sibyl_quit;
Packages.Add(p); Packages.Add(p);
} }
...@@ -1327,7 +1327,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -1327,7 +1327,7 @@ public class Ocgcore : ServantWithCardDescription
md5Maker = 0; md5Maker = 0;
for (int i = 0; i < cards.Count; i++) for (int i = 0; i < cards.Count; i++)
{ {
cards[i].p.location = (UInt32)game_location.LOCATION_UNKNOWN; cards[i].p.location = (UInt32)CardLocation.Unknown;
} }
int playertype = r.ReadByte(); int playertype = r.ReadByte();
isFirst = ((playertype & 0xf) > 0) ? false : true; isFirst = ((playertype & 0xf) > 0) ? false : true;
...@@ -1351,10 +1351,10 @@ public class Ocgcore : ServantWithCardDescription ...@@ -1351,10 +1351,10 @@ public class Ocgcore : ServantWithCardDescription
} }
} }
cookie_matchKill = 0; cookie_matchKill = 0;
MHS_creatBundle(r.ReadInt16(), localPlayer(0), game_location.LOCATION_DECK); MHS_creatBundle(r.ReadInt16(), localPlayer(0), CardLocation.Deck);
MHS_creatBundle(r.ReadInt16(), localPlayer(0), game_location.LOCATION_EXTRA); MHS_creatBundle(r.ReadInt16(), localPlayer(0), CardLocation.Extra);
MHS_creatBundle(r.ReadInt16(), localPlayer(1), game_location.LOCATION_DECK); MHS_creatBundle(r.ReadInt16(), localPlayer(1), CardLocation.Deck);
MHS_creatBundle(r.ReadInt16(), localPlayer(1), game_location.LOCATION_EXTRA); MHS_creatBundle(r.ReadInt16(), localPlayer(1), CardLocation.Extra);
gameField.clearDisabled(); gameField.clearDisabled();
if (Program.I().room.mode == 0) if (Program.I().room.mode == 0)
{ {
...@@ -1395,7 +1395,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -1395,7 +1395,7 @@ public class Ocgcore : ServantWithCardDescription
md5Maker = 0; md5Maker = 0;
for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy) for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy)
{ {
cards[i].p.location = (UInt32)game_location.LOCATION_UNKNOWN; cards[i].p.location = (UInt32)CardLocation.Unknown;
} }
cookie_matchKill = 0; cookie_matchKill = 0;
...@@ -1433,7 +1433,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -1433,7 +1433,7 @@ public class Ocgcore : ServantWithCardDescription
gps = new GPS gps = new GPS
{ {
controller = (UInt32)player, controller = (UInt32)player,
location = (UInt32)game_location.LOCATION_MZONE, location = (UInt32)CardLocation.MonsterZone,
position = (int)r.ReadByte(), position = (int)r.ReadByte(),
sequence = (UInt32)i, sequence = (UInt32)i,
}; };
...@@ -1441,7 +1441,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -1441,7 +1441,7 @@ public class Ocgcore : ServantWithCardDescription
val = r.ReadByte(); val = r.ReadByte();
for (int xyz = 0; xyz < val; ++xyz) for (int xyz = 0; xyz < val; ++xyz)
{ {
gps.location |= (UInt32)game_location.LOCATION_OVERLAY; gps.location |= (UInt32)CardLocation.Overlay;
gps.position = xyz; gps.position = xyz;
GCS_cardCreate(gps); GCS_cardCreate(gps);
} }
...@@ -1455,7 +1455,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -1455,7 +1455,7 @@ public class Ocgcore : ServantWithCardDescription
gps = new GPS gps = new GPS
{ {
controller = (UInt32)player, controller = (UInt32)player,
location = (UInt32)game_location.LOCATION_SZONE, location = (UInt32)CardLocation.SpellZone,
position = (int)r.ReadByte(), position = (int)r.ReadByte(),
sequence = (UInt32)i, sequence = (UInt32)i,
}; };
...@@ -1468,8 +1468,8 @@ public class Ocgcore : ServantWithCardDescription ...@@ -1468,8 +1468,8 @@ public class Ocgcore : ServantWithCardDescription
gps = new GPS gps = new GPS
{ {
controller = (UInt32)player, controller = (UInt32)player,
location = (UInt32)game_location.LOCATION_DECK, location = (UInt32)CardLocation.Deck,
position = (int)game_position.POS_FACEDOWN_ATTACK, position = (int)CardPosition.FaceDownAttack,
sequence = (UInt32)i, sequence = (UInt32)i,
}; };
GCS_cardCreate(gps); GCS_cardCreate(gps);
...@@ -1480,8 +1480,8 @@ public class Ocgcore : ServantWithCardDescription ...@@ -1480,8 +1480,8 @@ public class Ocgcore : ServantWithCardDescription
gps = new GPS gps = new GPS
{ {
controller = (UInt32)player, controller = (UInt32)player,
location = (UInt32)game_location.LOCATION_HAND, location = (UInt32)CardLocation.Hand,
position = (int)game_position.POS_FACEDOWN_ATTACK, position = (int)CardPosition.FaceDownAttack,
sequence = (UInt32)i, sequence = (UInt32)i,
}; };
GCS_cardCreate(gps); GCS_cardCreate(gps);
...@@ -1492,8 +1492,8 @@ public class Ocgcore : ServantWithCardDescription ...@@ -1492,8 +1492,8 @@ public class Ocgcore : ServantWithCardDescription
gps = new GPS gps = new GPS
{ {
controller = (UInt32)player, controller = (UInt32)player,
location = (UInt32)game_location.LOCATION_GRAVE, location = (UInt32)CardLocation.Grave,
position = (int)game_position.POS_FACEUP_ATTACK, position = (int)CardPosition.FaceUpAttack,
sequence = (UInt32)i, sequence = (UInt32)i,
}; };
GCS_cardCreate(gps); GCS_cardCreate(gps);
...@@ -1504,8 +1504,8 @@ public class Ocgcore : ServantWithCardDescription ...@@ -1504,8 +1504,8 @@ public class Ocgcore : ServantWithCardDescription
gps = new GPS gps = new GPS
{ {
controller = (UInt32)player, controller = (UInt32)player,
location = (UInt32)game_location.LOCATION_REMOVED, location = (UInt32)CardLocation.Removed,
position = (int)game_position.POS_FACEUP_ATTACK, position = (int)CardPosition.FaceUpAttack,
sequence = (UInt32)i, sequence = (UInt32)i,
}; };
GCS_cardCreate(gps); GCS_cardCreate(gps);
...@@ -1517,8 +1517,8 @@ public class Ocgcore : ServantWithCardDescription ...@@ -1517,8 +1517,8 @@ public class Ocgcore : ServantWithCardDescription
gps = new GPS gps = new GPS
{ {
controller = (UInt32)player, controller = (UInt32)player,
location = (UInt32)game_location.LOCATION_EXTRA, location = (UInt32)CardLocation.Extra,
position = (int)game_position.POS_FACEDOWN_ATTACK, position = (int)CardPosition.FaceDownAttack,
sequence = (UInt32)i, sequence = (UInt32)i,
}; };
GCS_cardCreate(gps); GCS_cardCreate(gps);
...@@ -1528,8 +1528,8 @@ public class Ocgcore : ServantWithCardDescription ...@@ -1528,8 +1528,8 @@ public class Ocgcore : ServantWithCardDescription
gps = new GPS gps = new GPS
{ {
controller = (UInt32)player, controller = (UInt32)player,
location = (UInt32)game_location.LOCATION_EXTRA, location = (UInt32)CardLocation.Extra,
position = (int)game_position.POS_FACEUP_ATTACK, position = (int)CardPosition.FaceUpAttack,
sequence = (UInt32)(val + i), sequence = (UInt32)(val + i),
}; };
GCS_cardCreate(gps); GCS_cardCreate(gps);
...@@ -1846,7 +1846,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -1846,7 +1846,7 @@ public class Ocgcore : ServantWithCardDescription
//printDuelLog(derectattack); //printDuelLog(derectattack);
} }
break; break;
case GameMessage.AttackDiabled: case GameMessage.AttackDisabled:
ES_hint = InterString.Get("攻击被无效时"); ES_hint = InterString.Get("攻击被无效时");
//printDuelLog(InterString.Get("攻击被无效")); //printDuelLog(InterString.Get("攻击被无效"));
break; break;
...@@ -1859,7 +1859,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -1859,7 +1859,7 @@ public class Ocgcore : ServantWithCardDescription
if (card != null) if (card != null)
{ {
card.set_code(code); card.set_code(code);
card.p.position = (int)game_position.POS_FACEUP_ATTACK; card.p.position = (int)CardPosition.FaceUpAttack;
card.refreshData(); card.refreshData();
ES_hint = InterString.Get("「[?]」反转召唤宣言时", card.get_data().Name); ES_hint = InterString.Get("「[?]」反转召唤宣言时", card.get_data().Name);
if (card.p.controller == 0) if (card.p.controller == 0)
...@@ -1916,24 +1916,24 @@ public class Ocgcore : ServantWithCardDescription ...@@ -1916,24 +1916,24 @@ public class Ocgcore : ServantWithCardDescription
ES_hint = InterString.Get("玩家抽卡时"); ES_hint = InterString.Get("玩家抽卡时");
controller = localPlayer(r.ReadByte()); controller = localPlayer(r.ReadByte());
count = r.ReadByte(); count = r.ReadByte();
int deckCC = MHS_getBundle(controller, (int)game_location.LOCATION_DECK).Count; int deckCC = MHS_getBundle(controller, (int)CardLocation.Deck).Count;
for (int isa = 0; isa < count; isa++) for (int isa = 0; isa < count; isa++)
{ {
card = GCS_cardMove( card = GCS_cardMove(
new GPS new GPS
{ {
controller = (UInt32)controller, controller = (UInt32)controller,
location = (UInt32)game_location.LOCATION_DECK, location = (UInt32)CardLocation.Deck,
sequence = (UInt32)(deckCC - 1 - isa), sequence = (UInt32)(deckCC - 1 - isa),
position = (int)game_position.POS_FACEDOWN_ATTACK, position = (int)CardPosition.FaceDownAttack,
} }
, ,
new GPS new GPS
{ {
controller = (UInt32)controller, controller = (UInt32)controller,
location = (UInt32)game_location.LOCATION_HAND, location = (UInt32)CardLocation.Hand,
sequence = (UInt32)(1000), sequence = (UInt32)(1000),
position = (int)game_position.POS_FACEDOWN_ATTACK, position = (int)CardPosition.FaceDownAttack,
} }
, false); , false);
card.set_code(r.ReadInt32() & 0x7fffffff); card.set_code(r.ReadInt32() & 0x7fffffff);
...@@ -1973,12 +1973,12 @@ public class Ocgcore : ServantWithCardDescription ...@@ -1973,12 +1973,12 @@ public class Ocgcore : ServantWithCardDescription
} }
} }
int mcount = r.ReadByte(); int mcount = r.ReadByte();
var cardsInDeck = MHS_resizeBundle(mcount, controller, game_location.LOCATION_DECK); var cardsInDeck = MHS_resizeBundle(mcount, controller, CardLocation.Deck);
int ecount = r.ReadByte(); int ecount = r.ReadByte();
var cardsInExtra = MHS_resizeBundle(ecount, controller, game_location.LOCATION_EXTRA); var cardsInExtra = MHS_resizeBundle(ecount, controller, CardLocation.Extra);
int pcount = r.ReadByte(); int pcount = r.ReadByte();
int hcount = r.ReadByte(); int hcount = r.ReadByte();
var cardsInHand = MHS_resizeBundle(hcount, controller, game_location.LOCATION_HAND); var cardsInHand = MHS_resizeBundle(hcount, controller, CardLocation.Hand);
if (cardsInDeck.Count > 0) if (cardsInDeck.Count > 0)
{ {
cardsInDeck[cardsInDeck.Count - 1].set_code(r.ReadInt32()); cardsInDeck[cardsInDeck.Count - 1].set_code(r.ReadInt32());
...@@ -1995,7 +1995,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -1995,7 +1995,7 @@ public class Ocgcore : ServantWithCardDescription
{ {
if (cardsInExtra.Count - 1 - i > 0) if (cardsInExtra.Count - 1 - i > 0)
{ {
cardsInExtra[cardsInExtra.Count - 1 - i].p.position = (int)game_position.POS_FACEUP_ATTACK; cardsInExtra[cardsInExtra.Count - 1 - i].p.position = (int)CardPosition.FaceUpAttack;
} }
} }
if (controller == 0) if (controller == 0)
...@@ -2212,7 +2212,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -2212,7 +2212,7 @@ public class Ocgcore : ServantWithCardDescription
case GameMessage.ConfirmDecktop: case GameMessage.ConfirmDecktop:
player = localPlayer(r.ReadByte()); player = localPlayer(r.ReadByte());
count = r.ReadByte(); count = r.ReadByte();
int countOfDeck = countLocation(player, game_location.LOCATION_DECK); int countOfDeck = countLocation(player, CardLocation.Deck);
for (int i = 0; i < count; i++) for (int i = 0; i < count; i++)
{ {
code = r.ReadInt32(); code = r.ReadInt32();
...@@ -2220,7 +2220,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -2220,7 +2220,7 @@ public class Ocgcore : ServantWithCardDescription
card = GCS_cardGet(new GPS card = GCS_cardGet(new GPS
{ {
controller = (UInt32)player, controller = (UInt32)player,
location = (UInt32)game_location.LOCATION_DECK, location = (UInt32)CardLocation.Deck,
sequence = (UInt32)(countOfDeck - 1 - i), sequence = (UInt32)(countOfDeck - 1 - i),
}, false); }, false);
if (card != null) if (card != null)
...@@ -2257,11 +2257,11 @@ public class Ocgcore : ServantWithCardDescription ...@@ -2257,11 +2257,11 @@ public class Ocgcore : ServantWithCardDescription
break; break;
case GameMessage.DeckTop: case GameMessage.DeckTop:
player = localPlayer(r.ReadByte()); player = localPlayer(r.ReadByte());
int countOfDeck_ = countLocation(player, game_location.LOCATION_DECK); int countOfDeck_ = countLocation(player, CardLocation.Deck);
gps = new GPS gps = new GPS
{ {
controller = (UInt32)player, controller = (UInt32)player,
location = (UInt32)game_location.LOCATION_DECK, location = (UInt32)CardLocation.Deck,
sequence = (UInt32)(countOfDeck_ - 1 - r.ReadByte()), sequence = (UInt32)(countOfDeck_ - 1 - r.ReadByte()),
}; };
code = r.ReadInt32(); code = r.ReadInt32();
...@@ -2285,7 +2285,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -2285,7 +2285,7 @@ public class Ocgcore : ServantWithCardDescription
} }
for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy) for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy)
{ {
if ((cards[i].p.location & (UInt32)game_location.LOCATION_DECK) > 0) if ((cards[i].p.location & (UInt32)CardLocation.Deck) > 0)
{ {
if (cards[i].p.controller == player) if (cards[i].p.controller == player)
{ {
...@@ -2298,7 +2298,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -2298,7 +2298,7 @@ public class Ocgcore : ServantWithCardDescription
player = localPlayer(r.ReadByte()); player = localPlayer(r.ReadByte());
for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy) for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy)
{ {
if ((cards[i].p.location & (UInt32)game_location.LOCATION_HAND) > 0) if ((cards[i].p.location & (UInt32)CardLocation.Hand) > 0)
{ {
if (cards[i].p.controller == player) if (cards[i].p.controller == player)
{ {
...@@ -2313,18 +2313,18 @@ public class Ocgcore : ServantWithCardDescription ...@@ -2313,18 +2313,18 @@ public class Ocgcore : ServantWithCardDescription
{ {
if (cards[i].p.controller == player) if (cards[i].p.controller == player)
{ {
if ((cards[i].p.location & (UInt32)game_location.LOCATION_DECK) > 0) if ((cards[i].p.location & (UInt32)CardLocation.Deck) > 0)
{ {
if (cards[i].p.controller == player) if (cards[i].p.controller == player)
{ {
cards[i].p.location = (UInt32)game_location.LOCATION_GRAVE; cards[i].p.location = (UInt32)CardLocation.Grave;
} }
} }
else if ((cards[i].p.location & (UInt32)game_location.LOCATION_GRAVE) > 0) else if ((cards[i].p.location & (UInt32)CardLocation.Grave) > 0)
{ {
if (cards[i].p.controller == player) if (cards[i].p.controller == player)
{ {
cards[i].p.location = (UInt32)game_location.LOCATION_DECK; cards[i].p.location = (UInt32)CardLocation.Deck;
} }
} }
} }
...@@ -2361,7 +2361,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -2361,7 +2361,7 @@ public class Ocgcore : ServantWithCardDescription
gps = new GPS gps = new GPS
{ {
controller = (UInt32)localPlayer(0), controller = (UInt32)localPlayer(0),
location = (UInt32)game_location.LOCATION_MZONE, location = (UInt32)CardLocation.MonsterZone,
sequence = (UInt32)i sequence = (UInt32)i
}; };
if ((selectable_field & filter) > 0) if ((selectable_field & filter) > 0)
...@@ -2379,7 +2379,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -2379,7 +2379,7 @@ public class Ocgcore : ServantWithCardDescription
gps = new GPS gps = new GPS
{ {
controller = (UInt32)localPlayer(0), controller = (UInt32)localPlayer(0),
location = (UInt32)game_location.LOCATION_SZONE, location = (UInt32)CardLocation.SpellZone,
sequence = (UInt32)i sequence = (UInt32)i
}; };
if ((selectable_field & filter) > 0) if ((selectable_field & filter) > 0)
...@@ -2397,7 +2397,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -2397,7 +2397,7 @@ public class Ocgcore : ServantWithCardDescription
gps = new GPS gps = new GPS
{ {
controller = (UInt32)localPlayer(1), controller = (UInt32)localPlayer(1),
location = (UInt32)game_location.LOCATION_MZONE, location = (UInt32)CardLocation.MonsterZone,
sequence = (UInt32)i sequence = (UInt32)i
}; };
if ((selectable_field & filter) > 0) if ((selectable_field & filter) > 0)
...@@ -2415,7 +2415,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -2415,7 +2415,7 @@ public class Ocgcore : ServantWithCardDescription
gps = new GPS gps = new GPS
{ {
controller = (UInt32)localPlayer(1), controller = (UInt32)localPlayer(1),
location = (UInt32)game_location.LOCATION_SZONE, location = (UInt32)CardLocation.SpellZone,
sequence = (UInt32)i sequence = (UInt32)i
}; };
if ((selectable_field & filter) > 0) if ((selectable_field & filter) > 0)
...@@ -2496,7 +2496,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -2496,7 +2496,7 @@ public class Ocgcore : ServantWithCardDescription
public Package getNamePacket() public Package getNamePacket()
{ {
Package p__ = new Package(); Package p__ = new Package();
p__.Fuction = (int)YGOSharp.OCGWrapper.Enums.GameMessage.sibyl_name; p__.Fuction = (int)GameMessage.sibyl_name;
p__.Data = new BinaryMaster(); p__.Data = new BinaryMaster();
p__.Data.writer.WriteUnicode(name_0, 50); p__.Data.writer.WriteUnicode(name_0, 50);
p__.Data.writer.WriteUnicode(name_0_tag, 50); p__.Data.writer.WriteUnicode(name_0_tag, 50);
...@@ -2513,7 +2513,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -2513,7 +2513,7 @@ public class Ocgcore : ServantWithCardDescription
Program.I().book.add(toPrint); Program.I().book.add(toPrint);
} }
private int countLocation(int player, game_location location_) private int countLocation(int player, CardLocation location_)
{ {
int re = 0; int re = 0;
...@@ -2531,7 +2531,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -2531,7 +2531,7 @@ public class Ocgcore : ServantWithCardDescription
return re; return re;
} }
private int countLocationSequence(int player, game_location location_) private int countLocationSequence(int player, CardLocation location_)
{ {
int re = 0; int re = 0;
...@@ -2919,8 +2919,8 @@ public class Ocgcore : ServantWithCardDescription ...@@ -2919,8 +2919,8 @@ public class Ocgcore : ServantWithCardDescription
card = GCS_cardGet(new GPS card = GCS_cardGet(new GPS
{ {
controller = (UInt32)0, controller = (UInt32)0,
location = (UInt32)game_location.LOCATION_DECK, location = (UInt32)CardLocation.Deck,
position = (int)game_position.POS_FACEDOWN_ATTACK, position = (int)CardPosition.FaceDownAttack,
sequence = (UInt32)0, sequence = (UInt32)0,
}, false); }, false);
if (card != null) if (card != null)
...@@ -2968,8 +2968,8 @@ public class Ocgcore : ServantWithCardDescription ...@@ -2968,8 +2968,8 @@ public class Ocgcore : ServantWithCardDescription
card = GCS_cardGet(new GPS card = GCS_cardGet(new GPS
{ {
controller = (UInt32)0, controller = (UInt32)0,
location = (UInt32)game_location.LOCATION_HAND, location = (UInt32)CardLocation.Hand,
position = (int)game_position.POS_FACEDOWN_ATTACK, position = (int)CardPosition.FaceDownAttack,
sequence = (UInt32)0, sequence = (UInt32)0,
}, false); }, false);
if (card != null) if (card != null)
...@@ -3418,7 +3418,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -3418,7 +3418,7 @@ public class Ocgcore : ServantWithCardDescription
gameField.setHint(InterString.Get("请选择卡片。") + " " + ES_min.ToString() + "-" + ES_max.ToString()); gameField.setHint(InterString.Get("请选择卡片。") + " " + ES_min.ToString() + "-" + ES_max.ToString());
} }
break; break;
case GameMessage.SelectUnselectCard: case GameMessage.SelectUnselect:
if (inIgnoranceReplay() || inTheWorld()) if (inIgnoranceReplay() || inTheWorld())
{ {
break; break;
...@@ -3918,7 +3918,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -3918,7 +3918,7 @@ public class Ocgcore : ServantWithCardDescription
if (card.levelForSelect_2 == 0) if (card.levelForSelect_2 == 0)
{ {
card.levelForSelect_2 = card.levelForSelect_1; card.levelForSelect_2 = card.levelForSelect_1;
if ((card.get_data().Type & (int)game_type.link) > 0) if ((card.get_data().Type & (int)CardType.Link) > 0)
{ {
card.levelForSelect_2 = 1; card.levelForSelect_2 = 1;
} }
...@@ -3945,7 +3945,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -3945,7 +3945,7 @@ public class Ocgcore : ServantWithCardDescription
if (card.levelForSelect_2 == 0) if (card.levelForSelect_2 == 0)
{ {
card.levelForSelect_2 = card.levelForSelect_1; card.levelForSelect_2 = card.levelForSelect_1;
if ((card.get_data().Type & (int)game_type.link) > 0) if ((card.get_data().Type & (int)CardType.Link) > 0)
{ {
card.levelForSelect_2 = 1; card.levelForSelect_2 = 1;
} }
...@@ -4187,7 +4187,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4187,7 +4187,7 @@ public class Ocgcore : ServantWithCardDescription
case GameMessage.ConfirmDecktop: case GameMessage.ConfirmDecktop:
player = localPlayer(r.ReadByte()); player = localPlayer(r.ReadByte());
count = r.ReadByte(); count = r.ReadByte();
int countOfDeck = countLocation(player, game_location.LOCATION_DECK); int countOfDeck = countLocation(player, CardLocation.Deck);
for (int i = 0; i < count; i++) for (int i = 0; i < count; i++)
{ {
code = r.ReadInt32(); code = r.ReadInt32();
...@@ -4195,7 +4195,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4195,7 +4195,7 @@ public class Ocgcore : ServantWithCardDescription
gps = new GPS gps = new GPS
{ {
controller = (UInt32)player, controller = (UInt32)player,
location = (UInt32)game_location.LOCATION_DECK, location = (UInt32)CardLocation.Deck,
sequence = (UInt32)(countOfDeck - 1 - i), sequence = (UInt32)(countOfDeck - 1 - i),
}; };
card = GCS_cardGet(gps, false); card = GCS_cardGet(gps, false);
...@@ -4224,7 +4224,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4224,7 +4224,7 @@ public class Ocgcore : ServantWithCardDescription
} }
else else
{ {
if (gps.location != (int)game_location.LOCATION_HAND) if (gps.location != (int)CardLocation.Hand)
{ {
showC = true; showC = true;
} }
...@@ -4245,13 +4245,13 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4245,13 +4245,13 @@ public class Ocgcore : ServantWithCardDescription
if (card != null) if (card != null)
{ {
if ( if (
(card.p.location & (UInt32)game_location.LOCATION_DECK) > 0 (card.p.location & (UInt32)CardLocation.Deck) > 0
|| ||
(card.p.location & (UInt32)game_location.LOCATION_GRAVE) > 0 (card.p.location & (UInt32)CardLocation.Grave) > 0
|| ||
(card.p.location & (UInt32)game_location.LOCATION_EXTRA) > 0 (card.p.location & (UInt32)CardLocation.Extra) > 0
|| ||
(card.p.location & (UInt32)game_location.LOCATION_REMOVED) > 0 (card.p.location & (UInt32)CardLocation.Removed) > 0
) )
{ {
card.currentKuang = gameCard.kuangType.selected; card.currentKuang = gameCard.kuangType.selected;
...@@ -4267,7 +4267,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4267,7 +4267,7 @@ public class Ocgcore : ServantWithCardDescription
} }
else if (card.condition != gameCardCondition.verticle_clickable) else if (card.condition != gameCardCondition.verticle_clickable)
{ {
if ((card.p.location & (UInt32)game_location.LOCATION_HAND) > 0) if ((card.p.location & (UInt32)CardLocation.Hand) > 0)
{ {
if (i==0) if (i==0)
{ {
...@@ -4315,7 +4315,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4315,7 +4315,7 @@ public class Ocgcore : ServantWithCardDescription
player = localPlayer(r.ReadByte()); player = localPlayer(r.ReadByte());
for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy) for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy)
{ {
if ((cards[i].p.location & (UInt32)game_location.LOCATION_DECK) > 0) if ((cards[i].p.location & (UInt32)CardLocation.Deck) > 0)
{ {
if (cards[i].p.controller == player) if (cards[i].p.controller == player)
{ {
...@@ -4420,7 +4420,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4420,7 +4420,7 @@ public class Ocgcore : ServantWithCardDescription
GPS from = r.ReadGPS(); GPS from = r.ReadGPS();
GPS to = r.ReadGPS(); GPS to = r.ReadGPS();
card = GCS_cardGet(to, false); card = GCS_cardGet(to, false);
if ((to.location == ((UInt32)game_location.LOCATION_OVERLAY | (UInt32)game_location.LOCATION_EXTRA)) && ((from.location & (UInt32)game_location.LOCATION_OVERLAY) == 0) && Program.I().setting.setting.Vxyz.value == true) if ((to.location == ((UInt32)CardLocation.Overlay | (UInt32)CardLocation.Extra)) && ((from.location & (UInt32)CardLocation.Overlay) == 0) && Program.I().setting.setting.Vxyz.value == true)
{ {
Vector3 vDarkHole = Vector3.zero; Vector3 vDarkHole = Vector3.zero;
float real = (Program.fieldSize - 1) * 0.9f + 1f; float real = (Program.fieldSize - 1) * 0.9f + 1f;
...@@ -4440,22 +4440,22 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4440,22 +4440,22 @@ public class Ocgcore : ServantWithCardDescription
} }
if (card != null) if (card != null)
{ {
if ((to.position & (int)game_position.POS_FACEDOWN) > 0) if ((to.position & (int)CardPosition.FaceDown) > 0)
{ {
if (to.location == (UInt32)game_location.LOCATION_MZONE || to.location == (UInt32)game_location.LOCATION_SZONE) if (to.location == (UInt32)CardLocation.MonsterZone || to.location == (UInt32)CardLocation.SpellZone)
{ {
if (Program.I().setting.setting.Vset.value == true) if (Program.I().setting.setting.Vset.value == true)
card.positionEffect(Program.I().mod_ocgcore_decoration_card_setted); card.positionEffect(Program.I().mod_ocgcore_decoration_card_setted);
UIHelper.playSound("set", 1f); UIHelper.playSound("set", 1f);
} }
} }
if (to.location == (UInt32)game_location.LOCATION_GRAVE) if (to.location == (UInt32)CardLocation.Grave)
{ {
if ((from.location & (UInt32)game_location.LOCATION_MZONE) > 0) UIHelper.playSound("destroyed", 1f); if ((from.location & (UInt32)CardLocation.MonsterZone) > 0) UIHelper.playSound("destroyed", 1f);
if (Program.I().setting.setting.Vmove.value == true) if (Program.I().setting.setting.Vmove.value == true)
MonoBehaviour.Destroy((GameObject)MonoBehaviour.Instantiate(Program.I().mod_ocgcore_decoration_tograve, card.gameObject.transform.position, Quaternion.identity), 5f); MonoBehaviour.Destroy((GameObject)MonoBehaviour.Instantiate(Program.I().mod_ocgcore_decoration_tograve, card.gameObject.transform.position, Quaternion.identity), 5f);
} }
if (to.location == (UInt32)game_location.LOCATION_REMOVED) if (to.location == (UInt32)CardLocation.Removed)
{ {
UIHelper.playSound("destroyed", 1f); UIHelper.playSound("destroyed", 1f);
if (Program.I().setting.setting.Vmove.value == true) if (Program.I().setting.setting.Vmove.value == true)
...@@ -4505,21 +4505,21 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4505,21 +4505,21 @@ public class Ocgcore : ServantWithCardDescription
if (Program.I().setting.setting.Vspsum.value==true) if (Program.I().setting.setting.Vspsum.value==true)
{ {
GameObject mod = Program.I().mod_ocgcore_ss_summon_light; GameObject mod = Program.I().mod_ocgcore_ss_summon_light;
if (GameStringHelper.differ(card.get_data().Attribute, (long)game_attributes.ATTRIBUTE_EARTH)) if (GameStringHelper.differ(card.get_data().Attribute, (long)CardAttribute.Earth))
mod = Program.I().mod_ocgcore_ss_summon_earth; mod = Program.I().mod_ocgcore_ss_summon_earth;
if (GameStringHelper.differ(card.get_data().Attribute, (long)game_attributes.ATTRIBUTE_DARK)) if (GameStringHelper.differ(card.get_data().Attribute, (long)CardAttribute.Dark))
mod = Program.I().mod_ocgcore_ss_summon_dark; mod = Program.I().mod_ocgcore_ss_summon_dark;
if (GameStringHelper.differ(card.get_data().Attribute, (long)game_attributes.ATTRIBUTE_DEVINE)) if (GameStringHelper.differ(card.get_data().Attribute, (long)CardAttribute.Divine))
mod = Program.I().mod_ocgcore_ss_summon_light; mod = Program.I().mod_ocgcore_ss_summon_light;
if (GameStringHelper.differ(card.get_data().Attribute, (long)game_attributes.ATTRIBUTE_FIRE)) if (GameStringHelper.differ(card.get_data().Attribute, (long)CardAttribute.Fire))
mod = Program.I().mod_ocgcore_ss_summon_fire; mod = Program.I().mod_ocgcore_ss_summon_fire;
if (GameStringHelper.differ(card.get_data().Attribute, (long)game_attributes.ATTRIBUTE_LIGHT)) if (GameStringHelper.differ(card.get_data().Attribute, (long)CardAttribute.Light))
mod = Program.I().mod_ocgcore_ss_summon_light; mod = Program.I().mod_ocgcore_ss_summon_light;
if (GameStringHelper.differ(card.get_data().Attribute, (long)game_attributes.ATTRIBUTE_WATER)) if (GameStringHelper.differ(card.get_data().Attribute, (long)CardAttribute.Water))
mod = Program.I().mod_ocgcore_ss_summon_water; mod = Program.I().mod_ocgcore_ss_summon_water;
if (GameStringHelper.differ(card.get_data().Attribute, (long)game_attributes.ATTRIBUTE_WIND)) if (GameStringHelper.differ(card.get_data().Attribute, (long)CardAttribute.Wind))
mod = Program.I().mod_ocgcore_ss_summon_wind; mod = Program.I().mod_ocgcore_ss_summon_wind;
if (GameStringHelper.differ(card.get_data().Type, (long)game_type.TYPE_FUSION)) if (GameStringHelper.differ(card.get_data().Type, (long)CardType.Fusion))
{ {
if (Program.I().setting.setting.Vfusion.value == true) if (Program.I().setting.setting.Vfusion.value == true)
{ {
...@@ -4527,7 +4527,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4527,7 +4527,7 @@ public class Ocgcore : ServantWithCardDescription
} }
UIHelper.playSound("specialsummon2", 1f); UIHelper.playSound("specialsummon2", 1f);
} }
else if (GameStringHelper.differ(card.get_data().Type, (long)game_type.TYPE_SYNCHRO)) else if (GameStringHelper.differ(card.get_data().Type, (long)CardType.Synchro))
{ {
if (Program.I().setting.setting.Vsync.value == true) if (Program.I().setting.setting.Vsync.value == true)
{ {
...@@ -4536,7 +4536,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4536,7 +4536,7 @@ public class Ocgcore : ServantWithCardDescription
UIHelper.playSound("specialsummon2", 1f); UIHelper.playSound("specialsummon2", 1f);
} }
else if (GameStringHelper.differ(card.get_data().Type, (long)game_type.TYPE_RITUAL)) else if (GameStringHelper.differ(card.get_data().Type, (long)CardType.Ritual))
{ {
if (Program.I().setting.setting.Vrution.value == true) if (Program.I().setting.setting.Vrution.value == true)
{ {
...@@ -4544,7 +4544,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4544,7 +4544,7 @@ public class Ocgcore : ServantWithCardDescription
} }
UIHelper.playSound("specialsummon2", 1f); UIHelper.playSound("specialsummon2", 1f);
} }
else if (GameStringHelper.differ(card.get_data().Type, (long)game_type.link)) else if (GameStringHelper.differ(card.get_data().Type, (long)CardType.Link))
{ {
if (Program.I().setting.setting.Vlink.value == true) if (Program.I().setting.setting.Vlink.value == true)
{ {
...@@ -4565,15 +4565,15 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4565,15 +4565,15 @@ public class Ocgcore : ServantWithCardDescription
} }
else else
{ {
if (GameStringHelper.differ(card.get_data().Type, (long)game_type.TYPE_FUSION)) if (GameStringHelper.differ(card.get_data().Type, (long)CardType.Fusion))
{ {
UIHelper.playSound("specialsummon2", 1f); UIHelper.playSound("specialsummon2", 1f);
} }
else if (GameStringHelper.differ(card.get_data().Type, (long)game_type.TYPE_SYNCHRO)) else if (GameStringHelper.differ(card.get_data().Type, (long)CardType.Synchro))
{ {
UIHelper.playSound("specialsummon2", 1f); UIHelper.playSound("specialsummon2", 1f);
} }
else if (GameStringHelper.differ(card.get_data().Type, (long)game_type.TYPE_RITUAL)) else if (GameStringHelper.differ(card.get_data().Type, (long)CardType.Ritual))
{ {
UIHelper.playSound("specialsummon2", 1f); UIHelper.playSound("specialsummon2", 1f);
} }
...@@ -4617,32 +4617,32 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4617,32 +4617,32 @@ public class Ocgcore : ServantWithCardDescription
card.set_code(code); card.set_code(code);
UIHelper.playSound("activate", 1); UIHelper.playSound("activate", 1);
card.animation_show_off( false); card.animation_show_off( false);
if ((card.get_data().Type & (int)game_type.TYPE_MONSTER) > 0) if ((card.get_data().Type & (int)CardType.Monster) > 0)
{ {
if (Program.I().setting.setting.Vactm.value == true) if (Program.I().setting.setting.Vactm.value == true)
{ {
GameObject mod = Program.I().mod_ocgcore_cs_mon_light; GameObject mod = Program.I().mod_ocgcore_cs_mon_light;
if ((card.get_data().Attribute & (int)game_attributes.ATTRIBUTE_EARTH) > 0) if ((card.get_data().Attribute & (int)CardAttribute.Earth) > 0)
{ {
mod = Program.I().mod_ocgcore_cs_mon_earth; mod = Program.I().mod_ocgcore_cs_mon_earth;
} }
if ((card.get_data().Attribute & (int)game_attributes.ATTRIBUTE_WATER) > 0) if ((card.get_data().Attribute & (int)CardAttribute.Water) > 0)
{ {
mod = Program.I().mod_ocgcore_cs_mon_water; mod = Program.I().mod_ocgcore_cs_mon_water;
} }
if ((card.get_data().Attribute & (int)game_attributes.ATTRIBUTE_FIRE) > 0) if ((card.get_data().Attribute & (int)CardAttribute.Fire) > 0)
{ {
mod = Program.I().mod_ocgcore_cs_mon_fire; mod = Program.I().mod_ocgcore_cs_mon_fire;
} }
if ((card.get_data().Attribute & (int)game_attributes.ATTRIBUTE_WIND) > 0) if ((card.get_data().Attribute & (int)CardAttribute.Wind) > 0)
{ {
mod = Program.I().mod_ocgcore_cs_mon_wind; mod = Program.I().mod_ocgcore_cs_mon_wind;
} }
if ((card.get_data().Attribute & (int)game_attributes.ATTRIBUTE_LIGHT) > 0) if ((card.get_data().Attribute & (int)CardAttribute.Light) > 0)
{ {
mod = Program.I().mod_ocgcore_cs_mon_light; mod = Program.I().mod_ocgcore_cs_mon_light;
} }
if ((card.get_data().Attribute & (int)game_attributes.ATTRIBUTE_DARK) > 0) if ((card.get_data().Attribute & (int)CardAttribute.Dark) > 0)
{ {
mod = Program.I().mod_ocgcore_cs_mon_dark; mod = Program.I().mod_ocgcore_cs_mon_dark;
} }
...@@ -4650,14 +4650,14 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4650,14 +4650,14 @@ public class Ocgcore : ServantWithCardDescription
card.fast_decoration(mod); card.fast_decoration(mod);
} }
} }
if ((card.get_data().Type & (int)game_type.TYPE_SPELL) > 0) if ((card.get_data().Type & (int)CardType.Spell) > 0)
{ {
if (Program.I().setting.setting.Vacts.value == true) if (Program.I().setting.setting.Vacts.value == true)
{ {
card.positionEffect(Program.I().mod_ocgcore_decoration_magic_activated); card.positionEffect(Program.I().mod_ocgcore_decoration_magic_activated);
} }
} }
if ((card.get_data().Type & (int)game_type.TYPE_TRAP) > 0) if ((card.get_data().Type & (int)CardType.Trap) > 0)
{ {
if (Program.I().setting.setting.Vactt.value == true) if (Program.I().setting.setting.Vactt.value == true)
{ {
...@@ -4743,7 +4743,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4743,7 +4743,7 @@ public class Ocgcore : ServantWithCardDescription
card = GCS_cardGet(gps, false); card = GCS_cardGet(gps, false);
if (card != null) if (card != null)
{ {
if (card.p.location == (UInt32)game_location.LOCATION_SZONE) if (card.p.location == (UInt32)CardLocation.SpellZone)
{ {
if (card.p.sequence == 6 || card.p.sequence == 7) if (card.p.sequence == 6 || card.p.sequence == 7)
{ {
...@@ -4761,9 +4761,9 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4761,9 +4761,9 @@ public class Ocgcore : ServantWithCardDescription
{ {
if (cardsInSelectAnimation.Count == 2) if (cardsInSelectAnimation.Count == 2)
{ {
if (cardsInSelectAnimation[0].p.location == (UInt32)game_location.LOCATION_SZONE) if (cardsInSelectAnimation[0].p.location == (UInt32)CardLocation.SpellZone)
{ {
if (cardsInSelectAnimation[1].p.location == (UInt32)game_location.LOCATION_SZONE) if (cardsInSelectAnimation[1].p.location == (UInt32)CardLocation.SpellZone)
{ {
if (cardsInSelectAnimation[1].p.sequence == 6 || cardsInSelectAnimation[1].p.sequence == 7) if (cardsInSelectAnimation[1].p.sequence == 6 || cardsInSelectAnimation[1].p.sequence == 7)
{ {
...@@ -4812,11 +4812,11 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4812,11 +4812,11 @@ public class Ocgcore : ServantWithCardDescription
card = GCS_cardGet(gps, false); card = GCS_cardGet(gps, false);
if (card != null) if (card != null)
{ {
if ((card.p.location == (UInt32)game_location.LOCATION_SZONE) && (card.p.sequence == 6 || card.p.sequence == 7)) if ((card.p.location == (UInt32)CardLocation.SpellZone) && (card.p.sequence == 6 || card.p.sequence == 7))
{ {
targetTime += 0; targetTime += 0;
} }
else if ((card.p.location & (UInt32)game_location.LOCATION_ONFIELD) > 0) else if ((card.p.location & (UInt32)CardLocation.Onfield) > 0)
{ {
targetTime += 30; targetTime += 30;
} }
...@@ -4835,9 +4835,9 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4835,9 +4835,9 @@ public class Ocgcore : ServantWithCardDescription
{ {
if (cardsInSelectAnimation.Count == 2) if (cardsInSelectAnimation.Count == 2)
{ {
if (cardsInSelectAnimation[0].p.location == (UInt32)game_location.LOCATION_SZONE) if (cardsInSelectAnimation[0].p.location == (UInt32)CardLocation.SpellZone)
{ {
if (cardsInSelectAnimation[1].p.location == (UInt32)game_location.LOCATION_SZONE) if (cardsInSelectAnimation[1].p.location == (UInt32)CardLocation.SpellZone)
{ {
if (cardsInSelectAnimation[1].p.sequence == 6 || cardsInSelectAnimation[1].p.sequence == 7) if (cardsInSelectAnimation[1].p.sequence == 6 || cardsInSelectAnimation[1].p.sequence == 7)
{ {
...@@ -4938,7 +4938,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4938,7 +4938,7 @@ public class Ocgcore : ServantWithCardDescription
UIHelper.playSound("addcounter", 1); UIHelper.playSound("addcounter", 1);
//if (Program.YGOPro1 == false) //if (Program.YGOPro1 == false)
{ {
Vector3 pos = ui_helper.get_close(card.gameObject.transform.position, Program.camera_game_main, 5); Vector3 pos = UIHelper.get_close(card.gameObject.transform.position, Program.camera_game_main, 5);
MonoBehaviour.Destroy((GameObject)MonoBehaviour.Instantiate(Program.I().mod_ocgcore_cs_end, pos, Quaternion.identity), 5f); MonoBehaviour.Destroy((GameObject)MonoBehaviour.Instantiate(Program.I().mod_ocgcore_cs_end, pos, Quaternion.identity), 5f);
} }
} }
...@@ -4959,7 +4959,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4959,7 +4959,7 @@ public class Ocgcore : ServantWithCardDescription
UIHelper.playSound("removecounter", 1); UIHelper.playSound("removecounter", 1);
//if (Program.YGOPro1 == false) //if (Program.YGOPro1 == false)
{ {
Vector3 pos = ui_helper.get_close(card.gameObject.transform.position, Program.camera_game_main, 5); Vector3 pos = UIHelper.get_close(card.gameObject.transform.position, Program.camera_game_main, 5);
MonoBehaviour.Destroy((GameObject)MonoBehaviour.Instantiate(Program.I().mod_ocgcore_cs_end, pos, Quaternion.identity), 5f); MonoBehaviour.Destroy((GameObject)MonoBehaviour.Instantiate(Program.I().mod_ocgcore_cs_end, pos, Quaternion.identity), 5f);
} }
} }
...@@ -5106,7 +5106,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -5106,7 +5106,7 @@ public class Ocgcore : ServantWithCardDescription
VectorAttackTarget = get_point_worldposition(gpsAttacked); VectorAttackTarget = get_point_worldposition(gpsAttacked);
VectorAttackTarget += (VectorAttackTarget - VectorAttackCard) * 0.3f; VectorAttackTarget += (VectorAttackTarget - VectorAttackCard) * 0.3f;
} }
if ((attackedCard != null && gpsAttacked.location != 0) && (attackedCard.p.position & (UInt32)game_position.POS_FACEUP_ATTACK) > 0) if ((attackedCard != null && gpsAttacked.location != 0) && (attackedCard.p.position & (UInt32)CardPosition.FaceUpAttack) > 0)
{ {
if (attackCard.get_data().Attack > attackedCard.get_data().Attack) if (attackCard.get_data().Attack > attackedCard.get_data().Attack)
{ {
...@@ -5124,7 +5124,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -5124,7 +5124,7 @@ public class Ocgcore : ServantWithCardDescription
Sleep(40); Sleep(40);
} }
break; break;
case GameMessage.AttackDiabled: case GameMessage.AttackDisabled:
//removeAttackHandler(); //removeAttackHandler();
break; break;
case GameMessage.DamageStepStart: case GameMessage.DamageStepStart:
...@@ -5246,7 +5246,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -5246,7 +5246,7 @@ public class Ocgcore : ServantWithCardDescription
player = localPlayer(r.ReadByte()); player = localPlayer(r.ReadByte());
ES_searchCode.Clear(); ES_searchCode.Clear();
ES_searchCode.Add(r.ReadInt32()); ES_searchCode.Add(r.ReadInt32());
ES_searchCode.Add((int)YGOSharp.OCGWrapper.Enums.searchCode.OPCODE_ISTYPE); ES_searchCode.Add((int)searchCode.OPCODE_ISTYPE);
RMSshow_input("AnnounceCard", InterString.Get("请输入关键字。"),""); RMSshow_input("AnnounceCard", InterString.Get("请输入关键字。"),"");
break; break;
case GameMessage.AnnounceCardFilter: case GameMessage.AnnounceCardFilter:
...@@ -5390,11 +5390,11 @@ public class Ocgcore : ServantWithCardDescription ...@@ -5390,11 +5390,11 @@ public class Ocgcore : ServantWithCardDescription
placs.data[1] = resp[1]; placs.data[1] = resp[1];
placs.data[2] = resp[2]; placs.data[2] = resp[2];
placeSelectors.Add(placs); placeSelectors.Add(placs);
if (location == (uint)game_location.LOCATION_MZONE && Program.I().setting.setting.hand.value == false) if (location == (uint)CardLocation.MonsterZone && Program.I().setting.setting.hand.value == false)
{ {
ES_placeSelected(placs); ES_placeSelected(placs);
} }
if (location == (uint)game_location.LOCATION_SZONE && Program.I().setting.setting.handm.value == false) if (location == (uint)CardLocation.SpellZone && Program.I().setting.setting.handm.value == false)
{ {
ES_placeSelected(placs); ES_placeSelected(placs);
} }
...@@ -5404,7 +5404,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -5404,7 +5404,7 @@ public class Ocgcore : ServantWithCardDescription
{ {
for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy) for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy)
{ {
if ((cards[i].p.location & (UInt32)game_location.LOCATION_HAND) > 0) if ((cards[i].p.location & (UInt32)CardLocation.Hand) > 0)
{ {
if (cards[i].p.controller == player) if (cards[i].p.controller == player)
{ {
...@@ -5523,7 +5523,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -5523,7 +5523,7 @@ public class Ocgcore : ServantWithCardDescription
return cardsInLocation; return cardsInLocation;
} }
void MHS_creatBundle(int count, int player, game_location location) void MHS_creatBundle(int count, int player, CardLocation location)
{ {
for (int i = 0; i < count; i++) for (int i = 0; i < count; i++)
{ {
...@@ -5531,13 +5531,13 @@ public class Ocgcore : ServantWithCardDescription ...@@ -5531,13 +5531,13 @@ public class Ocgcore : ServantWithCardDescription
{ {
controller = (UInt32)player, controller = (UInt32)player,
location = (UInt32)location, location = (UInt32)location,
position = (int)game_position.POS_FACEDOWN_ATTACK, position = (int)CardPosition.FaceDownAttack,
sequence = (UInt32)i, sequence = (UInt32)i,
}); });
} }
} }
List<gameCard> MHS_resizeBundle(int count, int player, game_location location) List<gameCard> MHS_resizeBundle(int count, int player, CardLocation location)
{ {
List<gameCard> cardBow = new List<gameCard>(); List<gameCard> cardBow = new List<gameCard>();
List<gameCard> waterOutOfBow = new List<gameCard>(); List<gameCard> waterOutOfBow = new List<gameCard>();
...@@ -5570,14 +5570,14 @@ public class Ocgcore : ServantWithCardDescription ...@@ -5570,14 +5570,14 @@ public class Ocgcore : ServantWithCardDescription
{ {
controller = (UInt32)player, controller = (UInt32)player,
location = (UInt32)location, location = (UInt32)location,
position = (int)game_position.POS_FACEDOWN_ATTACK, position = (int)CardPosition.FaceDownAttack,
sequence = (UInt32)(cardBow.Count), sequence = (UInt32)(cardBow.Count),
})); }));
} }
for (int i = 0; i < cardBow.Count; i++) for (int i = 0; i < cardBow.Count; i++)
{ {
cardBow[i].erase_data(); cardBow[i].erase_data();
cardBow[i].p.position = (int)game_position.POS_FACEDOWN_ATTACK; cardBow[i].p.position = (int)CardPosition.FaceDownAttack;
} }
return cardBow; return cardBow;
} }
...@@ -5629,19 +5629,19 @@ public class Ocgcore : ServantWithCardDescription ...@@ -5629,19 +5629,19 @@ public class Ocgcore : ServantWithCardDescription
GameObject prewarmAttackEffect(gameCard card, Vector3 from, Vector3 to) GameObject prewarmAttackEffect(gameCard card, Vector3 from, Vector3 to)
{ {
GameObject mod = Program.I().mod_ocgcore_bs_atk_line_earth; GameObject mod = Program.I().mod_ocgcore_bs_atk_line_earth;
if (GameStringHelper.differ(card.get_data().Attribute, (long)game_attributes.ATTRIBUTE_EARTH)) if (GameStringHelper.differ(card.get_data().Attribute, (long)CardAttribute.Earth))
mod = Program.I().mod_ocgcore_bs_atk_line_earth; mod = Program.I().mod_ocgcore_bs_atk_line_earth;
if (GameStringHelper.differ(card.get_data().Attribute, (long)game_attributes.ATTRIBUTE_WATER)) if (GameStringHelper.differ(card.get_data().Attribute, (long)CardAttribute.Water))
mod = Program.I().mod_ocgcore_bs_atk_line_water; mod = Program.I().mod_ocgcore_bs_atk_line_water;
if (GameStringHelper.differ(card.get_data().Attribute, (long)game_attributes.ATTRIBUTE_FIRE)) if (GameStringHelper.differ(card.get_data().Attribute, (long)CardAttribute.Fire))
mod = Program.I().mod_ocgcore_bs_atk_line_fire; mod = Program.I().mod_ocgcore_bs_atk_line_fire;
if (GameStringHelper.differ(card.get_data().Attribute, (long)game_attributes.ATTRIBUTE_WIND)) if (GameStringHelper.differ(card.get_data().Attribute, (long)CardAttribute.Wind))
mod = Program.I().mod_ocgcore_bs_atk_line_wind; mod = Program.I().mod_ocgcore_bs_atk_line_wind;
if (GameStringHelper.differ(card.get_data().Attribute, (long)game_attributes.ATTRIBUTE_DARK)) if (GameStringHelper.differ(card.get_data().Attribute, (long)CardAttribute.Dark))
mod = Program.I().mod_ocgcore_bs_atk_line_dark; mod = Program.I().mod_ocgcore_bs_atk_line_dark;
if (GameStringHelper.differ(card.get_data().Attribute, (long)game_attributes.ATTRIBUTE_LIGHT)) if (GameStringHelper.differ(card.get_data().Attribute, (long)CardAttribute.Light))
mod = Program.I().mod_ocgcore_bs_atk_line_light; mod = Program.I().mod_ocgcore_bs_atk_line_light;
if (GameStringHelper.differ(card.get_data().Attribute, (long)game_attributes.ATTRIBUTE_DEVINE)) if (GameStringHelper.differ(card.get_data().Attribute, (long)CardAttribute.Divine))
mod = Program.I().mod_ocgcore_bs_atk_line_light; mod = Program.I().mod_ocgcore_bs_atk_line_light;
mod.transform.GetChild(0).localPosition = to; mod.transform.GetChild(0).localPosition = to;
mod.transform.GetChild(1).localPosition = from; mod.transform.GetChild(1).localPosition = from;
...@@ -5904,7 +5904,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -5904,7 +5904,7 @@ public class Ocgcore : ServantWithCardDescription
} }
} }
} }
else if (currentMessage != GameMessage.SelectUnselectCard) else if (currentMessage != GameMessage.SelectUnselect)
{ {
gameInfo.removeHashedButton("sendSelected"); gameInfo.removeHashedButton("sendSelected");
} }
...@@ -5916,7 +5916,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -5916,7 +5916,7 @@ public class Ocgcore : ServantWithCardDescription
private void getSelectableCards() private void getSelectableCards()
{ {
if (currentMessage == GameMessage.SelectCard || currentMessage == GameMessage.SelectUnselectCard) if (currentMessage == GameMessage.SelectCard || currentMessage == GameMessage.SelectUnselect)
{ {
for (int i = 0; i < allCardsInSelectMessage.Count; i++) for (int i = 0; i < allCardsInSelectMessage.Count; i++)
{ {
...@@ -5961,7 +5961,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -5961,7 +5961,7 @@ public class Ocgcore : ServantWithCardDescription
if (cards.Count > 0) if (cards.Count > 0)
{ {
UInt32 loc = cards[0].p.location; UInt32 loc = cards[0].p.location;
if (loc != (UInt32)game_location.LOCATION_DECK) if (loc != (UInt32)CardLocation.Deck)
{ {
return false; return false;
} }
...@@ -6225,7 +6225,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6225,7 +6225,7 @@ public class Ocgcore : ServantWithCardDescription
switch (currentMessage) switch (currentMessage)
{ {
case GameMessage.SelectCard: case GameMessage.SelectCard:
case GameMessage.SelectUnselectCard: case GameMessage.SelectUnselect:
case GameMessage.SelectTribute: case GameMessage.SelectTribute:
int c = ES_min; int c = ES_min;
if (cardsSelectable.Count < c) if (cardsSelectable.Count < c)
...@@ -6265,11 +6265,11 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6265,11 +6265,11 @@ public class Ocgcore : ServantWithCardDescription
switch (currentMessage) switch (currentMessage)
{ {
case GameMessage.SelectCard: case GameMessage.SelectCard:
case GameMessage.SelectUnselectCard: case GameMessage.SelectUnselect:
case GameMessage.SelectTribute: case GameMessage.SelectTribute:
case GameMessage.SelectSum: case GameMessage.SelectSum:
m = new BinaryMaster(); m = new BinaryMaster();
if (currentMessage == GameMessage.SelectUnselectCard && cardsSelected.Count == 0) if (currentMessage == GameMessage.SelectUnselect && cardsSelected.Count == 0)
{ {
m.writer.Write((Int32)(-1)); m.writer.Write((Int32)(-1));
sendReturn(m.get()); sendReturn(m.get());
...@@ -6302,7 +6302,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6302,7 +6302,7 @@ public class Ocgcore : ServantWithCardDescription
flagForTimeConfirm = false; flagForTimeConfirm = false;
flagForCancleChain = false; flagForCancleChain = false;
//Package p = new Package(); //Package p = new Package();
//p.Fuction = (int)YGOSharp.OCGWrapper.Enums.GameMessage.sibyl_clear; //p.Fuction = (int)GameMessage.sibyl_clear;
//TcpHelper.AddRecordLine(p); //TcpHelper.AddRecordLine(p);
if (clearTimeFlag) if (clearTimeFlag)
{ {
...@@ -6326,7 +6326,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6326,7 +6326,7 @@ public class Ocgcore : ServantWithCardDescription
clearAllSelectPlace(); clearAllSelectPlace();
int myMaxDeck = countLocationSequence(0, game_location.LOCATION_DECK); int myMaxDeck = countLocationSequence(0, CardLocation.Deck);
for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy) for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy)
{ {
...@@ -6340,7 +6340,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6340,7 +6340,7 @@ public class Ocgcore : ServantWithCardDescription
{ {
cards[i].forSelect = false; cards[i].forSelect = false;
cards[i].isShowed = false; cards[i].isShowed = false;
if ((cards[i].p.location & (UInt32)game_location.LOCATION_DECK) > 0) if ((cards[i].p.location & (UInt32)CardLocation.Deck) > 0)
{ {
if (deckReserved == false || cards[i].p.controller != 0 || cards[i].p.sequence != myMaxDeck) if (deckReserved == false || cards[i].p.controller != 0 || cards[i].p.sequence != myMaxDeck)
{ {
...@@ -6356,7 +6356,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6356,7 +6356,7 @@ public class Ocgcore : ServantWithCardDescription
cards[i].isShowed = false; cards[i].isShowed = false;
} }
} }
if (cards[i].p.location == (uint)game_location.LOCATION_DECK) if (cards[i].p.location == (uint)CardLocation.Deck)
{ {
cards[i].isShowed = false; cards[i].isShowed = false;
} }
...@@ -6371,7 +6371,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6371,7 +6371,7 @@ public class Ocgcore : ServantWithCardDescription
List<gameCard> to_clear = new List<gameCard>(); List<gameCard> to_clear = new List<gameCard>();
for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy) for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy)
{ {
if (cards[i].p.location == (uint)game_location.search) if (cards[i].p.location == (uint)CardLocation.Search)
{ {
to_clear.Add(cards[i]); to_clear.Add(cards[i]);
} }
...@@ -6380,7 +6380,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6380,7 +6380,7 @@ public class Ocgcore : ServantWithCardDescription
for (int i = 0; i < to_clear.Count; i++) for (int i = 0; i < to_clear.Count; i++)
{ {
to_clear[i].hide(); to_clear[i].hide();
to_clear[i].p.location = (UInt32)game_location.LOCATION_UNKNOWN; to_clear[i].p.location = (UInt32)CardLocation.Unknown;
} }
gameInfo.removeAll(); gameInfo.removeAll();
RMSshow_clear(); RMSshow_clear();
...@@ -6467,7 +6467,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6467,7 +6467,7 @@ public class Ocgcore : ServantWithCardDescription
List<gameCard> to_clear = new List<gameCard>(); List<gameCard> to_clear = new List<gameCard>();
for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy) for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy)
{ {
if (cards[i].p.location == (uint)game_location.LOCATION_UNKNOWN) if (cards[i].p.location == (uint)CardLocation.Unknown)
{ {
to_clear.Add(cards[i]); to_clear.Add(cards[i]);
} }
...@@ -6503,18 +6503,18 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6503,18 +6503,18 @@ public class Ocgcore : ServantWithCardDescription
for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy) for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy)
if (cards[i].cookie_cared == false) if (cards[i].cookie_cared == false)
{ {
if ((cards[i].p.location & (UInt32)game_location.LOCATION_OVERLAY) == 0) if ((cards[i].p.location & (UInt32)CardLocation.Overlay) == 0)
{ {
if ((cards[i].p.location & (UInt32)game_location.LOCATION_SZONE) > 0) if ((cards[i].p.location & (UInt32)CardLocation.SpellZone) > 0)
{ {
cards[i].isShowed = false; cards[i].isShowed = false;
} }
if ((cards[i].p.location & (UInt32)game_location.LOCATION_MZONE) > 0) if ((cards[i].p.location & (UInt32)CardLocation.MonsterZone) > 0)
{ {
cards[i].isShowed = false; cards[i].isShowed = false;
} }
} }
if ((((cards[i].p.location & (UInt32)game_location.LOCATION_HAND) > 0) && (cards[i].p.controller == 0)) || ((cards[i].p.location & (UInt32)game_location.LOCATION_UNKNOWN) > 0)) if ((((cards[i].p.location & (UInt32)CardLocation.Hand) > 0) && (cards[i].p.controller == 0)) || ((cards[i].p.location & (UInt32)CardLocation.Unknown) > 0))
{ {
cards[i].isShowed = true; cards[i].isShowed = true;
} }
...@@ -6529,7 +6529,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6529,7 +6529,7 @@ public class Ocgcore : ServantWithCardDescription
for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy) for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy)
{ {
if (cards[i].p.location == (uint)game_location.search) if (cards[i].p.location == (uint)CardLocation.Search)
{ {
cards[i].isShowed = true; cards[i].isShowed = true;
} }
...@@ -6617,13 +6617,13 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6617,13 +6617,13 @@ public class Ocgcore : ServantWithCardDescription
{ {
if (cards[i].p.controller == 1) if (cards[i].p.controller == 1)
{ {
if ((cards[i].p.location & (UInt32)game_location.LOCATION_OVERLAY) == 0) if ((cards[i].p.location & (UInt32)CardLocation.Overlay) == 0)
{ {
if ((cards[i].p.location & (UInt32)game_location.LOCATION_MZONE) > 0) if ((cards[i].p.location & (UInt32)CardLocation.MonsterZone) > 0)
{ {
op_m.Add(cards[i]); op_m.Add(cards[i]);
} }
if ((cards[i].p.location & (UInt32)game_location.LOCATION_SZONE) > 0) if ((cards[i].p.location & (UInt32)CardLocation.SpellZone) > 0)
{ {
op_s.Add(cards[i]); op_s.Add(cards[i]);
} }
...@@ -6632,7 +6632,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6632,7 +6632,7 @@ public class Ocgcore : ServantWithCardDescription
} }
for (int m = 0; m < op_m.Count; m++) for (int m = 0; m < op_m.Count; m++)
{ {
if ((op_m[m].p.position & (UInt32)game_position.POS_FACEUP) > 0) if ((op_m[m].p.position & (UInt32)CardPosition.FaceUp) > 0)
{ {
for (int s = 0; s < op_s.Count; s++) for (int s = 0; s < op_s.Count; s++)
{ {
...@@ -6661,13 +6661,13 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6661,13 +6661,13 @@ public class Ocgcore : ServantWithCardDescription
} }
for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy) for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy)
{ {
if ((cards[i].p.location & (UInt32)game_location.LOCATION_OVERLAY) == 0) if ((cards[i].p.location & (UInt32)CardLocation.Overlay) == 0)
{ {
if ((cards[i].p.location & (UInt32)game_location.LOCATION_MZONE) > 0) if ((cards[i].p.location & (UInt32)CardLocation.MonsterZone) > 0)
{ {
if (cards[i].p.sequence >= 0 && cards[i].p.sequence <= 6) if (cards[i].p.sequence >= 0 && cards[i].p.sequence <= 6)
{ {
if ((cards[i].p.position & (UInt32)game_position.POS_FACEUP) > 0) if ((cards[i].p.position & (UInt32)CardPosition.FaceUp) > 0)
{ {
if (cards[i].p.controller == 1) if (cards[i].p.controller == 1)
{ {
...@@ -6728,15 +6728,15 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6728,15 +6728,15 @@ public class Ocgcore : ServantWithCardDescription
for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy) for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy)
{ {
if ((cards[i].p.location & (UInt32)game_location.LOCATION_OVERLAY) == 0) if ((cards[i].p.location & (UInt32)CardLocation.Overlay) == 0)
{ {
if ((cards[i].p.location & (UInt32)game_location.LOCATION_MZONE) > 0) if ((cards[i].p.location & (UInt32)CardLocation.MonsterZone) > 0)
{ {
if (cards[i].p.sequence >= 0 && cards[i].p.sequence <= 6) if (cards[i].p.sequence >= 0 && cards[i].p.sequence <= 6)
{ {
if ((cards[i].get_data().Type & (UInt32)game_type.link) > 0) if ((cards[i].get_data().Type & (UInt32)CardType.Link) > 0)
{ {
if ((cards[i].p.position & (UInt32)game_position.POS_FACEUP) > 0) if ((cards[i].p.position & (UInt32)CardPosition.FaceUp) > 0)
{ {
if (cards[i].p.controller == 1) if (cards[i].p.controller == 1)
{ {
...@@ -6786,7 +6786,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6786,7 +6786,7 @@ public class Ocgcore : ServantWithCardDescription
//if (vvv[curHang, curLie] != null) //if (vvv[curHang, curLie] != null)
{ {
GPS currentGPS = new GPS(); GPS currentGPS = new GPS();
currentGPS.location = (int)game_location.LOCATION_MZONE; currentGPS.location = (int)CardLocation.MonsterZone;
if (curHang == 4) if (curHang == 4)
{ {
currentGPS.controller = 1; currentGPS.controller = 1;
...@@ -6830,10 +6830,10 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6830,10 +6830,10 @@ public class Ocgcore : ServantWithCardDescription
{ {
gameCard card = vvv[curHang - 1, curLie - 1]; gameCard card = vvv[curHang - 1, curLie - 1];
if (card.p.controller == 0) if (card.p.controller == 0)
if ((card.get_data().rDefense & CardFac.youshang) > 0) if (card.get_data().HasLinkMarker(CardLinkMarker.TopRight))
lighted = true; lighted = true;
if (card.p.controller == 1) if (card.p.controller == 1)
if ((card.get_data().rDefense & CardFac.zuoxia) > 0) if (card.get_data().HasLinkMarker(CardLinkMarker.BottomLeft))
lighted = true; lighted = true;
} }
...@@ -6842,10 +6842,10 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6842,10 +6842,10 @@ public class Ocgcore : ServantWithCardDescription
{ {
gameCard card = vvv[curHang, curLie - 1]; gameCard card = vvv[curHang, curLie - 1];
if (card.p.controller == 0) if (card.p.controller == 0)
if ((card.get_data().rDefense & CardFac.you) > 0) if (card.get_data().HasLinkMarker(CardLinkMarker.Right))
lighted = true; lighted = true;
if (card.p.controller == 1) if (card.p.controller == 1)
if ((card.get_data().rDefense & CardFac.zuo) > 0) if (card.get_data().HasLinkMarker(CardLinkMarker.Left))
lighted = true; lighted = true;
} }
if (curLie - 1 >= 0) if (curLie - 1 >= 0)
...@@ -6853,10 +6853,10 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6853,10 +6853,10 @@ public class Ocgcore : ServantWithCardDescription
{ {
gameCard card = vvv[curHang + 1, curLie - 1]; gameCard card = vvv[curHang + 1, curLie - 1];
if (card.p.controller == 0) if (card.p.controller == 0)
if ((card.get_data().rDefense & CardFac.youxia) > 0) if (card.get_data().HasLinkMarker(CardLinkMarker.BottomRight))
lighted = true; lighted = true;
if (card.p.controller == 1) if (card.p.controller == 1)
if ((card.get_data().rDefense & CardFac.zuoshang) > 0) if (card.get_data().HasLinkMarker(CardLinkMarker.TopLeft))
lighted = true; lighted = true;
} }
if (curHang - 1 >= 0) if (curHang - 1 >= 0)
...@@ -6864,10 +6864,10 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6864,10 +6864,10 @@ public class Ocgcore : ServantWithCardDescription
{ {
gameCard card = vvv[curHang - 1, curLie]; gameCard card = vvv[curHang - 1, curLie];
if (card.p.controller == 0) if (card.p.controller == 0)
if ((card.get_data().rDefense & CardFac.shang) > 0) if (card.get_data().HasLinkMarker(CardLinkMarker.Top))
lighted = true; lighted = true;
if (card.p.controller == 1) if (card.p.controller == 1)
if ((card.get_data().rDefense & CardFac.xia) > 0) if (card.get_data().HasLinkMarker(CardLinkMarker.Bottom))
lighted = true; lighted = true;
} }
...@@ -6875,10 +6875,10 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6875,10 +6875,10 @@ public class Ocgcore : ServantWithCardDescription
{ {
gameCard card = vvv[curHang + 1, curLie]; gameCard card = vvv[curHang + 1, curLie];
if (card.p.controller == 0) if (card.p.controller == 0)
if ((card.get_data().rDefense & CardFac.xia) > 0) if (card.get_data().HasLinkMarker(CardLinkMarker.Bottom))
lighted = true; lighted = true;
if (card.p.controller == 1) if (card.p.controller == 1)
if ((card.get_data().rDefense & CardFac.shang) > 0) if (card.get_data().HasLinkMarker(CardLinkMarker.Top))
lighted = true; lighted = true;
} }
if (curHang - 1 >= 0) if (curHang - 1 >= 0)
...@@ -6886,10 +6886,10 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6886,10 +6886,10 @@ public class Ocgcore : ServantWithCardDescription
{ {
gameCard card = vvv[curHang - 1, curLie + 1]; gameCard card = vvv[curHang - 1, curLie + 1];
if (card.p.controller == 0) if (card.p.controller == 0)
if ((card.get_data().rDefense & CardFac.zuoshang) > 0) if (card.get_data().HasLinkMarker(CardLinkMarker.TopLeft))
lighted = true; lighted = true;
if (card.p.controller == 1) if (card.p.controller == 1)
if ((card.get_data().rDefense & CardFac.youxia) > 0) if (card.get_data().HasLinkMarker(CardLinkMarker.BottomRight))
lighted = true; lighted = true;
} }
...@@ -6897,10 +6897,10 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6897,10 +6897,10 @@ public class Ocgcore : ServantWithCardDescription
{ {
gameCard card = vvv[curHang, curLie + 1]; gameCard card = vvv[curHang, curLie + 1];
if (card.p.controller == 0) if (card.p.controller == 0)
if ((card.get_data().rDefense & CardFac.zuo) > 0) if (card.get_data().HasLinkMarker(CardLinkMarker.Left))
lighted = true; lighted = true;
if (card.p.controller == 1) if (card.p.controller == 1)
if ((card.get_data().rDefense & CardFac.you) > 0) if (card.get_data().HasLinkMarker(CardLinkMarker.Right))
lighted = true; lighted = true;
} }
...@@ -6908,10 +6908,10 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6908,10 +6908,10 @@ public class Ocgcore : ServantWithCardDescription
{ {
gameCard card = vvv[curHang + 1, curLie + 1]; gameCard card = vvv[curHang + 1, curLie + 1];
if (card.p.controller == 0) if (card.p.controller == 0)
if ((card.get_data().rDefense & CardFac.zuoxia) > 0) if (card.get_data().HasLinkMarker(CardLinkMarker.BottomLeft))
lighted = true; lighted = true;
if (card.p.controller == 1) if (card.p.controller == 1)
if ((card.get_data().rDefense & CardFac.youshang) > 0) if (card.get_data().HasLinkMarker(CardLinkMarker.TopRight))
lighted = true; lighted = true;
} }
...@@ -6978,7 +6978,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6978,7 +6978,7 @@ public class Ocgcore : ServantWithCardDescription
for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy) for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy)
if (cards[i].cookie_cared == false) if (cards[i].cookie_cared == false)
{ {
if ((cards[i].p.location & (UInt32)game_location.LOCATION_HAND) > 0 && cards[i].p.controller == 1) if ((cards[i].p.location & (UInt32)CardLocation.Hand) > 0 && cards[i].p.controller == 1)
{ {
line.Add(cards[i]); line.Add(cards[i]);
} }
...@@ -7022,7 +7022,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7022,7 +7022,7 @@ public class Ocgcore : ServantWithCardDescription
int overC = 0; int overC = 0;
if (Program.getVerticalTransparency() > 0.5f) if (Program.getVerticalTransparency() > 0.5f)
{ {
if ((cards[i].p.position & (Int32)game_position.POS_FACEUP) > 0 && (cards[i].p.location & (Int32)game_location.LOCATION_ONFIELD) > 0) if ((cards[i].p.position & (Int32)CardPosition.FaceUp) > 0 && (cards[i].p.location & (Int32)CardLocation.Onfield) > 0)
{ {
overC = overlayed_cards.Count; overC = overlayed_cards.Count;
} }
...@@ -7039,7 +7039,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7039,7 +7039,7 @@ public class Ocgcore : ServantWithCardDescription
} }
foreach (var item in cards[i].target) foreach (var item in cards[i].target)
{ {
if ((item.p.location & (UInt32)game_location.LOCATION_SZONE) > 0 || (item.p.location & (UInt32)game_location.LOCATION_MZONE) > 0) if ((item.p.location & (UInt32)CardLocation.SpellZone) > 0 || (item.p.location & (UInt32)CardLocation.MonsterZone) > 0)
{ {
animation_thunder(item.gameObject, cards[i].gameObject); animation_thunder(item.gameObject, cards[i].gameObject);
} }
...@@ -7073,11 +7073,11 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7073,11 +7073,11 @@ public class Ocgcore : ServantWithCardDescription
for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy) for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy)
if (cards[i].cookie_cared == false) if (cards[i].cookie_cared == false)
{ {
if ((cards[i].p.location & (UInt32)game_location.LOCATION_SZONE) > 0) if ((cards[i].p.location & (UInt32)CardLocation.SpellZone) > 0)
{ {
if (cards[i].p.sequence == 0 || cards[i].p.sequence == 4) if (cards[i].p.sequence == 0 || cards[i].p.sequence == 4)
{ {
if ((cards[i].get_data().Type & (int)game_type.TYPE_PENDULUM) > 0) if ((cards[i].get_data().Type & (int)CardType.Pendulum) > 0)
{ {
if (cards[i].p.controller == 0) if (cards[i].p.controller == 0)
{ {
...@@ -7210,7 +7210,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7210,7 +7210,7 @@ public class Ocgcore : ServantWithCardDescription
for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy) for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy)
if (cards[i].cookie_cared == false) if (cards[i].cookie_cared == false)
{ {
if ((cards[i].p.location & (UInt32)game_location.LOCATION_SZONE) > 0) if ((cards[i].p.location & (UInt32)CardLocation.SpellZone) > 0)
{ {
if (cards[i].p.sequence == 6 || cards[i].p.sequence == 7) if (cards[i].p.sequence == 6 || cards[i].p.sequence == 7)
{ {
...@@ -7255,9 +7255,9 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7255,9 +7255,9 @@ public class Ocgcore : ServantWithCardDescription
for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy) for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy)
if (cards[i].cookie_cared == false) if (cards[i].cookie_cared == false)
{ {
if ((cards[i].p.location & (UInt32)game_location.LOCATION_OVERLAY) > 0) if ((cards[i].p.location & (UInt32)CardLocation.Overlay) > 0)
{ {
if ((cards[i].p.location & (UInt32)game_location.LOCATION_EXTRA) > 0) if ((cards[i].p.location & (UInt32)CardLocation.Extra) > 0)
{ {
cards[i].cookie_cared = true; cards[i].cookie_cared = true;
cards[i].UA_give_condition(get_point_worldcondition(cards[i].p)); cards[i].UA_give_condition(get_point_worldcondition(cards[i].p));
...@@ -7287,11 +7287,11 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7287,11 +7287,11 @@ public class Ocgcore : ServantWithCardDescription
for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy) for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy)
{ {
if (((cards[i].p.location & (UInt32)game_location.LOCATION_SZONE) > 0) && cards[i].p.sequence == 5) if (((cards[i].p.location & (UInt32)CardLocation.SpellZone) > 0) && cards[i].p.sequence == 5)
{ {
if (cards[i].p.controller == 0) if (cards[i].p.controller == 0)
{ {
if ((cards[i].p.position & (Int32)game_position.POS_FACEUP) > 0) if ((cards[i].p.position & (Int32)CardPosition.FaceUp) > 0)
{ {
code = cards[i].get_data().Id; code = cards[i].get_data().Id;
} }
...@@ -7305,11 +7305,11 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7305,11 +7305,11 @@ public class Ocgcore : ServantWithCardDescription
for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy) for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy)
{ {
if (((cards[i].p.location & (UInt32)game_location.LOCATION_SZONE) > 0) && cards[i].p.sequence == 5) if (((cards[i].p.location & (UInt32)CardLocation.SpellZone) > 0) && cards[i].p.sequence == 5)
{ {
if (cards[i].p.controller == 1) if (cards[i].p.controller == 1)
{ {
if ((cards[i].p.position & (Int32)game_position.POS_FACEUP) > 0) if ((cards[i].p.position & (Int32)CardPosition.FaceUp) > 0)
{ {
code = cards[i].get_data().Id; code = cards[i].get_data().Id;
} }
...@@ -7375,14 +7375,14 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7375,14 +7375,14 @@ public class Ocgcore : ServantWithCardDescription
} }
animation_count(gameField.LOCATION_DECK_0, game_location.LOCATION_DECK, 0); animation_count(gameField.LOCATION_DECK_0, CardLocation.Deck, 0);
animation_count(gameField.LOCATION_EXTRA_0, game_location.LOCATION_EXTRA, 0); animation_count(gameField.LOCATION_EXTRA_0, CardLocation.Extra, 0);
animation_count(gameField.LOCATION_GRAVE_0, game_location.LOCATION_GRAVE, 0); animation_count(gameField.LOCATION_GRAVE_0, CardLocation.Grave, 0);
animation_count(gameField.LOCATION_REMOVED_0, game_location.LOCATION_REMOVED, 0); animation_count(gameField.LOCATION_REMOVED_0, CardLocation.Removed, 0);
animation_count(gameField.LOCATION_DECK_1, game_location.LOCATION_DECK, 1); animation_count(gameField.LOCATION_DECK_1, CardLocation.Deck, 1);
animation_count(gameField.LOCATION_EXTRA_1, game_location.LOCATION_EXTRA, 1); animation_count(gameField.LOCATION_EXTRA_1, CardLocation.Extra, 1);
animation_count(gameField.LOCATION_GRAVE_1, game_location.LOCATION_GRAVE, 1); animation_count(gameField.LOCATION_GRAVE_1, CardLocation.Grave, 1);
animation_count(gameField.LOCATION_REMOVED_1, game_location.LOCATION_REMOVED, 1); animation_count(gameField.LOCATION_REMOVED_1, CardLocation.Removed, 1);
gameField.realize(); gameField.realize();
Program.notGo(gameInfo.realize); Program.notGo(gameInfo.realize);
Program.go(50,gameInfo.realize); Program.go(50,gameInfo.realize);
...@@ -7429,7 +7429,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7429,7 +7429,7 @@ public class Ocgcore : ServantWithCardDescription
Vector3 get_world_rotation(gameCard card) Vector3 get_world_rotation(gameCard card)
{ {
cardRuleComdition r = cardRuleComdition.meUpAtk; cardRuleComdition r = cardRuleComdition.meUpAtk;
if ((card.p.location & (UInt32)game_location.LOCATION_DECK) > 0) if ((card.p.location & (UInt32)CardLocation.Deck) > 0)
{ {
if (card.get_data().Id > 0) if (card.get_data().Id > 0)
{ {
...@@ -7440,13 +7440,13 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7440,13 +7440,13 @@ public class Ocgcore : ServantWithCardDescription
r = cardRuleComdition.meDownAtk; r = cardRuleComdition.meDownAtk;
} }
} }
if ((card.p.location & (UInt32)game_location.LOCATION_GRAVE) > 0) if ((card.p.location & (UInt32)CardLocation.Grave) > 0)
{ {
r = cardRuleComdition.meUpAtk; r = cardRuleComdition.meUpAtk;
} }
if ((card.p.location & (UInt32)game_location.LOCATION_REMOVED) > 0) if ((card.p.location & (UInt32)CardLocation.Removed) > 0)
{ {
if ((card.p.position & (UInt32)game_position.POS_FACEUP) > 0) if ((card.p.position & (UInt32)CardPosition.FaceUp) > 0)
{ {
r = cardRuleComdition.meUpAtk; r = cardRuleComdition.meUpAtk;
} }
...@@ -7455,9 +7455,9 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7455,9 +7455,9 @@ public class Ocgcore : ServantWithCardDescription
r = cardRuleComdition.meDownAtk; r = cardRuleComdition.meDownAtk;
} }
} }
if ((card.p.location & (UInt32)game_location.LOCATION_EXTRA) > 0) if ((card.p.location & (UInt32)CardLocation.Extra) > 0)
{ {
if ((card.p.position & (UInt32)game_position.POS_FACEUP) > 0) if ((card.p.position & (UInt32)CardPosition.FaceUp) > 0)
{ {
r = cardRuleComdition.meUpAtk; r = cardRuleComdition.meUpAtk;
} }
...@@ -7466,28 +7466,28 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7466,28 +7466,28 @@ public class Ocgcore : ServantWithCardDescription
r = cardRuleComdition.meDownAtk; r = cardRuleComdition.meDownAtk;
} }
} }
if ((card.p.location & (UInt32)game_location.LOCATION_MZONE) > 0) if ((card.p.location & (UInt32)CardLocation.MonsterZone) > 0)
{ {
if ((card.p.position & (UInt32)game_position.POS_FACEDOWN_DEFENSE) > 0) if ((card.p.position & (UInt32)CardPosition.FaceDownDefence) > 0)
{ {
r = cardRuleComdition.meDownDef; r = cardRuleComdition.meDownDef;
} }
if ((card.p.position & (UInt32)game_position.POS_FACEUP_DEFENSE) > 0) if ((card.p.position & (UInt32)CardPosition.FaceUpDefence) > 0)
{ {
r = cardRuleComdition.meUpDef; r = cardRuleComdition.meUpDef;
} }
if ((card.p.position & (UInt32)game_position.POS_FACEDOWN_ATTACK) > 0) if ((card.p.position & (UInt32)CardPosition.FaceDownAttack) > 0)
{ {
r = cardRuleComdition.meDownAtk; r = cardRuleComdition.meDownAtk;
} }
if ((card.p.position & (UInt32)game_position.POS_FACEUP_ATTACK) > 0) if ((card.p.position & (UInt32)CardPosition.FaceUpAttack) > 0)
{ {
r = cardRuleComdition.meUpAtk; r = cardRuleComdition.meUpAtk;
} }
} }
if ((card.p.location & (UInt32)game_location.LOCATION_SZONE) > 0) if ((card.p.location & (UInt32)CardLocation.SpellZone) > 0)
{ {
if ((card.p.position & (UInt32)game_position.POS_FACEUP) > 0) if ((card.p.position & (UInt32)CardPosition.FaceUp) > 0)
{ {
r = cardRuleComdition.meUpAtk; r = cardRuleComdition.meUpAtk;
} }
...@@ -7496,7 +7496,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7496,7 +7496,7 @@ public class Ocgcore : ServantWithCardDescription
r = cardRuleComdition.meDownAtk; r = cardRuleComdition.meDownAtk;
} }
} }
if ((card.p.location & (UInt32)game_location.LOCATION_OVERLAY) > 0) if ((card.p.location & (UInt32)CardLocation.Overlay) > 0)
{ {
r = cardRuleComdition.meUpAtk; r = cardRuleComdition.meUpAtk;
} }
...@@ -7549,7 +7549,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7549,7 +7549,7 @@ public class Ocgcore : ServantWithCardDescription
//private Vector3 get_real_rotation(int i) //private Vector3 get_real_rotation(int i)
//{ //{
// Vector3 r = get_point_worldrotation(cards[i].p); // Vector3 r = get_point_worldrotation(cards[i].p);
// if ((cards[i].p.location & (UInt32)game_location.LOCATION_DECK) > 0) // if ((cards[i].p.location & (UInt32)CardLocation.Deck) > 0)
// { // {
// if (cards[i].get_data().Id > 0) // if (cards[i].get_data().Id > 0)
// { // {
...@@ -7560,51 +7560,51 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7560,51 +7560,51 @@ public class Ocgcore : ServantWithCardDescription
// r = new Vector3(-90, 0, 0); // r = new Vector3(-90, 0, 0);
// } // }
// } // }
// if ((cards[i].p.location & (UInt32)game_location.LOCATION_MZONE) > 0) // if ((cards[i].p.location & (UInt32)CardLocation.MonsterZone) > 0)
// { // {
// if ((cards[i].p.position & (UInt32)game_position.POS_FACEDOWN_DEFENSE) > 0) // if ((cards[i].p.position & (UInt32)CardPosition.FaceDown_DEFENSE) > 0)
// { // {
// r = new Vector3(-90, 0, 90); // r = new Vector3(-90, 0, 90);
// } // }
// if ((cards[i].p.position & (UInt32)game_position.POS_FACEUP_DEFENSE) > 0) // if ((cards[i].p.position & (UInt32)CardPosition.FaceUp_DEFENSE) > 0)
// { // {
// r = new Vector3(90, 0, 90); // r = new Vector3(90, 0, 90);
// } // }
// if ((cards[i].p.position & (UInt32)game_position.POS_FACEDOWN_ATTACK) > 0) // if ((cards[i].p.position & (UInt32)CardPosition.FaceDownAttack) > 0)
// { // {
// r = new Vector3(-90, 0, 0); // r = new Vector3(-90, 0, 0);
// } // }
// if ((cards[i].p.position & (UInt32)game_position.POS_FACEUP_ATTACK) > 0) // if ((cards[i].p.position & (UInt32)CardPosition.FaceUpAttack) > 0)
// { // {
// r = new Vector3(90, 0, 0); // r = new Vector3(90, 0, 0);
// } // }
// } // }
// if ((cards[i].p.location & (UInt32)game_location.LOCATION_SZONE) > 0) // if ((cards[i].p.location & (UInt32)CardLocation.SpellZone) > 0)
// { // {
// if ((cards[i].p.position & (UInt32)game_position.POS_FACEDOWN_DEFENSE) > 0) // if ((cards[i].p.position & (UInt32)CardPosition.FaceDown_DEFENSE) > 0)
// { // {
// r = new Vector3(-90, 0, 90); // r = new Vector3(-90, 0, 90);
// } // }
// if ((cards[i].p.position & (UInt32)game_position.POS_FACEUP_DEFENSE) > 0) // if ((cards[i].p.position & (UInt32)CardPosition.FaceUp_DEFENSE) > 0)
// { // {
// r = new Vector3(90, 0, 90); // r = new Vector3(90, 0, 90);
// } // }
// if ((cards[i].p.position & (UInt32)game_position.POS_FACEDOWN_ATTACK) > 0) // if ((cards[i].p.position & (UInt32)CardPosition.FaceDownAttack) > 0)
// { // {
// r = new Vector3(-90, 0, 0); // r = new Vector3(-90, 0, 0);
// } // }
// if ((cards[i].p.position & (UInt32)game_position.POS_FACEUP_ATTACK) > 0) // if ((cards[i].p.position & (UInt32)CardPosition.FaceUpAttack) > 0)
// { // {
// r = new Vector3(90, 0, 0); // r = new Vector3(90, 0, 0);
// } // }
// } // }
// if ((cards[i].p.location & (UInt32)game_location.LOCATION_GRAVE) > 0) // if ((cards[i].p.location & (UInt32)CardLocation.Grave) > 0)
// { // {
// r = new Vector3(90, 0, 0); // r = new Vector3(90, 0, 0);
// } // }
// if ((cards[i].p.location & (UInt32)game_location.LOCATION_REMOVED) > 0) // if ((cards[i].p.location & (UInt32)CardLocation.Removed) > 0)
// { // {
// if ((cards[i].p.position & (UInt32)game_position.POS_FACEUP) > 0) // if ((cards[i].p.position & (UInt32)CardPosition.FaceUp) > 0)
// { // {
// r = new Vector3(90, 0, 0); // r = new Vector3(90, 0, 0);
// } // }
...@@ -7613,9 +7613,9 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7613,9 +7613,9 @@ public class Ocgcore : ServantWithCardDescription
// r = new Vector3(-90, 0, 0); // r = new Vector3(-90, 0, 0);
// } // }
// } // }
// if ((cards[i].p.location & (UInt32)game_location.LOCATION_EXTRA) > 0) // if ((cards[i].p.location & (UInt32)CardLocation.Extra) > 0)
// { // {
// if ((cards[i].p.position & (UInt32)game_position.POS_FACEUP) > 0) // if ((cards[i].p.position & (UInt32)CardPosition.FaceUp) > 0)
// { // {
// r = new Vector3(90, 0, 0); // r = new Vector3(90, 0, 0);
// } // }
...@@ -7624,7 +7624,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7624,7 +7624,7 @@ public class Ocgcore : ServantWithCardDescription
// r = new Vector3(-90, 0, 0); // r = new Vector3(-90, 0, 0);
// } // }
// } // }
// if ((cards[i].p.location & (UInt32)game_location.LOCATION_OVERLAY) > 0) // if ((cards[i].p.location & (UInt32)CardLocation.Overlay) > 0)
// { // {
// r = new Vector3(90, 0, 0); // r = new Vector3(90, 0, 0);
// } // }
...@@ -7636,7 +7636,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7636,7 +7636,7 @@ public class Ocgcore : ServantWithCardDescription
// return r; // return r;
//} //}
private void animation_count(TMPro.TextMeshPro textmesh, game_location location, int player) private void animation_count(TMPro.TextMeshPro textmesh, CardLocation location, int player)
{ {
int count = 0; int count = 0;
int countU = 0; int countU = 0;
...@@ -7647,7 +7647,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7647,7 +7647,7 @@ public class Ocgcore : ServantWithCardDescription
if ((cards[i].p.location & (UInt32)location) > 0) if ((cards[i].p.location & (UInt32)location) > 0)
{ {
count++; count++;
if ((cards[i].p.position & (UInt32)game_position.POS_FACEUP) > 0) if ((cards[i].p.position & (UInt32)CardPosition.FaceUp) > 0)
{ {
countU++; countU++;
} }
...@@ -7660,7 +7660,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7660,7 +7660,7 @@ public class Ocgcore : ServantWithCardDescription
} }
else else
{ {
if (location== game_location.LOCATION_EXTRA) if (location== CardLocation.Extra)
{ {
textmesh.text = count.ToString()+"("+ countU .ToString()+ ")"; textmesh.text = count.ToString()+"("+ countU .ToString()+ ")";
} }
...@@ -7723,7 +7723,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7723,7 +7723,7 @@ public class Ocgcore : ServantWithCardDescription
public gameCard GCS_cardGet(GPS p, bool create) public gameCard GCS_cardGet(GPS p, bool create)
{ {
gameCard c = null; gameCard c = null;
if ((p.location & (UInt32)game_location.LOCATION_OVERLAY) > 0) if ((p.location & (UInt32)CardLocation.Overlay) > 0)
{ {
for (int i = 0; i < cards.Count; i++) for (int i = 0; i < cards.Count; i++)
{ {
...@@ -7785,13 +7785,13 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7785,13 +7785,13 @@ public class Ocgcore : ServantWithCardDescription
List<gameCard> cas = new List<gameCard>(); List<gameCard> cas = new List<gameCard>();
if (c != null) if (c != null)
{ {
if ((c.p.location & (UInt32)game_location.LOCATION_OVERLAY) == 0) if ((c.p.location & (UInt32)CardLocation.Overlay) == 0)
{ {
for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy) for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy)
{ {
if ((cards[i].p.location & (UInt32)game_location.LOCATION_OVERLAY) > 0) if ((cards[i].p.location & (UInt32)CardLocation.Overlay) > 0)
if (cards[i].p.controller == c.p.controller) if (cards[i].p.controller == c.p.controller)
if ((cards[i].p.location | (UInt32)game_location.LOCATION_OVERLAY) == (c.p.location | (UInt32)game_location.LOCATION_OVERLAY)) if ((cards[i].p.location | (UInt32)CardLocation.Overlay) == (c.p.location | (UInt32)CardLocation.Overlay))
if (cards[i].p.sequence == c.p.sequence) if (cards[i].p.sequence == c.p.sequence)
cas.Add(cards[i]); cas.Add(cards[i]);
} }
...@@ -7839,7 +7839,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7839,7 +7839,7 @@ public class Ocgcore : ServantWithCardDescription
if (swap == false) if (swap == false)
{ {
if ((p1.location != p2.location) || ((p2.position & (int)game_position.POS_FACEDOWN) > 0)) if ((p1.location != p2.location) || ((p2.position & (int)CardPosition.FaceDown) > 0))
{ {
card_from.target.Clear(); card_from.target.Clear();
for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy) for (int i = 0; i < cards.Count; i++) if (cards[i].gameObject.activeInHierarchy)
...@@ -7851,7 +7851,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7851,7 +7851,7 @@ public class Ocgcore : ServantWithCardDescription
} }
} }
if ((p2.location & (UInt32)game_location.LOCATION_OVERLAY) > 0) if ((p2.location & (UInt32)CardLocation.Overlay) > 0)
{ {
card_from.p_beforeOverLayed = p1; card_from.p_beforeOverLayed = p1;
} }
...@@ -7884,9 +7884,9 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7884,9 +7884,9 @@ public class Ocgcore : ServantWithCardDescription
} }
else else
{ {
if ((card_to.p.location & (UInt32)game_location.LOCATION_OVERLAY) == 0) if ((card_to.p.location & (UInt32)CardLocation.Overlay) == 0)
{ {
if (((card_to.p.location & (UInt32)game_location.LOCATION_MZONE) > 0) || ((card_to.p.location & (UInt32)game_location.LOCATION_SZONE) > 0)) if (((card_to.p.location & (UInt32)CardLocation.MonsterZone) > 0) || ((card_to.p.location & (UInt32)CardLocation.SpellZone) > 0))
{ {
if (card_from != null) if (card_from != null)
card_from.p = p2; card_from.p = p2;
...@@ -7920,7 +7920,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7920,7 +7920,7 @@ public class Ocgcore : ServantWithCardDescription
for (int i = 0; i < overlayed_cards_of_cardFrom.Count; i++) for (int i = 0; i < overlayed_cards_of_cardFrom.Count; i++)
{ {
overlayed_cards_of_cardFrom[i].p.controller = card_from.p.controller; overlayed_cards_of_cardFrom[i].p.controller = card_from.p.controller;
overlayed_cards_of_cardFrom[i].p.location = card_from.p.location | (UInt32)game_location.LOCATION_OVERLAY; overlayed_cards_of_cardFrom[i].p.location = card_from.p.location | (UInt32)CardLocation.Overlay;
overlayed_cards_of_cardFrom[i].p.sequence = card_from.p.sequence; overlayed_cards_of_cardFrom[i].p.sequence = card_from.p.sequence;
overlayed_cards_of_cardFrom[i].p.position += 1000; overlayed_cards_of_cardFrom[i].p.position += 1000;
} }
...@@ -7931,7 +7931,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7931,7 +7931,7 @@ public class Ocgcore : ServantWithCardDescription
for (int i = 0; i < overlayed_cards_of_cardTo.Count; i++) for (int i = 0; i < overlayed_cards_of_cardTo.Count; i++)
{ {
overlayed_cards_of_cardTo[i].p.controller = card_to.p.controller; overlayed_cards_of_cardTo[i].p.controller = card_to.p.controller;
overlayed_cards_of_cardTo[i].p.location = card_to.p.location | (UInt32)game_location.LOCATION_OVERLAY; overlayed_cards_of_cardTo[i].p.location = card_to.p.location | (UInt32)CardLocation.Overlay;
overlayed_cards_of_cardTo[i].p.sequence = card_to.p.sequence; overlayed_cards_of_cardTo[i].p.sequence = card_to.p.sequence;
overlayed_cards_of_cardTo[i].p.position += 1000; overlayed_cards_of_cardTo[i].p.position += 1000;
} }
...@@ -7993,21 +7993,21 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7993,21 +7993,21 @@ public class Ocgcore : ServantWithCardDescription
} }
else else
{ {
if (left.p.location == (UInt32)game_location.LOCATION_HAND && right.p.location != (UInt32)game_location.LOCATION_HAND) if (left.p.location == (UInt32)CardLocation.Hand && right.p.location != (UInt32)CardLocation.Hand)
{ {
a = -1; a = -1;
} }
else if (left.p.location != (UInt32)game_location.LOCATION_HAND && right.p.location == (UInt32)game_location.LOCATION_HAND) else if (left.p.location != (UInt32)CardLocation.Hand && right.p.location == (UInt32)CardLocation.Hand)
{ {
a = 1; a = 1;
} }
else else
{ {
if ((left.p.location | (UInt32)game_location.LOCATION_OVERLAY) > (right.p.location | (UInt32)game_location.LOCATION_OVERLAY)) if ((left.p.location | (UInt32)CardLocation.Overlay) > (right.p.location | (UInt32)CardLocation.Overlay))
{ {
a = -1; a = -1;
} }
else if ((left.p.location | (UInt32)game_location.LOCATION_OVERLAY) < (right.p.location | (UInt32)game_location.LOCATION_OVERLAY)) else if ((left.p.location | (UInt32)CardLocation.Overlay) < (right.p.location | (UInt32)CardLocation.Overlay))
{ {
a = 1; a = 1;
} }
...@@ -8023,11 +8023,11 @@ public class Ocgcore : ServantWithCardDescription ...@@ -8023,11 +8023,11 @@ public class Ocgcore : ServantWithCardDescription
} }
else else
{ {
if ((left.p.location & (UInt32)game_location.LOCATION_OVERLAY) > (right.p.location & (UInt32)game_location.LOCATION_OVERLAY)) if ((left.p.location & (UInt32)CardLocation.Overlay) > (right.p.location & (UInt32)CardLocation.Overlay))
{ {
a = -1; a = -1;
} }
else if ((left.p.location & (UInt32)game_location.LOCATION_OVERLAY) < (right.p.location & (UInt32)game_location.LOCATION_OVERLAY)) else if ((left.p.location & (UInt32)CardLocation.Overlay) < (right.p.location & (UInt32)CardLocation.Overlay))
{ {
a = 1; a = 1;
} }
...@@ -8063,7 +8063,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -8063,7 +8063,7 @@ public class Ocgcore : ServantWithCardDescription
{ {
sequenceWriter = 0; sequenceWriter = 0;
} }
if ((preLocation | (UInt32)game_location.LOCATION_OVERLAY) != (cards[i].p.location | (UInt32)game_location.LOCATION_OVERLAY)) if ((preLocation | (UInt32)CardLocation.Overlay) != (cards[i].p.location | (UInt32)CardLocation.Overlay))
{ {
sequenceWriter = 0; sequenceWriter = 0;
} }
...@@ -8072,15 +8072,15 @@ public class Ocgcore : ServantWithCardDescription ...@@ -8072,15 +8072,15 @@ public class Ocgcore : ServantWithCardDescription
positionWriter = 0; positionWriter = 0;
} }
if ((cards[i].p.location & (UInt32)game_location.LOCATION_MZONE) == 0) if ((cards[i].p.location & (UInt32)CardLocation.MonsterZone) == 0)
{ {
if ((cards[i].p.location & (UInt32)game_location.LOCATION_SZONE) == 0) if ((cards[i].p.location & (UInt32)CardLocation.SpellZone) == 0)
{ {
cards[i].p.sequence = sequenceWriter; cards[i].p.sequence = sequenceWriter;
} }
} }
if ((cards[i].p.location & (UInt32)game_location.LOCATION_OVERLAY) > 0) if ((cards[i].p.location & (UInt32)CardLocation.Overlay) > 0)
{ {
cards[i].p.position = positionWriter; cards[i].p.position = positionWriter;
positionWriter++; positionWriter++;
...@@ -8262,7 +8262,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -8262,7 +8262,7 @@ public class Ocgcore : ServantWithCardDescription
break; break;
case GameMessage.SelectCard: case GameMessage.SelectCard:
break; break;
case GameMessage.SelectUnselectCard: case GameMessage.SelectUnselect:
break; break;
case GameMessage.SelectChain: case GameMessage.SelectChain:
break; break;
...@@ -8334,7 +8334,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -8334,7 +8334,7 @@ public class Ocgcore : ServantWithCardDescription
case GameMessage.SelectEffectYn: case GameMessage.SelectEffectYn:
case GameMessage.SelectYesNo: case GameMessage.SelectYesNo:
case GameMessage.SelectCard: case GameMessage.SelectCard:
case GameMessage.SelectUnselectCard: case GameMessage.SelectUnselect:
case GameMessage.SelectTribute: case GameMessage.SelectTribute:
case GameMessage.SelectChain: case GameMessage.SelectChain:
clearAllShowedB = true; clearAllShowedB = true;
...@@ -8553,7 +8553,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -8553,7 +8553,7 @@ public class Ocgcore : ServantWithCardDescription
realizeCardsForSelect(); realizeCardsForSelect();
} }
break; break;
case GameMessage.SelectUnselectCard: case GameMessage.SelectUnselect:
if (card.forSelect) if (card.forSelect)
{ {
cardsSelected.Add(card); cardsSelected.Add(card);
...@@ -8767,7 +8767,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -8767,7 +8767,7 @@ public class Ocgcore : ServantWithCardDescription
GPS p = new GPS GPS p = new GPS
{ {
controller = 0, controller = 0,
location = (UInt32)game_location.search, location = (UInt32)CardLocation.Search,
sequence = (UInt32)i, sequence = (UInt32)i,
position = 0, position = 0,
}; };
......
using System; using System;
using YGOSharp; using YGOSharp;
using YGOSharp.OCGWrapper.Enums;
public class GameStringHelper public class GameStringHelper
{ {
...@@ -149,27 +150,27 @@ public class GameStringHelper ...@@ -149,27 +150,27 @@ public class GameStringHelper
{ {
} }
if (differ(card.Attribute,(int)game_attributes.ATTRIBUTE_EARTH)) if (differ(card.Attribute, (int)CardAttribute.Earth))
{ {
re = "[F4A460]" + re + "[-]"; re = "[F4A460]" + re + "[-]";
} }
if (differ(card.Attribute, (int)game_attributes.ATTRIBUTE_WATER)) if (differ(card.Attribute, (int)CardAttribute.Water))
{ {
re = "[D1EEEE]" + re + "[-]"; re = "[D1EEEE]" + re + "[-]";
} }
if (differ(card.Attribute, (int)game_attributes.ATTRIBUTE_FIRE)) if (differ(card.Attribute, (int)CardAttribute.Fire))
{ {
re = "[F08080]" + re + "[-]"; re = "[F08080]" + re + "[-]";
} }
if (differ(card.Attribute, (int)game_attributes.ATTRIBUTE_WIND)) if (differ(card.Attribute, (int)CardAttribute.Wind))
{ {
re = "[B3EE3A]" + re + "[-]"; re = "[B3EE3A]" + re + "[-]";
} }
if (differ(card.Attribute, (int)game_attributes.ATTRIBUTE_LIGHT)) if (differ(card.Attribute, (int)CardAttribute.Light))
{ {
re = "[EEEE00]" + re + "[-]"; re = "[EEEE00]" + re + "[-]";
} }
if (differ(card.Attribute, (int)game_attributes.ATTRIBUTE_DARK)) if (differ(card.Attribute, (int)CardAttribute.Dark))
{ {
re = "[FF00FF]" + re + "[-]"; re = "[FF00FF]" + re + "[-]";
} }
...@@ -182,9 +183,9 @@ public class GameStringHelper ...@@ -182,9 +183,9 @@ public class GameStringHelper
string re = ""; string re = "";
try try
{ {
if (differ(card.Type, (long)game_type.TYPE_MONSTER)) re += "[ff8000]" + mainType(card.Type); if (differ(card.Type, (long)CardType.Monster)) re += "[ff8000]" + mainType(card.Type);
else if (differ(card.Type, (long)game_type.TYPE_SPELL)) re += "[7FFF00]" + mainType(card.Type); else if (differ(card.Type, (long)CardType.Spell)) re += "[7FFF00]" + mainType(card.Type);
else if (differ(card.Type, (long)game_type.TYPE_TRAP)) re += "[dda0dd]" + mainType(card.Type); else if (differ(card.Type, (long)CardType.Trap)) re += "[dda0dd]" + mainType(card.Type);
else re += "[ff8000]" + mainType(card.Type); else re += "[ff8000]" + mainType(card.Type);
re += "[-]"; re += "[-]";
} }
...@@ -206,9 +207,9 @@ public class GameStringHelper ...@@ -206,9 +207,9 @@ public class GameStringHelper
re += "[ff8000]"; re += "[ff8000]";
re += "["+secondType(data.Type)+"]"; re += "["+secondType(data.Type)+"]";
if ((data.Type & (int)game_type.link) == 0) if ((data.Type & (int)CardType.Link) == 0)
{ {
if ((data.Type & (int)game_type.TYPE_XYZ) > 0) if ((data.Type & (int)CardType.Xyz) > 0)
{ {
re += " " + race(data.Race) + fen + attribute(data.Attribute) + fen + data.Level.ToString() + "[sup]☆[/sup]"; re += " " + race(data.Race) + fen + attribute(data.Attribute) + fen + data.Level.ToString() + "[sup]☆[/sup]";
} }
...@@ -251,7 +252,7 @@ public class GameStringHelper ...@@ -251,7 +252,7 @@ public class GameStringHelper
re += "[sup]ATK[/sup]" + data.Attack.ToString() + " "; re += "[sup]ATK[/sup]" + data.Attack.ToString() + " ";
} }
} }
if ((data.Type & (int)game_type.link) == 0) if ((data.Type & (int)CardType.Link) == 0)
{ {
if (data.Defense < 0) if (data.Defense < 0)
{ {
......
...@@ -5,6 +5,7 @@ using System.Collections.Generic; ...@@ -5,6 +5,7 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Threading; using System.Threading;
using UnityEngine; using UnityEngine;
using YGOSharp.OCGWrapper.Enums;
public enum GameTextureType public enum GameTextureType
{ {
...@@ -219,7 +220,7 @@ public class GameTextureManager ...@@ -219,7 +220,7 @@ public class GameTextureManager
pic = waitLoadStack.Pop(); pic = waitLoadStack.Pop();
try try
{ {
pic.pCard = (YGOSharp.CardsManager.Get((int)pic.code).Type & (int)game_type.TYPE_PENDULUM) > 0; pic.pCard = (YGOSharp.CardsManager.Get((int)pic.code).Type & (int)CardType.Pendulum) > 0;
} }
catch (Exception e) catch (Exception e)
{ {
......
...@@ -4,6 +4,7 @@ using System.Collections.Generic; ...@@ -4,6 +4,7 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using YGOSharp.Network.Enums;
public class Room : WindowServantSP public class Room : WindowServantSP
{ {
...@@ -256,30 +257,30 @@ public class Room : WindowServantSP ...@@ -256,30 +257,30 @@ public class Room : WindowServantSP
p.Data = new BinaryMaster(); p.Data = new BinaryMaster();
p.Data.writer.WriteUnicode(res, res.Length + 1); p.Data.writer.WriteUnicode(res, res.Length + 1);
TcpHelper.AddRecordLine(p); TcpHelper.AddRecordLine(p);
switch ((YGOSharp.Network.Enums.PlayerType)player) switch ((PlayerType)player)
{ {
case YGOSharp.Network.Enums.PlayerType.Red: case PlayerType.Red:
result = "[FF3030]" + result + "[-]"; result = "[FF3030]" + result + "[-]";
break; break;
case YGOSharp.Network.Enums.PlayerType.Green: case PlayerType.Green:
result = "[7CFC00]" + result + "[-]"; result = "[7CFC00]" + result + "[-]";
break; break;
case YGOSharp.Network.Enums.PlayerType.Blue: case PlayerType.Blue:
result = "[4876FF]" + result + "[-]"; result = "[4876FF]" + result + "[-]";
break; break;
case YGOSharp.Network.Enums.PlayerType.BabyBlue: case PlayerType.BabyBlue:
result = "[63B8FF]" + result + "[-]"; result = "[63B8FF]" + result + "[-]";
break; break;
case YGOSharp.Network.Enums.PlayerType.Pink: case PlayerType.Pink:
result = "[EED2EE]" + result + "[-]"; result = "[EED2EE]" + result + "[-]";
break; break;
case YGOSharp.Network.Enums.PlayerType.Yellow: case PlayerType.Yellow:
result = "[EEEE00]" + result + "[-]"; result = "[EEEE00]" + result + "[-]";
break; break;
case YGOSharp.Network.Enums.PlayerType.White: case PlayerType.White:
result = "[FAF0E6]" + result + "[-]"; result = "[FAF0E6]" + result + "[-]";
break; break;
case YGOSharp.Network.Enums.PlayerType.Gray: case PlayerType.Gray:
result = "[CDC9C9]" + result + "[-]"; result = "[CDC9C9]" + result + "[-]";
break; break;
} }
......
...@@ -3,6 +3,8 @@ using System.Collections.Generic; ...@@ -3,6 +3,8 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using UnityEngine; using UnityEngine;
using YGOSharp.OCGWrapper.Enums;
public class selectDeck : WindowServantSP public class selectDeck : WindowServantSP
{ {
...@@ -318,15 +320,15 @@ public class selectDeck : WindowServantSP ...@@ -318,15 +320,15 @@ public class selectDeck : WindowServantSP
{ {
mainAll++; mainAll++;
YGOSharp.Card c = YGOSharp.CardsManager.Get(item); YGOSharp.Card c = YGOSharp.CardsManager.Get(item);
if ((c.Type & (UInt32)game_type.TYPE_MONSTER) > 0) if ((c.Type & (UInt32)CardType.Monster) > 0)
{ {
mainMonster++; mainMonster++;
} }
if ((c.Type & (UInt32)game_type.TYPE_SPELL) > 0) if ((c.Type & (UInt32)CardType.Spell) > 0)
{ {
mainSpell++; mainSpell++;
} }
if ((c.Type & (UInt32)game_type.TYPE_TRAP) > 0) if ((c.Type & (UInt32)CardType.Trap) > 0)
{ {
mainTrap++; mainTrap++;
} }
...@@ -349,15 +351,15 @@ public class selectDeck : WindowServantSP ...@@ -349,15 +351,15 @@ public class selectDeck : WindowServantSP
{ {
sideAll++; sideAll++;
YGOSharp.Card c = YGOSharp.CardsManager.Get(item); YGOSharp.Card c = YGOSharp.CardsManager.Get(item);
if ((c.Type & (UInt32)game_type.TYPE_MONSTER) > 0) if ((c.Type & (UInt32)CardType.Monster) > 0)
{ {
sideMonster++; sideMonster++;
} }
if ((c.Type & (UInt32)game_type.TYPE_SPELL) > 0) if ((c.Type & (UInt32)CardType.Spell) > 0)
{ {
sideSpell++; sideSpell++;
} }
if ((c.Type & (UInt32)game_type.TYPE_TRAP) > 0) if ((c.Type & (UInt32)CardType.Trap) > 0)
{ {
sideTrap++; sideTrap++;
} }
...@@ -379,19 +381,19 @@ public class selectDeck : WindowServantSP ...@@ -379,19 +381,19 @@ public class selectDeck : WindowServantSP
{ {
extraAll++; extraAll++;
YGOSharp.Card c = YGOSharp.CardsManager.Get(item); YGOSharp.Card c = YGOSharp.CardsManager.Get(item);
if ((c.Type & (UInt32)game_type.TYPE_FUSION) > 0) if ((c.Type & (UInt32)CardType.Fusion) > 0)
{ {
extraFusion++; extraFusion++;
} }
if ((c.Type & (UInt32)game_type.TYPE_SYNCHRO) > 0) if ((c.Type & (UInt32)CardType.Synchro) > 0)
{ {
extraSync++; extraSync++;
} }
if ((c.Type & (UInt32)game_type.TYPE_XYZ) > 0) if ((c.Type & (UInt32)CardType.Xyz) > 0)
{ {
extraXyz++; extraXyz++;
} }
if ((c.Type & (UInt32)game_type.link) > 0) if ((c.Type & (UInt32)CardType.Link) > 0)
{ {
extraLink++; extraLink++;
} }
......
...@@ -655,7 +655,7 @@ public class Servant ...@@ -655,7 +655,7 @@ public class Servant
sp.width = 470; sp.width = 470;
for (int i = 0; i < options.Count; i++) for (int i = 0; i < options.Count; i++)
{ {
Vector2 v = ui_helper.get_hang_lie(i, 5); Vector2 v = UIHelper.get_hang_lie(i, 5);
float hang = v.x; float hang = v.x;
float lie = v.y; float lie = v.y;
GameObject btn = create GameObject btn = create
......
fileFormatVersion: 2 fileFormatVersion: 2
guid: ea6ed957719c1004a8fe5cb92cdce947 guid: e66911d20963de546aa086d0b4dc28fb
timeCreated: 1480605666 timeCreated: 1554574266
licenseType: Pro licenseType: Free
MonoImporter: MonoImporter:
serializedVersion: 2 serializedVersion: 2
defaultReferences: [] defaultReferences: []
......
...@@ -755,11 +755,11 @@ public class DeckManager : ServantWithCardDescription ...@@ -755,11 +755,11 @@ public class DeckManager : ServantWithCardDescription
} }
if (ifType(GameStringManager.get_unsafe(1075))) if (ifType(GameStringManager.get_unsafe(1075)))
{ {
returnValue |= (UInt32)CardType.Monster + (UInt32)CardType.sp; returnValue |= (UInt32)CardType.Monster + (UInt32)CardType.SpSummon;
} }
if (ifType(GameStringManager.get_unsafe(1076))) if (ifType(GameStringManager.get_unsafe(1076)))
{ {
returnValue |= (UInt32)CardType.Monster + (UInt32)CardType.link; returnValue |= (UInt32)CardType.Monster + (UInt32)CardType.Link;
} }
} }
if (UIPopupList_main.value == GameStringManager.get_unsafe(1313)) if (UIPopupList_main.value == GameStringManager.get_unsafe(1313))
...@@ -1308,7 +1308,7 @@ public class DeckManager : ServantWithCardDescription ...@@ -1308,7 +1308,7 @@ public class DeckManager : ServantWithCardDescription
{ {
if (deck.GetCardCount(cardPicLoader_.data.Id) < currentBanlist.GetQuantity(cardPicLoader_.data.Id)) if (deck.GetCardCount(cardPicLoader_.data.Id) < currentBanlist.GetQuantity(cardPicLoader_.data.Id))
{ {
if ((cardPicLoader_.data.Type & (UInt32)YGOSharp.OCGWrapper.Enums.CardType.Token) == 0) if ((cardPicLoader_.data.Type & (UInt32)CardType.Token) == 0)
{ {
MonoCardInDeckManager card = createCard(); MonoCardInDeckManager card = createCard();
card.transform.position = card.getGoodPosition(4); card.transform.position = card.getGoodPosition(4);
...@@ -1377,13 +1377,13 @@ public class DeckManager : ServantWithCardDescription ...@@ -1377,13 +1377,13 @@ public class DeckManager : ServantWithCardDescription
if (isSide) if (isSide)
{ {
if ( if (
(MonoCardInDeckManager_.cardData.Type & (UInt32)YGOSharp.OCGWrapper.Enums.CardType.Fusion) > 0 (MonoCardInDeckManager_.cardData.Type & (UInt32)CardType.Fusion) > 0
|| ||
(MonoCardInDeckManager_.cardData.Type & (UInt32)YGOSharp.OCGWrapper.Enums.CardType.Synchro) > 0 (MonoCardInDeckManager_.cardData.Type & (UInt32)CardType.Synchro) > 0
|| ||
(MonoCardInDeckManager_.cardData.Type & (UInt32)YGOSharp.OCGWrapper.Enums.CardType.Xyz) > 0 (MonoCardInDeckManager_.cardData.Type & (UInt32)CardType.Xyz) > 0
|| ||
(MonoCardInDeckManager_.cardData.Type & (UInt32)YGOSharp.OCGWrapper.Enums.CardType.link) > 0 (MonoCardInDeckManager_.cardData.Type & (UInt32)CardType.Link) > 0
) )
{ {
deck.IExtra.Add(MonoCardInDeckManager_); deck.IExtra.Add(MonoCardInDeckManager_);
...@@ -1421,13 +1421,13 @@ public class DeckManager : ServantWithCardDescription ...@@ -1421,13 +1421,13 @@ public class DeckManager : ServantWithCardDescription
deck.Side.Add(card.cardData.Id); deck.Side.Add(card.cardData.Id);
} }
else if ( else if (
(data.Type & (UInt32)YGOSharp.OCGWrapper.Enums.CardType.Fusion) > 0 (data.Type & (UInt32)CardType.Fusion) > 0
|| ||
(data.Type & (UInt32)YGOSharp.OCGWrapper.Enums.CardType.Synchro) > 0 (data.Type & (UInt32)CardType.Synchro) > 0
|| ||
(data.Type & (UInt32)YGOSharp.OCGWrapper.Enums.CardType.Xyz) > 0 (data.Type & (UInt32)CardType.Xyz) > 0
|| ||
(data.Type & (UInt32)YGOSharp.OCGWrapper.Enums.CardType.link) > 0 (data.Type & (UInt32)CardType.Link) > 0
) )
{ {
deck.IExtra.Add(card); deck.IExtra.Add(card);
...@@ -1496,13 +1496,13 @@ public class DeckManager : ServantWithCardDescription ...@@ -1496,13 +1496,13 @@ public class DeckManager : ServantWithCardDescription
default: default:
{ {
YGOSharp.Card card = YGOSharp.CardsManager.Get(code); YGOSharp.Card card = YGOSharp.CardsManager.Get(code);
if ((card.Type & (UInt32)YGOSharp.OCGWrapper.Enums.CardType.Fusion) > 0 if ((card.Type & (UInt32)CardType.Fusion) > 0
|| ||
(card.Type & (UInt32)YGOSharp.OCGWrapper.Enums.CardType.Synchro) > 0 (card.Type & (UInt32)CardType.Synchro) > 0
|| ||
(card.Type & (UInt32)YGOSharp.OCGWrapper.Enums.CardType.Xyz) > 0 (card.Type & (UInt32)CardType.Xyz) > 0
|| ||
(card.Type & (UInt32)YGOSharp.OCGWrapper.Enums.CardType.link) > 0) (card.Type & (UInt32)CardType.Link) > 0)
{ {
deck.Extra.Add(code); deck.Extra.Add(code);
deck.Deck_O.Extra.Add(code); deck.Deck_O.Extra.Add(code);
...@@ -1613,13 +1613,13 @@ public class DeckManager : ServantWithCardDescription ...@@ -1613,13 +1613,13 @@ public class DeckManager : ServantWithCardDescription
if (p.z > -8) if (p.z > -8)
{ {
if ( if (
(deckTemp[i].cardData.Type & (UInt32)YGOSharp.OCGWrapper.Enums.CardType.Fusion) > 0 (deckTemp[i].cardData.Type & (UInt32)CardType.Fusion) > 0
|| ||
(deckTemp[i].cardData.Type & (UInt32)YGOSharp.OCGWrapper.Enums.CardType.Synchro) > 0 (deckTemp[i].cardData.Type & (UInt32)CardType.Synchro) > 0
|| ||
(deckTemp[i].cardData.Type & (UInt32)YGOSharp.OCGWrapper.Enums.CardType.Xyz) > 0 (deckTemp[i].cardData.Type & (UInt32)CardType.Xyz) > 0
|| ||
(deckTemp[i].cardData.Type & (UInt32)YGOSharp.OCGWrapper.Enums.CardType.link) > 0 (deckTemp[i].cardData.Type & (UInt32)CardType.Link) > 0
) )
{ {
deck.IExtra.Add(deckTemp[i]); deck.IExtra.Add(deckTemp[i]);
......
...@@ -100,9 +100,14 @@ namespace YGOSharp ...@@ -100,9 +100,14 @@ namespace YGOSharp
return ((Type & (int)type) != 0); return ((Type & (int)type) != 0);
} }
public bool HasLinkMarker(CardLinkMarker dir)
{
return (rDefense & (int)dir) != 0;
}
public bool IsExtraCard() public bool IsExtraCard()
{ {
return (HasType(CardType.Fusion) || HasType(CardType.Synchro) || HasType(CardType.Xyz) || HasType(CardType.link)); return (HasType(CardType.Fusion) || HasType(CardType.Synchro) || HasType(CardType.Xyz) || HasType(CardType.Link));
} }
internal Card(IDataRecord reader) internal Card(IDataRecord reader)
......
...@@ -4,6 +4,7 @@ using Mono.Data.Sqlite; ...@@ -4,6 +4,7 @@ using Mono.Data.Sqlite;
using System; using System;
using System.IO; using System.IO;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using YGOSharp.OCGWrapper.Enums;
namespace YGOSharp namespace YGOSharp
{ {
...@@ -113,7 +114,7 @@ namespace YGOSharp ...@@ -113,7 +114,7 @@ namespace YGOSharp
foreach (var item in _cards) foreach (var item in _cards)
{ {
Card card = item.Value; Card card = item.Value;
if ((card.Type & (uint)game_type.TYPE_TOKEN) == 0) if ((card.Type & (uint)CardType.Token) == 0)
{ {
if (getName == "" if (getName == ""
|| Regex.Replace(card.Name, getName,"miaowu", RegexOptions.IgnoreCase) != card.Name || Regex.Replace(card.Name, getName,"miaowu", RegexOptions.IgnoreCase) != card.Name
...@@ -227,7 +228,7 @@ namespace YGOSharp ...@@ -227,7 +228,7 @@ namespace YGOSharp
{ {
switch (getsearchCode[i]) switch (getsearchCode[i])
{ {
case (int)OCGWrapper.Enums.searchCode.OPCODE_ADD: case (int)searchCode.OPCODE_ADD:
if (stack.Count >= 2) if (stack.Count >= 2)
{ {
int rhs = stack.Pop(); int rhs = stack.Pop();
...@@ -235,7 +236,7 @@ namespace YGOSharp ...@@ -235,7 +236,7 @@ namespace YGOSharp
stack.Push(lhs + rhs); stack.Push(lhs + rhs);
} }
break; break;
case (int)OCGWrapper.Enums.searchCode.OPCODE_SUB: case (int)searchCode.OPCODE_SUB:
if (stack.Count >= 2) if (stack.Count >= 2)
{ {
int rhs = stack.Pop(); int rhs = stack.Pop();
...@@ -243,7 +244,7 @@ namespace YGOSharp ...@@ -243,7 +244,7 @@ namespace YGOSharp
stack.Push(lhs - rhs); stack.Push(lhs - rhs);
} }
break; break;
case (int)OCGWrapper.Enums.searchCode.OPCODE_MUL: case (int)searchCode.OPCODE_MUL:
if (stack.Count >= 2) if (stack.Count >= 2)
{ {
int rhs = stack.Pop(); int rhs = stack.Pop();
...@@ -251,7 +252,7 @@ namespace YGOSharp ...@@ -251,7 +252,7 @@ namespace YGOSharp
stack.Push(lhs * rhs); stack.Push(lhs * rhs);
} }
break; break;
case (int)OCGWrapper.Enums.searchCode.OPCODE_DIV: case (int)searchCode.OPCODE_DIV:
if (stack.Count >= 2) if (stack.Count >= 2)
{ {
int rhs = stack.Pop(); int rhs = stack.Pop();
...@@ -259,7 +260,7 @@ namespace YGOSharp ...@@ -259,7 +260,7 @@ namespace YGOSharp
stack.Push(lhs / rhs); stack.Push(lhs / rhs);
} }
break; break;
case (int)OCGWrapper.Enums.searchCode.OPCODE_AND: case (int)searchCode.OPCODE_AND:
if (stack.Count >= 2) if (stack.Count >= 2)
{ {
int rhs = stack.Pop(); int rhs = stack.Pop();
...@@ -276,7 +277,7 @@ namespace YGOSharp ...@@ -276,7 +277,7 @@ namespace YGOSharp
} }
} }
break; break;
case (int)OCGWrapper.Enums.searchCode.OPCODE_OR: case (int)searchCode.OPCODE_OR:
if (stack.Count >= 2) if (stack.Count >= 2)
{ {
int rhs = stack.Pop(); int rhs = stack.Pop();
...@@ -293,14 +294,14 @@ namespace YGOSharp ...@@ -293,14 +294,14 @@ namespace YGOSharp
} }
} }
break; break;
case (int)OCGWrapper.Enums.searchCode.OPCODE_NEG: case (int)searchCode.OPCODE_NEG:
if (stack.Count >= 1) if (stack.Count >= 1)
{ {
int rhs = stack.Pop(); int rhs = stack.Pop();
stack.Push(-rhs); stack.Push(-rhs);
} }
break; break;
case (int)OCGWrapper.Enums.searchCode.OPCODE_NOT: case (int)searchCode.OPCODE_NOT:
if (stack.Count >= 1) if (stack.Count >= 1)
{ {
int rhs = stack.Pop(); int rhs = stack.Pop();
...@@ -315,7 +316,7 @@ namespace YGOSharp ...@@ -315,7 +316,7 @@ namespace YGOSharp
} }
} }
break; break;
case (int)OCGWrapper.Enums.searchCode.OPCODE_ISCODE: case (int)searchCode.OPCODE_ISCODE:
if (stack.Count >= 1) if (stack.Count >= 1)
{ {
int code = stack.Pop(); int code = stack.Pop();
...@@ -330,7 +331,7 @@ namespace YGOSharp ...@@ -330,7 +331,7 @@ namespace YGOSharp
} }
} }
break; break;
case (int)OCGWrapper.Enums.searchCode.OPCODE_ISSETCARD: case (int)searchCode.OPCODE_ISSETCARD:
if (stack.Count >= 1) if (stack.Count >= 1)
{ {
if (IfSetCard(stack.Pop(), card.Setcode)) if (IfSetCard(stack.Pop(), card.Setcode))
...@@ -343,7 +344,7 @@ namespace YGOSharp ...@@ -343,7 +344,7 @@ namespace YGOSharp
} }
} }
break; break;
case (int)OCGWrapper.Enums.searchCode.OPCODE_ISTYPE: case (int)searchCode.OPCODE_ISTYPE:
if (stack.Count >= 1) if (stack.Count >= 1)
{ {
if ((stack.Pop() & card.Type) > 0) if ((stack.Pop() & card.Type) > 0)
...@@ -356,7 +357,7 @@ namespace YGOSharp ...@@ -356,7 +357,7 @@ namespace YGOSharp
} }
} }
break; break;
case (int)OCGWrapper.Enums.searchCode.OPCODE_ISRACE: case (int)searchCode.OPCODE_ISRACE:
if (stack.Count >= 1) if (stack.Count >= 1)
{ {
if ((stack.Pop() & card.Race) > 0) if ((stack.Pop() & card.Race) > 0)
...@@ -369,7 +370,7 @@ namespace YGOSharp ...@@ -369,7 +370,7 @@ namespace YGOSharp
} }
} }
break; break;
case (int)OCGWrapper.Enums.searchCode.OPCODE_ISATTRIBUTE: case (int)searchCode.OPCODE_ISATTRIBUTE:
if (stack.Count >= 1) if (stack.Count >= 1)
{ {
if ((stack.Pop() & card.Attribute) > 0) if ((stack.Pop() & card.Attribute) > 0)
...@@ -390,13 +391,13 @@ namespace YGOSharp ...@@ -390,13 +391,13 @@ namespace YGOSharp
if (stack.Count != 1 || stack.Pop() == 0) if (stack.Count != 1 || stack.Pop() == 0)
return false; return false;
return return
card.Id == (int)YGOSharp.OCGWrapper.Enums.Sp.CARD_MARINE_DOLPHIN card.Id == (int)TwoNameCards.CARD_MARINE_DOLPHIN
|| ||
card.Id == (int)YGOSharp.OCGWrapper.Enums.Sp.CARD_TWINKLE_MOSS card.Id == (int)TwoNameCards.CARD_TWINKLE_MOSS
|| ||
(!(card.Alias != 0) (!(card.Alias != 0)
&& ((card.Type & ((int)YGOSharp.OCGWrapper.Enums.CardType.Monster + (int)YGOSharp.OCGWrapper.Enums.CardType.Token))) && ((card.Type & ((int)CardType.Monster + (int)CardType.Token)))
!= ((int)YGOSharp.OCGWrapper.Enums.CardType.Monster + (int)YGOSharp.OCGWrapper.Enums.CardType.Token)); != ((int)CardType.Monster + (int)CardType.Token));
} }
public static bool IfSetCard(int setCodeToAnalyse, long setCodeFromCard) public static bool IfSetCard(int setCodeToAnalyse, long setCodeFromCard)
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
Divine = 0x40, Divine = 0x40,
} }
public enum Sp public enum TwoNameCards
{ {
CARD_MARINE_DOLPHIN = 78734254, CARD_MARINE_DOLPHIN = 78734254,
CARD_TWINKLE_MOSS = 13857930, CARD_TWINKLE_MOSS = 13857930,
......
namespace YGOSharp.OCGWrapper.Enums
{
public enum CardLinkMarker
{
BottomLeft = 0x01,
Bottom = 0x02,
BottomRight = 0x04,
Left = 0x08,
Right = 0x20,
TopLeft = 0x40,
Top = 0x80,
TopRight = 0x100
}
}
\ No newline at end of file
fileFormatVersion: 2 fileFormatVersion: 2
guid: 34feabd62902b19489d8e3e2fe27d886 guid: 15d8ac695c446594ea28abe34e500bf1
timeCreated: 1469113965 timeCreated: 1554560396
licenseType: Pro licenseType: Free
MonoImporter: MonoImporter:
serializedVersion: 2 serializedVersion: 2
defaultReferences: [] defaultReferences: []
......
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
Removed = 0x20, Removed = 0x20,
Extra = 0x40, Extra = 0x40,
Overlay = 0x80, Overlay = 0x80,
Onfield = 0x0C Onfield = 0x0C,
Unknown = 0,
Search = 0x800
} }
} }
\ No newline at end of file
...@@ -12,16 +12,3 @@ ...@@ -12,16 +12,3 @@
Defence = 0xC Defence = 0xC
} }
} }
class CardFac
{
public static int zuoxia = 1 << (1 - 1);
public static int xia = 1 << (2 - 1);
public static int youxia = 1 << (3 - 1);
public static int zuo = 1 << (4 - 1);
public static int you = 1 << (6 - 1);
public static int zuoshang = 1 << (7 - 1);
public static int shang = 1 << (8 - 1);
public static int youshang = 1 << (9 - 1);
}
\ No newline at end of file
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
SeaSerpent = 0x40000, SeaSerpent = 0x40000,
Reptile = 0x80000, Reptile = 0x80000,
Psycho = 0x100000, Psycho = 0x100000,
DivineBeast = 0x200000 DivineBeast = 0x200000,
Wyrm = 0x800000,
Cyberse = 0x1000000
} }
} }
\ No newline at end of file
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
Toon = 0x400000, Toon = 0x400000,
Xyz = 0x800000, Xyz = 0x800000,
Pendulum = 0x1000000, Pendulum = 0x1000000,
sp = 0x2000000, SpSummon = 0x2000000,
link = 0x4000000, Link = 0x4000000
} }
} }
\ No newline at end of file
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
SelectSum = 23, SelectSum = 23,
SelectDisfield = 24, SelectDisfield = 24,
SortCard = 25, SortCard = 25,
SelectUnselectCard = 26, SelectUnselect = 26,
ConfirmDecktop = 30, ConfirmDecktop = 30,
ConfirmCards = 31, ConfirmCards = 31,
ShuffleDeck = 32, ShuffleDeck = 32,
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
RemoveCounter = 102, RemoveCounter = 102,
Attack = 110, Attack = 110,
Battle = 111, Battle = 111,
AttackDiabled = 112, AttackDisabled = 112,
DamageStepStart = 113, DamageStepStart = 113,
DamageStepEnd = 114, DamageStepEnd = 114,
MissedEffect = 120, MissedEffect = 120,
......
fileFormatVersion: 2
guid: f327885de3e94cd4187a9a4e91544c1f
folderAsset: yes
timeCreated: 1469172510
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
//using Mono.Data.Sqlite;
//using System;
//using System.Collections.Generic;
//using System.IO;
//using SQLiteConnection = Mono.Data.Sqlite.SqliteConnection;
//using SQLiteCommand = Mono.Data.Sqlite.SqliteCommand;
//using SQLiteDataReader = Mono.Data.Sqlite.SqliteDataReader;
//public class CardDataManager
//{
// List<CardData> CardDatas;
// public CardDataManager()
// {
// CardDatas = new List<CardData>();
// DirectoryInfo TheFolder = new DirectoryInfo("data_card");
// FileInfo[] fileInfo = TheFolder.GetFiles();
// foreach (FileInfo NextFile in fileInfo)
// {
// string path = "data_card\\" + NextFile.Name;
// load(path);
// }
// }
// public void load(string path)
// {
// using (SQLiteConnection connection = new SQLiteConnection("Data Source=" + path))
// {
// connection.Open();
// using (SQLiteCommand command = new SQLiteCommand("SELECT datas.*, texts.* FROM datas,texts WHERE datas.id=texts.id;",
// connection))
// {
// using (SQLiteDataReader reader = command.ExecuteReader())
// {
// while (reader.Read())
// {
// try
// {
// CardData c = new CardData();
// c.Str = new string[16];
// c.code = reader.GetInt64(0);
// c.Ot = reader.GetInt32(1);
// c.Alias = reader.GetInt64(2);
// c.SetCode = reader.GetInt64(3);
// c.Type = reader.GetInt64(4);
// c.Attack = reader.GetInt32(5);
// c.Defense = reader.GetInt32(6);
// long Level_raw = reader.GetInt64(7);
// c.Level = Level_raw & 0xff;
// c.LeftScale = (Level_raw >> 0x18) & 0xff;
// c.RightScale = (Level_raw >> 0x10) & 0xff;
// c.Race = reader.GetInt32(8);
// c.Attribute = reader.GetInt32(9);
// c.Category = reader.GetInt64(10);
// c.Name = reader.GetString(12);
// c.Desc = reader.GetString(13);
// c.tail = "";
// for (int ii = 0; ii < 0x10; ii++)
// {
// c.Str[ii] = reader.GetString(14 + ii);
// }
// CardDatas.Add(c);
// }
// catch (Exception e)
// {
// }
// }
// }
// }
// }
// /////////////////////////////////////////////////////
// //string text_all = System.IO.File.ReadAllText(path);
// //string[] card_strings = text_all.Split(new string[] { "/*/*/*/" }, StringSplitOptions.RemoveEmptyEntries);
// //foreach (string one_card_string in card_strings)
// //{
// // try
// // {
// // CardData c = new CardData();
// // c.Str = new string[16];
// // string[] elements = one_card_string.Split(new string[] { "|-" }, StringSplitOptions.RemoveEmptyEntries);
// // c.code = long.Parse(elements[0]);
// // c.Ot = int.Parse(elements[1]);
// // c.Alias = long.Parse(elements[2]);
// // c.SetCode = int.Parse(elements[3]);
// // c.Type = int.Parse(elements[4]);
// // c.Attack = int.Parse(elements[5]);
// // c.Defense = int.Parse(elements[6]);
// // c.Level = int.Parse(elements[7]);
// // c.LeftScale = int.Parse(elements[8]);
// // c.RightScale = int.Parse(elements[9]);
// // c.Race = int.Parse(elements[10]);
// // c.Attribute = int.Parse(elements[11]);
// // c.Name = elements[12];
// // c.Desc = elements[13];
// // for (int i = 0; i < 16;i++ )
// // {
// // if (elements.Length > 14 + i)
// // c.Str[i] = elements[14 + i];
// // }
// // CardDatas.Add(c);
// // }
// // catch(Exception e)
// // {
// // }
// //}
// }
// public CardData GetById(long id)
// {
// CardData card = new CardData();
// card.code = 0;
// card.Name = "预留广告位";
// card.Desc = "预留广告位 \n联系作者qq:914847518";
// if (id > 0) for (int i = 0; i < 10; i++)
// {
// foreach (CardData one_CardData in CardDatas)
// {
// if (one_CardData.code == id - i)
// {
// card = one_CardData;
// break;
// }
// }
// if (card.code > 0) break;
// }
// return card;
// }
// public List<CardData> search(UInt32 type, string str)
// {
// List<CardData> return_valse = new List<CardData>();
// if (str!="")
// {
// foreach (CardData one_CardData in CardDatas)
// {
// if (one_CardData.Name.Replace(str, "") != one_CardData.Name)
// {
// if ((one_CardData.Type | type) > 0)
// {
// return_valse.Add(one_CardData);
// }
// }
// }
// }
// return return_valse;
// }
// public List<CardData> search_advanced
// (
// UInt32 fil_type_temp,
// UInt32 fil_type_race_temp,
// UInt32 fil_type_attribute_temp,
// UInt32 fil_type_catagory_temp,
// string str,
// int atk=-233,
// int def=-233,
// int star=-233
// )
// {
// //if (fil_type_temp==0)
// //{
// // if (fil_type_race_temp == 0)
// // {
// // if (fil_type_attribute_temp == 0)
// // {
// // if (fil_type_catagory_temp == 0)
// // {
// // if (str=="")
// // {
// // if (atk==-233)
// // {
// // if (def == -233)
// // {
// // if (star == -233)
// // {
// // return new List<CardData>();
// // }
// // }
// // }
// // }
// // }
// // }
// // }
// //}
// UInt32 fil_type = fil_type_temp;
// if (fil_type == 0)
// {
// //fil_type = 0xffffffff;
// }
// UInt32 fil_type_race = fil_type_race_temp;
// if (fil_type_race == 0)
// {
// //fil_type_race = 0xffffffff;
// }
// UInt32 fil_type_attribute = fil_type_attribute_temp;
// if (fil_type_attribute == 0)
// {
// //fil_type_attribute = 0xffffffff;
// }
// UInt32 fil_type_catagory = fil_type_catagory_temp;
// if (fil_type_catagory == 0)
// {
// // fil_type_catagory = 0xffffffff;
// }
// List<CardData> return_valse = new List<CardData>();
// //if (str != "")
// {
// foreach (CardData one_CardData in CardDatas)
// {
// string string_name = one_CardData.Name;
// if (str == "" || string_name.Replace(str, "") != string_name || one_CardData.code.ToString() == str)
// {
// if ((one_CardData.Type & fil_type) == fil_type || (fil_type == 0))
// {
// if ((one_CardData.Race & fil_type_race) == fil_type_race || (fil_type_race == 0))
// {
// if (((UInt32)one_CardData.Attribute & fil_type_attribute) == fil_type_attribute || (fil_type_attribute == 0))
// {
// if ((one_CardData.Category & fil_type_catagory) == fil_type_catagory || (fil_type_catagory == 0))
// {
// if (one_CardData.Attack == atk || (atk == -233))
// {
// if (one_CardData.Defense == def || (def == -233))
// {
// if (one_CardData.Level == star || (star == -233))
// {
// return_valse.Add(one_CardData);
// }
// }
// }
// }
// }
// }
// }
// }
// }
// }
// return_valse.Sort(comparisonOfCard());
// return return_valse;
// }
// private static Comparison<CardData> comparisonOfCard()
// {
// return (left, right) =>
// {
// int a = 1;
// if ((left.Type & 7) < (right.Type & 7))
// {
// a = -1;
// }
// else if ((left.Type & 7) > (right.Type & 7))
// {
// a = 1;
// }
// else
// {
// if (left.Level > right.Level)
// {
// a = -1;
// }
// else if (left.Level < right.Level)
// {
// a = 1;
// }
// else
// {
// if (left.Attack > right.Attack)
// {
// a = -1;
// }
// else if (left.Attack < right.Attack)
// {
// a = 1;
// }
// else
// {
// if ((left.Type >> 3) > (right.Type >> 3))
// {
// a = 1;
// }
// else if ((left.Type >> 3) < (right.Type >> 3))
// {
// a = -1;
// }
// else
// {
// if (left.Attribute > right.Attribute)
// {
// a = 1;
// }
// else if (left.Attribute < right.Attribute)
// {
// a = -1;
// }
// else
// {
// if (left.Race > right.Race)
// {
// a = 1;
// }
// else if (left.Race < right.Race)
// {
// a = -1;
// }
// else
// {
// if (left.Category > right.Category)
// {
// a = 1;
// }
// else if (left.Category < right.Category)
// {
// a = -1;
// }
// }
// }
// }
// }
// }
// }
// return a;
// };
// }
// public string get_description(UInt32 l)
// {
// string re = "";
// UInt32 code = l >> 4;
// UInt32 index = l & 0xf;
// try
// {
// re += GetById(code).Str[index];
// }
// catch (Exception e)
// {
// }
// return re;
// }
//}
fileFormatVersion: 2
guid: 94fe09e18fbcd1946af542ce761a3470
timeCreated: 1480605655
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
fileFormatVersion: 2
guid: 0c4a0e6dafcb7be4d9579cc54c1a3547
timeCreated: 1469113965
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System;
public enum game_function
{
MSG_RETRY = 1,
MSG_HINT = 2,
MSG_WAITING = 3,
MSG_START = 4,
MSG_WIN = 5,
MSG_UPDATE_DATA = 6,
MSG_UPDATE_CARD = 7,
MSG_REQUEST_DECK = 8,
MSG_SELECT_BATTLECMD = 10,
MSG_SELECT_IDLECMD = 11,
MSG_SELECT_EFFECTYN = 12,
MSG_SELECT_YESNO = 13,
MSG_SELECT_OPTION = 14,
MSG_SELECT_CARD = 15,
MSG_SELECT_CHAIN = 16,
MSG_SELECT_PLACE = 18,
MSG_SELECT_POSITION = 19,
MSG_SELECT_TRIBUTE = 20,
MSG_SORT_CHAIN = 21,
MSG_SELECT_COUNTER = 22,
MSG_SELECT_SUM = 23,
MSG_SELECT_DISFIELD = 24,
MSG_SORT_CARD = 25,
MSG_CONFIRM_DECKTOP = 30,
MSG_CONFIRM_CARDS = 31,
MSG_SHUFFLE_DECK = 32,
MSG_SHUFFLE_HAND = 33,
MSG_REFRESH_DECK = 34,
MSG_SWAP_GRAVE_DECK = 35,
MSG_SHUFFLE_SET_CARD = 36,
MSG_REVERSE_DECK = 37,
MSG_DECK_TOP = 38,
MSG_NEW_TURN = 40,
MSG_NEW_PHASE = 41,
MSG_MOVE = 50,
MSG_POS_CHANGE = 53,
MSG_SET = 54,
MSG_SWAP = 55,
MSG_FIELD_DISABLED = 56,
MSG_SUMMONING = 60,
MSG_SUMMONED = 61,
MSG_SPSUMMONING = 62,
MSG_SPSUMMONED = 63,
MSG_FLIPSUMMONING = 64,
MSG_FLIPSUMMONED = 65,
MSG_CHAINING = 70,
MSG_CHAINED = 71,
MSG_CHAIN_SOLVING = 72,
MSG_CHAIN_SOLVED = 73,
MSG_CHAIN_END = 74,
MSG_CHAIN_NEGATED = 75,
MSG_CHAIN_DISABLED = 76,
MSG_CARD_SELECTED = 80,
MSG_RANDOM_SELECTED = 81,
MSG_BECOME_TARGET = 83,
MSG_DRAW = 90,
MSG_DAMAGE = 91,
MSG_RECOVER = 92,
MSG_EQUIP = 93,
MSG_LPUPDATE = 94,
MSG_UNEQUIP = 95,
MSG_CARD_TARGET = 96,
MSG_CANCEL_TARGET = 97,
MSG_PAY_LPCOST = 100,
MSG_ADD_COUNTER = 101,
MSG_REMOVE_COUNTER = 102,
MSG_ATTACK = 110,
MSG_BATTLE = 111,
MSG_ATTACK_DISABLED = 112,
MSG_DAMAGE_STEP_START = 113,
MSG_DAMAGE_STEP_END = 114,
MSG_MISSED_EFFECT = 120,
MSG_BE_CHAIN_TARGET = 121,
MSG_CREATE_RELATION = 122,
MSG_RELEASE_RELATION = 123,
MSG_TOSS_COIN = 130,
MSG_TOSS_DICE = 131,
MSG_ANNOUNCE_RACE = 140,
MSG_ANNOUNCE_ATTRIB = 141,
MSG_ANNOUNCE_CARD = 142,
MSG_ANNOUNCE_NUMBER = 143,
MSG_CARD_HINT = 160,
MSG_TAG_SWAP = 161,
MSG_RELOAD_FIELD = 162,
MSG_AI_NAME = 163,
MSG_SHOW_HINT = 164,
MSG_MATCH_KILL = 170,
MSG_CUSTOM_MSG = 180,
MSG_HINT_EVENT = 190,
MSG_HINT_MESSAGE = 191,
MSG_HINT_SELECTMSG = 192,
MSG_HINT_OPSELECTED = 193,
MSG_HINT_EFFECT = 194,
MSG_HINT_RACE = 195,
MSG_HINT_ATTRIB = 196,
MSG_HINT_CODE = 197,
MSG_HINT_NUMBER = 198,
MSG_HINT_CARD = 199,
MSG_CHINT_TURN = 200,
MSG_CHINT_CARD = 201,
MSG_CHINT_RACE = 202,
MSG_CHINT_ATTRIBUTE = 203,
MSG_CHINT_NUMBER = 204,
MSG_CHINT_DESC_ADD = 205,
MSG_CHINT_DESC_REMOVE = 206,
MSG_QUERY_CODE = 210,
MSG_QUERY_POSITION = 211,
MSG_QUERY_ALIAS = 212,
MSG_QUERY_TYPE = 213,
MSG_QUERY_LEVEL = 214,
MSG_QUERY_RANK = 215,
MSG_QUERY_ATTRIBUTE = 216,
MSG_QUERY_RACE = 217,
MSG_QUERY_ATTACK = 218,
MSG_QUERY_DEFENSE = 219,
MSG_QUERY_BASE_ATTACK = 220,
MSG_QUERY_BASE_DEFENSE = 221,
MSG_QUERY_REASON = 222,
MSG_QUERY_REASON_CARD = 223,
MSG_QUERY_EQUIP_CARD = 224,
MSG_QUERY_TARGET_CARD = 225,
MSG_QUERY_OVERLAY_CARD = 226,
MSG_QUERY_COUNTERS = 227,
MSG_QUERY_OWNER = 228,
MSG_QUERY_IS_DISABLED = 229,
MSG_QUERY_IS_PUBLIC = 230,
MSG_QUERY_LSCALE = 231,
MSG_QUERY_RSCALE = 232,
}
public enum game_position
{
POS_FACEUP_ATTACK = 0x1,
POS_FACEDOWN_ATTACK = 0x2,
POS_FACEUP_DEFENSE = 0x4,
POS_FACEDOWN_DEFENSE = 0x8,
POS_FACEUP = 0x5,
POS_FACEDOWN = 0xa,
POS_ATTACK = 0x3,
POS_DEFENSE = 0xc,
}
public enum game_location
{
LOCATION_UNKNOWN=0x00,
LOCATION_DECK = 0x01,
LOCATION_HAND = 0x02,
LOCATION_MZONE = 0x04,
LOCATION_SZONE = 0x08,
LOCATION_GRAVE = 0x10,
LOCATION_REMOVED = 0x20,
LOCATION_EXTRA = 0x40,
LOCATION_OVERLAY = 0x80,
LOCATION_ONFIELD = 0x0c,
LOCATION_FZONE = 0x100,
LOCATION_PZONE = 0x200,
search = 0x800,
}
public enum game_race
{
RACE_WARRIOR = 0x1,
RACE_SPELLCASTER = 0x2,
RACE_FAIRY = 0x4,
RACE_FIEND = 0x8,
RACE_ZOMBIE = 0x10,
RACE_MACHINE = 0x20,
RACE_AQUA = 0x40,
RACE_PYRO = 0x80,
RACE_ROCK = 0x100,
RACE_WINDBEAST = 0x200,
RACE_PLANT = 0x400,
RACE_INSECT = 0x800,
RACE_THUNDER = 0x1000,
RACE_DRAGON = 0x2000,
RACE_BEAST = 0x4000,
RACE_BEASTWARRIOR = 0x8000,
RACE_DINOSAUR = 0x10000,
RACE_FISH = 0x20000,
RACE_SEASERPENT = 0x40000,
RACE_REPTILE = 0x80000,
RACE_PSYCHO = 0x100000,
RACE_DEVINE = 0x200000,
RACE_CREATORGOD = 0x400000,
RACE_PHANTOMDRAGON = 0x800000,
}
public enum game_attributes
{
ATTRIBUTE_EARTH = 0x01,
ATTRIBUTE_WATER = 0x02,
ATTRIBUTE_FIRE = 0x04,
ATTRIBUTE_WIND = 0x08,
ATTRIBUTE_LIGHT = 0x10,
ATTRIBUTE_DARK = 0x20,
ATTRIBUTE_DEVINE = 0x40,
}
public enum game_type
{
TYPE_MONSTER = 0x1,
TYPE_SPELL = 0x2,
TYPE_TRAP = 0x4,
TYPE_NORMAL = 0x10,
TYPE_EFFECT = 0x20,
TYPE_FUSION = 0x40,
TYPE_RITUAL = 0x80,
TYPE_TRAPMONSTER = 0x100,
TYPE_SPIRIT = 0x200,
TYPE_UNION = 0x400,
TYPE_DUAL = 0x800,
TYPE_TUNER = 0x1000,
TYPE_SYNCHRO = 0x2000,
TYPE_TOKEN = 0x4000,
TYPE_QUICKPLAY = 0x10000,
TYPE_CONTINUOUS = 0x20000,
TYPE_EQUIP = 0x40000,
TYPE_FIELD = 0x80000,
TYPE_COUNTER = 0x100000,
TYPE_FLIP = 0x200000,
TYPE_TOON = 0x400000,
TYPE_XYZ = 0x800000,
TYPE_PENDULUM = 0x1000000,
link = 0x4000000,
}
public enum servant_type
{
OCGCORE_DEBUG = 0,
}
public enum game_phrases
{
PHASE_DRAW = 0x01,
PHASE_STANDBY = 0x02,
PHASE_MAIN1 = 0x04,
PHASE_BATTLE_START = 0x08,
PHASE_BATTLE_STEP = 0x10,
PHASE_DAMAGE = 0x20,
PHASE_DAMAGE_CAL = 0x40,
PHASE_BATTLE = 0x80,
PHASE_MAIN2 = 0x100,
PHASE_END = 0x200,
}
public enum TypeOfDuel
{
Normal = 0x01,
TAG = 0x20,
};
public enum StocMessage
{
GameMsg = 0x1,
ErrorMsg = 0x2,
SelectHand = 0x3,
SelectTp = 0x4,
HandResult = 0x5,
TpResult = 0x6,
ChangeSide = 0x7,
WaitingSide = 0x8,
CreateGame = 0x11,
JoinGame = 0x12,
TypeChange = 0x13,
LeaveGame = 0x14,
DuelStart = 0x15,
DuelEnd = 0x16,
Replay = 0x17,
TimeLimit = 0x18,
Chat = 0x19,
HsPlayerEnter = 0x20,
HsPlayerChange = 0x21,
HsWatchChange = 0x22,
jinglai=0x23,
chuqu=0x24
}
public enum CtosMessage
{
Response = 0x1,
UpdateDeck = 0x2,
HandResult = 0x3,
TpResult = 0x4,
PlayerInfo = 0x10,
CreateGame = 0x11,
JoinGame = 0x12,
LeaveGame = 0x13,
Surrender = 0x14,
TimeConfirm = 0x15,
Chat = 0x16,
HsToDuelist = 0x20,
HsToObserver = 0x21,
HsReady = 0x22,
HsNotReady = 0x23,
HsKick = 0x24,
HsStart = 0x25
}
public enum PlayerChange
{
Observe = 0x8,
Ready = 0x9,
NotReady = 0xA,
Leave = 0xB
}
\ No newline at end of file
//using System;
//using System.IO;
//using UnityEngine;
//public struct point
//{
// public bool me;
// public game_location location;
// public int index;
// public game_position position;
// public int overlay_index;
// public point(bool m, game_location l, int i, game_position p = game_position.POS_FACEDOWN_ATTACK, int o = 0)
// {
// me = m;
// location = l;
// index = i;
// position = p;
// overlay_index = o;
// }
//}
//public struct CardData
//{
// public Int64 code;
// public Int32 Ot;
// public Int64 Alias;
// public Int64 SetCode;
// public Int64 Type;
// public Int32 Attack;
// public Int32 Defense;
// public Int64 Level;
// public Int64 Race;
// public Int32 Attribute;
// public Int64 Category;
// public string Name;
// public string Desc;
// public string tail;
// public string[] Str;
// public long LeftScale;
// public long RightScale;
// public CardData(int a = 0)
// {
// code = 0;
// Ot = 0;
// Alias = 0;
// SetCode = 0;
// Type = 0;
// Attack = 0;
// Defense = 0;
// Level = 0;
// Race = 0;
// Attribute = 0;
// Category = 0;
// Name = "";
// Desc = "";
// Str = new string[0];
// LeftScale = 0;
// RightScale = 0;
// tail = "";
// }
//}
fileFormatVersion: 2
guid: f52930133f54dd446bd23d432f0b4332
folderAsset: yes
timeCreated: 1469182564
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
//using UnityEngine;
//using System.Collections;
//public class Delegater : MonoBehaviour
//{
// public CLIENT_SERVANT_OCGCORE.refresh_function f;
// // Use this for initialization
// void Start () {
// }
// public void function()
// {
// if (f != null) f();
// }
// // Update is called once per frame
// void Update () {
// }
//}
fileFormatVersion: 2
guid: e0685e730c8d7864e92f6cca605c4f52
timeCreated: 1480605664
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System.IO;
class TXT_DEBUGER_ruined
{
public static void debug(string raw)
{
FileStream fs = new FileStream("log.txt", FileMode.Append);
StreamWriter sw = new StreamWriter(fs);
sw.Write(raw + "\n");
sw.Flush();
sw.Close();
fs.Close();
}
}
fileFormatVersion: 2
guid: 1d455ff0e7866fd44abf7aca88d2ffbc
timeCreated: 1470044743
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
//using System;
//public class GameStringHelper
//{
// public static bool differ(long a, long b)
// {
// bool r = false;
// if ((a & b) > 0) r = true;
// return r;
// }
// public static string get_attribute_string(long a)
// {
// string r = "";
// if (differ(a, (long)game_attributes.ATTRIBUTE_EARTH)) r += "地";
// if (differ(a, (long)game_attributes.ATTRIBUTE_WATER)) r += "水";
// if (differ(a, (long)game_attributes.ATTRIBUTE_FIRE)) r += "炎";
// if (differ(a, (long)game_attributes.ATTRIBUTE_WIND)) r += "风";
// if (differ(a, (long)game_attributes.ATTRIBUTE_DARK)) r += "暗";
// if (differ(a, (long)game_attributes.ATTRIBUTE_LIGHT)) r += "光";
// if (differ(a, (long)game_attributes.ATTRIBUTE_DEVINE)) r += "神";
// r += "属性";
// return r;
// }
// public static string get_type_string(int a)
// {
// string r = "";
// if (differ(a, (long)game_type.TYPE_MONSTER)) r += "怪物卡";
// if (differ(a, (long)game_type.TYPE_SPELL)) r += "魔法卡";
// if (differ(a, (long)game_type.TYPE_TRAP)) r += "陷阱卡";
// return r;
// }
// public static string get_detailed_type_string(int a)
// {
// string r = "";
// if (differ(a, (long)game_type.TYPE_MONSTER)) r += "怪物卡";
// if (differ(a, (long)game_type.TYPE_SPELL)) r += "魔法卡";
// if (differ(a, (long)game_type.TYPE_TRAP)) r += "陷阱卡";
// return r;
// }
// public static string get_race_string(long a)
// {
// string r = "";
// if (differ(a, (long)game_race.RACE_WARRIOR)) r += "战士";
// if (differ(a, (long)game_race.RACE_SPELLCASTER)) r += "魔法师";
// if (differ(a, (long)game_race.RACE_FAIRY)) r += "天使";
// if (differ(a, (long)game_race.RACE_FIEND)) r += "恶魔";
// if (differ(a, (long)game_race.RACE_ZOMBIE)) r += "不死";
// if (differ(a, (long)game_race.RACE_MACHINE)) r += "机械";
// if (differ(a, (long)game_race.RACE_AQUA)) r += "水";
// if (differ(a, (long)game_race.RACE_PYRO)) r += "炎";
// if (differ(a, (long)game_race.RACE_ROCK)) r += "岩石";
// if (differ(a, (long)game_race.RACE_WINDBEAST)) r += "鸟兽";
// if (differ(a, (long)game_race.RACE_PLANT)) r += "植物";
// if (differ(a, (long)game_race.RACE_INSECT)) r += "昆虫";
// if (differ(a, (long)game_race.RACE_THUNDER)) r += "雷";
// if (differ(a, (long)game_race.RACE_DRAGON)) r += "龙";
// if (differ(a, (long)game_race.RACE_BEAST)) r += "兽";
// if (differ(a, (long)game_race.RACE_BEASTWARRIOR)) r += "兽战士";
// if (differ(a, (long)game_race.RACE_DINOSAUR)) r += "恐龙";
// if (differ(a, (long)game_race.RACE_FISH)) r += "鱼";
// if (differ(a, (long)game_race.RACE_SEASERPENT)) r += "海龙";
// if (differ(a, (long)game_race.RACE_REPTILE)) r += "爬虫";
// if (differ(a, (long)game_race.RACE_PSYCHO)) r += "念动力";
// if (differ(a, (long)game_race.RACE_DEVINE)) r += "幻神兽";
// if (differ(a, (long)game_race.RACE_CREATORGOD)) r += "创造神";
// if (differ(a, (long)game_race.RACE_PHANTOMDRAGON)) r += "幻龙";
// r += "族";
// return r;
// }
// public static string get_point_string(point p)
// {
// string re = "";
// if (p.me)
// {
// re += "我的";
// }
// else
// {
// re += "对方的";
// }
// switch (p.location)
// {
// case game_location.LOCATION_DECK:
// re += "卡组中的";
// break;
// case game_location.LOCATION_EXTRA:
// re += "额外卡组中的";
// break;
// case game_location.LOCATION_GRAVE:
// re += "墓地中的";
// break;
// case game_location.LOCATION_HAND:
// re += "手上的";
// break;
// case game_location.LOCATION_MZONE:
// re += "前场的";
// break;
// case game_location.LOCATION_REMOVED:
// re += "被除外的";
// break;
// case game_location.LOCATION_SZONE:
// re += "后场的";
// break;
// }
// re += "第" + p.index.ToString() + "张卡";
// if (p.overlay_index > 0)
// {
// re += "下面第" + p.overlay_index.ToString() + "张被叠放的卡";
// }
// switch (p.position)
// {
// case game_position.POS_FACEDOWN_ATTACK:
// re += "(里攻)";
// break;
// case game_position.POS_FACEDOWN_DEFENSE:
// re += "(里守)";
// break;
// case game_position.POS_FACEUP_ATTACK:
// re += "(表攻)";
// break;
// case game_position.POS_FACEUP_DEFENSE:
// re += "(表守)";
// break;
// }
// if (p.location == game_location.LOCATION_UNKNOWN) re = "(未知区域)";
// return re;
// }
// public static string get_name_string(CardData data)
// {
// string re = "";
// if (differ(data.Type, (long)game_type.TYPE_MONSTER)) re += "[ff8000]"+data.Name;
// else if (differ(data.Type, (long)game_type.TYPE_SPELL)) re += "[7FFF00]" + data.Name;
// else if (differ(data.Type, (long)game_type.TYPE_TRAP)) re += "[dda0dd]" + data.Name;
// else re += "[ff8000]" + data.Name;
// re += "[-]";
// return re;
// }
// public static string get_string(CardData data,bool desc=true)
// {
// string re = "";
// if ((data.Type & 0x1) > 0)
// {
// re += "[ff8000]";
// if ((data.Type & 0x10) > 0)
// {
// re += "通常|";
// }
// if ((data.Type & 0x20) > 0)
// {
// re += "效果|";
// }
// if ((data.Type & 0x40) > 0)
// {
// re += "融合|";
// }
// if ((data.Type & 0x80) > 0)
// {
// re += "仪式|";
// }
// if ((data.Type & 0x100) > 0)
// {
// re += "陷阱怪物|";
// }
// if ((data.Type & 0x200) > 0)
// {
// re += "灵魂|";
// }
// if ((data.Type & 0x400) > 0)
// {
// re += "同盟|";
// }
// if ((data.Type & 0x800) > 0)
// {
// re += "二重|";
// }
// if ((data.Type & 0x1000) > 0)
// {
// re += "调整|";
// }
// if ((data.Type & 0x2000) > 0)
// {
// re += "同调|";
// }
// if ((data.Type & 0x4000) > 0)
// {
// re += "衍生物|";
// }
// if ((data.Type & 0x200000) > 0)
// {
// re += "翻转|";
// }
// if ((data.Type & 0x400000) > 0)
// {
// re += "卡通|";
// }
// if ((data.Type & 0x800000) > 0)
// {
// re += "超量|";
// }
// if ((data.Type & 0x1000000) > 0)
// {
// re += "灵摆|";
// }
// re += get_race_string(data.Race) + "|" + get_attribute_string(data.Attribute) + "|" + data.Level.ToString() + "[sup]★[/sup]";
// if (data.LeftScale > 0) re += "|" + data.LeftScale.ToString() + "[sup]刻度[/sup]";
// re += "\n";
// if (data.Attack < 0)
// {
// re += "[sup]ATK[/sup]? ";
// }
// else
// {
// re += "[sup]ATK[/sup]" + data.Attack.ToString() + " ";
// }
// if (data.Defense < 0)
// {
// re += "[sup]DEF[/sup]?[-]\n";
// }
// else
// {
// re += "[sup]DEF[/sup]" + data.Defense.ToString() + "[-]\n";
// }
// }
// if ((data.Type & 0x2) > 0)
// {
// re += "[7FFF00]";
// if ((data.Type & 0x10000) > 0)
// {
// re += "速攻";
// }
// if ((data.Type & 0x20000) > 0)
// {
// re += "永续";
// }
// if ((data.Type & 0x40000) > 0)
// {
// re += "装备";
// }
// if ((data.Type & 0x80000) > 0)
// {
// re += "场地";
// }
// if ((data.Type & 0x80) > 0)
// {
// re += "仪式";
// }
// if (data.LeftScale > 0) re += "|" + data.LeftScale.ToString() + "[sup]刻度[/sup]";
// re += "[-]\n";
// }
// if ((data.Type & 0x4) > 0)
// {
// re += "[dda0dd]";
// if ((data.Type & 0x20000) > 0)
// {
// re += "永续";
// }
// if ((data.Type & 0x100000) > 0)
// {
// re += "反击";
// }
// re += "[-]\n";
// }
// if (data.tail.Length > 2)
// {
// re += data.tail;
// }
// if(desc)
// {
// if (re.Length > 12) re += data.Desc;
// else re = data.Desc;
// }
// return re;
// }
// public static string get_phase_string(int a)
// {
// string r = "";
// if (differ(a, (long)game_phrases.PHASE_BATTLE)) r += "战斗阶段";
// if (differ(a, (long)game_phrases.PHASE_BATTLE_START)) r += "战斗开始";
// if (differ(a, (long)game_phrases.PHASE_BATTLE_STEP)) r += "战斗步骤";
// if (differ(a, (long)game_phrases.PHASE_DAMAGE)) r += "伤害步骤";
// if (differ(a, (long)game_phrases.PHASE_DAMAGE_CAL)) r += "伤害计算";
// if (differ(a, (long)game_phrases.PHASE_DRAW)) r += "抽卡阶段";
// if (differ(a, (long)game_phrases.PHASE_END)) r += "回合结束";
// if (differ(a, (long)game_phrases.PHASE_MAIN1)) r += "主要阶段";
// if (differ(a, (long)game_phrases.PHASE_MAIN2)) r += "主要阶段";
// if (differ(a, (long)game_phrases.PHASE_STANDBY)) r += "准备阶段";
// return r;
// }
//}
fileFormatVersion: 2
guid: c348bd288e8db2d4d8ea0455b2c6a2e1
timeCreated: 1480605661
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
//using UnityEngine;
//using System.Collections;
//using System.Collections.Generic;
//public class loader : MonoBehaviour {
// private CLIENT client;
// public Camera main_camera;
// public GameObject mod_ui_2d;
// public GameObject mod_ui_3d;
// public GameObject mod_setting;
// public GameObject mod_ocgcore_button_mp;
// public GameObject mod_ocgcore_button_bp;
// public GameObject mod_ocgcore_button_ep;
// public GameObject mod_ocgcore_button_ok;
// public GameObject mod_ocgcore_button_no;
// public GameObject mod_ocgcore_button_change;
// public GameObject mod_ocgcore_button_see;
// public GameObject mod_ocgcore_button_sum;
// public GameObject mod_ocgcore_button_spsum;
// public GameObject mod_ocgcore_button_atk;
// public GameObject mod_ocgcore_button_act;
// public GameObject mod_ocgcore_button_set;
// public GameObject mod_ocgcore_button_wait_red;
// public GameObject mod_ocgcore_button_wait_green;
// public GameObject mod_ocgcore_button_wait_blue;
// public GameObject mod_ocgcore_button_wait_black;
// public GameObject mod_ocgcore_explode_mp;
// public GameObject mod_ocgcore_explode_selected;
// public GameObject mod_ocgcore_explode_bp;
// public GameObject mod_ocgcore_explode_ep;
// public GameObject mod_ocgcore_explode_ok;
// public GameObject mod_ocgcore_explode_no;
// public GameObject mod_ocgcore_explode_change;
// public GameObject mod_ocgcore_explode_see;
// public GameObject mod_ocgcore_explode_sum;
// public GameObject mod_ocgcore_explode_spsum;
// public GameObject mod_ocgcore_explode_atk;
// public GameObject mod_ocgcore_explode_act;
// public GameObject mod_ocgcore_explode_set;
// public GameObject mod_audio_effect;
// public GameObject mod_ocgcore_card;
// public GameObject mod_ocgcore_card_cloude;
// public GameObject mod_ocgcore_overlay_light;
// public GameObject mod_ocgcore_card_number_shower;
// public GameObject mod_ocgcore_card_figure_line;
// public GameObject mod_ocgcore_hidden_button;
// public GameObject mod_ocgcore_coin;
// public GameObject mod_ocgcore_dice;
// public GameObject mod_simple_quad;
// public GameObject mod_simple_ngui_background_texture;
// public GameObject mod_simple_ngui_text;
// public GameObject mod_ocgcore_idle_container;
// public GameObject mod_ocgcore_ui_card_hint;
// public GameObject mod_ocgcore_ui_health;
// public GameObject mod_ocgcore_ui_select_chain;
// public GameObject mod_ocgcore_ui_time_effect;
// public GameObject mod_ui_debbger;
// public GameObject mod_ocgcore_number;
// public GameObject mod_ocgcore_select_positions;
// public GameObject mod_ocgcore_search_cards;
// public GameObject mod_ocgcore_select_common;
// public GameObject mod_ocgcore_select_button_option;
// public GameObject mod_ocgcore_select_text_option;
// public GameObject mod_ocgcore_decoration_chain_selecting;
// public GameObject mod_ocgcore_decoration_card_selected;
// public GameObject mod_ocgcore_decoration_card_selecting;
// public GameObject mod_ocgcore_decoration_card_active;
// public GameObject mod_ocgcore_decoration_spsummon;
// public GameObject mod_ocgcore_decoration_thunder;
// public GameObject mod_ocgcore_decoration_cage;
// public GameObject mod_ocgcore_decoration_cage_of_field;
// public GameObject mod_ocgcore_decoration_monster_activated;
// public GameObject mod_ocgcore_decoration_trap_activated;
// public GameObject mod_ocgcore_decoration_magic_activated;
// public GameObject mod_ocgcore_decoration_magic_zhuangbei;
// public GameObject mod_ocgcore_decoration_removed;
// public GameObject mod_ocgcore_decoration_tograve;
// public GameObject mod_ocgcore_decoration_card_setted;
// public GameObject mod_ocgcore_blood;
// public GameObject mod_ocgcore_blood_screen;
// public Texture2D Texture2D_card_back;
// public GameObject mod_deck_manager_card_on_list;
// public GameObject mod_deck_manager_main_bed;
// public GameObject mod_deck_manager_max_bed;
// public GameObject mod_deck_manager_card;
// public GameObject mod_deck_manager_lflist;
// public GameObject mod_deck_manager_effect;
// public GameObject mod_ocgcore_bs_atk_decoration;
// public GameObject mod_ocgcore_bs_atk_sign;
// public GameObject mod_ocgcore_bs_atk_line_earth;
// public GameObject mod_ocgcore_bs_atk_line_water;
// public GameObject mod_ocgcore_bs_atk_line_fire;
// public GameObject mod_ocgcore_bs_atk_line_wind;
// public GameObject mod_ocgcore_bs_atk_line_dark;
// public GameObject mod_ocgcore_bs_atk_line_light;
// public GameObject mod_ocgcore_cs_chaining;
// public GameObject mod_ocgcore_cs_end;
// public GameObject mod_ocgcore_cs_bomb;
// public GameObject mod_ocgcore_cs_negated;
// public GameObject mod_ocgcore_ss_summon_earth;
// public GameObject mod_ocgcore_ss_summon_water;
// public GameObject mod_ocgcore_ss_summon_fire;
// public GameObject mod_ocgcore_ss_summon_wind;
// public GameObject mod_ocgcore_ss_summon_dark;
// public GameObject mod_ocgcore_ss_summon_light;
// public GameObject mod_ocgcore_ss_spsummon_normal;
// public GameObject mod_ocgcore_ss_spsummon_ronghe;
// public GameObject mod_ocgcore_ss_spsummon_tongtiao;
// public GameObject mod_ocgcore_ss_spsummon_yishi;
// public GameObject mod_ocgcore_ss_p_idle_effect;
// public GameObject mod_ocgcore_ss_p_sum_effect;
// public GameObject mod_ocgcore_ss_dark_hole;
// public GameObject mod_room_window;
// public GameObject mod_room_ui_button;
// public GameObject mod_login_window;
// public GameObject mod_regist_window;
// public GameObject mod_dating_window;
// public GameObject mod_room_in_dating_window;
// public GameObject mod_dating_chat;
// public GameObject mod_shangcheng;
// public GameObject mod_shangcheng_queren;
// public GameObject mod_shangping;
// //最后做一下preload
// void Start () {
// client = new CLIENT(this);
// ini_mods();
// }
// void ini_mods()
// {
// preload(mod_ocgcore_button_mp);
// preload(mod_ocgcore_button_bp);
// preload(mod_ocgcore_button_ep);
// preload(mod_ocgcore_button_ok);
// preload(mod_ocgcore_button_no);
// preload(mod_ocgcore_button_change);
// preload(mod_ocgcore_button_see);
// preload(mod_ocgcore_button_sum);
// preload(mod_ocgcore_button_spsum);
// preload(mod_ocgcore_button_atk);
// preload(mod_ocgcore_button_act);
// preload(mod_ocgcore_button_set);
// preload(mod_ocgcore_button_wait_red);
// preload(mod_ocgcore_button_wait_green);
// preload(mod_ocgcore_button_wait_blue);
// preload(mod_ocgcore_button_wait_black);
// preload(mod_ocgcore_explode_mp);
// preload(mod_ocgcore_explode_selected);
// preload(mod_ocgcore_explode_bp);
// preload(mod_ocgcore_explode_ep);
// preload(mod_ocgcore_explode_ok);
// preload(mod_ocgcore_explode_no);
// preload(mod_ocgcore_explode_change);
// preload(mod_ocgcore_explode_see);
// preload(mod_ocgcore_explode_sum);
// preload(mod_ocgcore_explode_spsum);
// preload(mod_ocgcore_explode_atk);
// preload(mod_ocgcore_explode_act);
// preload(mod_ocgcore_explode_set);
// preload(mod_ocgcore_card);
// preload(mod_ocgcore_card_cloude);
// preload(mod_ocgcore_overlay_light);
// preload(mod_ocgcore_card_number_shower);
// preload(mod_ocgcore_card_figure_line);
// preload(mod_ocgcore_hidden_button);
// preload(mod_ocgcore_coin);
// preload(mod_ocgcore_dice);
// preload(mod_simple_quad);
// preload(mod_simple_ngui_background_texture);
// preload(mod_simple_ngui_text);
// preload(mod_ocgcore_idle_container);
// preload(mod_ocgcore_ui_card_hint);
// preload(mod_ocgcore_ui_health);
// preload(mod_ocgcore_ui_select_chain);
// preload(mod_ocgcore_ui_time_effect);
// preload(mod_ocgcore_number);
// preload(mod_ocgcore_select_positions);
// preload(mod_ocgcore_search_cards);
// preload(mod_ocgcore_select_common);
// preload(mod_ocgcore_select_button_option);
// preload(mod_ocgcore_select_text_option);
// preload(mod_ocgcore_decoration_chain_selecting);
// preload(mod_ocgcore_decoration_card_selected);
// preload(mod_ocgcore_decoration_card_selecting);
// preload(mod_ocgcore_decoration_card_active);
// preload(mod_ocgcore_decoration_spsummon);
// preload(mod_ocgcore_decoration_thunder);
// preload(mod_ocgcore_decoration_cage);
// preload(mod_ocgcore_decoration_cage_of_field);
// preload(mod_ocgcore_decoration_monster_activated);
// preload(mod_ocgcore_decoration_trap_activated);
// preload(mod_ocgcore_decoration_magic_activated);
// preload(mod_ocgcore_decoration_magic_zhuangbei);
// preload(mod_ocgcore_decoration_removed);
// preload(mod_ocgcore_decoration_tograve);
// preload(mod_ocgcore_decoration_card_setted);
// preload(mod_ocgcore_blood);
// preload(mod_ocgcore_blood_screen);
// preload(mod_deck_manager_card_on_list);
// preload(mod_deck_manager_main_bed);
// preload(mod_deck_manager_max_bed);
// preload(mod_deck_manager_card);
// preload(mod_deck_manager_lflist);
// preload(mod_deck_manager_effect);
// preload(mod_ocgcore_bs_atk_decoration);
// preload(mod_ocgcore_bs_atk_sign);
// preload(mod_ocgcore_bs_atk_line_earth);
// preload(mod_ocgcore_bs_atk_line_water);
// preload(mod_ocgcore_bs_atk_line_fire);
// preload(mod_ocgcore_bs_atk_line_wind);
// preload(mod_ocgcore_bs_atk_line_dark);
// preload(mod_ocgcore_bs_atk_line_light);
// preload(mod_ocgcore_cs_chaining);
// preload(mod_ocgcore_cs_end);
// preload(mod_ocgcore_cs_bomb);
// preload(mod_ocgcore_cs_negated);
// preload(mod_ocgcore_ss_summon_earth);
// preload(mod_ocgcore_ss_summon_water);
// preload(mod_ocgcore_ss_summon_fire);
// preload(mod_ocgcore_ss_summon_wind);
// preload(mod_ocgcore_ss_summon_dark);
// preload(mod_ocgcore_ss_summon_light);
// preload(mod_ocgcore_ss_spsummon_normal);
// preload(mod_ocgcore_ss_spsummon_ronghe);
// preload(mod_ocgcore_ss_spsummon_tongtiao);
// preload(mod_ocgcore_ss_spsummon_yishi);
// preload(mod_ocgcore_ss_p_idle_effect);
// preload(mod_ocgcore_ss_p_sum_effect);
// preload(mod_ocgcore_ss_dark_hole);
// }
// private List<GameObject> GameObjects = new List<GameObject>();
// void preload(GameObject g)
// {
// GameObject obj = GameObject.Instantiate(g) as GameObject;
// obj.SetActive(false);
// GameObjects.Add(obj);
// }
// bool first = true;
// void Update ()
// {
// if (first)
// {
// first = false;
// //QualitySettings.SetQualityLevel(5);
// }
// client.update();
// }
// void OnApplicationQuit()
// {
// Debug.Log("OnApplicationQuit");
// client.is_running = false;
// client.networkStream.Flush();
// client.networkStream.Close();
// client.networkStream.Dispose();
// client.networkStream = null;
// client.tcpClient.Close();
// client.tcpClient = null;
// }
//}
fileFormatVersion: 2
guid: 89103720b5148e84a8ebeb6a8372af4a
timeCreated: 1480605654
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
//using System;
//using System.Drawing;
//using System.Drawing.Imaging;
//using System.Collections.Generic;
//using System.IO;
//using System.Threading;
//using UnityEngine;
//public enum ocgcore_picture_type
//{
// card_picture = 0,
// card_verticle_drawing = 1,
// card_feature = 3,
//}
//public class PictureLoader
//{
// private CLIENT client;
// System.Object waitLoadListLock = new System.Object();
// System.Object loadedListLock = new System.Object();
// List<PictureResource> waitLoadList = new List<PictureResource>();
// List<PictureResource> loadedList = new List<PictureResource>();
// System.Collections.Generic.Dictionary<UInt64, bool> addedMap = new Dictionary<ulong, bool>();
// private class BitmapHelper
// {
// public System.Drawing.Color[,] colors = null;
// public BitmapHelper(string path)
// {
// Bitmap bitmap = (Bitmap)Image.FromFile(path);
// BitmapData bmpData = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height), ImageLockMode.ReadOnly, PixelFormat.Format32bppArgb);
// IntPtr ptr = bmpData.Scan0;
// int bytes = Math.Abs(bmpData.Stride) * bitmap.Height;
// byte[] rgbValues = new byte[bytes];
// System.Runtime.InteropServices.Marshal.Copy(ptr, rgbValues, 0, bytes);
// colors = new System.Drawing.Color[bitmap.Width, bitmap.Height];
// for (int counter = 0; counter < rgbValues.Length; counter += 4)
// {
// int i_am = counter / 4;
// colors[i_am % bitmap.Width, i_am / bitmap.Width]
// =
// System.Drawing.Color.FromArgb(
// rgbValues[counter + 3],
// rgbValues[counter + 2],
// rgbValues[counter + 1],
// rgbValues[counter + 0]);
// }
// bitmap.UnlockBits(bmpData);
// bitmap.Dispose();
// }
// public System.Drawing.Color GetPixel(int a, int b)
// {
// return colors[a, b];
// }
// }
// private class PictureResource
// {
// public ocgcore_picture_type type;
// public long code;
// public byte[] data = null;
// public float[, ,] hashed_data = null;
// public PictureResource(ocgcore_picture_type t, long c)
// {
// type = t;
// code = c;
// }
// }
// public PictureLoader(CLIENT c)
// {
// client = c;
// Thread main = new Thread(thread_run);
// main.Start();
// Debug.Log("picture_loader_begin");
// }
// void thread_run()
// {
// while (client.is_running)
// {
// try
// {
// lock (waitLoadListLock)
// {
// //card_picture
// ProcessingCardPicture();
// //card_verticle_drawing
// ProcessingVerticleDrawing();
// //card_feature
// ProcessingCardFeature();
// }
// }
// catch (Exception e)
// {
// Debug.Log(e);
// }
// Thread.Sleep(2000);
// }
// }
// private void ProcessingCardFeature()
// {
// var removedList = new List<PictureResource>();
// for (int i = 0; i < waitLoadList.Count; i++)
// {
// if (waitLoadList[i].hashed_data == null)
// {
// if (waitLoadList[i].type == ocgcore_picture_type.card_feature)
// {
// if (File.Exists("picture_monster\\" + waitLoadList[i].code.ToString() + ".png"))
// {
// UsingAritificialPng(removedList, i);
// }
// else
// {
// UsingAutoPng(removedList, i);
// }
// }
// }
// }
// for (int i = 0; i < removedList.Count; i++)
// {
// waitLoadList.Remove(removedList[i]);
// }
// removedList.Clear();
// }
// private void UsingAutoPng(List<PictureResource> removedList, int i)
// {
// string path = "picture_card\\" + waitLoadList[i].code.ToString() + ".jpg";
// if (File.Exists(path))
// {
// BitmapHelper bitmap = new BitmapHelper(path);
// int width = bitmap.colors.GetLength(0);
// int height = bitmap.colors.GetLength(1);
// waitLoadList[i].hashed_data = new float[120, 120, 4];
// for (int w = 0; w < 120; w++)
// {
// for (int h = 0; h < 120; h++)
// {
// System.Drawing.Color color = bitmap.GetPixel((int)((float)(30 + w) / 177f * (float)width), (int)((float)(50 + h) / 254f * (float)height));
// float a = (float)color.A / 255f;
// if (w < 20) if (a > (float)w / (float)20) a = (float)w / (float)20;
// if (w > 100) if (a > 1f - (float)(w - 100) / (float)20) a = 1f - (float)(w - 100) / (float)20;
// if (h < 20) if (a > (float)h / (float)20) a = (float)h / (float)20;
// if (h > 100) if (a > 1f - (float)(h - 100) / (float)20) a = 1f - (float)(h - 100) / (float)20;
// waitLoadList[i].hashed_data[w, 120 - h - 1, 0] = (float)color.R / 255f;
// waitLoadList[i].hashed_data[w, 120 - h - 1, 1] = (float)color.G / 255f;
// waitLoadList[i].hashed_data[w, 120 - h - 1, 2] = (float)color.B / 255f;
// waitLoadList[i].hashed_data[w, 120 - h - 1, 3] = a;
// }
// }
// loadedList.Add(waitLoadList[i]);
// removedList.Add(waitLoadList[i]);
// }
// }
// private void UsingAritificialPng(List<PictureResource> removedList, int i)
// {
// string path = "picture_monster\\" + waitLoadList[i].code.ToString() + ".png";
// BitmapHelper bitmap = new BitmapHelper(path);
// int left;
// int right;
// int up;
// int down;
// CutTop(bitmap, out left, out right, out up, out down);
// up = CutLeft(bitmap, up);
// down = CutRight(bitmap, down);
// right = CutButton(bitmap, right);
// int width = right - left;
// int height = down - up;
// waitLoadList[i].hashed_data = new float[width, height, 4];
// for (int w = 0; w < width; w++)
// {
// for (int h = 0; h < height; h++)
// {
// System.Drawing.Color color = bitmap.GetPixel(left + w, up + h);
// float a = (float)color.A / 255f;
// if (w < 40) if (a > (float)w / (float)40) a = (float)w / (float)40;
// if (w > (width - 40)) if (a > 1f - (float)(w - (width - 40)) / (float)40) a = 1f - (float)(w - (width - 40)) / (float)40;
// if (h < 40) if (a > (float)h / (float)40) a = (float)h / (float)40;
// if (h > (height - 40)) if (a > 1f - (float)(h - (height - 40)) / (float)40) a = 1f - (float)(h - (height - 40)) / (float)40;
// waitLoadList[i].hashed_data[w, height - h - 1, 0] = (float)color.R / 255f;
// waitLoadList[i].hashed_data[w, height - h - 1, 1] = (float)color.G / 255f;
// waitLoadList[i].hashed_data[w, height - h - 1, 2] = (float)color.B / 255f;
// waitLoadList[i].hashed_data[w, height - h - 1, 3] = a;
// }
// }
// loadedList.Add(waitLoadList[i]);
// removedList.Add(waitLoadList[i]);
// }
// private static int CutButton(BitmapHelper bitmap, int right)
// {
// for (int w = bitmap.colors.GetLength(0) - 1; w >= 0; w--)
// {
// for (int h = 0; h < bitmap.colors.GetLength(1); h++)
// {
// System.Drawing.Color color = bitmap.GetPixel(w, h);
// if (color.A > 10)
// {
// right = w;
// return right;
// }
// }
// }
// return right;
// }
// private static int CutRight(BitmapHelper bitmap, int down)
// {
// for (int h = bitmap.colors.GetLength(1) - 1; h >= 0; h--)
// {
// for (int w = 0; w < bitmap.colors.GetLength(0); w++)
// {
// System.Drawing.Color color = bitmap.GetPixel(w, h);
// if (color.A > 10)
// {
// down = h;
// return down;
// }
// }
// }
// return down;
// }
// private static int CutLeft(BitmapHelper bitmap, int up)
// {
// for (int h = 0; h < bitmap.colors.GetLength(1); h++)
// {
// for (int w = 0; w < bitmap.colors.GetLength(0); w++)
// {
// System.Drawing.Color color = bitmap.GetPixel(w, h);
// if (color.A > 10)
// {
// up = h;
// return up;
// }
// }
// }
// return up;
// }
// private static void CutTop(BitmapHelper bitmap, out int left, out int right, out int up, out int down)
// {
// ///////切边算法
// left = 0;
// right = bitmap.colors.GetLength(0);
// up = 0;
// down = bitmap.colors.GetLength(1);
// for (int w = 0; w < bitmap.colors.GetLength(0); w++)
// {
// for (int h = 0; h < bitmap.colors.GetLength(1); h++)
// {
// System.Drawing.Color color = bitmap.GetPixel(w, h);
// if (color.A > 10)
// {
// left = w;
// return;
// }
// }
// }
// }
// private void ProcessingVerticleDrawing()
// {
// var removedList = new List<PictureResource>();
// for (int i = 0; i < waitLoadList.Count; i++)
// {
// if (waitLoadList[i].type == ocgcore_picture_type.card_verticle_drawing)
// {
// string path = "picture_card\\" + waitLoadList[i].code.ToString() + ".jpg";
// if (!File.Exists(path))
// {
// continue;
// }
// BitmapHelper bitmap = new BitmapHelper(path);
// int width = bitmap.colors.GetLength(0);
// int height = bitmap.colors.GetLength(1);
// waitLoadList[i].hashed_data = new float[120, 120, 4];
// for (int w = 0; w < 120; w++)
// {
// for (int h = 0; h < 120; h++)
// {
// System.Drawing.Color color = bitmap.GetPixel((int)((float)(30 + w) / 177f * (float)width), (int)((float)(50 + h) / 254f * (float)height));
// float a = (float)color.A / 255f;
// if (h < 60)
// {
// if (w < 20) if (a > (float)w / (float)20) a = (float)w / (float)20;
// if (w > 100) if (a > 1f - (float)(w - 100) / (float)20) a = 1f - (float)(w - 100) / (float)20;
// if (h < 20) if (a > (float)h / (float)20) a = (float)h / (float)20;
// if (h > 100) if (a > 1f - (float)(h - 100) / (float)20) a = 1f - (float)(h - 100) / (float)20;
// }
// else
// {
// float l = (float)Math.Sqrt((60 - w) * (60 - w) + (60 - h) * (60 - h));
// float aaa = 1.0f - (l / 60);
// if (aaa < 0) { a = 0; }
// else
// {
// if (aaa > 0.4) aaa = 1;
// else aaa = (aaa) / 0.4f;
// a = aaa;
// }
// }
// waitLoadList[i].hashed_data[w, 120 - h - 1, 0] = (float)color.R / 255f;
// waitLoadList[i].hashed_data[w, 120 - h - 1, 1] = (float)color.G / 255f;
// waitLoadList[i].hashed_data[w, 120 - h - 1, 2] = (float)color.B / 255f;
// waitLoadList[i].hashed_data[w, 120 - h - 1, 3] = a;
// }
// }
// loadedList.Add(waitLoadList[i]);
// removedList.Add(waitLoadList[i]);
// }
// }
// for (int i = 0; i < removedList.Count; i++)
// {
// waitLoadList.Remove(removedList[i]);
// }
// removedList.Clear();
// }
// private void ProcessingCardPicture()
// {
// var removedList = new List<PictureResource>();
// foreach (var val in waitLoadList)
// {
// if (val.type == ocgcore_picture_type.card_picture)
// {
// string path = "picture_card\\" + val.code.ToString() + ".jpg";
// if (!File.Exists(path))
// {
// path = "picture_card\\0.jpg";
// }
// byte[] data;
// using (FileStream file = new FileStream(path, FileMode.Open, FileAccess.Read))
// {
// file.Seek(0, SeekOrigin.Begin);
// data = new byte[file.Length];
// file.Read(data, 0, (int)file.Length);
// }
// val.data = data;
// loadedList.Add(val);
// removedList.Add(val);
// }
// }
// for (int i = 0; i < removedList.Count; i++)
// {
// waitLoadList.Remove(removedList[i]);
// }
// removedList.Clear();
// }
// public Texture2D get(long code, ocgcore_picture_type type)
// {
// lock (loadedListLock)
// {
// foreach (PictureResource r in loadedList)
// {
// if (r.type == type)
// {
// if (r.code == code)
// {
// Texture2D re = null;
// if (r.data != null)
// {
// re = new Texture2D(400, 600);
// re.LoadImage(r.data);
// return re;
// }
// if (r.hashed_data != null)
// {
// int width = r.hashed_data.GetLength(0);
// int height = r.hashed_data.GetLength(1);
// re = new Texture2D(width, height);
// for (int w = 0; w < width; w++)
// {
// for (int h = 0; h < height; h++)
// {
// re.SetPixel(w, h, new UnityEngine.Color(r.hashed_data[w, h, 0], r.hashed_data[w, h, 1], r.hashed_data[w, h, 2], r.hashed_data[w, h, 3]));
// }
// }
// re.Apply();
// return re;
// }
// }
// }
// }
// }
// lock (waitLoadListLock)
// {
// if (!addedMap.ContainsKey((UInt64)type << 32 | (UInt64)code))
// {
// waitLoadList.Add(new PictureResource(type, code));
// addedMap.Add((UInt64)type << 32 | (UInt64)code, true);
// }
// }
// return null;
// }
//}
fileFormatVersion: 2
guid: 7c2075ecc16bdb54b917575d16794398
timeCreated: 1480605653
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System;
using System.Collections.Generic;
using UnityEngine;
public class string_reader
{
class string_hash
{
public string father = "";
public int id = 0;
public string content = "";
}
List<string_hash> strs = new List<string_hash>();
public int get_int(string str)
{
int return_value = 0;
if(str.Length>2&&str.Substring(0,2)=="0x"){
return_value = Convert.ToInt32(str,16);
}
else
{
return_value = Int32.Parse(str);
}
return return_value;
}
public string_reader(string path)
{
string text = System.IO.File.ReadAllText(path);
string st = text.Replace("\r", "");
string[] lines = st.Split(new string[] { "\n" }, StringSplitOptions.RemoveEmptyEntries);
foreach (string line in lines)
{
if (line.Length>1&&line.Substring(0,1)=="!")
{
string[] mats = line.Substring(1, line.Length-1).Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries);
if (mats.Length > 2)
{
string_hash a = new string_hash();
a.father = mats[0];
try
{
a.id = get_int(mats[1]);
}catch(Exception e){
Debug.Log(e);
}
a.content = mats[2];
strs.Add(a);
if (a.id==1160)
{
Debug.Log(a.content);
}
}
}
}
}
public string get(string father,int id)
{
string re = "";
foreach (string_hash s in strs)
{
if(s.father==father&&s.id==id){
re = s.content;
}
}
return re;
}
}
fileFormatVersion: 2
guid: a11211d5ee383a8479ecca7d7e220cdf
timeCreated: 1480605656
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System;
using System.IO;
using UnityEngine;
public class ui_helper
{
public static Vector2 get_hang_lie(int index, int meihangdegeshu)
{
Vector2 return_value = Vector2.zero;
return_value.x = (int)index / meihangdegeshu;
return_value.y = index % meihangdegeshu;
return return_value;
}
public static int get_zuihouyihangdegeshu(int zongshu,int meihangdegeshu)
{
int re = 0;
re = zongshu % meihangdegeshu;
if (re==0)
{
re = meihangdegeshu;
}
return re;
}
public static bool get_shifouzaizuihouyihang(int zongshu, int meihangdegeshu,int index)
{
return (int)((index) / meihangdegeshu) == (int)(zongshu / meihangdegeshu);
}
public static int get_zonghangshu(int zongshu, int meihangdegeshu)
{
return ((int)(zongshu - 1) / meihangdegeshu) + 1;
}
public static Vector3 get_close(Vector3 input_vector,Camera cam,float l)
{
Vector3 o = Vector3.zero;
Vector3 scr = cam.WorldToScreenPoint(input_vector);
scr.z -= l;
o = cam.ScreenToWorldPoint(scr);
return o;
}
public static Texture2D get_rand_face()
{
DirectoryInfo TheFolder = new DirectoryInfo("face");
FileInfo[] fileInfo = TheFolder.GetFiles();
FileInfo NextFile;
Texture2D tex = new Texture2D(400, 600);
if (fileInfo.Length > 0)
{
NextFile = fileInfo[UnityEngine.Random.Range(0, fileInfo.Length)];
byte[] data;
using (FileStream file = new FileStream(NextFile.FullName, FileMode.Open, FileAccess.Read))
{
file.Seek(0, SeekOrigin.Begin);
data = new byte[file.Length];
file.Read(data, 0, (int)file.Length);
}
tex.LoadImage(data);
}
return tex;
}
}
fileFormatVersion: 2
guid: d53d6189fd0c71342a84342e7dc83c27
timeCreated: 1480605664
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
...@@ -10,14 +10,6 @@ The game is now being tested in china now, with at least *100,000* users ( about ...@@ -10,14 +10,6 @@ The game is now being tested in china now, with at least *100,000* users ( about
We use Yu-Gi-Oh card game only to test our engine, and the game is not for commercial use. When our card game engine is finally finished in about several years, all the contents about Yu-Gi-Oh will be deleted. We use Yu-Gi-Oh card game only to test our engine, and the game is not for commercial use. When our card game engine is finally finished in about several years, all the contents about Yu-Gi-Oh will be deleted.
The feedbacks is checked every day.
![pic](https://raw.githubusercontent.com/lllyasviel/YGOProUnity_V2/master/gitpic/0.jpg)
**The pro2 AI is an lua AI reader with MR4. It can read all lua AI code.**
**The AI seems buggy now because it is not the excellent Percy AI. We will make effort to improve it.**
# How to compile the game? # How to compile the game?
1. Download Unity 5.6.7f1 (https://unity3d.com/cn/get-unity/download/archive). 1. Download Unity 5.6.7f1 (https://unity3d.com/cn/get-unity/download/archive).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment