Commit 6e28da11 authored by mercury233's avatar mercury233

update HintMsg

parent f193f1f9
......@@ -2762,7 +2762,7 @@ namespace WindBot.Game.AI.Decks
Logger.DebugWriteLine("EvenlyMatched: min=" + min.ToString() + ", max=" + max.ToString());
}
else if (cards[0].Location == CardLocation.Hand && cards[cards.Count - 1].Location == CardLocation.Hand
&& (hint == HintMsg.HINTMSG_DISCARD || hint == HintMsg.HINTMSG_TOGRAVE) && min == max)
&& (hint == HintMsg.Discard || hint == HintMsg.ToGrave) && min == max)
{
if (Duel.LastChainPlayer == 0 && Util.GetLastChainCard().IsCode(CardId.OneForOne)) return null;
Logger.DebugWriteLine("Hand drop except OneForOne");
......
......@@ -67,8 +67,8 @@ namespace WindBot.Game.AI.Decks
public List<int> REMOVE_HINTMSG = new List<int>
{
HintMsg.HINTMSG_RELEASE, HintMsg.HINTMSG_DESTROY, HintMsg.HINTMSG_REMOVE, HintMsg.HINTMSG_TOGRAVE,
HintMsg.HINTMSG_RTOHAND, HintMsg.HINTMSG_TODECK, HintMsg.HINTMSG_DISABLE
HintMsg.Release, HintMsg.Destroy, HintMsg.Remove, HintMsg.ToGrave,
HintMsg.ReturnToHand, HintMsg.ToDeck, HintMsg.Disable
};
public override IList<ClientCard> OnSelectCard(IList<ClientCard> _cards, int min, int max, int hint, bool cancelable)
......
......@@ -310,7 +310,7 @@ namespace WindBot.Game.AI.Decks
public override IList<ClientCard> OnSelectCard(IList<ClientCard> cards, int min, int max, int hint, bool cancelable)
{
// Patronus
if (hint == HintMsg.HINTMSG_ATOHAND)
if (hint == HintMsg.AddToHand)
{
bool flag = true;
foreach(ClientCard card in cards)
......@@ -335,7 +335,7 @@ namespace WindBot.Game.AI.Decks
}
}
// MaxxC solution
if (hint == HintMsg.HINTMSG_SPSUMMON && enemy_activate_MaxxC)
if (hint == HintMsg.SpSummon && enemy_activate_MaxxC)
{
// check whether SS from deck while using effect
bool flag = true;
......@@ -393,7 +393,7 @@ namespace WindBot.Game.AI.Decks
}
}
// MadameVerre
if (hint == HintMsg.HINTMSG_CONFIRM)
if (hint == HintMsg.Confirm)
{
Logger.DebugWriteLine("** min-max: " + min.ToString() + " / " + max.ToString());
foreach (ClientCard card in cards)
......
......@@ -2,61 +2,61 @@
{
public static class HintMsg
{
public const int HINTMSG_RELEASE = 500,
HINTMSG_DISCARD = 501,
HINTMSG_DESTROY = 502,
HINTMSG_REMOVE = 503,
HINTMSG_TOGRAVE = 504,
HINTMSG_RTOHAND = 505,
HINTMSG_ATOHAND = 506,
HINTMSG_TODECK = 507,
HINTMSG_SUMMON = 508,
HINTMSG_SPSUMMON = 509,
HINTMSG_SET = 510,
HINTMSG_FMATERIAL = 511,
HINTMSG_SMATERIAL = 512,
HINTMSG_XMATERIAL = 513,
HINTMSG_FACEUP = 514,
HINTMSG_FACEDOWN = 515,
HINTMSG_ATTACK = 516,
HINTMSG_DEFENSE = 517,
HINTMSG_EQUIP = 518,
HINTMSG_REMOVEXYZ = 519,
HINTMSG_CONTROL = 520,
HINTMSG_DESREPLACE = 521,
HINTMSG_FACEUPATTACK = 522,
HINTMSG_FACEUPDEFENSE = 523,
HINTMSG_FACEDOWNATTACK = 524,
HINTMSG_FACEDOWNDEFENSE = 525,
HINTMSG_CONFIRM = 526,
HINTMSG_TOFIELD = 527,
HINTMSG_POSCHANGE = 528,
HINTMSG_SELF = 529,
HINTMSG_OPPO = 530,
HINTMSG_TRIBUTE = 531,
HINTMSG_DEATTACHFROM = 532,
HINTMSG_LMATERIAL = 533,
HINTMSG_ATTACKTARGET = 549,
HINTMSG_EFFECT = 550,
HINTMSG_TARGET = 551,
HINTMSG_COIN = 552,
HINTMSG_DICE = 553,
HINTMSG_CARDTYPE = 554,
HINTMSG_OPTION = 555,
HINTMSG_RESOLVEEFFECT = 556,
HINTMSG_SELECT = 560,
HINTMSG_POSITION = 561,
HINTMSG_ATTRIBUTE = 562,
HINTMSG_RACE = 563,
HINTMSG_CODE = 564,
HINGMSG_NUMBER = 565,
HINGMSG_LVRANK = 567,
HINTMSG_RESOLVECARD = 568,
HINTMSG_ZONE = 569,
HINTMSG_DISABLEZONE = 570,
HINTMSG_TOZONE = 571,
HINTMSG_COUNTER = 572,
HINTMSG_DISABLE = 573,
HINTMSG_OPERATECARD = 574;
public const int Release = 500,
Discard = 501,
Destroy = 502,
Remove = 503,
ToGrave = 504,
ReturnToHand = 505,
AddToHand = 506,
ToDeck = 507,
Summon = 508,
SpSummon = 509,
Set = 510,
FusionMaterial = 511,
SynchroMaterial = 512,
XyzMaterial = 513,
Faceup = 514,
Facedown = 515,
Attack = 516,
Defense = 517,
Equip = 518,
RemoveXyz = 519,
Control = 520,
DestroyReplace = 521,
FaceupAttack = 522,
FaceupDefense = 523,
FacedownAttack = 524,
FacedownDefense = 525,
Confirm = 526,
ToField = 527,
PosChange = 528,
Self = 529,
Oppo = 530,
Tribute = 531,
DeattachFrom = 532,
LinkMaterial = 533,
AttackTarget = 549,
Effect = 550,
Target = 551,
Coin = 552,
Dice = 553,
CardType = 554,
Option = 555,
ResolveEffect = 556,
Select = 560,
Position = 561,
Attribute = 562,
Race = 563,
Code = 564,
Number = 565,
LvRank = 567,
ResolveCard = 568,
Zone = 569,
DisableZone = 570,
ToZone = 571,
Counter = 572,
Disable = 573,
OperateCard = 574;
}
}
\ No newline at end of file
......@@ -231,18 +231,12 @@ namespace WindBot.Game
/// <returns>A new list containing the selected cards.</returns>
public IList<ClientCard> OnSelectCard(IList<ClientCard> cards, int min, int max, int hint, bool cancelable)
{
const int HINTMSG_FMATERIAL = 511;
const int HINTMSG_SMATERIAL = 512;
const int HINTMSG_XMATERIAL = 513;
const int HINTMSG_LMATERIAL = 533;
const int HINTMSG_SPSUMMON = 509;
// Check for the executor.
IList<ClientCard> result = Executor.OnSelectCard(cards, min, max, hint, cancelable);
if (result != null)
return result;
if (hint == HINTMSG_SPSUMMON && min == 1 && max > min) // pendulum summon
if (hint == HintMsg.SpSummon && min == 1 && max > min) // pendulum summon
{
result = Executor.OnSelectPendulumSummon(cards, max);
if (result != null)
......@@ -250,7 +244,7 @@ namespace WindBot.Game
}
CardSelector selector = null;
if (hint == HINTMSG_FMATERIAL || hint == HINTMSG_SMATERIAL || hint == HINTMSG_XMATERIAL || hint == HINTMSG_LMATERIAL)
if (hint == HintMsg.FusionMaterial || hint == HintMsg.SynchroMaterial || hint == HintMsg.XyzMaterial || hint == HintMsg.LinkMaterial)
{
if (m_materialSelector != null)
{
......@@ -259,13 +253,13 @@ namespace WindBot.Game
}
else
{
if (hint == HINTMSG_FMATERIAL)
if (hint == HintMsg.FusionMaterial)
result = Executor.OnSelectFusionMaterial(cards, min, max);
if (hint == HINTMSG_SMATERIAL)
if (hint == HintMsg.SynchroMaterial)
result = Executor.OnSelectSynchroMaterial(cards, 0, min, max);
if (hint == HINTMSG_XMATERIAL)
if (hint == HintMsg.XyzMaterial)
result = Executor.OnSelectXyzMaterial(cards, min, max);
if (hint == HINTMSG_LMATERIAL)
if (hint == HintMsg.LinkMaterial)
result = Executor.OnSelectLinkMaterial(cards, min, max);
if (result != null)
......@@ -533,16 +527,13 @@ namespace WindBot.Game
/// <returns></returns>
public IList<ClientCard> OnSelectSum(IList<ClientCard> cards, int sum, int min, int max, int hint, bool mode)
{
const int HINTMSG_RELEASE = 500;
const int HINTMSG_SMATERIAL = 512;
IList<ClientCard> selected = Executor.OnSelectSum(cards, sum, min, max, hint, mode);
if (selected != null)
{
return selected;
}
if (hint == HINTMSG_RELEASE || hint == HINTMSG_SMATERIAL)
if (hint == HintMsg.Release || hint == HintMsg.SynchroMaterial)
{
if (m_materialSelector != null)
{
......@@ -552,10 +543,10 @@ namespace WindBot.Game
{
switch (hint)
{
case HINTMSG_SMATERIAL:
case HintMsg.SynchroMaterial:
selected = Executor.OnSelectSynchroMaterial(cards, sum, min, max);
break;
case HINTMSG_RELEASE:
case HintMsg.Release:
selected = Executor.OnSelectRitualTribute(cards, sum, min, max);
break;
}
......
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