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
1ccd1824
Commit
1ccd1824
authored
Sep 18, 2024
by
Tang Xinwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发牌姬二期:宝箱怪、AI用赌博卡智力改善
贡献者:神数不神
parent
7ffb811e
Pipeline
#29864
passed with stage
in 37 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
7 deletions
+36
-7
Game/AI/DefaultExecutor.cs
Game/AI/DefaultExecutor.cs
+27
-3
Game/GameAI.cs
Game/GameAI.cs
+9
-4
No files found.
Game/AI/DefaultExecutor.cs
View file @
1ccd1824
...
...
@@ -239,8 +239,8 @@ namespace WindBot.Game.AI
});
SetFuncFilter
(
ExecutorType
.
Activate
,
()
=>
{
if
(
Card
.
IsCode
(
5990062
))
return
Bot
.
HasInSpellZone
(
9373534
);
//[大逆转谜题]只有在自己场上有手里剑覆盖的场合才发动
if
(
Card
.
IsCode
(
3493058
))
return
Bot
.
GetSpellCount
()
+
Enemy
.
GetSpellCount
()
>
0
;
//[骰子旋风]
玩家场上有魔陷才发动
if
(
Card
.
IsCode
(
5990062
))
return
Bot
.
HasInSpellZone
(
9373534
);
//[大逆转谜题]只有在自己场上有手里剑覆盖的场合才发动
if
(
Card
.
IsCode
(
3493058
))
return
Enemy
.
GetSpellCount
()
>
0
;
//[骰子旋风]对方
玩家场上有魔陷才发动
if
(
Card
.
IsCode
(
22802010
))
//[无差别崩坏]自己场上怪兽少于对方才发动
return
Bot
.
MonsterZone
.
Count
(
c
=>
c
!=
null
&&
c
.
IsFaceup
()
&&
!
c
.
HasType
(
CardType
.
Link
))
<
Enemy
.
MonsterZone
.
Count
(
c
=>
c
!=
null
&&
c
.
IsFaceup
()
&&
!
c
.
HasType
(
CardType
.
Link
));
return
false
;
...
...
@@ -637,7 +637,31 @@ namespace WindBot.Game.AI
lowMonsters
.
AddRange
(
powerfulMonsters
);
return
Util
.
CheckSelectCount
(
lowMonsters
,
cards
,
min
,
max
);
}
if
(
hint
==
HintMsg
.
Destroy
)
{
if
(
AI
.
HaveSelectedCards
())
return
null
;
//[骰子旋风]破坏对方场上的魔法陷阱
List
<
ClientCard
>
ccards
=
new
List
<
ClientCard
>(
cards
);
bool
spellCard
=
true
;
List
<
ClientCard
>
enemyCards
=
new
List
<
ClientCard
>();
List
<
ClientCard
>
botCards
=
new
List
<
ClientCard
>();
foreach
(
ClientCard
card
in
ccards
)
{
if
(
card
==
null
)
continue
;
if
(!
card
.
HasType
(
CardType
.
Spell
)
&&
!
card
.
HasType
(
CardType
.
Trap
))
{
spellCard
=
false
;
break
;
}
if
(
card
.
Controller
==
1
)
enemyCards
.
Add
(
card
);
else
botCards
.
Add
(
card
);
}
if
(
spellCard
)
{
enemyCards
.
AddRange
(
botCards
);
return
Util
.
CheckSelectCount
(
enemyCards
,
cards
,
min
,
max
);
}
}
return
null
;
}
...
...
Game/GameAI.cs
View file @
1ccd1824
...
...
@@ -1172,10 +1172,15 @@ namespace WindBot.Game
if
(!
Executor
.
OnPreActivate
(
card
))
return
false
;
}
bool
result
=
card
!=
null
&&
exec
.
Type
==
type
&&
(
exec
.
CardId
==
-
1
||
exec
.
CardId
==
card
.
Id
)
&&
(
exec
.
Func
==
null
||
exec
.
Func
());
if
(
card
.
Id
!=
0
&&
type
==
ExecutorType
.
Activate
&&
result
)
Func
<
bool
>
Func
=
()
=>
{
if
(
Executor
.
FuncFilters
.
ContainsKey
(
exec
.
Type
)
&&
Executor
.
FuncFilters
[
exec
.
Type
]
!=
null
&&
!
Executor
.
FuncFilters
[
exec
.
Type
]())
return
false
;
return
exec
.
Func
==
null
||
exec
.
Func
();
};
bool
result
=
card
!=
null
&&
exec
.
Type
==
type
&&
(
exec
.
CardId
==
-
1
||
exec
.
CardId
==
card
.
Id
)
&&
Func
();
if
(
card
.
Id
!=
0
&&
type
==
ExecutorType
.
Activate
&&
result
)
{
int
count
=
card
.
IsDisabled
()
?
3
:
1
;
if
(!
_activatedCards
.
ContainsKey
(
card
.
Id
))
...
...
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