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
神之吹息
windbot
Commits
72bf1203
Commit
72bf1203
authored
Oct 26, 2023
by
苍蓝
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix 救火女
parent
5ebbbd4f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
112 additions
and
47 deletions
+112
-47
Decks/AI_Mituzi.ydk
Decks/AI_Mituzi.ydk
+6
-6
Game/AI/Decks/ExcutieExecutor.cs
Game/AI/Decks/ExcutieExecutor.cs
+56
-26
Game/AI/Decks/MituziExecutor.cs
Game/AI/Decks/MituziExecutor.cs
+43
-15
Game/AI/Enums/DangerousMonster.cs
Game/AI/Enums/DangerousMonster.cs
+7
-0
No files found.
Decks/AI_Mituzi.ydk
View file @
72bf1203
#created by ...
#main
1202
38019
1202
47063
120199020
120199020
120199020
...
...
@@ -12,9 +12,9 @@
120155002
120155002
120155002
120
155001
120
155001
120
155001
120
247046
120
247046
120
247046
120192010
120192010
120192010
...
...
@@ -36,8 +36,8 @@
120194004
120155042
120155042
120
151033
120
151033
120
247058
120
247058
120155054
120155053
120198003
...
...
Game/AI/Decks/ExcutieExecutor.cs
View file @
72bf1203
...
...
@@ -42,7 +42,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
紧急事态
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
幻影咆哮
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
救火女
,
救火女
Sp
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
夜魔女
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
光天女
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
细剑女
);
...
...
@@ -52,7 +52,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
SpellSet
,
_CardId
.
黑洞
);
AddExecutor
(
ExecutorType
.
SpellSet
,
_CardId
.
圣防
);
AddExecutor
(
ExecutorType
.
SpellSet
,
_CardId
.
傲慢之壶
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
救火女
,
救火女
Sp
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
花草女
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
遥控女
,
遥控女
Effect1
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
浮游女
,
浮游女
Effect
);
...
...
@@ -82,7 +82,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
遥控女
,
遥控女
Effect2
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
救火女
,
救火女
Effect2
);
AddExecutor
(
ExecutorType
.
Activate
,
DefaultDontChainMyself
);
//
AddExecutor(ExecutorType.Activate, DefaultDontChainMyself);
AddExecutor
(
ExecutorType
.
Repos
,
DefaultMonsterRepos
);
AddExecutor
(
ExecutorType
.
Repos
,
CardId
.
花草女
,
圣防
Repos
);
...
...
@@ -104,6 +104,23 @@ namespace WindBot.Game.AI.Decks
{
atkup
=
false
;
}
public
override
BattlePhaseAction
OnSelectAttackTarget
(
ClientCard
attacker
,
IList
<
ClientCard
>
defenders
)
{
int
minAttack
=
1450
;
foreach
(
ClientCard
defender
in
defenders
)
{
if
(
defender
.
IsAttack
()
&&
defender
.
Attack
<
minAttack
)
minAttack
=
defender
.
Attack
;
}
foreach
(
ClientCard
defenderCard
in
defenders
)
if
(
defenderCard
.
IsAttack
()
&&
defenderCard
.
Attack
==
minAttack
)
{
return
AI
.
Attack
(
attacker
,
defenderCard
);
}
return
base
.
OnSelectAttackTarget
(
attacker
,
defenders
);
}
private
IList
<
int
>
targets
=
new
[]
{
CardId
.
夜魔女
,
CardId
.
光天女
,
CardId
.
细剑女
,
CardId
.
救火女
,
CardId
.
浮游女
,
CardId
.
遥控女
,
CardId
.
主存女
,
CardId
.
花草女
};
...
...
@@ -115,8 +132,7 @@ namespace WindBot.Game.AI.Decks
private
bool
救火女
Sp
()
{
int
topattack
=
(
Bot
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
card
.
Level
==
6
)
+
Enemy
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
card
.
Level
==
6
))
*
600
+
1700
;
if
(
Util
.
IsOneEnemyBetter
()
&&
!
atkup
&&
Util
.
GetBestAttack
(
Enemy
)
<
topattack
)
if
(
Util
.
IsOneEnemyBetter
()
&&
!
atkup
&&
Util
.
GetBestAttack
(
Enemy
)
<
topattack
)
return
true
;
return
false
;
}
...
...
@@ -164,40 +180,42 @@ namespace WindBot.Game.AI.Decks
private
bool
救火女
Effect1
()
{
int
topattack
=
(
Bot
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
card
.
Level
==
6
)
+
Enemy
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
card
.
Level
==
6
))
*
600
+
1700
;
if
(
Util
.
IsOneEnemyBetter
()
&&
!
atkup
&&
Util
.
GetBestAttack
(
Enemy
)
<
topattack
)
if
((
Util
.
IsOneEnemyBetter
()
&&
!
atkup
&&
Util
.
GetBestAttack
(
Enemy
)
<
topattack
)
||
(
Enemy
.
HasAttackingMonster
()
&&
Enemy
.
GetMonsters
().
Any
(
card
=>
card
?.
Data
==
null
))
)
{
foreach
(
ClientCard
m
in
Bot
.
Hand
)
AI
.
SelectCard
(
m
);
atkup
=
true
;
return
true
;
}
return
false
;
}
private
bool
救火女
Effect2
()
{
if
(!
atkup
&&
Enemy
.
HasAttackingMonster
())
int
topattack
=
(
Bot
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
card
.
Level
==
6
)
+
Enemy
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
card
.
Level
==
6
))
*
600
+
1700
;
ClientCard
enemymon
=
Enemy
.
GetMonsters
().
GetLowestAttackMonster
();
if
(
enemymon
!=
null
&&
!
atkup
&&
Enemy
.
HasAttackingMonster
()
&&
!
Util
.
IsOneEnemyBetter
())
{
int
topattack
=
(
Bot
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
card
.
Level
==
6
)
+
Enemy
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
card
.
Level
==
6
))
*
600
+
1700
;
if
(
Util
.
GetTotalAttackingMonsterAttack
(
0
)
<
topattack
||
(
topattack
>=
Enemy
.
LifePoints
+
Enemy
.
GetMonsters
().
GetLowestAttackMonster
().
Attack
))
if
(
Util
.
GetTotalAttackingMonsterAttack
(
0
)
+
100
<=
topattack
||
Enemy
.
LifePoints
+
enemymon
.
Attack
<=
topattack
)
{
foreach
(
ClientCard
m
in
Bot
.
Hand
)
AI
.
SelectCard
(
m
);
atkup
=
true
;
return
true
;
}
return
false
;
}
return
false
;
}
private
bool
光天女
Effect
()
{
var
mon
=
Enemy
.
MonsterZone
.
GetMatchingCards
(
card
=>
card
.
Level
==
7
||
card
.
Level
==
8
).
OrderByDescending
(
card
=>
card
.
Attack
).
FirstOrDefault
();
ClientCard
mon
=
Enemy
.
MonsterZone
.
GetMatchingCards
(
card
=>
card
.
Level
==
7
||
card
.
Level
==
8
).
OrderByDescending
(
card
=>
card
.
Attack
).
FirstOrDefault
();
if
(
mon
!=
null
)
{
AI
.
SelectCard
(
tar
);
AI
.
Select
Next
Card
(
mon
);
AI
.
SelectCard
(
mon
);
return
true
;
}
return
false
;
...
...
@@ -227,8 +245,8 @@ namespace WindBot.Game.AI.Decks
private
bool
遥控女
Effect1
()
{
var
mon
=
Enemy
.
MonsterZone
.
GetHighestAttackMonster
(
);
if
(
mon
.
Attack
>
1800
&&
mon
.
Defense
<
Util
.
GetBestBotMonster
().
Attack
&&
Bot
.
HasInGraveyard
(
targets
))
ClientCard
mon
=
Util
.
GetOneEnemyBetterThanValue
(
1800
);
if
(
mon
!=
null
&&
mon
.
Defense
<
Util
.
GetBestBotMonster
().
Attack
&&
Bot
.
HasInGraveyard
(
targets
))
AI
.
SelectCard
(
targets
);
AI
.
SelectNextCard
(
mon
);
return
true
;
...
...
@@ -255,19 +273,31 @@ namespace WindBot.Game.AI.Decks
}
private
bool
劈裂史莱姆
Effect
()
{
var
mon
=
Enemy
.
MonsterZone
.
GetHighestAttackMonster
();
int
att
=
Bot
.
MonsterZone
.
GetHighestAttackMonster
().
Attack
;
if
(
mon
.
Attack
<=
att
+
1000
&&
mon
.
Attack
>
att
)
ClientCard
mon
=
Enemy
.
GetMonsters
()
.
GetHighestAttackMonster
();
ClientCard
m
=
Bot
.
GetMonsters
().
GetHighestAttackMonster
()
;
if
(
mon
!=
null
&&
m
!=
null
&&
mon
.
Attack
<=
m
.
Attack
+
1000
&&
mon
.
Attack
>
m
.
Attack
)
{
AI
.
SelectCard
(
tar
);
AI
.
SelectNextCard
(
mon
);
if
(
Bot
.
HasInGraveyard
(
_CardId
.
幻影之龙
))
{
AI
.
SelectYesNo
(
true
);
AI
.
SelectThirdCard
(
_CardId
.
幻影之龙
);
}
return
true
;
}
if
((
Bot
.
HasInMonstersZone
(
CardId
.
花草女
)
||
Bot
.
HasInMonstersZone
(
CardId
.
主存女
))
&&
Bot
.
HasInGraveyard
(
_CardId
.
幻影之龙
))
if
(
mon
!=
null
&&
m
!=
null
&&
(
Bot
.
HasInMonstersZone
(
CardId
.
花草女
)
||
Bot
.
HasInMonstersZone
(
CardId
.
主存女
))
&&
Bot
.
HasInGraveyard
(
_CardId
.
幻影之龙
))
{
AI
.
SelectCard
(
CardId
.
花草女
,
CardId
.
主存女
);
AI
.
SelectNextCard
(
mon
);
AI
.
SelectYesNo
(
true
);
AI
.
SelectThirdCard
(
_CardId
.
幻影之龙
);
return
true
;
}
if
(
mon
!=
null
&&
Bot
.
HasInMonstersZone
(
_CardId
.
幻影之龙
))
{
AI
.
SelectCard
(
_CardId
.
幻影之龙
);
AI
.
SelectNextCard
(
mon
);
AI
.
SelectYesNo
(
true
);
AI
.
SelectThirdCard
(
_CardId
.
幻影之龙
);
return
true
;
}
...
...
Game/AI/Decks/MituziExecutor.cs
View file @
72bf1203
...
...
@@ -15,6 +15,7 @@ namespace WindBot.Game.AI.Decks
{
public
class
CardId
{
public
const
int
幻煌
=
120247063
;
public
const
int
起重龙
=
120199020
;
public
const
int
幻龙重骑
=
120155022
;
public
const
int
建造龙
=
120155024
;
...
...
@@ -24,7 +25,7 @@ namespace WindBot.Game.AI.Decks
public
const
int
荒废蟠龙
=
120192011
;
public
const
int
风车鳞虫
=
120183034
;
public
const
int
丰沃蟠龙
=
120170037
;
public
const
int
钻头蜥蜴
=
120155001
;
public
const
int
高空工龙
=
120247046
;
public
const
int
镐头龙
=
120155025
;
public
const
int
贯通
=
120120037
;
public
const
int
阴阳封阵
=
120183053
;
...
...
@@ -34,13 +35,13 @@ namespace WindBot.Game.AI.Decks
public
const
int
幻刃复归
=
120151033
;
public
const
int
幻刃急攻
=
120155053
;
public
const
int
幻刃封锁
=
120155054
;
public
const
int
幻坏奥义
=
120247058
;
public
const
int
暗黑释放
=
120105013
;
}
public
int
[]
priList
=
{
CardId
.
起重龙
,
CardId
.
建造龙
,
CardId
.
幻龙重骑
,
CardId
.
幻刃破龙
};
public
int
[]
rePriList
=
{
CardId
.
幻刃破龙
,
CardId
.
幻龙重骑
,
CardId
.
建造龙
,
CardId
.
起重龙
,
};
public
int
[]
priList
=
{
CardId
.
起重龙
,
CardId
.
建造龙
,
CardId
.
幻龙重骑
,
CardId
.
幻煌
,
CardId
.
幻刃破龙
};
public
int
[]
rePriList
=
{
CardId
.
幻刃破龙
,
CardId
.
幻
煌
,
CardId
.
幻
龙重骑
,
CardId
.
建造龙
,
CardId
.
起重龙
,
};
public
MituziExecutor
(
GameAI
ai
,
Duel
duel
)
:
base
(
ai
,
duel
)
{
...
...
@@ -51,6 +52,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
_CardId
.
落穴
,
落穴
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
_CardId
.
激流葬
,
激流葬
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
_CardId
.
圣防
,
圣防
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
幻坏奥义
,
奥义
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
阴阳封阵
,
阴阳封阵
Effect
);
AddExecutor
(
ExecutorType
.
SpellSet
,
CardId
.
阴阳封阵
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
透幻乡险峻
,
DefaultField
);
...
...
@@ -63,6 +65,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
起重龙
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
建造龙
,
建造龙
Effect
);
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
镐头龙
,
镐头龙
Effect
);
AddExecutor
(
ExecutorType
.
Summon
,
CardId
.
幻煌
,
DefaultMonsterSummon
);
AddExecutor
(
ExecutorType
.
Summon
,
_CardId
.
伟大魔兽
,
伟大魔兽
Summon
);
AddExecutor
(
ExecutorType
.
Summon
,
幻刃急攻
Summon
);
...
...
@@ -296,7 +299,7 @@ namespace WindBot.Game.AI.Decks
private
bool
镐头龙
Summon
()
{
if
(
Bot
.
HasInMonstersZone
(
CardId
.
幻刃破龙
)
&&
Bot
.
HasInHand
(
CardId
.
建造龙
)
&&
Bot
.
HasInHand
(
CardId
.
起重龙
))
if
(
Bot
.
HasInMonstersZone
(
CardId
.
幻刃破龙
)
||
(
Bot
.
HasInMonstersZone
(
CardId
.
幻煌
))
&&
Bot
.
HasInHand
(
CardId
.
建造龙
)
&&
Bot
.
HasInHand
(
CardId
.
起重龙
))
return
Discord1Draw1Eff
(
CardRace
.
Wyrm
,
false
,
true
);
return
Discord1Draw1Eff
(
CardRace
.
Wyrm
,
false
,
false
);
}
...
...
@@ -415,17 +418,15 @@ namespace WindBot.Game.AI.Decks
{
if
(
_card
.
Level
<
5
)
return
true
;
int
tributeAllow
=
Bot
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
card
.
Level
<
5
);
if
(
_card
.
Id
==
CardId
.
建造龙
)
if
(
Bot
.
SpellZone
.
GetMatchingCardsCount
(
card
=>
card
.
HasType
(
CardType
.
Field
))
+
Enemy
.
SpellZone
.
GetMatchingCardsCount
(
card
=>
card
.
HasType
(
CardType
.
Field
))
>
0
)
{
if
(
_card
.
Id
==
CardId
.
建造龙
)
tributeAllow
+=
Bot
.
HasInMonstersZone
(
CardId
.
幻刃破龙
)
?
1
:
0
;
if
(
Bot
.
SpellZone
.
GetMatchingCardsCount
(
card
=>
card
.
HasType
(
CardType
.
Field
))>
0
||
Enemy
.
SpellZone
.
GetMatchingCardsCount
(
card
=>
card
.
HasType
(
CardType
.
Field
))
>
0
)
{
tributeAllow
+=
Bot
.
HasInMonstersZone
(
CardId
.
幻龙重骑
)
?
1
:
0
;
tributeAllow
+=
Bot
.
HasInMonstersZone
(
CardId
.
幻煌
)
?
1
:
0
;
if
(
_card
.
Id
==
CardId
.
起重龙
||
Bot
.
HasInMonstersZone
(
CardId
.
起重龙
))
tributeAllow
+=
Bot
.
HasInMonstersZone
(
CardId
.
建造龙
)
?
1
:
0
;
}
}
if
(
_card
.
Id
==
CardId
.
幻龙重骑
)
tributeAllow
+=
Bot
.
HasInMonstersZone
(
CardId
.
幻刃破龙
)
?
1
:
0
;
if
(
_card
.
Id
!=
CardId
.
幻刃破龙
&&
Bot
.
Hand
.
GetMatchingCardsCount
(
card
=>
card
.
Level
>
6
)
>
2
&&
if
((
_card
.
Id
!=
CardId
.
幻刃破龙
||
_card
.
Id
!=
CardId
.
幻煌
)
&&
Bot
.
Hand
.
GetMatchingCardsCount
(
card
=>
card
.
Level
>
6
)
>
2
&&
Bot
.
Hand
.
GetMatchingCardsCount
(
card
=>
card
.
Level
<
5
)
+
Bot
.
MonsterZone
.
GetMatchingCardsCount
(
card
=>
card
.
Level
<
5
)
<
2
)
tributeAllow
=
Bot
.
GetMonsterCount
();
return
tributeAllow
>=
(
_card
.
Level
>
6
?
2
:
1
);
...
...
@@ -467,7 +468,7 @@ namespace WindBot.Game.AI.Decks
}
private
bool
镐头龙
Effect
()
{
if
(
Bot
.
HasInMonstersZone
(
CardId
.
幻刃破龙
)
&&
Bot
.
HasInHand
(
CardId
.
建造龙
)
&&
Bot
.
HasInHand
(
CardId
.
起重龙
))
if
(
Bot
.
HasInMonstersZone
(
CardId
.
幻刃破龙
)
||
(
Bot
.
HasInMonstersZone
(
CardId
.
幻煌
))
&&
Bot
.
HasInHand
(
CardId
.
建造龙
)
&&
Bot
.
HasInHand
(
CardId
.
起重龙
))
return
Discord1Draw1Eff
(
CardRace
.
Wyrm
,
true
,
true
);
return
Discord1Draw1Eff
(
CardRace
.
Wyrm
,
true
,
false
);
}
...
...
@@ -604,6 +605,33 @@ namespace WindBot.Game.AI.Decks
}
return
false
;
}
private
bool
奥义
Effect
()
{
var
cards
=
Bot
.
Graveyard
.
GetMatchingCards
(
card
=>
(
card
.
Race
&
(
int
)
CardRace
.
Wyrm
)
>
0
);
int
totalLevel
=
cards
.
Sum
(
card
=>
card
.
Level
);
if
(
totalLevel
>=
16
)
{
var
sortedCards
=
cards
.
OrderBy
(
card
=>
card
.
Level
).
ToList
();
var
ttl
=
0
;
var
targets
=
new
List
<
ClientCard
>();
for
(
int
i
=
0
;
i
<
sortedCards
.
Count
()
&&
ttl
<
16
;
i
++)
{
targets
.
Add
(
sortedCards
[
i
]);
ttl
+=
sortedCards
[
i
].
Level
;
}
if
(
ttl
>=
16
)
{
if
(
Util
.
GetTotalAttackingMonsterAttack
(
1
)
>=
1900
&&
(
Enemy
.
GetMonsters
().
GetImmuneTrapMonster
()
==
null
)
||
Util
.
GetTotalAttackingMonsterAttack
(
1
)
-
Util
.
GetTotalAttackingMonsterAttack
(
0
)
>
Bot
.
LifePoints
&&
!
Bot
.
HasDefendingMonster
())
{
AI
.
SelectCard
(
targets
);
return
true
;
}
}
}
return
false
;
}
private
bool
贯通
Effect
()
{
...
...
@@ -651,7 +679,7 @@ namespace WindBot.Game.AI.Decks
{
if
(
isAISelect
)
{
int
[]
localList
=
new
int
[]
{
CardId
.
建造龙
,
CardId
.
幻刃破龙
,
CardId
.
起重龙
};
int
[]
localList
=
new
int
[]
{
CardId
.
建造龙
,
CardId
.
幻刃破龙
,
CardId
.
幻煌
,
CardId
.
起重龙
};
if
(
Bot
.
HasInMonstersZone
(
CardId
.
建造龙
)
&&
建造龙
Effect
(
true
,
false
))
{
if
(
Bot
.
HasInGraveyard
(
localList
[
0
])
||
Bot
.
HasInGraveyard
(
localList
[
1
]))
...
...
Game/AI/Enums/DangerousMonster.cs
View file @
72bf1203
...
...
@@ -33,14 +33,21 @@
超魔机神
=
120150002
,
超魔机神
2
=
120231005
,
超魔辉兽
=
120217002
,
超魔辉兽
2
=
120239005
,
超魔轨道
=
120239002
,
灰霸炎神
=
120170015
,
大恐龙驾
=
120151007
,
终焰魔神
=
120231007
,
焰魔神
=
120231011
,
深渊杀戮者
=
120249023
,
三日月之剑豪将军
=
120196033
,
剑黎
=
120246080
,
新种掠夺萝卜
=
120228035
,
武枪
=
120231052
,
苍救之幻影
=
120235041
,
流星黑龙兽
=
120253047
,
极乐鹰巨人
=
120227001
,
鹰身三姐妹
=
120247002
,
}
}
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