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/
AI_core_vs2017solution/build/android/obj/
# ygopro
ai/
cdb/
config/
deck/
......
......@@ -5,8 +5,6 @@ VisualStudioVersion = 15.0.26403.3
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ocgcore", "ocgcore\ocgcore.vcxproj", "{63635A2D-8303-46F7-8C8B-D1C36655F820}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "coreWrapper", "coreWrapper\coreWrapper.csproj", "{5448596E-A4D2-4011-B8C1-5228260040D1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
......@@ -27,20 +25,11 @@ Global
{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.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
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6B0513E2-BC41-4C0B-91E8-E596BD9336CF}
EndGlobalSection
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;
public class MegaBendEditor : MegaModifierEditor
{
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()
{
......
......@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaBubbleEditor : MegaModifierEditor
{
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()
{
......
......@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaDisplaceEditor : MegaModifierEditor
{
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()
{
......
......@@ -6,7 +6,7 @@ public class MegaFFDEditor : MegaModifierEditor
{
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;
......
......@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaHumpEditor : MegaModifierEditor
{
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()
{
......
......@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaMeltEditor : MegaModifierEditor
{
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()
{
......
......@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaNoiseEditor : MegaModifierEditor
{
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()
{
......
......@@ -6,7 +6,7 @@ using UnityEngine;
public class MegaPageFlipEditor : MegaModifierEditor
{
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;
......
......@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaPushEditor : MegaModifierEditor
{
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()
{
......
......@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaRadialSkewEditor : MegaModifierEditor
{
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()
{
......
......@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaRubberEditor : MegaModifierEditor
{
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 Inspector()
......
......@@ -7,7 +7,7 @@ using UnityEditor;
public class MegaSelectionEditor : MegaModifierEditor
{
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; }
......
......@@ -5,7 +5,7 @@ using UnityEditor;
public class MegaSimpleEditor : MegaModifierEditor
{
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()
{
......
......@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaSinusCurveEditor : MegaModifierEditor
{
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()
{
......
......@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaSqueezeEditor : MegaModifierEditor
{
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()
{
......
......@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaStretchEditor : MegaModifierEditor
{
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()
{
......
......@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaTaperEditor : MegaModifierEditor
{
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()
{
......
......@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaTwistEditor : MegaModifierEditor
{
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()
{
......
......@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaVertColSelectEditor : MegaModifierEditor
{
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; }
......
......@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaVertNoiseEditor : MegaModifierEditor
{
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()
{
......
......@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaVolSelectEditor : MegaModifierEditor
{
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; }
......
......@@ -6,7 +6,7 @@ using UnityEditor;
public class MegaWaveEditor : MegaModifierEditor
{
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()
{
......
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 @@
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using YGOSharp.OCGWrapper.Enums;
public class Book : WindowServant2D
{
......@@ -102,15 +103,15 @@ public class Book : WindowServant2D
}
foreach (var item in Program.I().ocgcore.cards)
{
if (item.p.location == (UInt32)game_location.search)
if (item.p.location == (UInt32)CardLocation.Search)
{
continue;
}
if (item.p.location == (UInt32)game_location.LOCATION_UNKNOWN)
if (item.p.location == (UInt32)CardLocation.Unknown)
{
continue;
}
if (item.p.location == (UInt32)game_location.LOCATION_DECK)
if (item.p.location == (UInt32)CardLocation.Deck)
{
continue;
}
......@@ -132,7 +133,7 @@ public class Book : WindowServant2D
master = new MultiStringMaster();
foreach (var item in Program.I().ocgcore.cards)
{
if (item.p.location == (UInt32)game_location.search)
if (item.p.location == (UInt32)CardLocation.Search)
{
continue;
}
......@@ -169,11 +170,11 @@ public class Book : WindowServant2D
bool died = false;
foreach (var item in Program.I().ocgcore.cards)
{
if (item.p.location == (UInt32)game_location.search)
if (item.p.location == (UInt32)CardLocation.Search)
{
continue;
}
if (item.p.location == (UInt32)game_location.LOCATION_UNKNOWN)
if (item.p.location == (UInt32)CardLocation.Unknown)
{
continue;
}
......@@ -181,15 +182,15 @@ public class Book : WindowServant2D
{
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]++;
}
if (item.p.location == (UInt32)game_location.LOCATION_HAND)
if (item.p.location == (UInt32)CardLocation.Hand)
{
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]++;
}
......
using UnityEngine;
using System;
using System.Collections.Generic;
using YGOSharp.OCGWrapper.Enums;
public class CardDescription : Servant
{
......@@ -251,30 +252,30 @@ public class CardDescription : Servant
{
if (gps.controller == 0)
{
if ((gps.location & (UInt32)game_location.LOCATION_GRAVE) > 0)
if ((gps.location & (UInt32)CardLocation.Grave) > 0)
{
myGrave.Add(curCard);
}
if ((gps.location & (UInt32)game_location.LOCATION_REMOVED) > 0)
if ((gps.location & (UInt32)CardLocation.Removed) > 0)
{
myBanished.Add(curCard);
}
if ((gps.location & (UInt32)game_location.LOCATION_EXTRA) > 0)
if ((gps.location & (UInt32)CardLocation.Extra) > 0)
{
myExtra.Add(curCard);
}
}
else
{
if ((gps.location & (UInt32)game_location.LOCATION_GRAVE) > 0)
if ((gps.location & (UInt32)CardLocation.Grave) > 0)
{
opGrave.Add(curCard);
}
if ((gps.location & (UInt32)game_location.LOCATION_REMOVED) > 0)
if ((gps.location & (UInt32)CardLocation.Removed) > 0)
{
opBanished.Add(curCard);
}
if ((gps.location & (UInt32)game_location.LOCATION_EXTRA) > 0)
if ((gps.location & (UInt32)CardLocation.Extra) > 0)
{
opExtra.Add(curCard);
}
......
This diff is collapsed.
......@@ -4,6 +4,8 @@ using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using UnityEngine;
using YGOSharp.OCGWrapper.Enums;
public static class UIHelper
{
[DllImport("user32")]
......@@ -980,31 +982,31 @@ public static class UIHelper
{
res += InterString.Get("对方");
}
if ((p1.location & (UInt32)game_location.LOCATION_DECK) > 0)
if ((p1.location & (UInt32)CardLocation.Deck) > 0)
{
res += InterString.Get("卡组");
}
if ((p1.location & (UInt32)game_location.LOCATION_EXTRA) > 0)
if ((p1.location & (UInt32)CardLocation.Extra) > 0)
{
res += InterString.Get("额外");
}
if ((p1.location & (UInt32)game_location.LOCATION_GRAVE) > 0)
if ((p1.location & (UInt32)CardLocation.Grave) > 0)
{
res += InterString.Get("墓地");
}
if ((p1.location & (UInt32)game_location.LOCATION_HAND) > 0)
if ((p1.location & (UInt32)CardLocation.Hand) > 0)
{
res += InterString.Get("手牌");
}
if ((p1.location & (UInt32)game_location.LOCATION_MZONE) > 0)
if ((p1.location & (UInt32)CardLocation.MonsterZone) > 0)
{
res += InterString.Get("前场");
}
if ((p1.location & (UInt32)game_location.LOCATION_REMOVED) > 0)
if ((p1.location & (UInt32)CardLocation.Removed) > 0)
{
res += InterString.Get("除外");
}
if ((p1.location & (UInt32)game_location.LOCATION_SZONE) > 0)
if ((p1.location & (UInt32)CardLocation.SpellZone) > 0)
{
res += InterString.Get("后场");
}
......@@ -1014,41 +1016,41 @@ public static class UIHelper
//internal static string getGPSstringPosition(GPS p1)
//{
// string res = "";
// if ((p1.location & (UInt32)game_location.LOCATION_OVERLAY) > 0)
// if ((p1.location & (UInt32)CardLocation.Overlay) > 0)
// {
// res += InterString.Get("(被叠放)");
// }
// else
// {
// if ((p1.position & (UInt32)game_position.POS_FACEUP_ATTACK) > 0)
// if ((p1.position & (UInt32)CardPosition.FaceUpAttack) > 0)
// {
// 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("(表侧防御)");
// }
// else if ((p1.position & (UInt32)game_position.POS_FACEDOWN_ATTACK) > 0)
// else if ((p1.position & (UInt32)CardPosition.FaceDownAttack) > 0)
// {
// 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("(里侧防御)");
// }
// else if ((p1.position & (UInt32)game_position.POS_ATTACK) > 0)
// else if ((p1.position & (UInt32)CardPosition.Attack) > 0)
// {
// 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("(防御)");
// }
// else if ((p1.position & (UInt32)game_position.POS_FACEUP) > 0)
// else if ((p1.position & (UInt32)CardPosition.FaceUp) > 0)
// {
// 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("(里侧)");
// }
......@@ -1096,4 +1098,13 @@ public static class UIHelper
foreach (Transform achild in Transforms)
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;
}
}
......@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.IO;
using UnityEngine;
using YGOSharp.OCGWrapper.Enums;
public class GameField : OCGobject
{
......@@ -90,14 +91,14 @@ public class GameField : OCGobject
Program.I().ocgcore.AddUpdateAction_s(Update);
gameHiddenButtons.Add(new gameHiddenButton(game_location.LOCATION_DECK, 0));
gameHiddenButtons.Add(new gameHiddenButton(game_location.LOCATION_EXTRA, 0));
gameHiddenButtons.Add(new gameHiddenButton(game_location.LOCATION_GRAVE, 0));
gameHiddenButtons.Add(new gameHiddenButton(game_location.LOCATION_REMOVED, 0));
gameHiddenButtons.Add(new gameHiddenButton(game_location.LOCATION_DECK, 1));
gameHiddenButtons.Add(new gameHiddenButton(game_location.LOCATION_EXTRA, 1));
gameHiddenButtons.Add(new gameHiddenButton(game_location.LOCATION_GRAVE, 1));
gameHiddenButtons.Add(new gameHiddenButton(game_location.LOCATION_REMOVED, 1));
gameHiddenButtons.Add(new gameHiddenButton(CardLocation.Deck, 0));
gameHiddenButtons.Add(new gameHiddenButton(CardLocation.Extra, 0));
gameHiddenButtons.Add(new gameHiddenButton(CardLocation.Grave, 0));
gameHiddenButtons.Add(new gameHiddenButton(CardLocation.Removed, 0));
gameHiddenButtons.Add(new gameHiddenButton(CardLocation.Deck, 1));
gameHiddenButtons.Add(new gameHiddenButton(CardLocation.Extra, 1));
gameHiddenButtons.Add(new gameHiddenButton(CardLocation.Grave, 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_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
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);
relocateTextMesh(LOCATION_DECK_0, 0, game_location.LOCATION_DECK, new Vector3(0, 0, -3f));
relocateTextMesh(LOCATION_EXTRA_0, 0, game_location.LOCATION_EXTRA, new Vector3(0, 0, -3f));
relocateTextMesh(LOCATION_REMOVED_0, 0, game_location.LOCATION_REMOVED, new Vector3(0, 0, -3f));
relocateTextMesh(LOCATION_GRAVE_0, 0, game_location.LOCATION_GRAVE, new Vector3(0, 0, -3f));
relocateTextMesh(LOCATION_DECK_0, 0, CardLocation.Deck, new Vector3(0, 0, -3f));
relocateTextMesh(LOCATION_EXTRA_0, 0, CardLocation.Extra, new Vector3(0, 0, -3f));
relocateTextMesh(LOCATION_REMOVED_0, 0, CardLocation.Removed, 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_EXTRA_1, 1, game_location.LOCATION_EXTRA, new Vector3(0, 0, -3f));
relocateTextMesh(LOCATION_REMOVED_1, 1, game_location.LOCATION_REMOVED, new Vector3(0, 0, -3f));
relocateTextMesh(LOCATION_GRAVE_1, 1, game_location.LOCATION_GRAVE, new Vector3(0, 0, -3f));
relocateTextMesh(LOCATION_DECK_1, 1, CardLocation.Deck, new Vector3(0, 0, -3f));
relocateTextMesh(LOCATION_EXTRA_1, 1, CardLocation.Extra, new Vector3(0, 0, -3f));
relocateTextMesh(LOCATION_REMOVED_1, 1, CardLocation.Removed, 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);
......@@ -277,7 +278,7 @@ public class GameField : OCGobject
prelong = isLong;
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)
{
......@@ -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
{
......@@ -610,7 +611,7 @@ public class GameField : OCGobject
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)
{
......
using System;
using UnityEngine;
using YGOSharp.OCGWrapper.Enums;
public class gameHiddenButton : OCGobject
{
public game_location location;
public CardLocation location;
public int player;
......@@ -11,7 +12,7 @@ public class gameHiddenButton : OCGobject
GPS ps;
public gameHiddenButton(game_location l, int p)
public gameHiddenButton(CardLocation l, int p)
{
ps = new GPS();
ps.controller = (UInt32)p;
......@@ -107,7 +108,7 @@ public class gameHiddenButton : OCGobject
{
if (player == 0)
{
if (location == game_location.LOCATION_DECK)
if (location == CardLocation.Deck)
{
if (Program.I().book.lab != null)
{
......@@ -120,7 +121,7 @@ public class gameHiddenButton : OCGobject
}
if (player == 1)
{
if (location == game_location.LOCATION_DECK)
if (location == CardLocation.Deck)
{
if (Program.I().book.labop != null)
{
......@@ -173,7 +174,7 @@ public class gameHiddenButton : OCGobject
{
if (player == 0)
{
if (location == game_location.LOCATION_DECK)
if (location == CardLocation.Deck)
{
if (Program.I().book.lab != null)
{
......@@ -201,7 +202,7 @@ public class gameHiddenButton : OCGobject
if (player == 1)
{
if (location == game_location.LOCATION_DECK)
if (location == CardLocation.Deck)
{
if (Program.I().book.labop != null)
{
......
This diff is collapsed.
using System;
using YGOSharp;
using YGOSharp.OCGWrapper.Enums;
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 + "[-]";
}
if (differ(card.Attribute, (int)game_attributes.ATTRIBUTE_WATER))
if (differ(card.Attribute, (int)CardAttribute.Water))
{
re = "[D1EEEE]" + re + "[-]";
}
if (differ(card.Attribute, (int)game_attributes.ATTRIBUTE_FIRE))
if (differ(card.Attribute, (int)CardAttribute.Fire))
{
re = "[F08080]" + re + "[-]";
}
if (differ(card.Attribute, (int)game_attributes.ATTRIBUTE_WIND))
if (differ(card.Attribute, (int)CardAttribute.Wind))
{
re = "[B3EE3A]" + re + "[-]";
}
if (differ(card.Attribute, (int)game_attributes.ATTRIBUTE_LIGHT))
if (differ(card.Attribute, (int)CardAttribute.Light))
{
re = "[EEEE00]" + re + "[-]";
}
if (differ(card.Attribute, (int)game_attributes.ATTRIBUTE_DARK))
if (differ(card.Attribute, (int)CardAttribute.Dark))
{
re = "[FF00FF]" + re + "[-]";
}
......@@ -182,9 +183,9 @@ public class GameStringHelper
string re = "";
try
{
if (differ(card.Type, (long)game_type.TYPE_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)game_type.TYPE_TRAP)) re += "[dda0dd]" + mainType(card.Type);
if (differ(card.Type, (long)CardType.Monster)) re += "[ff8000]" + mainType(card.Type);
else if (differ(card.Type, (long)CardType.Spell)) re += "[7FFF00]" + mainType(card.Type);
else if (differ(card.Type, (long)CardType.Trap)) re += "[dda0dd]" + mainType(card.Type);
else re += "[ff8000]" + mainType(card.Type);
re += "[-]";
}
......@@ -206,9 +207,9 @@ public class GameStringHelper
re += "[ff8000]";
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]";
}
......@@ -251,7 +252,7 @@ public class GameStringHelper
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)
{
......
......@@ -5,6 +5,7 @@ using System.Collections.Generic;
using System.IO;
using System.Threading;
using UnityEngine;
using YGOSharp.OCGWrapper.Enums;
public enum GameTextureType
{
......@@ -219,7 +220,7 @@ public class GameTextureManager
pic = waitLoadStack.Pop();
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)
{
......
......@@ -4,6 +4,7 @@ using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using YGOSharp.Network.Enums;
public class Room : WindowServantSP
{
......@@ -256,30 +257,30 @@ public class Room : WindowServantSP
p.Data = new BinaryMaster();
p.Data.writer.WriteUnicode(res, res.Length + 1);
TcpHelper.AddRecordLine(p);
switch ((YGOSharp.Network.Enums.PlayerType)player)
switch ((PlayerType)player)
{
case YGOSharp.Network.Enums.PlayerType.Red:
case PlayerType.Red:
result = "[FF3030]" + result + "[-]";
break;
case YGOSharp.Network.Enums.PlayerType.Green:
case PlayerType.Green:
result = "[7CFC00]" + result + "[-]";
break;
case YGOSharp.Network.Enums.PlayerType.Blue:
case PlayerType.Blue:
result = "[4876FF]" + result + "[-]";
break;
case YGOSharp.Network.Enums.PlayerType.BabyBlue:
case PlayerType.BabyBlue:
result = "[63B8FF]" + result + "[-]";
break;
case YGOSharp.Network.Enums.PlayerType.Pink:
case PlayerType.Pink:
result = "[EED2EE]" + result + "[-]";
break;
case YGOSharp.Network.Enums.PlayerType.Yellow:
case PlayerType.Yellow:
result = "[EEEE00]" + result + "[-]";
break;
case YGOSharp.Network.Enums.PlayerType.White:
case PlayerType.White:
result = "[FAF0E6]" + result + "[-]";
break;
case YGOSharp.Network.Enums.PlayerType.Gray:
case PlayerType.Gray:
result = "[CDC9C9]" + result + "[-]";
break;
}
......
......@@ -3,6 +3,8 @@ using System.Collections.Generic;
using System.IO;
using System.Text.RegularExpressions;
using UnityEngine;
using YGOSharp.OCGWrapper.Enums;
public class selectDeck : WindowServantSP
{
......@@ -318,15 +320,15 @@ public class selectDeck : WindowServantSP
{
mainAll++;
YGOSharp.Card c = YGOSharp.CardsManager.Get(item);
if ((c.Type & (UInt32)game_type.TYPE_MONSTER) > 0)
if ((c.Type & (UInt32)CardType.Monster) > 0)
{
mainMonster++;
}
if ((c.Type & (UInt32)game_type.TYPE_SPELL) > 0)
if ((c.Type & (UInt32)CardType.Spell) > 0)
{
mainSpell++;
}
if ((c.Type & (UInt32)game_type.TYPE_TRAP) > 0)
if ((c.Type & (UInt32)CardType.Trap) > 0)
{
mainTrap++;
}
......@@ -349,15 +351,15 @@ public class selectDeck : WindowServantSP
{
sideAll++;
YGOSharp.Card c = YGOSharp.CardsManager.Get(item);
if ((c.Type & (UInt32)game_type.TYPE_MONSTER) > 0)
if ((c.Type & (UInt32)CardType.Monster) > 0)
{
sideMonster++;
}
if ((c.Type & (UInt32)game_type.TYPE_SPELL) > 0)
if ((c.Type & (UInt32)CardType.Spell) > 0)
{
sideSpell++;
}
if ((c.Type & (UInt32)game_type.TYPE_TRAP) > 0)
if ((c.Type & (UInt32)CardType.Trap) > 0)
{
sideTrap++;
}
......@@ -379,19 +381,19 @@ public class selectDeck : WindowServantSP
{
extraAll++;
YGOSharp.Card c = YGOSharp.CardsManager.Get(item);
if ((c.Type & (UInt32)game_type.TYPE_FUSION) > 0)
if ((c.Type & (UInt32)CardType.Fusion) > 0)
{
extraFusion++;
}
if ((c.Type & (UInt32)game_type.TYPE_SYNCHRO) > 0)
if ((c.Type & (UInt32)CardType.Synchro) > 0)
{
extraSync++;
}
if ((c.Type & (UInt32)game_type.TYPE_XYZ) > 0)
if ((c.Type & (UInt32)CardType.Xyz) > 0)
{
extraXyz++;
}
if ((c.Type & (UInt32)game_type.link) > 0)
if ((c.Type & (UInt32)CardType.Link) > 0)
{
extraLink++;
}
......
......@@ -655,7 +655,7 @@ public class Servant
sp.width = 470;
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 lie = v.y;
GameObject btn = create
......
fileFormatVersion: 2
guid: ea6ed957719c1004a8fe5cb92cdce947
timeCreated: 1480605666
licenseType: Pro
guid: e66911d20963de546aa086d0b4dc28fb
timeCreated: 1554574266
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
......
......@@ -755,11 +755,11 @@ public class DeckManager : ServantWithCardDescription
}
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)))
{
returnValue |= (UInt32)CardType.Monster + (UInt32)CardType.link;
returnValue |= (UInt32)CardType.Monster + (UInt32)CardType.Link;
}
}
if (UIPopupList_main.value == GameStringManager.get_unsafe(1313))
......@@ -1308,7 +1308,7 @@ public class DeckManager : ServantWithCardDescription
{
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();
card.transform.position = card.getGoodPosition(4);
......@@ -1377,13 +1377,13 @@ public class DeckManager : ServantWithCardDescription
if (isSide)
{
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_);
......@@ -1421,13 +1421,13 @@ public class DeckManager : ServantWithCardDescription
deck.Side.Add(card.cardData.Id);
}
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);
......@@ -1496,13 +1496,13 @@ public class DeckManager : ServantWithCardDescription
default:
{
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.Deck_O.Extra.Add(code);
......@@ -1613,13 +1613,13 @@ public class DeckManager : ServantWithCardDescription
if (p.z > -8)
{
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]);
......
......@@ -100,9 +100,14 @@ namespace YGOSharp
return ((Type & (int)type) != 0);
}
public bool HasLinkMarker(CardLinkMarker dir)
{
return (rDefense & (int)dir) != 0;
}
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)
......
......@@ -4,6 +4,7 @@ using Mono.Data.Sqlite;
using System;
using System.IO;
using System.Text.RegularExpressions;
using YGOSharp.OCGWrapper.Enums;
namespace YGOSharp
{
......@@ -113,7 +114,7 @@ namespace YGOSharp
foreach (var item in _cards)
{
Card card = item.Value;
if ((card.Type & (uint)game_type.TYPE_TOKEN) == 0)
if ((card.Type & (uint)CardType.Token) == 0)
{
if (getName == ""
|| Regex.Replace(card.Name, getName,"miaowu", RegexOptions.IgnoreCase) != card.Name
......@@ -227,7 +228,7 @@ namespace YGOSharp
{
switch (getsearchCode[i])
{
case (int)OCGWrapper.Enums.searchCode.OPCODE_ADD:
case (int)searchCode.OPCODE_ADD:
if (stack.Count >= 2)
{
int rhs = stack.Pop();
......@@ -235,7 +236,7 @@ namespace YGOSharp
stack.Push(lhs + rhs);
}
break;
case (int)OCGWrapper.Enums.searchCode.OPCODE_SUB:
case (int)searchCode.OPCODE_SUB:
if (stack.Count >= 2)
{
int rhs = stack.Pop();
......@@ -243,7 +244,7 @@ namespace YGOSharp
stack.Push(lhs - rhs);
}
break;
case (int)OCGWrapper.Enums.searchCode.OPCODE_MUL:
case (int)searchCode.OPCODE_MUL:
if (stack.Count >= 2)
{
int rhs = stack.Pop();
......@@ -251,7 +252,7 @@ namespace YGOSharp
stack.Push(lhs * rhs);
}
break;
case (int)OCGWrapper.Enums.searchCode.OPCODE_DIV:
case (int)searchCode.OPCODE_DIV:
if (stack.Count >= 2)
{
int rhs = stack.Pop();
......@@ -259,7 +260,7 @@ namespace YGOSharp
stack.Push(lhs / rhs);
}
break;
case (int)OCGWrapper.Enums.searchCode.OPCODE_AND:
case (int)searchCode.OPCODE_AND:
if (stack.Count >= 2)
{
int rhs = stack.Pop();
......@@ -276,7 +277,7 @@ namespace YGOSharp
}
}
break;
case (int)OCGWrapper.Enums.searchCode.OPCODE_OR:
case (int)searchCode.OPCODE_OR:
if (stack.Count >= 2)
{
int rhs = stack.Pop();
......@@ -293,14 +294,14 @@ namespace YGOSharp
}
}
break;
case (int)OCGWrapper.Enums.searchCode.OPCODE_NEG:
case (int)searchCode.OPCODE_NEG:
if (stack.Count >= 1)
{
int rhs = stack.Pop();
stack.Push(-rhs);
}
break;
case (int)OCGWrapper.Enums.searchCode.OPCODE_NOT:
case (int)searchCode.OPCODE_NOT:
if (stack.Count >= 1)
{
int rhs = stack.Pop();
......@@ -315,7 +316,7 @@ namespace YGOSharp
}
}
break;
case (int)OCGWrapper.Enums.searchCode.OPCODE_ISCODE:
case (int)searchCode.OPCODE_ISCODE:
if (stack.Count >= 1)
{
int code = stack.Pop();
......@@ -330,7 +331,7 @@ namespace YGOSharp
}
}
break;
case (int)OCGWrapper.Enums.searchCode.OPCODE_ISSETCARD:
case (int)searchCode.OPCODE_ISSETCARD:
if (stack.Count >= 1)
{
if (IfSetCard(stack.Pop(), card.Setcode))
......@@ -343,7 +344,7 @@ namespace YGOSharp
}
}
break;
case (int)OCGWrapper.Enums.searchCode.OPCODE_ISTYPE:
case (int)searchCode.OPCODE_ISTYPE:
if (stack.Count >= 1)
{
if ((stack.Pop() & card.Type) > 0)
......@@ -356,7 +357,7 @@ namespace YGOSharp
}
}
break;
case (int)OCGWrapper.Enums.searchCode.OPCODE_ISRACE:
case (int)searchCode.OPCODE_ISRACE:
if (stack.Count >= 1)
{
if ((stack.Pop() & card.Race) > 0)
......@@ -369,7 +370,7 @@ namespace YGOSharp
}
}
break;
case (int)OCGWrapper.Enums.searchCode.OPCODE_ISATTRIBUTE:
case (int)searchCode.OPCODE_ISATTRIBUTE:
if (stack.Count >= 1)
{
if ((stack.Pop() & card.Attribute) > 0)
......@@ -390,13 +391,13 @@ namespace YGOSharp
if (stack.Count != 1 || stack.Pop() == 0)
return false;
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.Type & ((int)YGOSharp.OCGWrapper.Enums.CardType.Monster + (int)YGOSharp.OCGWrapper.Enums.CardType.Token)))
!= ((int)YGOSharp.OCGWrapper.Enums.CardType.Monster + (int)YGOSharp.OCGWrapper.Enums.CardType.Token));
&& ((card.Type & ((int)CardType.Monster + (int)CardType.Token)))
!= ((int)CardType.Monster + (int)CardType.Token));
}
public static bool IfSetCard(int setCodeToAnalyse, long setCodeFromCard)
......
......@@ -11,7 +11,7 @@
Divine = 0x40,
}
public enum Sp
public enum TwoNameCards
{
CARD_MARINE_DOLPHIN = 78734254,
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
guid: 34feabd62902b19489d8e3e2fe27d886
timeCreated: 1469113965
licenseType: Pro
guid: 15d8ac695c446594ea28abe34e500bf1
timeCreated: 1554560396
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
......
......@@ -10,6 +10,9 @@
Removed = 0x20,
Extra = 0x40,
Overlay = 0x80,
Onfield = 0x0C
Onfield = 0x0C,
Unknown = 0,
Search = 0x800
}
}
\ No newline at end of file
......@@ -12,16 +12,3 @@
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 @@
SeaSerpent = 0x40000,
Reptile = 0x80000,
Psycho = 0x100000,
DivineBeast = 0x200000
DivineBeast = 0x200000,
Wyrm = 0x800000,
Cyberse = 0x1000000
}
}
\ No newline at end of file
......@@ -25,7 +25,7 @@
Toon = 0x400000,
Xyz = 0x800000,
Pendulum = 0x1000000,
sp = 0x2000000,
link = 0x4000000,
SpSummon = 0x2000000,
Link = 0x4000000
}
}
\ No newline at end of file
......@@ -25,7 +25,7 @@
SelectSum = 23,
SelectDisfield = 24,
SortCard = 25,
SelectUnselectCard = 26,
SelectUnselect = 26,
ConfirmDecktop = 30,
ConfirmCards = 31,
ShuffleDeck = 32,
......@@ -73,7 +73,7 @@
RemoveCounter = 102,
Attack = 110,
Battle = 111,
AttackDiabled = 112,
AttackDisabled = 112,
DamageStepStart = 113,
DamageStepEnd = 114,
MissedEffect = 120,
......
fileFormatVersion: 2
guid: f327885de3e94cd4187a9a4e91544c1f
folderAsset: yes
timeCreated: 1469172510
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
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:
This diff is collapsed.
fileFormatVersion: 2
guid: c348bd288e8db2d4d8ea0455b2c6a2e1
timeCreated: 1480605661
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: 89103720b5148e84a8ebeb6a8372af4a
timeCreated: 1480605654
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
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
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?
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