Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
W
windbot
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alstroemeria-silentlove
windbot
Commits
ddbdbd85
Commit
ddbdbd85
authored
Aug 17, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ennemy -> enemy
parent
811e3d61
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
81 additions
and
81 deletions
+81
-81
Game/AI/AIFunctions.cs
Game/AI/AIFunctions.cs
+18
-18
Game/AI/Decks/BlueEyesExecutor.cs
Game/AI/Decks/BlueEyesExecutor.cs
+6
-6
Game/AI/Decks/CyberDragonExecutor.cs
Game/AI/Decks/CyberDragonExecutor.cs
+4
-4
Game/AI/Decks/DragunityExecutor.cs
Game/AI/Decks/DragunityExecutor.cs
+2
-2
Game/AI/Decks/FrogExecutor.cs
Game/AI/Decks/FrogExecutor.cs
+8
-8
Game/AI/Decks/GravekeeperExecutor.cs
Game/AI/Decks/GravekeeperExecutor.cs
+1
-1
Game/AI/Decks/HorusExecutor.cs
Game/AI/Decks/HorusExecutor.cs
+1
-1
Game/AI/Decks/LightswornExecutor.cs
Game/AI/Decks/LightswornExecutor.cs
+2
-2
Game/AI/Decks/NekrozExecutor.cs
Game/AI/Decks/NekrozExecutor.cs
+9
-9
Game/AI/Decks/OldSchoolExecutor.cs
Game/AI/Decks/OldSchoolExecutor.cs
+1
-1
Game/AI/Decks/RainbowExecutor.cs
Game/AI/Decks/RainbowExecutor.cs
+7
-7
Game/AI/Decks/Rank5Executor.cs
Game/AI/Decks/Rank5Executor.cs
+3
-3
Game/AI/Decks/ToadallyAwesomeExecutor.cs
Game/AI/Decks/ToadallyAwesomeExecutor.cs
+5
-5
Game/AI/Decks/YosenjuExecutor.cs
Game/AI/Decks/YosenjuExecutor.cs
+1
-1
Game/AI/Decks/ZexalWeaponsExecutor.cs
Game/AI/Decks/ZexalWeaponsExecutor.cs
+1
-1
Game/AI/Decks/ZoodiacExecutor.cs
Game/AI/Decks/ZoodiacExecutor.cs
+2
-2
Game/AI/DefaultExecutor.cs
Game/AI/DefaultExecutor.cs
+9
-9
Game/GameAI.cs
Game/GameAI.cs
+1
-1
No files found.
Game/AI/AIFunctions.cs
View file @
ddbdbd85
...
@@ -46,14 +46,14 @@ namespace WindBot.Game.AI
...
@@ -46,14 +46,14 @@ namespace WindBot.Game.AI
ClientCard
card
=
field
.
MonsterZone
[
i
];
ClientCard
card
=
field
.
MonsterZone
[
i
];
if
(
card
==
null
)
continue
;
if
(
card
==
null
)
continue
;
if
(
onlyatk
&&
card
.
IsDefense
())
continue
;
if
(
onlyatk
&&
card
.
IsDefense
())
continue
;
int
en
n
emyValue
=
card
.
GetDefensePower
();
int
enemyValue
=
card
.
GetDefensePower
();
if
(
en
n
emyValue
>
bestAtk
)
if
(
enemyValue
>
bestAtk
)
bestAtk
=
en
n
emyValue
;
bestAtk
=
enemyValue
;
}
}
return
bestAtk
;
return
bestAtk
;
}
}
public
bool
IsEn
n
emyBetter
(
bool
onlyatk
,
bool
all
)
public
bool
IsEnemyBetter
(
bool
onlyatk
,
bool
all
)
{
{
if
(
Duel
.
Fields
[
1
].
GetMonsterCount
()
==
0
)
if
(
Duel
.
Fields
[
1
].
GetMonsterCount
()
==
0
)
return
false
;
return
false
;
...
@@ -63,11 +63,11 @@ namespace WindBot.Game.AI
...
@@ -63,11 +63,11 @@ namespace WindBot.Game.AI
if
(
monsters
.
Count
>
0
)
if
(
monsters
.
Count
>
0
)
bestAtk
=
monsters
[
monsters
.
Count
-
1
].
Attack
;
bestAtk
=
monsters
[
monsters
.
Count
-
1
].
Attack
;
if
(
all
)
if
(
all
)
return
IsAllEn
n
emyBetterThanValue
(
bestAtk
,
onlyatk
);
return
IsAllEnemyBetterThanValue
(
bestAtk
,
onlyatk
);
return
IsOneEn
n
emyBetterThanValue
(
bestAtk
,
onlyatk
);
return
IsOneEnemyBetterThanValue
(
bestAtk
,
onlyatk
);
}
}
public
bool
IsOneEn
n
emyBetterThanValue
(
int
value
,
bool
onlyatk
)
public
bool
IsOneEnemyBetterThanValue
(
int
value
,
bool
onlyatk
)
{
{
int
bestValue
=
-
1
;
int
bestValue
=
-
1
;
bool
nomonster
=
true
;
bool
nomonster
=
true
;
...
@@ -77,15 +77,15 @@ namespace WindBot.Game.AI
...
@@ -77,15 +77,15 @@ namespace WindBot.Game.AI
if
(
card
==
null
)
continue
;
if
(
card
==
null
)
continue
;
if
(
onlyatk
&&
card
.
IsDefense
())
continue
;
if
(
onlyatk
&&
card
.
IsDefense
())
continue
;
nomonster
=
false
;
nomonster
=
false
;
int
en
n
emyValue
=
card
.
GetDefensePower
();
int
enemyValue
=
card
.
GetDefensePower
();
if
(
en
n
emyValue
>
bestValue
)
if
(
enemyValue
>
bestValue
)
bestValue
=
en
n
emyValue
;
bestValue
=
enemyValue
;
}
}
if
(
nomonster
)
return
false
;
if
(
nomonster
)
return
false
;
return
bestValue
>
value
;
return
bestValue
>
value
;
}
}
public
bool
IsAllEn
n
emyBetterThanValue
(
int
value
,
bool
onlyatk
)
public
bool
IsAllEnemyBetterThanValue
(
int
value
,
bool
onlyatk
)
{
{
bool
nomonster
=
true
;
bool
nomonster
=
true
;
for
(
int
i
=
0
;
i
<
7
;
++
i
)
for
(
int
i
=
0
;
i
<
7
;
++
i
)
...
@@ -94,22 +94,22 @@ namespace WindBot.Game.AI
...
@@ -94,22 +94,22 @@ namespace WindBot.Game.AI
if
(
card
==
null
||
card
.
Data
==
null
)
continue
;
if
(
card
==
null
||
card
.
Data
==
null
)
continue
;
if
(
onlyatk
&&
card
.
IsDefense
())
continue
;
if
(
onlyatk
&&
card
.
IsDefense
())
continue
;
nomonster
=
false
;
nomonster
=
false
;
int
en
n
emyValue
=
card
.
GetDefensePower
();
int
enemyValue
=
card
.
GetDefensePower
();
if
(
en
n
emyValue
<=
value
)
if
(
enemyValue
<=
value
)
return
false
;
return
false
;
}
}
return
!
nomonster
;
return
!
nomonster
;
}
}
public
ClientCard
GetOneEn
n
emyBetterThanValue
(
int
value
,
bool
onlyatk
)
public
ClientCard
GetOneEnemyBetterThanValue
(
int
value
,
bool
onlyatk
)
{
{
for
(
int
i
=
0
;
i
<
7
;
++
i
)
for
(
int
i
=
0
;
i
<
7
;
++
i
)
{
{
ClientCard
card
=
Duel
.
Fields
[
1
].
MonsterZone
[
i
];
ClientCard
card
=
Duel
.
Fields
[
1
].
MonsterZone
[
i
];
if
(
card
==
null
)
continue
;
if
(
card
==
null
)
continue
;
if
(
onlyatk
&&
card
.
IsDefense
())
continue
;
if
(
onlyatk
&&
card
.
IsDefense
())
continue
;
int
en
n
emyValue
=
card
.
GetDefensePower
();
int
enemyValue
=
card
.
GetDefensePower
();
if
(
en
n
emyValue
>=
value
)
if
(
enemyValue
>=
value
)
return
card
;
return
card
;
}
}
return
null
;
return
null
;
...
@@ -128,7 +128,7 @@ namespace WindBot.Game.AI
...
@@ -128,7 +128,7 @@ namespace WindBot.Game.AI
return
card
;
return
card
;
if
(
attack
==
0
)
if
(
attack
==
0
)
attack
=
GetBestAttack
(
Duel
.
Fields
[
0
],
true
);
attack
=
GetBestAttack
(
Duel
.
Fields
[
0
],
true
);
return
GetOneEn
n
emyBetterThanValue
(
attack
,
true
);
return
GetOneEnemyBetterThanValue
(
attack
,
true
);
}
}
public
ClientCard
GetProblematicMonsterCard
(
int
attack
=
0
)
public
ClientCard
GetProblematicMonsterCard
(
int
attack
=
0
)
...
@@ -141,7 +141,7 @@ namespace WindBot.Game.AI
...
@@ -141,7 +141,7 @@ namespace WindBot.Game.AI
return
card
;
return
card
;
if
(
attack
==
0
)
if
(
attack
==
0
)
attack
=
GetBestAttack
(
Duel
.
Fields
[
0
],
true
);
attack
=
GetBestAttack
(
Duel
.
Fields
[
0
],
true
);
return
GetOneEn
n
emyBetterThanValue
(
attack
,
true
);
return
GetOneEnemyBetterThanValue
(
attack
,
true
);
}
}
public
ClientCard
GetProblematicSpellCard
()
public
ClientCard
GetProblematicSpellCard
()
...
...
Game/AI/Decks/BlueEyesExecutor.cs
View file @
ddbdbd85
...
@@ -430,7 +430,7 @@ namespace MycardBot.Game.AI.Decks
...
@@ -430,7 +430,7 @@ namespace MycardBot.Game.AI.Decks
使用过的青眼亚白龙
.
Add
(
Card
);
使用过的青眼亚白龙
.
Add
(
Card
);
return
true
;
return
true
;
}
}
card
=
AI
.
Utils
.
GetOneEn
n
emyBetterThanValue
(
Card
.
GetDefensePower
(),
false
);
card
=
AI
.
Utils
.
GetOneEnemyBetterThanValue
(
Card
.
GetDefensePower
(),
false
);
if
(
card
!=
null
)
if
(
card
!=
null
)
{
{
Logger
.
DebugWriteLine
(
"炸比自己强的怪."
);
Logger
.
DebugWriteLine
(
"炸比自己强的怪."
);
...
@@ -771,7 +771,7 @@ namespace MycardBot.Game.AI.Decks
...
@@ -771,7 +771,7 @@ namespace MycardBot.Game.AI.Decks
Logger
.
DebugWriteLine
(
"先攻不叠银河眼,叠银河巨神."
);
Logger
.
DebugWriteLine
(
"先攻不叠银河眼,叠银河巨神."
);
return
false
;
return
false
;
}
}
if
(
AI
.
Utils
.
IsOneEn
n
emyBetterThanValue
(
2999
,
false
))
if
(
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
2999
,
false
))
{
{
Logger
.
DebugWriteLine
(
"有高攻怪兽,出银河眼."
);
Logger
.
DebugWriteLine
(
"有高攻怪兽,出银河眼."
);
return
true
;
return
true
;
...
@@ -797,7 +797,7 @@ namespace MycardBot.Game.AI.Decks
...
@@ -797,7 +797,7 @@ namespace MycardBot.Game.AI.Decks
}
}
if
(
Duel
.
Fields
[
0
].
HasInMonstersZone
((
int
)
CardId
.
银河眼光子龙皇
))
if
(
Duel
.
Fields
[
0
].
HasInMonstersZone
((
int
)
CardId
.
银河眼光子龙皇
))
{
{
if
(!
AI
.
Utils
.
IsOneEn
n
emyBetterThanValue
(
4000
,
false
))
if
(!
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
4000
,
false
))
{
{
Logger
.
DebugWriteLine
(
"没有高攻怪兽,出重铠."
);
Logger
.
DebugWriteLine
(
"没有高攻怪兽,出重铠."
);
AI
.
SelectCard
((
int
)
CardId
.
银河眼光子龙皇
);
AI
.
SelectCard
((
int
)
CardId
.
银河眼光子龙皇
);
...
@@ -1122,13 +1122,13 @@ namespace MycardBot.Game.AI.Decks
...
@@ -1122,13 +1122,13 @@ namespace MycardBot.Game.AI.Decks
private
bool
改变攻守表示
()
private
bool
改变攻守表示
()
{
{
bool
en
nemyBetter
=
AI
.
Utils
.
IsEn
nemyBetter
(
true
,
true
);
bool
en
emyBetter
=
AI
.
Utils
.
IsE
nemyBetter
(
true
,
true
);
if
(
Card
.
IsAttack
()
&&
en
n
emyBetter
)
if
(
Card
.
IsAttack
()
&&
enemyBetter
)
return
true
;
return
true
;
if
(
Card
.
IsFacedown
())
if
(
Card
.
IsFacedown
())
return
true
;
return
true
;
if
(
Card
.
IsDefense
()
&&
!
en
n
emyBetter
&&
Card
.
Attack
>=
Card
.
Defense
)
if
(
Card
.
IsDefense
()
&&
!
enemyBetter
&&
Card
.
Attack
>=
Card
.
Defense
)
return
true
;
return
true
;
if
(
Card
.
IsDefense
()
&&
(
if
(
Card
.
IsDefense
()
&&
(
Card
.
Id
==
(
int
)
CardId
.
青眼精灵龙
Card
.
Id
==
(
int
)
CardId
.
青眼精灵龙
...
...
Game/AI/Decks/CyberDragonExecutor.cs
View file @
ddbdbd85
...
@@ -127,7 +127,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -127,7 +127,7 @@ namespace WindBot.Game.AI.Decks
private
bool
进化光焰
()
private
bool
进化光焰
()
{
{
if
(!
AI
.
Utils
.
IsOneEn
n
emyBetterThanValue
(
Bot
.
MonsterZone
.
GetHighestAttackMonster
().
Attack
,
false
))
if
(!
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
Bot
.
MonsterZone
.
GetHighestAttackMonster
().
Attack
,
false
))
return
false
;
return
false
;
else
else
AI
.
SelectCard
(
Duel
.
Fields
[
1
].
MonsterZone
.
GetHighestAttackMonster
());
AI
.
SelectCard
(
Duel
.
Fields
[
1
].
MonsterZone
.
GetHighestAttackMonster
());
...
@@ -143,7 +143,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -143,7 +143,7 @@ namespace WindBot.Game.AI.Decks
private
bool
装甲电子翼
()
private
bool
装甲电子翼
()
{
{
if
(
CyberDragonInHand
()
&&
(
Bot
.
GetMonsterCount
()
==
0
&&
Duel
.
Fields
[
1
].
GetMonsterCount
()
!=
0
)
||
(
Bot
.
HasInHand
((
int
)
CardId
.
电子龙三型
)
||
Bot
.
HasInHand
((
int
)
CardId
.
电子凤凰
))
&&
!
AI
.
Utils
.
IsOneEn
n
emyBetterThanValue
(
1800
,
true
))
if
(
CyberDragonInHand
()
&&
(
Bot
.
GetMonsterCount
()
==
0
&&
Duel
.
Fields
[
1
].
GetMonsterCount
()
!=
0
)
||
(
Bot
.
HasInHand
((
int
)
CardId
.
电子龙三型
)
||
Bot
.
HasInHand
((
int
)
CardId
.
电子凤凰
))
&&
!
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
1800
,
true
))
return
false
;
return
false
;
return
true
;
return
true
;
}
}
...
@@ -152,7 +152,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -152,7 +152,7 @@ namespace WindBot.Game.AI.Decks
{
{
if
(
Bot
.
GetCountCardInZone
(
Bot
.
Hand
,
(
int
)
CardId
.
电子龙
)
+
Bot
.
GetCountCardInZone
(
Bot
.
MonsterZone
,
(
int
)
CardId
.
电子龙
)
+
Bot
.
GetCountCardInZone
(
Bot
.
MonsterZone
,
(
int
)
CardId
.
电子龙核
)
>=
1
&&
Bot
.
HasInHand
((
int
)
CardId
.
融合
)
||
Bot
.
GetCountCardInZone
(
Bot
.
Hand
,
(
int
)
CardId
.
电子龙
)
+
Bot
.
GetCountCardInZone
(
Bot
.
MonsterZone
,
(
int
)
CardId
.
电子龙
)
+
Bot
.
GetCountCardInZone
(
Bot
.
Graveyard
,
(
int
)
CardId
.
电子龙
)
+
Bot
.
GetCountCardInZone
(
Bot
.
Graveyard
,
(
int
)
CardId
.
电子龙核
)
>=
1
&&
Bot
.
HasInHand
((
int
)
CardId
.
力量结合
))
if
(
Bot
.
GetCountCardInZone
(
Bot
.
Hand
,
(
int
)
CardId
.
电子龙
)
+
Bot
.
GetCountCardInZone
(
Bot
.
MonsterZone
,
(
int
)
CardId
.
电子龙
)
+
Bot
.
GetCountCardInZone
(
Bot
.
MonsterZone
,
(
int
)
CardId
.
电子龙核
)
>=
1
&&
Bot
.
HasInHand
((
int
)
CardId
.
融合
)
||
Bot
.
GetCountCardInZone
(
Bot
.
Hand
,
(
int
)
CardId
.
电子龙
)
+
Bot
.
GetCountCardInZone
(
Bot
.
MonsterZone
,
(
int
)
CardId
.
电子龙
)
+
Bot
.
GetCountCardInZone
(
Bot
.
Graveyard
,
(
int
)
CardId
.
电子龙
)
+
Bot
.
GetCountCardInZone
(
Bot
.
Graveyard
,
(
int
)
CardId
.
电子龙核
)
>=
1
&&
Bot
.
HasInHand
((
int
)
CardId
.
力量结合
))
return
true
;
return
true
;
if
(
CyberDragonInHand
()
&&
(
Bot
.
GetMonsterCount
()
==
0
&&
Duel
.
Fields
[
1
].
GetMonsterCount
()
!=
0
)
||
(
Bot
.
HasInHand
((
int
)
CardId
.
电子龙三型
)
||
Bot
.
HasInHand
((
int
)
CardId
.
电子凤凰
))
&&
!
AI
.
Utils
.
IsOneEn
n
emyBetterThanValue
(
1800
,
true
))
if
(
CyberDragonInHand
()
&&
(
Bot
.
GetMonsterCount
()
==
0
&&
Duel
.
Fields
[
1
].
GetMonsterCount
()
!=
0
)
||
(
Bot
.
HasInHand
((
int
)
CardId
.
电子龙三型
)
||
Bot
.
HasInHand
((
int
)
CardId
.
电子凤凰
))
&&
!
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
1800
,
true
))
return
false
;
return
false
;
return
true
;
return
true
;
}
}
...
@@ -168,7 +168,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -168,7 +168,7 @@ namespace WindBot.Game.AI.Decks
return
true
;
return
true
;
else
if
(
Card
.
Location
==
CardLocation
.
SpellZone
)
else
if
(
Card
.
Location
==
CardLocation
.
SpellZone
)
{
{
if
(
AI
.
Utils
.
IsOneEn
n
emyBetterThanValue
(
Bot
.
GetMonsters
().
GetHighestAttackMonster
().
Attack
,
true
))
if
(
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
Bot
.
GetMonsters
().
GetHighestAttackMonster
().
Attack
,
true
))
if
(
ActivateDescription
==
AI
.
Utils
.
GetStringId
((
int
)
CardId
.
装甲电子翼
,
2
))
if
(
ActivateDescription
==
AI
.
Utils
.
GetStringId
((
int
)
CardId
.
装甲电子翼
,
2
))
return
true
;
return
true
;
return
false
;
return
false
;
...
...
Game/AI/Decks/DragunityExecutor.cs
View file @
ddbdbd85
...
@@ -344,7 +344,7 @@ namespace DevBot.Game.AI.Decks
...
@@ -344,7 +344,7 @@ namespace DevBot.Game.AI.Decks
private
bool
ScrapDragonSummon
()
private
bool
ScrapDragonSummon
()
{
{
//if (AI.Utils.IsOneEn
n
emyBetterThanValue(2500, true))
//if (AI.Utils.IsOneEnemyBetterThanValue(2500, true))
// return true;
// return true;
ClientCard
invincible
=
GetProblematicCard
();
ClientCard
invincible
=
GetProblematicCard
();
return
invincible
!=
null
;
return
invincible
!=
null
;
...
@@ -353,7 +353,7 @@ namespace DevBot.Game.AI.Decks
...
@@ -353,7 +353,7 @@ namespace DevBot.Game.AI.Decks
private
bool
ScrapDragonEffect
()
private
bool
ScrapDragonEffect
()
{
{
ClientCard
invincible
=
GetProblematicCard
();
ClientCard
invincible
=
GetProblematicCard
();
if
(
invincible
==
null
&&
!
AI
.
Utils
.
IsOneEn
n
emyBetterThanValue
(
2800
-
1
,
false
))
if
(
invincible
==
null
&&
!
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
2800
-
1
,
false
))
return
false
;
return
false
;
ClientField
field
=
Duel
.
Fields
[
0
];
ClientField
field
=
Duel
.
Fields
[
0
];
...
...
Game/AI/Decks/FrogExecutor.cs
View file @
ddbdbd85
...
@@ -95,7 +95,7 @@ namespace DevBot.Game.AI.Decks
...
@@ -95,7 +95,7 @@ namespace DevBot.Game.AI.Decks
private
bool
SwapFrogSummon
()
private
bool
SwapFrogSummon
()
{
{
int
atk
=
Card
.
Attack
+
GetSpellBonus
();
int
atk
=
Card
.
Attack
+
GetSpellBonus
();
if
(
AI
.
Utils
.
IsAllEn
n
emyBetterThanValue
(
atk
,
true
))
if
(
AI
.
Utils
.
IsAllEnemyBetterThanValue
(
atk
,
true
))
return
false
;
return
false
;
AI
.
SelectCard
((
int
)
CardId
.
Ronintoadin
);
AI
.
SelectCard
((
int
)
CardId
.
Ronintoadin
);
...
@@ -152,7 +152,7 @@ namespace DevBot.Game.AI.Decks
...
@@ -152,7 +152,7 @@ namespace DevBot.Game.AI.Decks
{
{
int
atk
=
Card
.
Attack
+
GetSpellBonus
();
int
atk
=
Card
.
Attack
+
GetSpellBonus
();
if
(
AI
.
Utils
.
IsOneEn
n
emyBetterThanValue
(
atk
,
true
))
if
(
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
atk
,
true
))
return
false
;
return
false
;
if
(
Card
.
Id
==
(
int
)
CardId
.
SwapFrog
)
if
(
Card
.
Id
==
(
int
)
CardId
.
SwapFrog
)
...
@@ -164,7 +164,7 @@ namespace DevBot.Game.AI.Decks
...
@@ -164,7 +164,7 @@ namespace DevBot.Game.AI.Decks
{
{
List
<
int
>
cards
=
new
List
<
int
>();
List
<
int
>
cards
=
new
List
<
int
>();
if
(
AI
.
Utils
.
IsEn
n
emyBetter
(
false
,
false
))
if
(
AI
.
Utils
.
IsEnemyBetter
(
false
,
false
))
{
{
cards
.
Add
((
int
)
CardId
.
FlipFlopFrog
);
cards
.
Add
((
int
)
CardId
.
FlipFlopFrog
);
}
}
...
@@ -190,7 +190,7 @@ namespace DevBot.Game.AI.Decks
...
@@ -190,7 +190,7 @@ namespace DevBot.Game.AI.Decks
private
bool
DarkHole
()
private
bool
DarkHole
()
{
{
return
AI
.
Utils
.
IsEn
n
emyBetter
(
false
,
false
);
return
AI
.
Utils
.
IsEnemyBetter
(
false
,
false
);
}
}
private
bool
Terraforming
()
private
bool
Terraforming
()
...
@@ -226,13 +226,13 @@ namespace DevBot.Game.AI.Decks
...
@@ -226,13 +226,13 @@ namespace DevBot.Game.AI.Decks
if
(
Card
.
Id
==
(
int
)
CardId
.
DewdarkOfTheIceBarrier
)
if
(
Card
.
Id
==
(
int
)
CardId
.
DewdarkOfTheIceBarrier
)
return
Card
.
IsDefense
();
return
Card
.
IsDefense
();
bool
en
nemyBetter
=
AI
.
Utils
.
IsOneEn
nemyBetterThanValue
(
Card
.
Attack
+
(
Card
.
IsFacedown
()
?
GetSpellBonus
()
:
0
),
true
);
bool
en
emyBetter
=
AI
.
Utils
.
IsOneE
nemyBetterThanValue
(
Card
.
Attack
+
(
Card
.
IsFacedown
()
?
GetSpellBonus
()
:
0
),
true
);
if
(
Card
.
Attack
<
800
)
if
(
Card
.
Attack
<
800
)
en
n
emyBetter
=
true
;
enemyBetter
=
true
;
bool
result
=
false
;
bool
result
=
false
;
if
(
Card
.
IsAttack
()
&&
en
n
emyBetter
)
if
(
Card
.
IsAttack
()
&&
enemyBetter
)
result
=
true
;
result
=
true
;
if
(
Card
.
IsDefense
()
&&
!
en
n
emyBetter
)
if
(
Card
.
IsDefense
()
&&
!
enemyBetter
)
result
=
true
;
result
=
true
;
if
(!
result
&&
Card
.
Id
==
(
int
)
CardId
.
FlipFlopFrog
&&
Duel
.
Fields
[
1
].
GetMonsterCount
()
>
0
&&
Card
.
IsFacedown
())
if
(!
result
&&
Card
.
Id
==
(
int
)
CardId
.
FlipFlopFrog
&&
Duel
.
Fields
[
1
].
GetMonsterCount
()
>
0
&&
Card
.
IsFacedown
())
...
...
Game/AI/Decks/GravekeeperExecutor.cs
View file @
ddbdbd85
...
@@ -127,7 +127,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -127,7 +127,7 @@ namespace WindBot.Game.AI.Decks
private
bool
守墓的末裔
()
private
bool
守墓的末裔
()
{
{
int
bestatk
=
Duel
.
Fields
[
0
].
GetMonsters
().
GetHighestAttackMonster
().
Attack
;
int
bestatk
=
Duel
.
Fields
[
0
].
GetMonsters
().
GetHighestAttackMonster
().
Attack
;
if
(
AI
.
Utils
.
IsOneEn
n
emyBetterThanValue
(
bestatk
,
true
))
if
(
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
bestatk
,
true
))
{
{
AI
.
SelectCard
(
Duel
.
Fields
[
1
].
GetMonsters
().
GetHighestAttackMonster
());
AI
.
SelectCard
(
Duel
.
Fields
[
1
].
GetMonsters
().
GetHighestAttackMonster
());
return
true
;
return
true
;
...
...
Game/AI/Decks/HorusExecutor.cs
View file @
ddbdbd85
...
@@ -147,7 +147,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -147,7 +147,7 @@ namespace WindBot.Game.AI.Decks
private
bool
WhiteNightDragon
()
private
bool
WhiteNightDragon
()
{
{
// We should summon Horus the Black Flame Dragon LV6 if he can lvlup.
// We should summon Horus the Black Flame Dragon LV6 if he can lvlup.
if
(
Duel
.
Fields
[
1
].
GetMonsterCount
()
!=
0
&&
!
AI
.
Utils
.
IsAllEn
n
emyBetterThanValue
(
2300
-
1
,
false
))
if
(
Duel
.
Fields
[
1
].
GetMonsterCount
()
!=
0
&&
!
AI
.
Utils
.
IsAllEnemyBetterThanValue
(
2300
-
1
,
false
))
foreach
(
ClientCard
card
in
Main
.
SummonableCards
)
foreach
(
ClientCard
card
in
Main
.
SummonableCards
)
if
(
card
.
Id
==
11224103
)
if
(
card
.
Id
==
11224103
)
return
false
;
return
false
;
...
...
Game/AI/Decks/LightswornExecutor.cs
View file @
ddbdbd85
...
@@ -291,7 +291,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -291,7 +291,7 @@ namespace WindBot.Game.AI.Decks
private
bool
辉光子帕拉迪奥斯效果
()
private
bool
辉光子帕拉迪奥斯效果
()
{
{
ClientCard
result
=
AI
.
Utils
.
GetOneEn
n
emyBetterThanValue
(
2000
,
true
);
ClientCard
result
=
AI
.
Utils
.
GetOneEnemyBetterThanValue
(
2000
,
true
);
if
(
result
!=
null
)
if
(
result
!=
null
)
{
{
AI
.
SelectNextCard
(
result
);
AI
.
SelectNextCard
(
result
);
...
@@ -302,7 +302,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -302,7 +302,7 @@ namespace WindBot.Game.AI.Decks
private
bool
电光皇特殊召唤
()
private
bool
电光皇特殊召唤
()
{
{
return
AI
.
Utils
.
IsEn
n
emyBetter
(
false
,
false
);
return
AI
.
Utils
.
IsEnemyBetter
(
false
,
false
);
}
}
}
}
}
}
\ No newline at end of file
Game/AI/Decks/NekrozExecutor.cs
View file @
ddbdbd85
...
@@ -156,14 +156,14 @@ namespace WindBot.Game.AI.Decks
...
@@ -156,14 +156,14 @@ namespace WindBot.Game.AI.Decks
private
bool
三叉龙之影灵衣
()
private
bool
三叉龙之影灵衣
()
{
{
if
(
AI
.
Utils
.
IsAllEn
n
emyBetterThanValue
(
2700
,
true
)
&&
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
决战兵器之影灵衣
))
if
(
AI
.
Utils
.
IsAllEnemyBetterThanValue
(
2700
,
true
)
&&
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
决战兵器之影灵衣
))
return
false
;
return
false
;
return
true
;
return
true
;
}
}
private
bool
决战兵器之影灵衣
()
private
bool
决战兵器之影灵衣
()
{
{
if
(
AI
.
Utils
.
IsAllEn
n
emyBetterThanValue
(
3300
,
true
))
if
(
AI
.
Utils
.
IsAllEnemyBetterThanValue
(
3300
,
true
))
{
{
AI
.
SelectCard
((
int
)
CardId
.
决战兵器之影灵衣
);
AI
.
SelectCard
((
int
)
CardId
.
决战兵器之影灵衣
);
return
true
;
return
true
;
...
@@ -173,7 +173,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -173,7 +173,7 @@ namespace WindBot.Game.AI.Decks
private
bool
励辉士入魔蝇王
()
private
bool
励辉士入魔蝇王
()
{
{
if
(
AI
.
Utils
.
IsAllEn
n
emyBetterThanValue
(
Duel
.
Fields
[
0
].
GetMonsters
().
GetHighestAttackMonster
().
Attack
,
true
))
if
(
AI
.
Utils
.
IsAllEnemyBetterThanValue
(
Duel
.
Fields
[
0
].
GetMonsters
().
GetHighestAttackMonster
().
Attack
,
true
))
{
{
return
true
;
return
true
;
}
}
...
@@ -189,7 +189,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -189,7 +189,7 @@ namespace WindBot.Game.AI.Decks
private
bool
天枪龙之影灵衣
()
private
bool
天枪龙之影灵衣
()
{
{
if
(
AI
.
Utils
.
IsOneEn
n
emyBetterThanValue
(
Duel
.
Fields
[
0
].
GetMonsters
().
GetHighestAttackMonster
().
Attack
,
true
)
&&
Duel
.
Phase
==
DuelPhase
.
Main1
)
if
(
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
Duel
.
Fields
[
0
].
GetMonsters
().
GetHighestAttackMonster
().
Attack
,
true
)
&&
Duel
.
Phase
==
DuelPhase
.
Main1
)
{
{
AI
.
SelectCard
(
Duel
.
Fields
[
1
].
GetMonsters
().
GetHighestAttackMonster
());
AI
.
SelectCard
(
Duel
.
Fields
[
1
].
GetMonsters
().
GetHighestAttackMonster
());
return
true
;
return
true
;
...
@@ -209,12 +209,12 @@ namespace WindBot.Game.AI.Decks
...
@@ -209,12 +209,12 @@ namespace WindBot.Game.AI.Decks
AI
.
SelectCard
((
int
)
CardId
.
影灵衣的降魔镜
);
AI
.
SelectCard
((
int
)
CardId
.
影灵衣的降魔镜
);
return
true
;
return
true
;
}
}
else
if
(
AI
.
Utils
.
IsOneEn
n
emyBetterThanValue
(
3300
,
true
)
&&
!
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
三叉龙之影灵衣
))
else
if
(
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
3300
,
true
)
&&
!
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
三叉龙之影灵衣
))
{
{
AI
.
SelectCard
((
int
)
CardId
.
三叉龙之影灵衣
);
AI
.
SelectCard
((
int
)
CardId
.
三叉龙之影灵衣
);
return
true
;
return
true
;
}
}
else
if
(
AI
.
Utils
.
IsAllEn
n
emyBetterThanValue
(
2700
,
true
)
&&
!
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
决战兵器之影灵衣
))
else
if
(
AI
.
Utils
.
IsAllEnemyBetterThanValue
(
2700
,
true
)
&&
!
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
决战兵器之影灵衣
))
{
{
AI
.
SelectCard
((
int
)
CardId
.
决战兵器之影灵衣
);
AI
.
SelectCard
((
int
)
CardId
.
决战兵器之影灵衣
);
return
true
;
return
true
;
...
@@ -234,12 +234,12 @@ namespace WindBot.Game.AI.Decks
...
@@ -234,12 +234,12 @@ namespace WindBot.Game.AI.Decks
private
bool
千手神效果
()
private
bool
千手神效果
()
{
{
if
(
AI
.
Utils
.
IsOneEn
n
emyBetterThanValue
(
3300
,
true
)
&&
!
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
三叉龙之影灵衣
))
if
(
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
3300
,
true
)
&&
!
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
三叉龙之影灵衣
))
{
{
AI
.
SelectCard
((
int
)
CardId
.
三叉龙之影灵衣
);
AI
.
SelectCard
((
int
)
CardId
.
三叉龙之影灵衣
);
return
true
;
return
true
;
}
}
else
if
(
AI
.
Utils
.
IsAllEn
n
emyBetterThanValue
(
2700
,
true
)
&&
!
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
决战兵器之影灵衣
))
else
if
(
AI
.
Utils
.
IsAllEnemyBetterThanValue
(
2700
,
true
)
&&
!
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
决战兵器之影灵衣
))
{
{
AI
.
SelectCard
((
int
)
CardId
.
决战兵器之影灵衣
);
AI
.
SelectCard
((
int
)
CardId
.
决战兵器之影灵衣
);
return
true
;
return
true
;
...
@@ -290,7 +290,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -290,7 +290,7 @@ namespace WindBot.Game.AI.Decks
foreach
(
int
Id
in
NekrozCard
)
foreach
(
int
Id
in
NekrozCard
)
{
{
if
(
Id
==
(
int
)
CardId
.
三叉龙之影灵衣
&&
AI
.
Utils
.
IsAllEn
n
emyBetterThanValue
(
2700
,
true
)
&&
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
决战兵器之影灵衣
))
if
(
Id
==
(
int
)
CardId
.
三叉龙之影灵衣
&&
AI
.
Utils
.
IsAllEnemyBetterThanValue
(
2700
,
true
)
&&
Duel
.
Fields
[
0
].
HasInHand
((
int
)
CardId
.
决战兵器之影灵衣
))
{
{
AI
.
SelectCard
((
int
)
CardId
.
三叉龙之影灵衣
);
AI
.
SelectCard
((
int
)
CardId
.
三叉龙之影灵衣
);
return
true
;
return
true
;
...
...
Game/AI/Decks/OldSchoolExecutor.cs
View file @
ddbdbd85
...
@@ -85,7 +85,7 @@
...
@@ -85,7 +85,7 @@
if
(
handCard
.
IsFacedown
())
if
(
handCard
.
IsFacedown
())
return
true
;
return
true
;
}
}
return
AI
.
Utils
.
IsEn
n
emyBetter
(
true
,
false
);
return
AI
.
Utils
.
IsEnemyBetter
(
true
,
false
);
}
}
}
}
}
}
\ No newline at end of file
Game/AI/Decks/RainbowExecutor.cs
View file @
ddbdbd85
...
@@ -390,7 +390,7 @@ namespace MycardBot.Game.AI.Decks
...
@@ -390,7 +390,7 @@ namespace MycardBot.Game.AI.Decks
private
bool
No37
希望织龙蜘蛛鲨特殊召唤
()
private
bool
No37
希望织龙蜘蛛鲨特殊召唤
()
{
{
return
AI
.
Utils
.
IsAllEn
nemyBetterThanValue
(
1700
,
false
)
&&
!
AI
.
Utils
.
IsOneEn
nemyBetterThanValue
(
3600
,
true
);
return
AI
.
Utils
.
IsAllEn
emyBetterThanValue
(
1700
,
false
)
&&
!
AI
.
Utils
.
IsOneE
nemyBetterThanValue
(
3600
,
true
);
}
}
private
bool
电光千鸟特殊召唤
()
private
bool
电光千鸟特殊召唤
()
...
@@ -424,7 +424,7 @@ namespace MycardBot.Game.AI.Decks
...
@@ -424,7 +424,7 @@ namespace MycardBot.Game.AI.Decks
private
bool
星尘龙特殊召唤
()
private
bool
星尘龙特殊召唤
()
{
{
return
(
AI
.
Utils
.
IsEn
nemyBetter
(
false
,
false
)
&&
!
AI
.
Utils
.
IsOneEn
nemyBetterThanValue
(
2400
,
true
))
||
AI
.
Utils
.
IsTurn1OrMain2
();
return
(
AI
.
Utils
.
IsEn
emyBetter
(
false
,
false
)
&&
!
AI
.
Utils
.
IsOneE
nemyBetterThanValue
(
2400
,
true
))
||
AI
.
Utils
.
IsTurn1OrMain2
();
}
}
private
bool
星尘龙效果
()
private
bool
星尘龙效果
()
...
@@ -434,7 +434,7 @@ namespace MycardBot.Game.AI.Decks
...
@@ -434,7 +434,7 @@ namespace MycardBot.Game.AI.Decks
private
bool
进化帝半鸟龙特殊召唤
()
private
bool
进化帝半鸟龙特殊召唤
()
{
{
return
(
AI
.
Utils
.
IsAllEn
nemyBetterThanValue
(
1700
,
false
)
&&
!
AI
.
Utils
.
IsOneEn
nemyBetterThanValue
(
2400
,
true
))
||
AI
.
Utils
.
IsTurn1OrMain2
();
return
(
AI
.
Utils
.
IsAllEn
emyBetterThanValue
(
1700
,
false
)
&&
!
AI
.
Utils
.
IsOneE
nemyBetterThanValue
(
2400
,
true
))
||
AI
.
Utils
.
IsTurn1OrMain2
();
}
}
private
bool
入魔梦魇骑士特殊召唤
()
private
bool
入魔梦魇骑士特殊召唤
()
...
@@ -460,7 +460,7 @@ namespace MycardBot.Game.AI.Decks
...
@@ -460,7 +460,7 @@ namespace MycardBot.Game.AI.Decks
private
bool
No59
背反之料理人特殊召唤
()
private
bool
No59
背反之料理人特殊召唤
()
{
{
return
((
Duel
.
Fields
[
0
].
GetMonsterCount
()
+
Duel
.
Fields
[
0
].
GetSpellCount
()
-
2
)
<=
1
)
&&
return
((
Duel
.
Fields
[
0
].
GetMonsterCount
()
+
Duel
.
Fields
[
0
].
GetSpellCount
()
-
2
)
<=
1
)
&&
((
AI
.
Utils
.
IsEn
nemyBetter
(
false
,
false
)
&&
!
AI
.
Utils
.
IsOneEn
nemyBetterThanValue
(
2300
,
true
))
||
AI
.
Utils
.
IsTurn1OrMain2
());
((
AI
.
Utils
.
IsEn
emyBetter
(
false
,
false
)
&&
!
AI
.
Utils
.
IsOneE
nemyBetterThanValue
(
2300
,
true
))
||
AI
.
Utils
.
IsTurn1OrMain2
());
}
}
private
bool
No59
背反之料理人效果
()
private
bool
No59
背反之料理人效果
()
...
@@ -493,7 +493,7 @@ namespace MycardBot.Game.AI.Decks
...
@@ -493,7 +493,7 @@ namespace MycardBot.Game.AI.Decks
private
bool
辉光子帕拉迪奥斯效果
()
private
bool
辉光子帕拉迪奥斯效果
()
{
{
ClientCard
result
=
AI
.
Utils
.
GetOneEn
n
emyBetterThanValue
(
2000
,
true
);
ClientCard
result
=
AI
.
Utils
.
GetOneEnemyBetterThanValue
(
2000
,
true
);
if
(
result
!=
null
)
if
(
result
!=
null
)
{
{
AI
.
SelectNextCard
(
result
);
AI
.
SelectNextCard
(
result
);
...
@@ -504,7 +504,7 @@ namespace MycardBot.Game.AI.Decks
...
@@ -504,7 +504,7 @@ namespace MycardBot.Game.AI.Decks
private
bool
电光皇特殊召唤
()
private
bool
电光皇特殊召唤
()
{
{
return
AI
.
Utils
.
IsEn
n
emyBetter
(
false
,
false
);
return
AI
.
Utils
.
IsEnemyBetter
(
false
,
false
);
}
}
private
bool
强欲而贪欲之壶效果
()
private
bool
强欲而贪欲之壶效果
()
...
@@ -514,7 +514,7 @@ namespace MycardBot.Game.AI.Decks
...
@@ -514,7 +514,7 @@ namespace MycardBot.Game.AI.Decks
private
bool
地碎效果
()
private
bool
地碎效果
()
{
{
return
AI
.
Utils
.
IsEn
n
emyBetter
(
false
,
false
);
return
AI
.
Utils
.
IsEnemyBetter
(
false
,
false
);
}
}
private
bool
陷阱卡覆盖
()
private
bool
陷阱卡覆盖
()
...
...
Game/AI/Decks/Rank5Executor.cs
View file @
ddbdbd85
...
@@ -280,14 +280,14 @@ namespace DevBot.Game.AI.Decks
...
@@ -280,14 +280,14 @@ namespace DevBot.Game.AI.Decks
private
bool
No61
火山恐龙特殊召唤
()
private
bool
No61
火山恐龙特殊召唤
()
{
{
return
AI
.
Utils
.
IsOneEn
n
emyBetterThanValue
(
2000
,
false
);
return
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
2000
,
false
);
}
}
private
bool
No61
火山恐龙效果
()
private
bool
No61
火山恐龙效果
()
{
{
ClientCard
target
=
Duel
.
Fields
[
1
].
MonsterZone
.
GetFloodgate
();
ClientCard
target
=
Duel
.
Fields
[
1
].
MonsterZone
.
GetFloodgate
();
if
(
target
==
null
)
if
(
target
==
null
)
target
=
AI
.
Utils
.
GetOneEn
n
emyBetterThanValue
(
2000
,
false
);
target
=
AI
.
Utils
.
GetOneEnemyBetterThanValue
(
2000
,
false
);
if
(
target
!=
null
)
if
(
target
!=
null
)
{
{
AI
.
SelectCard
((
int
)
CardId
.
电子龙
);
AI
.
SelectCard
((
int
)
CardId
.
电子龙
);
...
@@ -416,7 +416,7 @@ namespace DevBot.Game.AI.Decks
...
@@ -416,7 +416,7 @@ namespace DevBot.Game.AI.Decks
return
false
;
return
false
;
}
}
private
ClientCard
GetBestEn
n
emyCard
()
private
ClientCard
GetBestEnemyCard
()
{
{
ClientCard
card
=
AI
.
Utils
.
GetProblematicCard
();
ClientCard
card
=
AI
.
Utils
.
GetProblematicCard
();
if
(
card
!=
null
)
if
(
card
!=
null
)
...
...
Game/AI/Decks/ToadallyAwesomeExecutor.cs
View file @
ddbdbd85
...
@@ -421,7 +421,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -421,7 +421,7 @@ namespace WindBot.Game.AI.Decks
private
bool
猫鲨特殊召唤
()
private
bool
猫鲨特殊召唤
()
{
{
bool
should
=
Duel
.
Fields
[
0
].
HasInMonstersZone
((
int
)
CardId
.
饼蛙
)
bool
should
=
Duel
.
Fields
[
0
].
HasInMonstersZone
((
int
)
CardId
.
饼蛙
)
&&
((
AI
.
Utils
.
IsEn
n
emyBetter
(
true
,
false
)
&&
((
AI
.
Utils
.
IsEnemyBetter
(
true
,
false
)
&&
!
Duel
.
Fields
[
0
].
HasInMonstersZone
(
new
List
<
int
>
&&
!
Duel
.
Fields
[
0
].
HasInMonstersZone
(
new
List
<
int
>
{
{
(
int
)
CardId
.
猫鲨
,
(
int
)
CardId
.
猫鲨
,
...
@@ -480,7 +480,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -480,7 +480,7 @@ namespace WindBot.Game.AI.Decks
num
++;
num
++;
}
}
}
}
return
AI
.
Utils
.
IsEn
n
emyBetter
(
true
,
false
)
return
AI
.
Utils
.
IsEnemyBetter
(
true
,
false
)
&&
AI
.
Utils
.
GetBestAttack
(
Duel
.
Fields
[
1
],
true
)
>
2200
&&
AI
.
Utils
.
GetBestAttack
(
Duel
.
Fields
[
1
],
true
)
>
2200
&&
num
<
4
&&
num
<
4
&&
!
Duel
.
Fields
[
0
].
HasInMonstersZone
(
new
List
<
int
>
&&
!
Duel
.
Fields
[
0
].
HasInMonstersZone
(
new
List
<
int
>
...
@@ -508,7 +508,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -508,7 +508,7 @@ namespace WindBot.Game.AI.Decks
{
{
defence
+=
monster
.
GetDefensePower
();
defence
+=
monster
.
GetDefensePower
();
}
}
if
(
attack
-
2000
-
defence
>
Duel
.
LifePoints
[
1
]
&&
!
AI
.
Utils
.
IsEn
n
emyBetter
(
true
,
false
))
if
(
attack
-
2000
-
defence
>
Duel
.
LifePoints
[
1
]
&&
!
AI
.
Utils
.
IsEnemyBetter
(
true
,
false
))
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
@@ -522,11 +522,11 @@ namespace WindBot.Game.AI.Decks
...
@@ -522,11 +522,11 @@ namespace WindBot.Game.AI.Decks
private
bool
改变攻守表示
()
private
bool
改变攻守表示
()
{
{
bool
en
nemyBetter
=
AI
.
Utils
.
IsEn
nemyBetter
(
true
,
true
);
bool
en
emyBetter
=
AI
.
Utils
.
IsE
nemyBetter
(
true
,
true
);
if
(
Card
.
IsFacedown
())
if
(
Card
.
IsFacedown
())
return
true
;
return
true
;
if
(
Card
.
IsDefense
()
&&
!
en
n
emyBetter
&&
Card
.
Attack
>=
Card
.
Defense
)
if
(
Card
.
IsDefense
()
&&
!
enemyBetter
&&
Card
.
Attack
>=
Card
.
Defense
)
return
true
;
return
true
;
return
false
;
return
false
;
}
}
...
...
Game/AI/Decks/YosenjuExecutor.cs
View file @
ddbdbd85
...
@@ -352,7 +352,7 @@ namespace WindBot.Game.AI.Decks
...
@@ -352,7 +352,7 @@ namespace WindBot.Game.AI.Decks
private
bool
暗叛逆超量龙效果
()
private
bool
暗叛逆超量龙效果
()
{
{
int
oppoBestAttack
=
AI
.
Utils
.
GetBestAttack
(
Duel
.
Fields
[
1
],
true
);
int
oppoBestAttack
=
AI
.
Utils
.
GetBestAttack
(
Duel
.
Fields
[
1
],
true
);
ClientCard
target
=
AI
.
Utils
.
GetOneEn
n
emyBetterThanValue
(
oppoBestAttack
,
true
);
ClientCard
target
=
AI
.
Utils
.
GetOneEnemyBetterThanValue
(
oppoBestAttack
,
true
);
if
(
target
!=
null
)
if
(
target
!=
null
)
{
{
AI
.
SelectNextCard
(
target
);
AI
.
SelectNextCard
(
target
);
...
...
Game/AI/Decks/ZexalWeaponsExecutor.cs
View file @
ddbdbd85
...
@@ -151,7 +151,7 @@ namespace DevBot.Game.AI.Decks
...
@@ -151,7 +151,7 @@ namespace DevBot.Game.AI.Decks
private
bool
Number61Volcasaurus
()
private
bool
Number61Volcasaurus
()
{
{
return
AI
.
Utils
.
IsOneEn
n
emyBetterThanValue
(
2000
,
false
);
return
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
2000
,
false
);
}
}
private
bool
ZwLionArms
()
private
bool
ZwLionArms
()
...
...
Game/AI/Decks/ZoodiacExecutor.cs
View file @
ddbdbd85
...
@@ -209,7 +209,7 @@ namespace MycardBot.Game.AI.Decks
...
@@ -209,7 +209,7 @@ namespace MycardBot.Game.AI.Decks
AI
.
SelectCard
(
card
);
AI
.
SelectCard
(
card
);
return
true
;
return
true
;
}
}
card
=
AI
.
Utils
.
GetOneEn
n
emyBetterThanValue
(
Card
.
GetDefensePower
(),
false
);
card
=
AI
.
Utils
.
GetOneEnemyBetterThanValue
(
Card
.
GetDefensePower
(),
false
);
if
(
card
!=
null
)
if
(
card
!=
null
)
{
{
AI
.
SelectCard
(
card
);
AI
.
SelectCard
(
card
);
...
@@ -241,7 +241,7 @@ namespace MycardBot.Game.AI.Decks
...
@@ -241,7 +241,7 @@ namespace MycardBot.Game.AI.Decks
||
Duel
.
Phase
==
DuelPhase
.
Damage
))
||
Duel
.
Phase
==
DuelPhase
.
Damage
))
return
false
;
return
false
;
return
Duel
.
Player
==
0
return
Duel
.
Player
==
0
||
AI
.
Utils
.
IsEn
n
emyBetter
(
false
,
false
);
||
AI
.
Utils
.
IsEnemyBetter
(
false
,
false
);
}
}
return
true
;
return
true
;
}
}
...
...
Game/AI/DefaultExecutor.cs
View file @
ddbdbd85
...
@@ -96,7 +96,7 @@ namespace WindBot.Game.AI
...
@@ -96,7 +96,7 @@ namespace WindBot.Game.AI
protected
bool
DefaultBookOfMoon
()
protected
bool
DefaultBookOfMoon
()
{
{
if
(
AI
.
Utils
.
IsEn
n
emyBetter
(
true
,
true
))
if
(
AI
.
Utils
.
IsEnemyBetter
(
true
,
true
))
{
{
ClientCard
monster
=
Duel
.
Fields
[
1
].
GetMonsters
().
GetHighestAttackMonster
();
ClientCard
monster
=
Duel
.
Fields
[
1
].
GetMonsters
().
GetHighestAttackMonster
();
if
(
monster
!=
null
&&
monster
.
HasType
(
CardType
.
Effect
)
&&
(
monster
.
HasType
(
CardType
.
Xyz
)
||
monster
.
Level
>
4
))
if
(
monster
!=
null
&&
monster
.
HasType
(
CardType
.
Effect
)
&&
(
monster
.
HasType
(
CardType
.
Xyz
)
||
monster
.
Level
>
4
))
...
@@ -133,7 +133,7 @@ namespace WindBot.Game.AI
...
@@ -133,7 +133,7 @@ namespace WindBot.Game.AI
protected
bool
DefaultCallOfTheHaunted
()
protected
bool
DefaultCallOfTheHaunted
()
{
{
if
(!
AI
.
Utils
.
IsEn
n
emyBetter
(
true
,
true
))
if
(!
AI
.
Utils
.
IsEnemyBetter
(
true
,
true
))
return
false
;
return
false
;
ClientCard
selected
=
null
;
ClientCard
selected
=
null
;
int
BestAtk
=
0
;
int
BestAtk
=
0
;
...
@@ -151,7 +151,7 @@ namespace WindBot.Game.AI
...
@@ -151,7 +151,7 @@ namespace WindBot.Game.AI
protected
bool
DefaultTorrentialTribute
()
protected
bool
DefaultTorrentialTribute
()
{
{
return
(
AI
.
Utils
.
IsEn
n
emyBetter
(
true
,
true
));
return
(
AI
.
Utils
.
IsEnemyBetter
(
true
,
true
));
}
}
protected
bool
DefaultHeavyStorm
()
protected
bool
DefaultHeavyStorm
()
...
@@ -161,17 +161,17 @@ namespace WindBot.Game.AI
...
@@ -161,17 +161,17 @@ namespace WindBot.Game.AI
protected
bool
DefaultHammerShot
()
protected
bool
DefaultHammerShot
()
{
{
return
AI
.
Utils
.
IsEn
n
emyBetter
(
true
,
false
);
return
AI
.
Utils
.
IsEnemyBetter
(
true
,
false
);
}
}
protected
bool
DefaultDarkHole
()
protected
bool
DefaultDarkHole
()
{
{
return
AI
.
Utils
.
IsEn
n
emyBetter
(
false
,
false
);
return
AI
.
Utils
.
IsEnemyBetter
(
false
,
false
);
}
}
protected
bool
DefaultRaigeki
()
protected
bool
DefaultRaigeki
()
{
{
return
AI
.
Utils
.
IsEn
n
emyBetter
(
false
,
false
);
return
AI
.
Utils
.
IsEnemyBetter
(
false
,
false
);
}
}
protected
bool
DefaultSpellSet
()
protected
bool
DefaultSpellSet
()
...
@@ -206,11 +206,11 @@ namespace WindBot.Game.AI
...
@@ -206,11 +206,11 @@ namespace WindBot.Game.AI
protected
bool
DefaultMonsterRepos
()
protected
bool
DefaultMonsterRepos
()
{
{
bool
en
nemyBetter
=
AI
.
Utils
.
IsEn
nemyBetter
(
true
,
true
);
bool
en
emyBetter
=
AI
.
Utils
.
IsE
nemyBetter
(
true
,
true
);
if
(
Card
.
IsAttack
()
&&
en
n
emyBetter
)
if
(
Card
.
IsAttack
()
&&
enemyBetter
)
return
true
;
return
true
;
if
(
Card
.
IsDefense
()
&&
!
en
n
emyBetter
&&
Card
.
Attack
>=
Card
.
Defense
)
if
(
Card
.
IsDefense
()
&&
!
enemyBetter
&&
Card
.
Attack
>=
Card
.
Defense
)
return
true
;
return
true
;
return
false
;
return
false
;
}
}
...
...
Game/GameAI.cs
View file @
ddbdbd85
...
@@ -298,7 +298,7 @@ namespace WindBot.Game
...
@@ -298,7 +298,7 @@ namespace WindBot.Game
}
}
if
(
ShouldExecute
(
exec
,
card
,
ExecutorType
.
SummonOrSet
))
if
(
ShouldExecute
(
exec
,
card
,
ExecutorType
.
SummonOrSet
))
{
{
if
(
Utils
.
IsEn
nemyBetter
(
true
,
true
)
&&
Utils
.
IsAllEn
nemyBetterThanValue
(
card
.
Attack
+
300
,
false
)
&&
if
(
Utils
.
IsEn
emyBetter
(
true
,
true
)
&&
Utils
.
IsAllE
nemyBetterThanValue
(
card
.
Attack
+
300
,
false
)
&&
main
.
MonsterSetableCards
.
Contains
(
card
))
main
.
MonsterSetableCards
.
Contains
(
card
))
{
{
_dialogs
.
SendSetMonster
();
_dialogs
.
SendSetMonster
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment