Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro-rush-duel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4
Issues
4
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
MyCard
ygopro-rush-duel
Commits
543922ca
Commit
543922ca
authored
Jul 25, 2021
by
未闻皂名
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'HEAD' of
https://hub.fastgit.org/Yuzurisa/ygopro-rush-duel
parents
2cc1cb13
8fa8726d
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
914 additions
and
0 deletions
+914
-0
windbotRD/Decks/AI_DinocarriageDynarmix.ydk
windbotRD/Decks/AI_DinocarriageDynarmix.ydk
+44
-0
windbotRD/Decks/AI_MokeyMokey.ydk
windbotRD/Decks/AI_MokeyMokey.ydk
+45
-0
windbotRD/Decks/AI_MokeyMokeyKing.ydk
windbotRD/Decks/AI_MokeyMokeyKing.ydk
+44
-0
windbotRD/Game/AI/Decks/DinocarriageDynarmixExecutor.cs
windbotRD/Game/AI/Decks/DinocarriageDynarmixExecutor.cs
+332
-0
windbotRD/Game/AI/Decks/MokeyMokeyExecutor.cs
windbotRD/Game/AI/Decks/MokeyMokeyExecutor.cs
+213
-0
windbotRD/Game/AI/Decks/MokeyMokeyKingExecutor.cs
windbotRD/Game/AI/Decks/MokeyMokeyKingExecutor.cs
+216
-0
windbotRD/bot.conf
windbotRD/bot.conf
+20
-0
No files found.
windbotRD/Decks/AI_DinocarriageDynarmix.ydk
0 → 100644
View file @
543922ca
#created by ygomobile
#main
120151006
120151006
120151006
120151007
120151007
120151007
120151005
120151005
120151005
120130029
120130029
120130029
120130005
120130005
120151012
120151012
120151012
120151013
120151013
120151013
120151011
120151011
120151009
120151009
120151009
120151010
120151010
120151010
120151018
120151018
120151018
120151015
120151015
120151017
120151017
120151017
120151016
120151020
120151020
120151019
#extra
!side
\ No newline at end of file
windbotRD/Decks/AI_MokeyMokey.ydk
0 → 100644
View file @
543922ca
#created by ...
#main
120170000
120110001
120110001
120110001
120105001
120105001
120105001
120110005
120110005
120105005
120105005
120145001
120145001
120145001
120105006
120105006
120105006
120145014
120145014
120120018
120120018
120120018
120130016
120130016
120130016
120110009
120110009
120110009
120151023
120105012
120105012
120105012
120110012
120110012
120105013
120105013
120105013
120105014
120170065
120150019
#extra
!side
windbotRD/Decks/AI_MokeyMokeyKing.ydk
0 → 100644
View file @
543922ca
#created by ...
#main
120170000
120170000
120170000
120110001
120110001
120110001
120145000
120145000
120105005
120105005
120105005
120145001
120145001
120145001
120105006
120105006
120105006
120145014
120145014
120120018
120120018
120120018
120130016
120130016
120130016
120110009
120110009
120151023
120105012
120105012
120105012
120110012
120110012
120105013
120105013
120105013
120105014
120150019
120150019
120150019
#extra
!side
windbotRD/Game/AI/Decks/DinocarriageDynarmixExecutor.cs
0 → 100644
View file @
543922ca
using
YGOSharp.OCGWrapper.Enums
;
using
System.Collections.Generic
;
using
System.Linq
;
using
WindBot
;
using
WindBot.Game
;
using
WindBot.Game.AI
;
using
System
;
namespace
WindBot.Game.AI.Decks
{
[
Deck
(
"DinocarriageDynarmix"
,
"AI_DinocarriageDynarmix"
)]
public
class
DinocarriageDynarmixExecutor
:
DefaultExecutor
{
public
class
CardId
{
public
const
int
超级恐龙王
=
120130029
;
public
const
int
巨身多角龙
=
120130005
;
public
const
int
荒野盗龙
=
120151012
;
public
const
int
名流雷龙
=
120151013
;
public
const
int
抑龙
=
120151011
;
public
const
int
机械镰刀盗龙
=
120151009
;
public
const
int
成金恐龙王
=
120151010
;
public
const
int
侏罗纪世界
=
120151015
;
public
const
int
奇迹的共进化
=
120151016
;
public
const
int
成金哥布林
=
120151018
;
public
const
int
恐龙粉碎
=
120151017
;
public
const
int
超越进化
=
120151019
;
public
const
int
恐力重压
=
120151020
;
public
const
int
大恐龙驾
L
=
120151005
;
public
const
int
大恐龙驾
R
=
120151007
;
public
const
int
大恐龙驾
=
120151006
;
}
public
DinocarriageDynarmixExecutor
(
GameAI
ai
,
Duel
duel
)
:
base
(
ai
,
duel
)
{
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
大恐龙驾
,
MAXsummon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
大恐龙驾
,
大恐龙驾
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
成金哥布林
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
抑龙
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
成金恐龙王
,
成金恐龙王
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
机械镰刀盗龙
,
机械镰刀盗龙
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
奇迹的共进化
,
奇迹的共进化
Effect
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
巨身多角龙
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
超级恐龙王
,
超级恐龙王
Effect
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
机械镰刀盗龙
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
抑龙
,
抑龙
Summon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
成金恐龙王
,
成金恐龙王
Summon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
恐龙粉碎
,
恐龙粉碎
Effect
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
荒野盗龙
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
CardId
.
名流雷龙
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
超级恐龙王
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
大恐龙驾
L
,
MAXLsummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
大恐龙驾
R
,
MAXRsummon
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
大恐龙驾
L
,
MAXLset
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
大恐龙驾
R
,
MAXRset
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
抑龙
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
成金恐龙王
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
名流雷龙
,
monsterset
);
AddExecutor
(
ExecutorType
.
Repos
,
DefaultMonsterRepos
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
侏罗纪世界
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
恐力重压
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
超越进化
,
超越进化
Effect
);
AddExecutor
(
ExecutorType
.
SpellSet
);
//AddExecutor(ExecutorType.Activate, DefaultDontChainMyself);
}
private
bool
大恐龙驾
Effect
()
{
{
IList
<
ClientCard
>
targets
=
new
List
<
ClientCard
>();
foreach
(
ClientCard
target
in
Enemy
.
GetMonsters
())
{
if
(
target
.
IsFacedown
())
targets
.
Add
(
target
);
if
(
targets
.
Count
>=
2
)
break
;
}
if
(
targets
.
Count
<
2
)
{
foreach
(
ClientCard
target
in
Enemy
.
GetMonsters
())
{
if
(
target
.
IsFaceup
())
targets
.
Add
(
target
);
if
(
targets
.
Count
>=
2
)
break
;
}
}
if
(
targets
.
Count
>
0
)
{
AI
.
SelectCard
(
CardId
.
抑龙
,
CardId
.
名流雷龙
,
CardId
.
荒野盗龙
,
CardId
.
巨身多角龙
,
CardId
.
成金恐龙王
,
CardId
.
机械镰刀盗龙
,
CardId
.
超级恐龙王
,
CardId
.
大恐龙驾
,
CardId
.
大恐龙驾
L
,
CardId
.
大恐龙驾
R
);
AI
.
SelectNextCard
(
targets
);
return
true
;
}
return
false
;
}
}
private
bool
MAXsummon
()
{
if
(
Bot
.
HasInMonstersZone
(
CardId
.
大恐龙驾
))
{
return
false
;
}
else
AI
.
SelectCard
(
CardId
.
大恐龙驾
L
);
AI
.
SelectNextCard
(
CardId
.
大恐龙驾
R
);
return
true
;
}
private
List
<
int
>
HintMsgForEnemy
=
new
List
<
int
>
{
HintMsg
.
Release
,
HintMsg
.
Destroy
,
HintMsg
.
Remove
,
HintMsg
.
ToGrave
,
HintMsg
.
ReturnToHand
,
HintMsg
.
ToDeck
,
HintMsg
.
FusionMaterial
,
HintMsg
.
SynchroMaterial
,
HintMsg
.
XyzMaterial
,
HintMsg
.
LinkMaterial
,
HintMsg
.
Disable
};
private
List
<
int
>
HintMsgForMaxSelect
=
new
List
<
int
>
{
HintMsg
.
SpSummon
,
HintMsg
.
ToGrave
,
HintMsg
.
AddToHand
,
HintMsg
.
ToDeck
,
HintMsg
.
Destroy
};
public
override
IList
<
ClientCard
>
OnSelectCard
(
IList
<
ClientCard
>
_cards
,
int
min
,
int
max
,
int
hint
,
bool
cancelable
)
{
if
(
Duel
.
Phase
==
DuelPhase
.
BattleStart
)
return
null
;
if
(
AI
.
HaveSelectedCards
())
return
null
;
IList
<
ClientCard
>
selected
=
new
List
<
ClientCard
>();
IList
<
ClientCard
>
cards
=
new
List
<
ClientCard
>(
_cards
);
if
(
max
>
cards
.
Count
)
max
=
cards
.
Count
;
if
(
HintMsgForEnemy
.
Contains
(
hint
))
{
IList
<
ClientCard
>
enemyCards
=
cards
.
Where
(
card
=>
card
.
Controller
==
1
).
ToList
();
// select enemy's card first
while
(
enemyCards
.
Count
>
0
&&
selected
.
Count
<
max
)
{
ClientCard
card
=
enemyCards
[
Program
.
Rand
.
Next
(
enemyCards
.
Count
)];
selected
.
Add
(
card
);
enemyCards
.
Remove
(
card
);
cards
.
Remove
(
card
);
}
}
if
(
HintMsgForMaxSelect
.
Contains
(
hint
))
{
// select max cards
while
(
selected
.
Count
<
max
)
{
ClientCard
card
=
cards
[
Program
.
Rand
.
Next
(
cards
.
Count
)];
selected
.
Add
(
card
);
cards
.
Remove
(
card
);
}
}
return
selected
;
}
public
override
bool
OnSelectHand
()
{
// go first
return
true
;
}
public
bool
monsterset
()
{
if
(
Duel
.
Turn
==
1
)
{
return
true
;
}
else
if
(
Bot
.
HasInHand
(
new
[]
{
CardId
.
巨身多角龙
,
CardId
.
超级恐龙王
,
}))
return
false
;
return
true
;
}
private
bool
抑龙
Summon
()
{
if
(
Duel
.
Turn
==
1
)
return
false
;
if
(
Enemy
.
GetHandCount
()
>
1
)
return
true
;
return
false
;
}
private
bool
成金恐龙王
Summon
()
{
if
(
Enemy
.
GetHandCount
()
<
1
)
return
true
;
return
false
;
}
private
bool
成金恐龙王
Effect
()
{
AI
.
SelectCard
(
CardId
.
成金哥布林
);
return
true
;
}
private
bool
奇迹的共进化
Effect
()
{
if
(
Bot
.
HasInHand
(
CardId
.
超级恐龙王
))
{
if
(
Bot
.
HasInMonstersZone
(
CardId
.
大恐龙驾
))
{
return
false
;
}
else
AI
.
SelectCard
(
CardId
.
大恐龙驾
L
,
CardId
.
大恐龙驾
R
,
CardId
.
抑龙
,
CardId
.
名流雷龙
,
CardId
.
荒野盗龙
,
CardId
.
巨身多角龙
);
AI
.
SelectNextCard
(
CardId
.
超级恐龙王
);
return
true
;
}
return
false
;
}
private
bool
机械镰刀盗龙
Effect
()
{
if
(
Bot
.
GetCountCardInZone
(
Bot
.
Hand
,
CardId
.
大恐龙驾
)
>=
2
)
AI
.
SelectCard
(
CardId
.
大恐龙驾
);
else
if
(
Bot
.
GetCountCardInZone
(
Bot
.
Hand
,
CardId
.
大恐龙驾
L
)
>=
2
)
AI
.
SelectCard
(
CardId
.
大恐龙驾
L
);
else
if
(
Bot
.
GetCountCardInZone
(
Bot
.
Hand
,
CardId
.
大恐龙驾
R
)
>=
2
)
AI
.
SelectCard
(
CardId
.
大恐龙驾
R
);
else
if
(
Bot
.
GetCountCardInZone
(
Bot
.
Hand
,
CardId
.
超级恐龙王
)
>=
2
)
AI
.
SelectCard
(
CardId
.
超级恐龙王
);
else
AI
.
SelectCard
(
CardId
.
抑龙
,
CardId
.
名流雷龙
,
CardId
.
荒野盗龙
,
CardId
.
巨身多角龙
,
CardId
.
成金恐龙王
,
CardId
.
机械镰刀盗龙
);
return
true
;
}
private
bool
恐龙粉碎
Effect
()
{
ClientCard
check
=
null
;
List
<
ClientCard
>
spells
=
Enemy
.
GetSpells
();
List
<
ClientCard
>
mons
=
Enemy
.
GetMonsters
();
foreach
(
ClientCard
spell
in
spells
)
foreach
(
ClientCard
mon
in
mons
)
{
if
(
Bot
.
HasInMonstersZone
(
CardId
.
大恐龙驾
)
&&
mon
.
IsFacedown
())
check
=
mon
;
else
if
(
Bot
.
HasInMonstersZone
(
CardId
.
大恐龙驾
)
&&
spell
.
IsFacedown
())
check
=
spell
;
else
if
(
spell
.
IsFacedown
())
check
=
spell
;
else
check
=
mon
;
}
if
(
Bot
.
GetCountCardInZone
(
Bot
.
Hand
,
CardId
.
侏罗纪世界
)
>=
2
)
{
AI
.
SelectCard
(
CardId
.
侏罗纪世界
);
AI
.
SelectNextCard
(
check
);
}
else
if
(
Bot
.
GetCountCardInZone
(
Bot
.
Hand
,
CardId
.
大恐龙驾
)
>=
2
)
{
AI
.
SelectCard
(
CardId
.
大恐龙驾
);
AI
.
SelectNextCard
(
check
);
}
else
if
(
Bot
.
GetCountCardInZone
(
Bot
.
Hand
,
CardId
.
大恐龙驾
R
)
>=
2
)
{
AI
.
SelectCard
(
CardId
.
大恐龙驾
R
);
AI
.
SelectNextCard
(
check
);
}
else
if
(
Bot
.
GetCountCardInZone
(
Bot
.
Hand
,
CardId
.
大恐龙驾
L
)
>=
2
)
{
AI
.
SelectCard
(
CardId
.
大恐龙驾
L
);
AI
.
SelectNextCard
(
check
);
}
else
if
(
Bot
.
GetCountCardInZone
(
Bot
.
Hand
,
CardId
.
巨身多角龙
)
>=
2
)
{
AI
.
SelectCard
(
CardId
.
巨身多角龙
);
AI
.
SelectNextCard
(
check
);
}
else
AI
.
SelectCard
(
CardId
.
成金恐龙王
,
CardId
.
抑龙
,
CardId
.
奇迹的共进化
,
CardId
.
名流雷龙
,
CardId
.
超级恐龙王
,
CardId
.
恐力重压
,
CardId
.
超越进化
,
CardId
.
恐龙粉碎
,
CardId
.
荒野盗龙
);
AI
.
SelectNextCard
(
check
);
return
true
;
}
private
bool
超越进化
Effect
()
{
AI
.
SelectCard
(
CardId
.
大恐龙驾
,
CardId
.
超级恐龙王
);
return
true
;
}
private
bool
超级恐龙王
Effect
()
{
AI
.
SelectCard
(
CardId
.
巨身多角龙
,
CardId
.
荒野盗龙
,
CardId
.
名流雷龙
);
return
true
;
}
private
bool
MAXLsummon
()
{
if
(
Bot
.
GetCountCardInZone
(
Bot
.
Hand
,
CardId
.
大恐龙驾
L
)
>=
2
&&
Bot
.
GetCountCardInZone
(
Bot
.
Hand
,
CardId
.
奇迹的共进化
)
>=
1
&&
Bot
.
GetCountCardInZone
(
Bot
.
Hand
,
CardId
.
超级恐龙王
)
>=
1
)
return
true
;
return
false
;
}
private
bool
MAXRsummon
()
{
if
(
Bot
.
GetCountCardInZone
(
Bot
.
Hand
,
CardId
.
大恐龙驾
R
)
>=
2
&&
Bot
.
GetCountCardInZone
(
Bot
.
Hand
,
CardId
.
奇迹的共进化
)
>=
1
&&
Bot
.
GetCountCardInZone
(
Bot
.
Hand
,
CardId
.
超级恐龙王
)
>=
1
)
return
true
;
return
false
;
}
private
bool
MAXLset
()
{
if
(
Bot
.
GetCountCardInZone
(
Bot
.
Hand
,
CardId
.
大恐龙驾
L
)
<
2
)
return
false
;
return
true
;
}
private
bool
MAXRset
()
{
if
(
Bot
.
GetCountCardInZone
(
Bot
.
Hand
,
CardId
.
大恐龙驾
R
)
<
2
)
return
false
;
return
true
;
}
}
}
windbotRD/Game/AI/Decks/MokeyMokeyExecutor.cs
0 → 100644
View file @
543922ca
using
YGOSharp.OCGWrapper.Enums
;
using
System.Collections.Generic
;
using
System.Linq
;
using
WindBot
;
using
WindBot.Game
;
using
WindBot.Game.AI
;
using
System
;
namespace
WindBot.Game.AI.Decks
{
[
Deck
(
"MokeyMokey"
,
"AI_MokeyMokey"
)]
public
class
MokeyMokeyExecutor
:
DefaultExecutor
{
public
class
CardId
{
public
const
int
青眼白龙
=
120120000
;
public
const
int
破坏之剑士
=
120170000
;
public
const
int
黑魔术师
=
120130000
;
public
const
int
真红眼黑龙
=
120125001
;
public
const
int
恶魔召唤
=
120145000
;
public
const
int
人造人
=
120155000
;
public
const
int
连击龙
=
120110001
;
public
const
int
七星道魔术师
=
120105001
;
public
const
int
雅灭鲁拉
=
120120029
;
public
const
int
耳语妖精
=
120120018
;
public
const
int
神秘庄家
=
120105006
;
public
const
int
火星心少女
=
120145014
;
public
const
int
斗牛士
=
120170035
;
public
const
int
凤凰龙
=
120110009
;
public
const
int
七星道法师
=
120130016
;
public
const
int
sionmax
=
120150007
;
public
const
int
对死者的供奉
=
120151023
;
public
const
int
落穴
=
120150019
;
public
const
int
暗黑释放
=
120105013
;
}
public
MokeyMokeyExecutor
(
GameAI
ai
,
Duel
duel
)
:
base
(
ai
,
duel
)
{
AddExecutor
(
ExecutorType
.
SpSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
七星道法师
,
七星道法师
Effect
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
青眼白龙
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
破坏之剑士
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
恶魔召唤
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
连击龙
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
雅灭鲁拉
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
黑魔术师
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
真红眼黑龙
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
七星道魔术师
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
人造人
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
神秘庄家
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
神秘庄家
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
暗黑释放
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
落穴
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
落穴
,
落穴
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
对死者的供奉
,
死供
Effect
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
对死者的供奉
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
凤凰龙
,
monsterset
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
火星心少女
,
monsterset
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
七星道法师
,
monsterset
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
耳语妖精
,
monsterset
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
七星道法师
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
凤凰龙
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
凤凰龙
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Repos
,
DefaultMonsterRepos
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
落穴
,
落穴
Effect
);
AddExecutor
(
ExecutorType
.
SpellSet
);
//AddExecutor(ExecutorType.Activate, CardId.sionmax, sionmaxEffect);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
耳语妖精
,
耳语妖精
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
火星心少女
,
火星心少女
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
连击龙
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
七星道魔术师
);
//AddExecutor(ExecutorType.Activate, CardId.斗牛士, 斗牛士Effect);
AddExecutor
(
ExecutorType
.
Activate
,
DefaultDontChainMyself
);
}
private
List
<
int
>
HintMsgForEnemy
=
new
List
<
int
>
{
HintMsg
.
Release
,
HintMsg
.
Destroy
,
HintMsg
.
Remove
,
HintMsg
.
ToGrave
,
HintMsg
.
ReturnToHand
,
HintMsg
.
ToDeck
,
HintMsg
.
FusionMaterial
,
HintMsg
.
SynchroMaterial
,
HintMsg
.
XyzMaterial
,
HintMsg
.
LinkMaterial
,
HintMsg
.
Disable
};
private
List
<
int
>
HintMsgForMaxSelect
=
new
List
<
int
>
{
HintMsg
.
SpSummon
,
HintMsg
.
ToGrave
,
HintMsg
.
AddToHand
,
HintMsg
.
ToDeck
,
HintMsg
.
Destroy
};
public
override
IList
<
ClientCard
>
OnSelectCard
(
IList
<
ClientCard
>
_cards
,
int
min
,
int
max
,
int
hint
,
bool
cancelable
)
{
if
(
Duel
.
Phase
==
DuelPhase
.
BattleStart
)
return
null
;
if
(
AI
.
HaveSelectedCards
())
return
null
;
IList
<
ClientCard
>
selected
=
new
List
<
ClientCard
>();
IList
<
ClientCard
>
cards
=
new
List
<
ClientCard
>(
_cards
);
if
(
max
>
cards
.
Count
)
max
=
cards
.
Count
;
if
(
HintMsgForEnemy
.
Contains
(
hint
))
{
IList
<
ClientCard
>
enemyCards
=
cards
.
Where
(
card
=>
card
.
Controller
==
1
).
ToList
();
// select enemy's card first
while
(
enemyCards
.
Count
>
0
&&
selected
.
Count
<
max
)
{
ClientCard
card
=
enemyCards
[
Program
.
Rand
.
Next
(
enemyCards
.
Count
)];
selected
.
Add
(
card
);
enemyCards
.
Remove
(
card
);
cards
.
Remove
(
card
);
}
}
if
(
HintMsgForMaxSelect
.
Contains
(
hint
))
{
// select max cards
while
(
selected
.
Count
<
max
)
{
ClientCard
card
=
cards
[
Program
.
Rand
.
Next
(
cards
.
Count
)];
selected
.
Add
(
card
);
cards
.
Remove
(
card
);
}
}
return
selected
;
}
public
override
bool
OnSelectHand
()
{
// go first
return
true
;
}
public
bool
monsterset
()
{
if
(
Duel
.
Turn
==
1
)
{
return
true
;
}
else
if
(
Bot
.
HasInHand
(
new
[]
{
CardId
.
七星道魔术师
,
CardId
.
连击龙
,
CardId
.
青眼白龙
,
CardId
.
人造人
,
CardId
.
恶魔召唤
,
CardId
.
雅灭鲁拉
,
CardId
.
破坏之剑士
,
CardId
.
真红眼黑龙
,
CardId
.
黑魔术师
}))
return
false
;
return
true
;
}
private
bool
耳语妖精
Effect
()
{
IList
<
ClientCard
>
targets
=
new
List
<
ClientCard
>();
foreach
(
ClientCard
card
in
Enemy
.
GetGraveyardMonsters
())
{
if
(
card
.
Level
<=
4
)
targets
.
Add
(
card
);
}
return
true
;
}
private
bool
落穴
Effect
()
{
foreach
(
ClientCard
n
in
Duel
.
LastSummonedCards
)
{
if
(
n
.
Attack
>=
1900
)
return
true
;
}
return
false
;
}
private
bool
死供
Effect
()
{
if
(
Util
.
IsOneEnemyBetterThanValue
(
1900
,
true
))
{
AI
.
SelectNextCard
(
Enemy
.
GetMonsters
().
GetHighestAttackMonster
());
return
true
;
}
return
false
;
}
private
bool
七星道法师
Effect
()
{
AI
.
SelectCard
(
Enemy
.
GetMonsters
().
GetHighestAttackMonster
());
return
true
;
}
private
bool
火星心少女
Effect
()
{
foreach
(
ClientCard
m
in
Bot
.
Hand
)
AI
.
SelectCard
(
m
);
AI
.
SelectNextCard
(
Enemy
.
GetMonsters
().
GetHighestAttackMonster
());
AI
.
SelectYesNo
(
true
);
return
true
;
}
}
}
windbotRD/Game/AI/Decks/MokeyMokeyKingExecutor.cs
0 → 100644
View file @
543922ca
using
YGOSharp.OCGWrapper.Enums
;
using
System.Collections.Generic
;
using
System.Linq
;
using
WindBot
;
using
WindBot.Game
;
using
WindBot.Game.AI
;
using
System
;
namespace
WindBot.Game.AI.Decks
{
[
Deck
(
"MokeyMokeyKing"
,
"AI_MokeyMokeyKing"
)]
public
class
MokeyMokeyKingExecutor
:
DefaultExecutor
{
public
class
CardId
{
public
const
int
青眼白龙
=
120120000
;
public
const
int
破坏之剑士
=
120170000
;
public
const
int
黑魔术师
=
120130000
;
public
const
int
真红眼黑龙
=
120125001
;
public
const
int
恶魔召唤
=
120145000
;
public
const
int
人造人
=
120155000
;
public
const
int
连击龙
=
120110001
;
public
const
int
七星道魔术师
=
120105001
;
public
const
int
雅灭鲁拉
=
120120029
;
public
const
int
耳语妖精
=
120120018
;
public
const
int
神秘庄家
=
120105006
;
public
const
int
火星心少女
=
120145014
;
public
const
int
斗牛士
=
120170035
;
public
const
int
凤凰龙
=
120110009
;
public
const
int
七星道法师
=
120130016
;
public
const
int
sionmax
=
120150007
;
public
const
int
对死者的供奉
=
120151023
;
public
const
int
落穴
=
120150019
;
public
const
int
暗黑释放
=
120105013
;
}
public
MokeyMokeyKingExecutor
(
GameAI
ai
,
Duel
duel
)
:
base
(
ai
,
duel
)
{
AddExecutor
(
ExecutorType
.
SpSummon
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
七星道法师
,
七星道法师
Effect
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
青眼白龙
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
破坏之剑士
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
恶魔召唤
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
连击龙
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
雅灭鲁拉
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
黑魔术师
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
真红眼黑龙
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
七星道魔术师
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
人造人
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
神秘庄家
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
神秘庄家
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
暗黑释放
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
落穴
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
落穴
,
落穴
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
对死者的供奉
,
死供
Effect
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
对死者的供奉
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
凤凰龙
,
monsterset
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
火星心少女
,
monsterset
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
七星道法师
,
monsterset
);
AddExecutor
(
ExecutorType
.
MonsterSet
,
CardId
.
耳语妖精
,
monsterset
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
七星道法师
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
凤凰龙
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
凤凰龙
);
AddExecutor
(
ExecutorType
.
SummonOrSet
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Repos
,
DefaultMonsterRepos
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
落穴
,
落穴
Effect
);
AddExecutor
(
ExecutorType
.
SpellSet
);
//AddExecutor(ExecutorType.Activate, CardId.sionmax, sionmaxEffect);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
耳语妖精
,
耳语妖精
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
火星心少女
,
火星心少女
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
连击龙
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
七星道魔术师
);
//AddExecutor(ExecutorType.Activate, CardId.斗牛士, 斗牛士Effect);
AddExecutor
(
ExecutorType
.
Activate
,
DefaultDontChainMyself
);
}
private
List
<
int
>
HintMsgForEnemy
=
new
List
<
int
>
{
HintMsg
.
Release
,
HintMsg
.
Destroy
,
HintMsg
.
Remove
,
HintMsg
.
ToGrave
,
HintMsg
.
ReturnToHand
,
HintMsg
.
ToDeck
,
HintMsg
.
FusionMaterial
,
HintMsg
.
SynchroMaterial
,
HintMsg
.
XyzMaterial
,
HintMsg
.
LinkMaterial
,
HintMsg
.
Disable
};
private
List
<
int
>
HintMsgForMaxSelect
=
new
List
<
int
>
{
HintMsg
.
SpSummon
,
HintMsg
.
ToGrave
,
HintMsg
.
AddToHand
,
HintMsg
.
ToDeck
,
HintMsg
.
Destroy
};
public
override
IList
<
ClientCard
>
OnSelectCard
(
IList
<
ClientCard
>
_cards
,
int
min
,
int
max
,
int
hint
,
bool
cancelable
)
{
if
(
Duel
.
Phase
==
DuelPhase
.
BattleStart
)
return
null
;
if
(
AI
.
HaveSelectedCards
())
return
null
;
IList
<
ClientCard
>
selected
=
new
List
<
ClientCard
>();
IList
<
ClientCard
>
cards
=
new
List
<
ClientCard
>(
_cards
);
if
(
max
>
cards
.
Count
)
max
=
cards
.
Count
;
if
(
HintMsgForEnemy
.
Contains
(
hint
))
{
IList
<
ClientCard
>
enemyCards
=
cards
.
Where
(
card
=>
card
.
Controller
==
1
).
ToList
();
// select enemy's card first
while
(
enemyCards
.
Count
>
0
&&
selected
.
Count
<
max
)
{
ClientCard
card
=
enemyCards
[
Program
.
Rand
.
Next
(
enemyCards
.
Count
)];
selected
.
Add
(
card
);
enemyCards
.
Remove
(
card
);
cards
.
Remove
(
card
);
}
}
if
(
HintMsgForMaxSelect
.
Contains
(
hint
))
{
// select max cards
while
(
selected
.
Count
<
max
)
{
ClientCard
card
=
cards
[
Program
.
Rand
.
Next
(
cards
.
Count
)];
selected
.
Add
(
card
);
cards
.
Remove
(
card
);
}
}
return
selected
;
}
public
override
bool
OnSelectHand
()
{
// go first
return
true
;
}
public
bool
monsterset
()
{
if
(
Duel
.
Turn
==
1
)
{
return
true
;
}
else
if
(
Bot
.
HasInHand
(
new
[]
{
CardId
.
七星道魔术师
,
CardId
.
连击龙
,
CardId
.
青眼白龙
,
CardId
.
人造人
,
CardId
.
恶魔召唤
,
CardId
.
雅灭鲁拉
,
CardId
.
破坏之剑士
,
CardId
.
真红眼黑龙
,
CardId
.
黑魔术师
}))
return
false
;
return
true
;
}
private
bool
耳语妖精
Effect
()
{
IList
<
ClientCard
>
targets
=
new
List
<
ClientCard
>();
foreach
(
ClientCard
card
in
Enemy
.
GetGraveyardMonsters
())
{
if
(
card
.
Level
<=
4
)
targets
.
Add
(
card
);
}
return
true
;
}
private
bool
七星道法师
Effect
()
{
AI
.
SelectCard
(
Enemy
.
GetMonsters
().
GetHighestAttackMonster
());
return
true
;
}
private
bool
落穴
Effect
()
{
foreach
(
ClientCard
n
in
Duel
.
LastSummonedCards
)
{
if
(
n
.
Attack
>=
1900
)
return
true
;
}
return
false
;
}
private
bool
死供
Effect
()
{
if
(
Util
.
IsOneEnemyBetterThanValue
(
1900
,
true
))
{
AI
.
SelectNextCard
(
Enemy
.
GetMonsters
().
GetHighestAttackMonster
());
return
true
;
}
return
false
;
}
private
bool
火星心少女
Effect
()
{
foreach
(
ClientCard
m
in
Bot
.
Hand
)
AI
.
SelectCard
(
m
);
AI
.
SelectNextCard
(
Enemy
.
GetMonsters
().
GetHighestAttackMonster
());
AI
.
SelectYesNo
(
true
);
return
true
;
}
}
}
\ No newline at end of file
windbotRD/bot.conf
0 → 100644
View file @
543922ca
#bots list
# !name
# command
# description
# flags (avail flags: SUPPORT_MASTER_RULE_3, SUPPORT_NEW_MASTER_RULE, SUPPORT_MASTER_RULE_2020)
!齿车戒龙
Name
=齿车戒龙
Deck
=
MokeyMokey
Dialog
=
zh
-
CN
龙法卡组。
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!破坏剑士
Name
=破坏剑士
Deck
=
MokeyMokeyKing
Dialog
=
zh
-
CN
加强版龙法卡组。需勾选不检查卡组才能对战。
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
!大恐龙驾
Name
=大恐龙驾
Deck
=
DinocarriageDynarmix
Dialog
=
zh
-
CN
恐龙卡组。
SUPPORT_MASTER_RULE_3
SUPPORT_NEW_MASTER_RULE
SUPPORT_MASTER_RULE_2020
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