Commit 21f22a05 authored by mercury233's avatar mercury233 Committed by GitHub

add basic support for cant check grave (#18)

parent 1131c2d5
......@@ -147,7 +147,11 @@ public class Book : WindowServant2D
}
}
opString += master.managedString.TrimEnd('\n');
if (master.strings.Count > 0)
if (Program.I().ocgcore.cantCheckGrave)
{
labop.text = InterString.Get("不能查看对手使用过的卡");
}
else if (master.strings.Count > 0)
{
labop.text = InterString.Get("[ff5555]对手使用过:@n[?][-]", opString);
}
......
......@@ -59,6 +59,11 @@ public class gameHiddenButton : OCGobject
void showAll()
{
if (location == CardLocation.Grave && Program.I().ocgcore.cantCheckGrave)
{
Program.I().cardDescription.RMSshow_none(InterString.Get("不能确认墓地里的卡"));
return;
}
bool allShow = true;
for (int i = 0; i < Program.I().ocgcore.cards.Count; i++) if (Program.I().ocgcore.cards[i].gameObject.activeInHierarchy)
{
......@@ -151,6 +156,10 @@ public class gameHiddenButton : OCGobject
void excite()
{
excited = true;
if (location == CardLocation.Grave && Program.I().ocgcore.cantCheckGrave)
{
return;
}
YGOSharp.Card data = null;
string tailString = "";
uint con = 0;
......
......@@ -528,6 +528,11 @@ public class Ocgcore : ServantWithCardDescription
}
if (condition == Condition.duel)
{
if (cantCheckGrave)
{
RMSshow_none(InterString.Get("不能确认墓地里的卡,无法跨越时间线!"));
return;
}
if (gameInfo.amIdanger())
{
RMSshow_none(InterString.Get("您的时间不足无法使用ReadingSteiner!"));
......@@ -712,6 +717,11 @@ public class Ocgcore : ServantWithCardDescription
void on_stop()
{
if (cantCheckGrave)
{
RMSshow_none(InterString.Get("不能确认墓地里的卡,无法跨越时间线!"));
return;
}
if (paused == false)
{
destroy(waitObject, 0, false, true);
......@@ -1204,6 +1214,7 @@ public class Ocgcore : ServantWithCardDescription
}
autoForceChainHandlerType autoForceChainHandler = autoForceChainHandlerType.manDoAll;
bool deckReserved = false;
public bool cantCheckGrave = false;
public int turns = 0;
public List<string> confirmedCards = new List<string>();
void logicalizeMessage(Package p)
......@@ -1258,6 +1269,7 @@ public class Ocgcore : ServantWithCardDescription
break;
case GameMessage.Win:
deckReserved = false;
cantCheckGrave = false;
player = localPlayer(r.ReadByte());
int winType = r.ReadByte();
keys.Insert(0, currentMessageIndex);
......@@ -1305,6 +1317,7 @@ public class Ocgcore : ServantWithCardDescription
Program.I().room.joinWithReconnect = false;
turns = 0;
deckReserved = false;
cantCheckGrave = false;
keys.Insert(0, currentMessageIndex);
RMSshow_clear();
md5Maker = 0;
......@@ -2007,6 +2020,10 @@ public class Ocgcore : ServantWithCardDescription
int ptype = r.ReadByte();
int pvalue = r.ReadInt32();
string valstring = GameStringManager.get(pvalue);
if (pvalue == 38723936)
{
valstring = InterString.Get("不能确认墓地里的卡");
}
if (ptype == 6)
{
if (controller==0)
......@@ -5287,6 +5304,21 @@ public class Ocgcore : ServantWithCardDescription
int ptype = r.ReadByte();
int pvalue = r.ReadInt32();
string valstring = GameStringManager.get(pvalue);
if (pvalue == 38723936)
{
valstring = InterString.Get("不能确认墓地里的卡");
if (player == 0)
{
if (ptype == 6)
{
clearAllShowed();
Program.I().cardDescription.setData(YGOSharp.CardsManager.Get(38723936), GameTextureManager.opBack, "", true);
cantCheckGrave = true;
}
if (ptype == 7)
cantCheckGrave = false;
}
}
if (ptype == 6)
{
if (player == 0)
......@@ -8146,6 +8178,7 @@ public class Ocgcore : ServantWithCardDescription
}
}
deckReserved = false;
cantCheckGrave = false;
surrended = false;
Program.I().room.duelEnded = false;
gameInfo.swaped = false;
......@@ -8170,6 +8203,7 @@ public class Ocgcore : ServantWithCardDescription
cardsForConfirm.Clear();
logicalClearChain();
deckReserved = false;
cantCheckGrave = false;
if (isShowed)
{
clearResponse();
......@@ -8938,7 +8972,10 @@ public class Ocgcore : ServantWithCardDescription
{
if (Program.I().setting.setting.spyer.value)
{
Program.I().cardDescription.shiftCardShower(false);
if (cantCheckGrave)
RMSshow_none(InterString.Get("不能确认墓地里的卡,监控全局卡片功能暂停使用。"));
else
Program.I().cardDescription.shiftCardShower(false);
}
if (gameInfo.queryHashedButton("hide_all_card") == true)
{
......
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