Commit ffb143dc authored by mercury233's avatar mercury233 Committed by Unicorn369

refactor enums

parent d8033b10
......@@ -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("(里侧)");
// }
......
......@@ -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
{
public static string fen = "/";
......@@ -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,7 +5,8 @@ using System.Collections.Generic;
using System.IO;
using System.Threading;
using UnityEngine;
using YGOSharp.OCGWrapper.Enums;
public enum GameTextureType
{
card_picture = 0,
......@@ -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;
}
......
......@@ -109,11 +109,6 @@ public class RoomList : WindowServantSP
string portString = UIHelper.getByName<UIInput>(Program.I().selectServer.gameObject, "port_").value;
string pswString = roomPsw;
string versionString = UIHelper.getByName<UIInput>(Program.I().selectServer.gameObject, "version_").value;
if (versionString == "")
{
UIHelper.getByName<UIInput>(Program.I().selectServer.gameObject, "version_").value = "0x1349";
versionString = "0x1349";
}
Program.I().roomList.hide();
Program.I().selectServer.KF_onlineGame(Name, ipString, portString, versionString, pswString);
}
......
......@@ -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++;
}
......
......@@ -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]);
......
......@@ -4,7 +4,8 @@ using Mono.Data.Sqlite;
using System;
using System.IO;
using System.Text.RegularExpressions;
using YGOSharp.OCGWrapper.Enums;
namespace YGOSharp
{
internal static class CardsManager
......@@ -117,7 +118,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
......@@ -231,7 +232,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();
......@@ -239,7 +240,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();
......@@ -247,7 +248,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();
......@@ -255,7 +256,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();
......@@ -263,7 +264,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();
......@@ -280,7 +281,7 @@ namespace YGOSharp
}
}
break;
case (int)OCGWrapper.Enums.searchCode.OPCODE_OR:
case (int)searchCode.OPCODE_OR:
if (stack.Count >= 2)
{
int rhs = stack.Pop();
......@@ -297,14 +298,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();
......@@ -319,7 +320,7 @@ namespace YGOSharp
}
}
break;
case (int)OCGWrapper.Enums.searchCode.OPCODE_ISCODE:
case (int)searchCode.OPCODE_ISCODE:
if (stack.Count >= 1)
{
int code = stack.Pop();
......@@ -334,7 +335,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))
......@@ -347,7 +348,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)
......@@ -360,7 +361,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)
......@@ -373,7 +374,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)
......@@ -394,13 +395,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,
......
......@@ -10,6 +10,9 @@
Removed = 0x20,
Extra = 0x40,
Overlay = 0x80,
Onfield = 0x0C
Onfield = 0x0C,
Unknown = 0,
Search = 0x800
}
}
\ No newline at end of file
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
fileFormatVersion: 2
guid: ea6ed957719c1004a8fe5cb92cdce947
timeCreated: 1480605666
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
//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: 34feabd62902b19489d8e3e2fe27d886
timeCreated: 1469113965
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
......@@ -10,30 +10,30 @@
// 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 += "神";
// if (differ(a, (long)CardAttribute.Earth)) r += "地";
// if (differ(a, (long)CardAttribute.Water)) r += "水";
// if (differ(a, (long)CardAttribute.Fire)) r += "炎";
// if (differ(a, (long)CardAttribute.Wind)) r += "风";
// if (differ(a, (long)CardAttribute.Dark)) r += "暗";
// if (differ(a, (long)CardAttribute.Light)) r += "光";
// if (differ(a, (long)CardAttribute.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 += "陷阱卡";
// if (differ(a, (long)CardType.Monster)) r += "怪物卡";
// if (differ(a, (long)CardType.Spell)) r += "魔法卡";
// if (differ(a, (long)CardType.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 += "陷阱卡";
// if (differ(a, (long)CardType.Monster)) r += "怪物卡";
// if (differ(a, (long)CardType.Spell)) r += "魔法卡";
// if (differ(a, (long)CardType.Trap)) r += "陷阱卡";
// return r;
// }
// public static string get_race_string(long a)
......@@ -79,25 +79,25 @@
// }
// switch (p.location)
// {
// case game_location.LOCATION_DECK:
// case CardLocation.Deck:
// re += "卡组中的";
// break;
// case game_location.LOCATION_EXTRA:
// case CardLocation.Extra:
// re += "额外卡组中的";
// break;
// case game_location.LOCATION_GRAVE:
// case CardLocation.Grave:
// re += "墓地中的";
// break;
// case game_location.LOCATION_HAND:
// case CardLocation.Hand:
// re += "手上的";
// break;
// case game_location.LOCATION_MZONE:
// case CardLocation.MonsterZone:
// re += "前场的";
// break;
// case game_location.LOCATION_REMOVED:
// case CardLocation.Hand:
// re += "被除外的";
// break;
// case game_location.LOCATION_SZONE:
// case CardLocation.SpellZone:
// re += "后场的";
// break;
// }
......@@ -108,28 +108,28 @@
// }
// switch (p.position)
// {
// case game_position.POS_FACEDOWN_ATTACK:
// case CardPosition.FaceDownAttack:
// re += "(里攻)";
// break;
// case game_position.POS_FACEDOWN_DEFENSE:
// case CardPosition.FaceDown_DEFENSE:
// re += "(里守)";
// break;
// case game_position.POS_FACEUP_ATTACK:
// case CardPosition.FaceUpAttack:
// re += "(表攻)";
// break;
// case game_position.POS_FACEUP_DEFENSE:
// case CardPosition.FaceUp_DEFENSE:
// re += "(表守)";
// break;
// }
// if (p.location == game_location.LOCATION_UNKNOWN) re = "(未知区域)";
// if (p.location == CardLocation.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;
// if (differ(data.Type, (long)CardType.Monster)) re += "[ff8000]"+data.Name;
// else if (differ(data.Type, (long)CardType.Spell)) re += "[7FFF00]" + data.Name;
// else if (differ(data.Type, (long)CardType.Trap)) re += "[dda0dd]" + data.Name;
// else re += "[ff8000]" + data.Name;
// re += "[-]";
// return re;
......
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