Commit c55ce9f7 authored by mercury233's avatar mercury233

new Qliphort deck

parent 9b18ffdc
#created by ...
#main
65518099
65518099
65518099
13073850
13073850
90885155
37991342
37991342
91907707
91907707
53129443
59750328
59750328
59750328
79816536
79816536
79816536
98645731
98645731
17639150
44095762
44095762
44095762
53582587
53582587
53582587
83326048
83326048
83326048
94192409
94192409
5851097
82732705
82732705
82732705
40605147
40605147
40605147
99188141
99188141
#extra
13331639
13331639
13331639
79229522
79229522
79229522
26268488
26268488
26268488
35952884
35952884
35952884
23187256
23187256
23187256
!side
...@@ -131,6 +131,27 @@ namespace WindBot.Game.AI ...@@ -131,6 +131,27 @@ namespace WindBot.Game.AI
return GetOneEnnemyBetterThanValue(attack, true); return GetOneEnnemyBetterThanValue(attack, true);
} }
public ClientCard GetProblematicMonsterCard(int attack = 0)
{
ClientCard card = Duel.Fields[1].MonsterZone.GetInvincibleMonster();
if (card != null)
return card;
card = Duel.Fields[1].MonsterZone.GetFloodgate();
if (card != null)
return card;
if (attack == 0)
attack = GetBestAttack(Duel.Fields[0], true);
return GetOneEnnemyBetterThanValue(attack, true);
}
public ClientCard GetProblematicSpellCard()
{
ClientCard card = Duel.Fields[1].SpellZone.GetNegateAttackSpell();
if (card != null)
return card;
card = Duel.Fields[1].SpellZone.GetFloodgate();
return card;
}
public int GetStringId(int id, int option) public int GetStringId(int id, int option)
{ {
......
...@@ -24,5 +24,15 @@ namespace WindBot.Game.AI ...@@ -24,5 +24,15 @@ namespace WindBot.Game.AI
{ {
return Enum.IsDefined(typeof(Floodgate), card.Id); return Enum.IsDefined(typeof(Floodgate), card.Id);
} }
public static bool IsOneForXyz(this ClientCard card)
{
return Enum.IsDefined(typeof(OneForXyz), card.Id);
}
public static bool IsFusionSpell(this ClientCard card)
{
return Enum.IsDefined(typeof(FusionSpell), card.Id);
}
} }
} }
\ No newline at end of file
This diff is collapsed.
...@@ -85,7 +85,7 @@ namespace DevBot.Game.AI.Decks ...@@ -85,7 +85,7 @@ namespace DevBot.Game.AI.Decks
// Useful spells // Useful spells
AddExecutor(ExecutorType.Activate, (int)CardId.二重召唤, 二重召唤效果); AddExecutor(ExecutorType.Activate, (int)CardId.二重召唤, 二重召唤效果);
AddExecutor(ExecutorType.Activate, (int)CardId.超量组件); AddExecutor(ExecutorType.Activate, (int)CardId.超量组件, 超量组件效果);
AddExecutor(ExecutorType.Activate, (int)CardId.超量苏生, 超量苏生效果); AddExecutor(ExecutorType.Activate, (int)CardId.超量苏生, 超量苏生效果);
...@@ -347,6 +347,12 @@ namespace DevBot.Game.AI.Decks ...@@ -347,6 +347,12 @@ namespace DevBot.Game.AI.Decks
return true; return true;
} }
private bool 超量组件效果()
{
List<ClientCard> monsters = Duel.Fields[0].GetMonsters();
return monsters.Exists(p => p.HasType(CardType.Xyz));
}
private bool 重装机甲装甲车龙效果() private bool 重装机甲装甲车龙效果()
{ {
ClientCard target = AI.Utils.GetProblematicCard(); ClientCard target = AI.Utils.GetProblematicCard();
......
...@@ -108,6 +108,29 @@ namespace WindBot.Game.AI ...@@ -108,6 +108,29 @@ namespace WindBot.Game.AI
return false; return false;
} }
protected bool DefaultCompulsoryEvacuationDevice()
{
ClientCard target = AI.Utils.GetProblematicMonsterCard();
if (target != null)
{
AI.SelectCard(target);
return true;
}
foreach (ClientCard card in Duel.ChainTargets)
{
if (Card.Equals(card))
{
List<ClientCard> monsters = Duel.Fields[1].GetMonsters();
foreach (ClientCard monster in monsters)
{
AI.SelectCard(monster);
return true;
}
}
}
return false;
}
protected bool DefaultCallOfTheHaunted() protected bool DefaultCallOfTheHaunted()
{ {
if (!AI.Utils.IsEnnemyBetter(true, true)) if (!AI.Utils.IsEnnemyBetter(true, true))
...@@ -158,6 +181,13 @@ namespace WindBot.Game.AI ...@@ -158,6 +181,13 @@ namespace WindBot.Game.AI
protected bool DefaultTributeSummon() protected bool DefaultTributeSummon()
{ {
foreach (ClientCard card in Duel.Fields[0].SpellZone)
{
if (card != null &&
card.Id == Card.Id &&
card.HasPosition(CardPosition.FaceUp))
return false;
}
int tributecount = (int)Math.Ceiling((Card.Level - 4.0d) / 2.0d); int tributecount = (int)Math.Ceiling((Card.Level - 4.0d) / 2.0d);
for (int j = 0; j < 5; ++j) for (int j = 0; j < 5; ++j)
{ {
...@@ -222,5 +252,87 @@ namespace WindBot.Game.AI ...@@ -222,5 +252,87 @@ namespace WindBot.Game.AI
return true; return true;
return false; return false;
} }
protected bool DefaultDimensionalBarrier()
{
if (Duel.Player != 0)
{
List<ClientCard> monsters = Duel.Fields[1].GetMonsters();
int[] levels = new int[13];
bool tuner = false;
bool nontuner = false;
foreach (ClientCard monster in monsters)
{
if (monster.HasType(CardType.Tuner))
tuner = true;
else if (!monster.HasType(CardType.Xyz))
nontuner = true;
if (monster.IsOneForXyz())
{
AI.SelectOption(3);
return true;
}
levels[monster.Level] = levels[monster.Level] + 1;
}
if (tuner && nontuner)
{
AI.SelectOption(2);
return true;
}
for (int i=1; i<=12; i++)
{
if (levels[i]>1)
{
AI.SelectOption(3);
return true;
}
}
ClientCard l = Duel.Fields[1].SpellZone[6];
ClientCard r = Duel.Fields[1].SpellZone[7];
if (l != null && r != null && l.LScale != r.RScale)
{
AI.SelectOption(4);
return true;
}
}
ClientCard lastchaincard = GetLastChainCard();
if (LastChainPlayer == 1 && lastchaincard != null && !lastchaincard.IsDisabled())
{
if (lastchaincard.HasType(CardType.Ritual))
{
AI.SelectOption(0);
return true;
}
if (lastchaincard.HasType(CardType.Fusion))
{
AI.SelectOption(1);
return true;
}
if (lastchaincard.HasType(CardType.Synchro))
{
AI.SelectOption(2);
return true;
}
if (lastchaincard.HasType(CardType.Xyz))
{
AI.SelectOption(3);
return true;
}
if (lastchaincard.IsFusionSpell())
{
AI.SelectOption(1);
return true;
}
}
foreach (ClientCard card in Duel.ChainTargets)
{
if (Card.Equals(card))
{
AI.SelectOption(3);
return true;
}
}
return false;
}
} }
} }
namespace WindBot.Game.AI.Enums
{
public enum FusionSpell
{
GemKnightFusion = 1264319,
TheEyeofTimaeus = 1784686,
InstantFusion = 1845204,
OverloadFusion = 3659803,
FrightfurFusion = 6077601,
RedEyesFusion = 6172122,
Ostinato = 9113513,
DarkCalling = 12071500,
VehicroidConnectionZone = 23299957,
Polymerization = 24094653,
MiracleSynchroFusion = 36484016,
PowerBond = 37630732,
ParticleFusion = 39261576,
NeutronBlast = 43845801,
ShaddollFusion = 44394295,
TheTerminusoftheBurningAbyss = 44771289,
MiracleFusion = 45906428,
OddEyesFusion = 48144509,
ParallelWorldFusion = 54283059,
PendulumFusion = 65646587,
AbsorbFusion = 71422989,
DragonsMirror = 71490127,
MetalfoesFusion = 73594093,
EidolonSummoningMagic = 74063034,
FusionSubstitute = 74335036,
TranscendentalPolymerization = 76647978,
CyberdarkImpact = 80033124,
DarkFusion = 94820406,
TheBookoftheLaw = 458748,
ElShaddollFusion = 6417578,
FlashFusion = 17236839,
FullmetalfoesFusion = 39564736,
DestructionSwordsmanFusion = 41940225,
SuperPolymerization = 48130397,
CyberneticFusionSupport = 58199906,
BrilliantFusion = 7394770,
ForbiddenDarkContractwiththeSwampKing = 10833828,
Fortissimo = 11493868,
VoidImagination = 31444249,
FrightfurFactory = 43698897,
DarkContractwiththeSwampKing = 73360025,
NepheShaddollFusion = 60226558,
FusionGate = 33550694
}
}
namespace WindBot.Game.AI.Enums
{
public enum OneForXyz
{
ZoodiacThoroughblade = 77150143,
ZoodiacViper = 31755044,
ZoodiacCluckle = 20155904,
ZoodiacRabbina = 4367330,
ZoodiacRam = 4145852,
ZoodiacMarmorat = 78872731,
ZoodiacTigress = 11510448,
ZoodiacHammerkong = 14970113,
ZoodiacLyca = 41375811,
ZoodiacDrancia = 48905153,
ZoodiacBoarbow = 74393852,
ZoodiacBroadbull = 85115440,
Number62 = 31801517,
GalaxyEyesCipherDragon = 18963306,
Number107 = 88177324,
CyberDragonNova = 58069384,
Number39 = 84013237
}
}
...@@ -22,6 +22,8 @@ namespace WindBot.Game ...@@ -22,6 +22,8 @@ namespace WindBot.Game
public int Race { get; private set; } public int Race { get; private set; }
public int Attack { get; private set; } public int Attack { get; private set; }
public int Defense { get; private set; } public int Defense { get; private set; }
public int LScale { get; private set; }
public int RScale { get; private set; }
public int BaseAttack { get; private set; } public int BaseAttack { get; private set; }
public int BaseDefense { get; private set; } public int BaseDefense { get; private set; }
public int RealPower { get; set; } public int RealPower { get; set; }
...@@ -125,9 +127,9 @@ namespace WindBot.Game ...@@ -125,9 +127,9 @@ namespace WindBot.Game
if ((flag & (int)Query.IsPublic) != 0) if ((flag & (int)Query.IsPublic) != 0)
packet.ReadInt32(); packet.ReadInt32();
if ((flag & (int)Query.LScale) != 0) if ((flag & (int)Query.LScale) != 0)
packet.ReadInt32(); LScale = packet.ReadInt32();
if ((flag & (int)Query.RScale) != 0) if ((flag & (int)Query.RScale) != 0)
packet.ReadInt32(); RScale = packet.ReadInt32();
} }
public bool HasType(CardType type) public bool HasType(CardType type)
......
...@@ -325,7 +325,7 @@ namespace WindBot.Game ...@@ -325,7 +325,7 @@ namespace WindBot.Game
/// <returns>Index of the selected option.</returns> /// <returns>Index of the selected option.</returns>
public int OnSelectOption(IList<int> options) public int OnSelectOption(IList<int> options)
{ {
if (m_option != -1) if (m_option != -1 && m_option < options.Count)
return m_option; return m_option;
int result = Executor.OnSelectOption(options); int result = Executor.OnSelectOption(options);
......
...@@ -70,6 +70,7 @@ ...@@ -70,6 +70,7 @@
<Compile Include="Game\AI\Decks\EvilswarmExecutor.cs" /> <Compile Include="Game\AI\Decks\EvilswarmExecutor.cs" />
<Compile Include="Game\AI\Decks\GraydleExecutor.cs" /> <Compile Include="Game\AI\Decks\GraydleExecutor.cs" />
<Compile Include="Game\AI\Decks\LightswornExecutor.cs" /> <Compile Include="Game\AI\Decks\LightswornExecutor.cs" />
<Compile Include="Game\AI\Decks\QliphortExecutor.cs" />
<Compile Include="Game\AI\Decks\YosenjuExecutor.cs" /> <Compile Include="Game\AI\Decks\YosenjuExecutor.cs" />
<Compile Include="Game\AI\Decks\DragunityExecutor.cs" /> <Compile Include="Game\AI\Decks\DragunityExecutor.cs" />
<Compile Include="Game\AI\Decks\FrogExecutor.cs" /> <Compile Include="Game\AI\Decks\FrogExecutor.cs" />
...@@ -82,6 +83,8 @@ ...@@ -82,6 +83,8 @@
<Compile Include="Game\AI\DefaultExecutor.cs" /> <Compile Include="Game\AI\DefaultExecutor.cs" />
<Compile Include="Game\AI\Dialogs.cs" /> <Compile Include="Game\AI\Dialogs.cs" />
<Compile Include="Game\AI\Enums\DangerousMonster.cs" /> <Compile Include="Game\AI\Enums\DangerousMonster.cs" />
<Compile Include="Game\AI\Enums\FusionSpell.cs" />
<Compile Include="Game\AI\Enums\OneForXyz.cs" />
<Compile Include="Game\AI\Enums\InvincibleMonster.cs" /> <Compile Include="Game\AI\Enums\InvincibleMonster.cs" />
<Compile Include="Game\AI\Enums\Floodgate.cs" /> <Compile Include="Game\AI\Enums\Floodgate.cs" />
<Compile Include="Game\AI\Enums\NegateAttackSpell.cs" /> <Compile Include="Game\AI\Enums\NegateAttackSpell.cs" />
......
...@@ -57,12 +57,12 @@ ...@@ -57,12 +57,12 @@
}, },
{ {
"name": "尼亚", "name": "尼亚",
"deck": "Yosenju", "deck": "Qliphort",
"dialog": "near.zh-CN" "dialog": "near.zh-CN"
}, },
{ {
"name": "尼亚", "name": "尼亚",
"deck": "Yosenju", "deck": "Qliphort",
"dialog": "near.zh-CN" "dialog": "near.zh-CN"
}, },
{ {
......
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