Commit 6e28da11 authored by mercury233's avatar mercury233

update HintMsg

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