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
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
MyCard
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
ClientCard
card
=
field
.
MonsterZone
[
i
];
if
(
card
==
null
)
continue
;
if
(
onlyatk
&&
card
.
IsDefense
())
continue
;
int
en
n
emyValue
=
card
.
GetDefensePower
();
if
(
en
n
emyValue
>
bestAtk
)
bestAtk
=
en
n
emyValue
;
int
enemyValue
=
card
.
GetDefensePower
();
if
(
enemyValue
>
bestAtk
)
bestAtk
=
enemyValue
;
}
return
bestAtk
;
}
public
bool
IsEn
n
emyBetter
(
bool
onlyatk
,
bool
all
)
public
bool
IsEnemyBetter
(
bool
onlyatk
,
bool
all
)
{
if
(
Duel
.
Fields
[
1
].
GetMonsterCount
()
==
0
)
return
false
;
...
...
@@ -63,11 +63,11 @@ namespace WindBot.Game.AI
if
(
monsters
.
Count
>
0
)
bestAtk
=
monsters
[
monsters
.
Count
-
1
].
Attack
;
if
(
all
)
return
IsAllEn
n
emyBetterThanValue
(
bestAtk
,
onlyatk
);
return
IsOneEn
n
emyBetterThanValue
(
bestAtk
,
onlyatk
);
return
IsAllEnemyBetterThanValue
(
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
;
bool
nomonster
=
true
;
...
...
@@ -77,15 +77,15 @@ namespace WindBot.Game.AI
if
(
card
==
null
)
continue
;
if
(
onlyatk
&&
card
.
IsDefense
())
continue
;
nomonster
=
false
;
int
en
n
emyValue
=
card
.
GetDefensePower
();
if
(
en
n
emyValue
>
bestValue
)
bestValue
=
en
n
emyValue
;
int
enemyValue
=
card
.
GetDefensePower
();
if
(
enemyValue
>
bestValue
)
bestValue
=
enemyValue
;
}
if
(
nomonster
)
return
false
;
return
bestValue
>
value
;
}
public
bool
IsAllEn
n
emyBetterThanValue
(
int
value
,
bool
onlyatk
)
public
bool
IsAllEnemyBetterThanValue
(
int
value
,
bool
onlyatk
)
{
bool
nomonster
=
true
;
for
(
int
i
=
0
;
i
<
7
;
++
i
)
...
...
@@ -94,22 +94,22 @@ namespace WindBot.Game.AI
if
(
card
==
null
||
card
.
Data
==
null
)
continue
;
if
(
onlyatk
&&
card
.
IsDefense
())
continue
;
nomonster
=
false
;
int
en
n
emyValue
=
card
.
GetDefensePower
();
if
(
en
n
emyValue
<=
value
)
int
enemyValue
=
card
.
GetDefensePower
();
if
(
enemyValue
<=
value
)
return
false
;
}
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
)
{
ClientCard
card
=
Duel
.
Fields
[
1
].
MonsterZone
[
i
];
if
(
card
==
null
)
continue
;
if
(
onlyatk
&&
card
.
IsDefense
())
continue
;
int
en
n
emyValue
=
card
.
GetDefensePower
();
if
(
en
n
emyValue
>=
value
)
int
enemyValue
=
card
.
GetDefensePower
();
if
(
enemyValue
>=
value
)
return
card
;
}
return
null
;
...
...
@@ -128,7 +128,7 @@ namespace WindBot.Game.AI
return
card
;
if
(
attack
==
0
)
attack
=
GetBestAttack
(
Duel
.
Fields
[
0
],
true
);
return
GetOneEn
n
emyBetterThanValue
(
attack
,
true
);
return
GetOneEnemyBetterThanValue
(
attack
,
true
);
}
public
ClientCard
GetProblematicMonsterCard
(
int
attack
=
0
)
...
...
@@ -141,7 +141,7 @@ namespace WindBot.Game.AI
return
card
;
if
(
attack
==
0
)
attack
=
GetBestAttack
(
Duel
.
Fields
[
0
],
true
);
return
GetOneEn
n
emyBetterThanValue
(
attack
,
true
);
return
GetOneEnemyBetterThanValue
(
attack
,
true
);
}
public
ClientCard
GetProblematicSpellCard
()
...
...
Game/AI/Decks/BlueEyesExecutor.cs
View file @
ddbdbd85
...
...
@@ -430,7 +430,7 @@ namespace MycardBot.Game.AI.Decks
使用过的青眼亚白龙
.
Add
(
Card
);
return
true
;
}
card
=
AI
.
Utils
.
GetOneEn
n
emyBetterThanValue
(
Card
.
GetDefensePower
(),
false
);
card
=
AI
.
Utils
.
GetOneEnemyBetterThanValue
(
Card
.
GetDefensePower
(),
false
);
if
(
card
!=
null
)
{
Logger
.
DebugWriteLine
(
"炸比自己强的怪."
);
...
...
@@ -771,7 +771,7 @@ namespace MycardBot.Game.AI.Decks
Logger
.
DebugWriteLine
(
"先攻不叠银河眼,叠银河巨神."
);
return
false
;
}
if
(
AI
.
Utils
.
IsOneEn
n
emyBetterThanValue
(
2999
,
false
))
if
(
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
2999
,
false
))
{
Logger
.
DebugWriteLine
(
"有高攻怪兽,出银河眼."
);
return
true
;
...
...
@@ -797,7 +797,7 @@ namespace MycardBot.Game.AI.Decks
}
if
(
Duel
.
Fields
[
0
].
HasInMonstersZone
((
int
)
CardId
.
银河眼光子龙皇
))
{
if
(!
AI
.
Utils
.
IsOneEn
n
emyBetterThanValue
(
4000
,
false
))
if
(!
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
4000
,
false
))
{
Logger
.
DebugWriteLine
(
"没有高攻怪兽,出重铠."
);
AI
.
SelectCard
((
int
)
CardId
.
银河眼光子龙皇
);
...
...
@@ -1122,13 +1122,13 @@ namespace MycardBot.Game.AI.Decks
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
;
if
(
Card
.
IsFacedown
())
return
true
;
if
(
Card
.
IsDefense
()
&&
!
en
n
emyBetter
&&
Card
.
Attack
>=
Card
.
Defense
)
if
(
Card
.
IsDefense
()
&&
!
enemyBetter
&&
Card
.
Attack
>=
Card
.
Defense
)
return
true
;
if
(
Card
.
IsDefense
()
&&
(
Card
.
Id
==
(
int
)
CardId
.
青眼精灵龙
...
...
Game/AI/Decks/CyberDragonExecutor.cs
View file @
ddbdbd85
...
...
@@ -127,7 +127,7 @@ namespace WindBot.Game.AI.Decks
private
bool
进化光焰
()
{
if
(!
AI
.
Utils
.
IsOneEn
n
emyBetterThanValue
(
Bot
.
MonsterZone
.
GetHighestAttackMonster
().
Attack
,
false
))
if
(!
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
Bot
.
MonsterZone
.
GetHighestAttackMonster
().
Attack
,
false
))
return
false
;
else
AI
.
SelectCard
(
Duel
.
Fields
[
1
].
MonsterZone
.
GetHighestAttackMonster
());
...
...
@@ -143,7 +143,7 @@ namespace WindBot.Game.AI.Decks
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
true
;
}
...
...
@@ -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
.
力量结合
))
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
true
;
}
...
...
@@ -168,7 +168,7 @@ namespace WindBot.Game.AI.Decks
return
true
;
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
))
return
true
;
return
false
;
...
...
Game/AI/Decks/DragunityExecutor.cs
View file @
ddbdbd85
...
...
@@ -344,7 +344,7 @@ namespace DevBot.Game.AI.Decks
private
bool
ScrapDragonSummon
()
{
//if (AI.Utils.IsOneEn
n
emyBetterThanValue(2500, true))
//if (AI.Utils.IsOneEnemyBetterThanValue(2500, true))
// return true;
ClientCard
invincible
=
GetProblematicCard
();
return
invincible
!=
null
;
...
...
@@ -353,7 +353,7 @@ namespace DevBot.Game.AI.Decks
private
bool
ScrapDragonEffect
()
{
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
;
ClientField
field
=
Duel
.
Fields
[
0
];
...
...
Game/AI/Decks/FrogExecutor.cs
View file @
ddbdbd85
...
...
@@ -95,7 +95,7 @@ namespace DevBot.Game.AI.Decks
private
bool
SwapFrogSummon
()
{
int
atk
=
Card
.
Attack
+
GetSpellBonus
();
if
(
AI
.
Utils
.
IsAllEn
n
emyBetterThanValue
(
atk
,
true
))
if
(
AI
.
Utils
.
IsAllEnemyBetterThanValue
(
atk
,
true
))
return
false
;
AI
.
SelectCard
((
int
)
CardId
.
Ronintoadin
);
...
...
@@ -152,7 +152,7 @@ namespace DevBot.Game.AI.Decks
{
int
atk
=
Card
.
Attack
+
GetSpellBonus
();
if
(
AI
.
Utils
.
IsOneEn
n
emyBetterThanValue
(
atk
,
true
))
if
(
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
atk
,
true
))
return
false
;
if
(
Card
.
Id
==
(
int
)
CardId
.
SwapFrog
)
...
...
@@ -164,7 +164,7 @@ namespace DevBot.Game.AI.Decks
{
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
);
}
...
...
@@ -190,7 +190,7 @@ namespace DevBot.Game.AI.Decks
private
bool
DarkHole
()
{
return
AI
.
Utils
.
IsEn
n
emyBetter
(
false
,
false
);
return
AI
.
Utils
.
IsEnemyBetter
(
false
,
false
);
}
private
bool
Terraforming
()
...
...
@@ -226,13 +226,13 @@ namespace DevBot.Game.AI.Decks
if
(
Card
.
Id
==
(
int
)
CardId
.
DewdarkOfTheIceBarrier
)
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
)
en
n
emyBetter
=
true
;
enemyBetter
=
true
;
bool
result
=
false
;
if
(
Card
.
IsAttack
()
&&
en
n
emyBetter
)
if
(
Card
.
IsAttack
()
&&
enemyBetter
)
result
=
true
;
if
(
Card
.
IsDefense
()
&&
!
en
n
emyBetter
)
if
(
Card
.
IsDefense
()
&&
!
enemyBetter
)
result
=
true
;
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
private
bool
守墓的末裔
()
{
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
());
return
true
;
...
...
Game/AI/Decks/HorusExecutor.cs
View file @
ddbdbd85
...
...
@@ -147,7 +147,7 @@ namespace WindBot.Game.AI.Decks
private
bool
WhiteNightDragon
()
{
// 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
)
if
(
card
.
Id
==
11224103
)
return
false
;
...
...
Game/AI/Decks/LightswornExecutor.cs
View file @
ddbdbd85
...
...
@@ -291,7 +291,7 @@ namespace WindBot.Game.AI.Decks
private
bool
辉光子帕拉迪奥斯效果
()
{
ClientCard
result
=
AI
.
Utils
.
GetOneEn
n
emyBetterThanValue
(
2000
,
true
);
ClientCard
result
=
AI
.
Utils
.
GetOneEnemyBetterThanValue
(
2000
,
true
);
if
(
result
!=
null
)
{
AI
.
SelectNextCard
(
result
);
...
...
@@ -302,7 +302,7 @@ namespace WindBot.Game.AI.Decks
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
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
true
;
}
private
bool
决战兵器之影灵衣
()
{
if
(
AI
.
Utils
.
IsAllEn
n
emyBetterThanValue
(
3300
,
true
))
if
(
AI
.
Utils
.
IsAllEnemyBetterThanValue
(
3300
,
true
))
{
AI
.
SelectCard
((
int
)
CardId
.
决战兵器之影灵衣
);
return
true
;
...
...
@@ -173,7 +173,7 @@ namespace WindBot.Game.AI.Decks
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
;
}
...
...
@@ -189,7 +189,7 @@ namespace WindBot.Game.AI.Decks
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
());
return
true
;
...
...
@@ -209,12 +209,12 @@ namespace WindBot.Game.AI.Decks
AI
.
SelectCard
((
int
)
CardId
.
影灵衣的降魔镜
);
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
.
三叉龙之影灵衣
);
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
.
决战兵器之影灵衣
);
return
true
;
...
...
@@ -234,12 +234,12 @@ namespace WindBot.Game.AI.Decks
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
.
三叉龙之影灵衣
);
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
.
决战兵器之影灵衣
);
return
true
;
...
...
@@ -290,7 +290,7 @@ namespace WindBot.Game.AI.Decks
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
.
三叉龙之影灵衣
);
return
true
;
...
...
Game/AI/Decks/OldSchoolExecutor.cs
View file @
ddbdbd85
...
...
@@ -85,7 +85,7 @@
if
(
handCard
.
IsFacedown
())
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
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
电光千鸟特殊召唤
()
...
...
@@ -424,7 +424,7 @@ namespace MycardBot.Game.AI.Decks
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
星尘龙效果
()
...
...
@@ -434,7 +434,7 @@ namespace MycardBot.Game.AI.Decks
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
入魔梦魇骑士特殊召唤
()
...
...
@@ -460,7 +460,7 @@ namespace MycardBot.Game.AI.Decks
private
bool
No59
背反之料理人特殊召唤
()
{
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
背反之料理人效果
()
...
...
@@ -493,7 +493,7 @@ namespace MycardBot.Game.AI.Decks
private
bool
辉光子帕拉迪奥斯效果
()
{
ClientCard
result
=
AI
.
Utils
.
GetOneEn
n
emyBetterThanValue
(
2000
,
true
);
ClientCard
result
=
AI
.
Utils
.
GetOneEnemyBetterThanValue
(
2000
,
true
);
if
(
result
!=
null
)
{
AI
.
SelectNextCard
(
result
);
...
...
@@ -504,7 +504,7 @@ namespace MycardBot.Game.AI.Decks
private
bool
电光皇特殊召唤
()
{
return
AI
.
Utils
.
IsEn
n
emyBetter
(
false
,
false
);
return
AI
.
Utils
.
IsEnemyBetter
(
false
,
false
);
}
private
bool
强欲而贪欲之壶效果
()
...
...
@@ -514,7 +514,7 @@ namespace MycardBot.Game.AI.Decks
private
bool
地碎效果
()
{
return
AI
.
Utils
.
IsEn
n
emyBetter
(
false
,
false
);
return
AI
.
Utils
.
IsEnemyBetter
(
false
,
false
);
}
private
bool
陷阱卡覆盖
()
...
...
Game/AI/Decks/Rank5Executor.cs
View file @
ddbdbd85
...
...
@@ -280,14 +280,14 @@ namespace DevBot.Game.AI.Decks
private
bool
No61
火山恐龙特殊召唤
()
{
return
AI
.
Utils
.
IsOneEn
n
emyBetterThanValue
(
2000
,
false
);
return
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
2000
,
false
);
}
private
bool
No61
火山恐龙效果
()
{
ClientCard
target
=
Duel
.
Fields
[
1
].
MonsterZone
.
GetFloodgate
();
if
(
target
==
null
)
target
=
AI
.
Utils
.
GetOneEn
n
emyBetterThanValue
(
2000
,
false
);
target
=
AI
.
Utils
.
GetOneEnemyBetterThanValue
(
2000
,
false
);
if
(
target
!=
null
)
{
AI
.
SelectCard
((
int
)
CardId
.
电子龙
);
...
...
@@ -416,7 +416,7 @@ namespace DevBot.Game.AI.Decks
return
false
;
}
private
ClientCard
GetBestEn
n
emyCard
()
private
ClientCard
GetBestEnemyCard
()
{
ClientCard
card
=
AI
.
Utils
.
GetProblematicCard
();
if
(
card
!=
null
)
...
...
Game/AI/Decks/ToadallyAwesomeExecutor.cs
View file @
ddbdbd85
...
...
@@ -421,7 +421,7 @@ namespace WindBot.Game.AI.Decks
private
bool
猫鲨特殊召唤
()
{
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
>
{
(
int
)
CardId
.
猫鲨
,
...
...
@@ -480,7 +480,7 @@ namespace WindBot.Game.AI.Decks
num
++;
}
}
return
AI
.
Utils
.
IsEn
n
emyBetter
(
true
,
false
)
return
AI
.
Utils
.
IsEnemyBetter
(
true
,
false
)
&&
AI
.
Utils
.
GetBestAttack
(
Duel
.
Fields
[
1
],
true
)
>
2200
&&
num
<
4
&&
!
Duel
.
Fields
[
0
].
HasInMonstersZone
(
new
List
<
int
>
...
...
@@ -508,7 +508,7 @@ namespace WindBot.Game.AI.Decks
{
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
false
;
...
...
@@ -522,11 +522,11 @@ namespace WindBot.Game.AI.Decks
private
bool
改变攻守表示
()
{
bool
en
nemyBetter
=
AI
.
Utils
.
IsEn
nemyBetter
(
true
,
true
);
bool
en
emyBetter
=
AI
.
Utils
.
IsE
nemyBetter
(
true
,
true
);
if
(
Card
.
IsFacedown
())
return
true
;
if
(
Card
.
IsDefense
()
&&
!
en
n
emyBetter
&&
Card
.
Attack
>=
Card
.
Defense
)
if
(
Card
.
IsDefense
()
&&
!
enemyBetter
&&
Card
.
Attack
>=
Card
.
Defense
)
return
true
;
return
false
;
}
...
...
Game/AI/Decks/YosenjuExecutor.cs
View file @
ddbdbd85
...
...
@@ -352,7 +352,7 @@ namespace WindBot.Game.AI.Decks
private
bool
暗叛逆超量龙效果
()
{
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
)
{
AI
.
SelectNextCard
(
target
);
...
...
Game/AI/Decks/ZexalWeaponsExecutor.cs
View file @
ddbdbd85
...
...
@@ -151,7 +151,7 @@ namespace DevBot.Game.AI.Decks
private
bool
Number61Volcasaurus
()
{
return
AI
.
Utils
.
IsOneEn
n
emyBetterThanValue
(
2000
,
false
);
return
AI
.
Utils
.
IsOneEnemyBetterThanValue
(
2000
,
false
);
}
private
bool
ZwLionArms
()
...
...
Game/AI/Decks/ZoodiacExecutor.cs
View file @
ddbdbd85
...
...
@@ -209,7 +209,7 @@ namespace MycardBot.Game.AI.Decks
AI
.
SelectCard
(
card
);
return
true
;
}
card
=
AI
.
Utils
.
GetOneEn
n
emyBetterThanValue
(
Card
.
GetDefensePower
(),
false
);
card
=
AI
.
Utils
.
GetOneEnemyBetterThanValue
(
Card
.
GetDefensePower
(),
false
);
if
(
card
!=
null
)
{
AI
.
SelectCard
(
card
);
...
...
@@ -241,7 +241,7 @@ namespace MycardBot.Game.AI.Decks
||
Duel
.
Phase
==
DuelPhase
.
Damage
))
return
false
;
return
Duel
.
Player
==
0
||
AI
.
Utils
.
IsEn
n
emyBetter
(
false
,
false
);
||
AI
.
Utils
.
IsEnemyBetter
(
false
,
false
);
}
return
true
;
}
...
...
Game/AI/DefaultExecutor.cs
View file @
ddbdbd85
...
...
@@ -96,7 +96,7 @@ namespace WindBot.Game.AI
protected
bool
DefaultBookOfMoon
()
{
if
(
AI
.
Utils
.
IsEn
n
emyBetter
(
true
,
true
))
if
(
AI
.
Utils
.
IsEnemyBetter
(
true
,
true
))
{
ClientCard
monster
=
Duel
.
Fields
[
1
].
GetMonsters
().
GetHighestAttackMonster
();
if
(
monster
!=
null
&&
monster
.
HasType
(
CardType
.
Effect
)
&&
(
monster
.
HasType
(
CardType
.
Xyz
)
||
monster
.
Level
>
4
))
...
...
@@ -133,7 +133,7 @@ namespace WindBot.Game.AI
protected
bool
DefaultCallOfTheHaunted
()
{
if
(!
AI
.
Utils
.
IsEn
n
emyBetter
(
true
,
true
))
if
(!
AI
.
Utils
.
IsEnemyBetter
(
true
,
true
))
return
false
;
ClientCard
selected
=
null
;
int
BestAtk
=
0
;
...
...
@@ -151,7 +151,7 @@ namespace WindBot.Game.AI
protected
bool
DefaultTorrentialTribute
()
{
return
(
AI
.
Utils
.
IsEn
n
emyBetter
(
true
,
true
));
return
(
AI
.
Utils
.
IsEnemyBetter
(
true
,
true
));
}
protected
bool
DefaultHeavyStorm
()
...
...
@@ -161,17 +161,17 @@ namespace WindBot.Game.AI
protected
bool
DefaultHammerShot
()
{
return
AI
.
Utils
.
IsEn
n
emyBetter
(
true
,
false
);
return
AI
.
Utils
.
IsEnemyBetter
(
true
,
false
);
}
protected
bool
DefaultDarkHole
()
{
return
AI
.
Utils
.
IsEn
n
emyBetter
(
false
,
false
);
return
AI
.
Utils
.
IsEnemyBetter
(
false
,
false
);
}
protected
bool
DefaultRaigeki
()
{
return
AI
.
Utils
.
IsEn
n
emyBetter
(
false
,
false
);
return
AI
.
Utils
.
IsEnemyBetter
(
false
,
false
);
}
protected
bool
DefaultSpellSet
()
...
...
@@ -206,11 +206,11 @@ namespace WindBot.Game.AI
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
;
if
(
Card
.
IsDefense
()
&&
!
en
n
emyBetter
&&
Card
.
Attack
>=
Card
.
Defense
)
if
(
Card
.
IsDefense
()
&&
!
enemyBetter
&&
Card
.
Attack
>=
Card
.
Defense
)
return
true
;
return
false
;
}
...
...
Game/GameAI.cs
View file @
ddbdbd85
...
...
@@ -298,7 +298,7 @@ namespace WindBot.Game
}
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
))
{
_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