Commit 8779c0b1 authored by mercury233's avatar mercury233

implement HINT_ZONE

parent f0e9928d
...@@ -2149,6 +2149,12 @@ public class Ocgcore : ServantWithCardDescription ...@@ -2149,6 +2149,12 @@ public class Ocgcore : ServantWithCardDescription
{ {
printDuelLog(InterString.Get("卡片展示:[?]", UIHelper.getSuperName(YGOSharp.CardsManager.Get(data).Name, data))); printDuelLog(InterString.Get("卡片展示:[?]", UIHelper.getSuperName(YGOSharp.CardsManager.Get(data).Name, data)));
} }
if (type == 11)
{
if (player == 1)
data = (data >> 16) | (data << 16);
printDuelLog(InterString.Get("区域选择:[?]", GameStringHelper.zone(data)));
}
break; break;
case GameMessage.MissedEffect: case GameMessage.MissedEffect:
r.ReadInt32(); r.ReadInt32();
...@@ -2896,6 +2902,12 @@ public class Ocgcore : ServantWithCardDescription ...@@ -2896,6 +2902,12 @@ public class Ocgcore : ServantWithCardDescription
{ {
animation_show_card_code(data); animation_show_card_code(data);
} }
if (type == 11)
{
if (localPlayer(player) == 1)
data = (data >> 16) | (data << 16);
RMSshow_none(InterString.Get("区域选择:[?]", GameStringHelper.zone(data)));
}
break; break;
case GameMessage.MissedEffect: case GameMessage.MissedEffect:
break; break;
......
...@@ -77,6 +77,53 @@ public class GameStringHelper ...@@ -77,6 +77,53 @@ public class GameStringHelper
return r; return r;
} }
public static string zone(long data)
{
List<string> strs = new List<string>();
for (long filter = 0x1L; filter <= (0x1L << 32); filter <<= 1)
{
string str = "";
long s = filter & data;
if (s != 0)
{
if ((s & 0x60) != 0)
{
str += GameStringManager.get_unsafe(1081);
data &= ~0x600000;
}
else if ((s & 0xffff) != 0)
str += GameStringManager.get_unsafe(102);
else if ((s & 0xffff0000) != 0)
{
str += GameStringManager.get_unsafe(103);
s >>= 16;
}
if ((s & 0x1f) != 0)
str += GameStringManager.get_unsafe(1002);
else if ((s & 0xff00) != 0)
{
s >>= 8;
if ((s & 0x1f) != 0)
str += GameStringManager.get_unsafe(1003);
else if ((s & 0x20) != 0)
str += GameStringManager.get_unsafe(1008);
else if ((s & 0xc0) != 0)
str += GameStringManager.get_unsafe(1009);
}
int seq = 1;
for (int i = 0x1; i < 0x100; i <<= 1)
{
if ((s & i) != 0)
break;
++seq;
}
str += "(" + seq.ToString() + ")";
strs.Add(str);
}
}
return String.Join(", ", strs.ToArray());
}
public static string mainType(long a) public static string mainType(long a)
{ {
string r = ""; string r = "";
......
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