Commit c50fa397 authored by mercury233's avatar mercury233 Committed by nanahira

implement HINT_ZONE

parent 1392ada4
......@@ -2173,6 +2173,12 @@ public class Ocgcore : ServantWithCardDescription
{
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;
case GameMessage.MissedEffect:
r.ReadInt32();
......@@ -2919,6 +2925,12 @@ public class Ocgcore : ServantWithCardDescription
{
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;
case GameMessage.MissedEffect:
break;
......
......@@ -77,6 +77,53 @@ public class GameStringHelper
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)
{
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