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
HiiragiGuardians
windbot
Commits
c69d4a4b
Commit
c69d4a4b
authored
Jul 31, 2022
by
wyykak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add dingdang support
Signed-off-by:
wyykak
<
wyy_1414@126.com
>
parent
650a0ad9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
130 additions
and
72 deletions
+130
-72
App.config
App.config
+1
-1
BotWrapper/BotWrapper.csproj
BotWrapper/BotWrapper.csproj
+62
-60
BotWrapper/app.config
BotWrapper/app.config
+3
-3
Decks/AI_THC_DSReimu.ydk
Decks/AI_THC_DSReimu.ydk
+7
-4
Game/AI/Decks/THC_DSReimuExecutor.cs
Game/AI/Decks/THC_DSReimuExecutor.cs
+54
-3
WindBot.csproj
WindBot.csproj
+3
-1
No files found.
App.config
View file @
c69d4a4b
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
configuration
>
<
startup
>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.
0
"
/>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.
8
"
/>
</
startup
>
</
configuration
>
BotWrapper/BotWrapper.csproj
View file @
c69d4a4b
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"14.0"
DefaultTargets=
"Build"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<Import
Project=
"$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props"
Condition=
"Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"
/>
<PropertyGroup>
<Configuration
Condition=
" '$(Configuration)' == '' "
>
Debug
</Configuration>
<Platform
Condition=
" '$(Platform)' == '' "
>
AnyCPU
</Platform>
<ProjectGuid>
{0665CA3B-C14F-40EC-ABFB-AD46A695F5A3}
</ProjectGuid>
<OutputType>
WinExe
</OutputType>
<AppDesignerFolder>
Properties
</AppDesignerFolder>
<RootNamespace>
BotWrapper
</RootNamespace>
<AssemblyName>
Bot
</AssemblyName>
<TargetFrameworkVersion>
v4.0
</TargetFrameworkVersion>
<FileAlignment>
512
</FileAlignment>
<TargetFrameworkProfile
/>
</PropertyGroup>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Debug|x86'"
>
<PlatformTarget>
x86
</PlatformTarget>
<DebugSymbols>
true
</DebugSymbols>
<DebugType>
full
</DebugType>
<Optimize>
false
</Optimize>
<OutputPath>
bin\Debug\
</OutputPath>
<DefineConstants>
DEBUG;TRACE
</DefineConstants>
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
</PropertyGroup>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Release|x86'"
>
<PlatformTarget>
x86
</PlatformTarget>
<DebugType>
pdbonly
</DebugType>
<Optimize>
true
</Optimize>
<OutputPath>
bin\Release\
</OutputPath>
<DefineConstants>
TRACE
</DefineConstants>
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject>
BotWrapper.BotWrapper
</StartupObject>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>
WindBot.ico
</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference
Include=
"System"
/>
<Reference
Include=
"System.Data"
/>
<Reference
Include=
"System.Xml"
/>
</ItemGroup>
<ItemGroup>
<Compile
Include=
"BotWrapper.cs"
/>
<Compile
Include=
"Properties\AssemblyInfo.cs"
/>
</ItemGroup>
<ItemGroup>
<None
Include=
"app.config"
/>
<None
Include=
"bot.conf"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Content
Include=
"WindBot.ico"
/>
</ItemGroup>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
/>
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"14.0"
DefaultTargets=
"Build"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<Import
Project=
"$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props"
Condition=
"Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"
/>
<PropertyGroup>
<Configuration
Condition=
" '$(Configuration)' == '' "
>
Debug
</Configuration>
<Platform
Condition=
" '$(Platform)' == '' "
>
AnyCPU
</Platform>
<ProjectGuid>
{0665CA3B-C14F-40EC-ABFB-AD46A695F5A3}
</ProjectGuid>
<OutputType>
WinExe
</OutputType>
<AppDesignerFolder>
Properties
</AppDesignerFolder>
<RootNamespace>
BotWrapper
</RootNamespace>
<AssemblyName>
Bot
</AssemblyName>
<TargetFrameworkVersion>
v4.8
</TargetFrameworkVersion>
<FileAlignment>
512
</FileAlignment>
<TargetFrameworkProfile
/>
</PropertyGroup>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Debug|x86'"
>
<PlatformTarget>
x86
</PlatformTarget>
<DebugSymbols>
true
</DebugSymbols>
<DebugType>
full
</DebugType>
<Optimize>
false
</Optimize>
<OutputPath>
bin\Debug\
</OutputPath>
<DefineConstants>
DEBUG;TRACE
</DefineConstants>
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
<Prefer32Bit>
false
</Prefer32Bit>
</PropertyGroup>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Release|x86'"
>
<PlatformTarget>
x86
</PlatformTarget>
<DebugType>
pdbonly
</DebugType>
<Optimize>
true
</Optimize>
<OutputPath>
bin\Release\
</OutputPath>
<DefineConstants>
TRACE
</DefineConstants>
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
<Prefer32Bit>
false
</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<StartupObject>
BotWrapper.BotWrapper
</StartupObject>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>
WindBot.ico
</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference
Include=
"System"
/>
<Reference
Include=
"System.Data"
/>
<Reference
Include=
"System.Xml"
/>
</ItemGroup>
<ItemGroup>
<Compile
Include=
"BotWrapper.cs"
/>
<Compile
Include=
"Properties\AssemblyInfo.cs"
/>
</ItemGroup>
<ItemGroup>
<None
Include=
"app.config"
/>
<None
Include=
"bot.conf"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Content
Include=
"WindBot.ico"
/>
</ItemGroup>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
/>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
-->
</Project>
\ No newline at end of file
BotWrapper/app.config
View file @
c69d4a4b
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
configuration
>
<
startup
><
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.
0"
/></
startup
></
configuration
>
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
configuration
>
<
startup
><
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.
8"
/></
startup
></
configuration
>
Decks/AI_THC_DSReimu.ydk
View file @
c69d4a4b
#created by ...
#main
74561023
16011501
14050011
14050011
10278
74561023
74561023
74561020
...
...
@@ -26,6 +22,7 @@
16000006
16000006
10278
10278
10020
10020
10020
...
...
@@ -39,6 +36,9 @@
86379728
86379728
14050011
14050011
14050011
16011501
16011501
16011501
#extra
...
...
@@ -48,6 +48,9 @@
23504
23504
23504
17030980
17030980
17030980
!side
74561004
23501
Game/AI/Decks/THC_DSReimuExecutor.cs
View file @
c69d4a4b
...
...
@@ -33,7 +33,10 @@ namespace WindBot.Game.AI.Decks
public
const
int
幼女化
=
74561045
;
public
const
int
天狗
L2
=
23504
;
public
const
int
叮当
=
17030980
;
}
readonly
int
[]
叮当素材
=
{
CardId
.
幼女化
,
CardId
.
女神天子
,
CardId
.
天子翼
,
CardId
.
萨丽艾尔
,
16019999
};
public
THC_DSReimuExecutor
(
GameAI
ai
,
Duel
duel
)
:
base
(
ai
,
duel
)
{
...
...
@@ -63,6 +66,7 @@ namespace WindBot.Game.AI.Decks
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
有顶天场地
,
()
=>
!(
AlreadySucceeded
()
&&
Bot
.
HasInHand
(
CardId
.
梦想天生
)));
AddExecutor
(
ExecutorType
.
Activate
,
CardId
.
灵符
);
AddExecutor
(
ExecutorType
.
SpSummon
,
CardId
.
叮当
,
叮当特召
);
}
...
...
@@ -77,6 +81,14 @@ namespace WindBot.Game.AI.Decks
// go first
return
true
;
}
public
override
CardPosition
OnSelectPosition
(
int
cardId
,
IList
<
CardPosition
>
positions
)
{
if
(
cardId
==
CardId
.
萨丽艾尔
&&
positions
.
Contains
(
CardPosition
.
FaceUpAttack
))
{
return
CardPosition
.
FaceUpAttack
;
}
return
base
.
OnSelectPosition
(
cardId
,
positions
);
}
public
override
IList
<
ClientCard
>
OnSelectCard
(
IList
<
ClientCard
>
cards
,
int
min
,
int
max
,
int
hint
,
bool
cancelable
)
{
if
(
hint
==
HintMsg
.
Discard
)
...
...
@@ -103,7 +115,7 @@ namespace WindBot.Game.AI.Decks
{
return
false
;
}
return
(!
AlreadySucceeded
()
&&
!
HasDSTunerOnField
()
&&
HasSpSummonableNonTuner
(
Card
))
||
NeedToFreeSZone
();
return
(!
HasDSTunerOnField
()
&&
HasSpSummonableNonTuner
(
Card
))
||
NeedToFreeSZone
();
}
private
bool
女神天子等级提升
()
{
...
...
@@ -140,7 +152,7 @@ namespace WindBot.Game.AI.Decks
{
return
true
;
}
if
(
AlreadySucceeded
()
||
HasDSTunerOnField
())
if
(
HasDSTunerOnField
())
{
return
false
;
}
...
...
@@ -207,10 +219,15 @@ namespace WindBot.Game.AI.Decks
private
bool
茧墨特召
()
{
if
(
A
lreadySucceeded
()
||
A
ctivateDescription
==
Util
.
GetStringId
(
CardId
.
茧墨场地
,
1
))
if
(
ActivateDescription
==
Util
.
GetStringId
(
CardId
.
茧墨场地
,
1
))
{
return
false
;
}
if
(
AlreadySucceeded
())
{
AI
.
SelectCard
(
CardId
.
萨丽艾尔
,
CardId
.
天子翼
);
return
true
;
}
if
(
Card
.
Location
==
CardLocation
.
Hand
&&
!(
Bot
.
GetFieldSpellCard
()
!=
null
&&
Bot
.
GetFieldSpellCard
().
IsCode
(
CardId
.
茧墨场地
)
&&
!
Bot
.
GetFieldSpellCard
().
IsDisabled
()
&&
!
JMUsed
)
||
NeedToFreeSZone
())
...
...
@@ -240,6 +257,10 @@ namespace WindBot.Game.AI.Decks
}
private
bool
守备特召
()
{
if
(
Bot
.
HasInMonstersZone
(
CardId
.
叮当
))
{
return
false
;
}
AI
.
SelectPosition
(
CardPosition
.
FaceUpDefence
);
return
true
;
}
...
...
@@ -275,6 +296,36 @@ namespace WindBot.Game.AI.Decks
}
return
true
;
}
private
bool
叮当特召
()
{
if
(
AlreadySucceeded
()
&&
Bot
.
HasInHand
(
CardId
.
梦想天生
)
||
Duel
.
Turn
==
1
)
{
return
false
;
}
var
material
=
Bot
.
GetMonsters
().
GetMatchingCards
((
c
)
=>
叮当素材
.
Contains
(
c
.
Id
));
var
matCount
=
material
.
Count
-
Enemy
.
GetMonsterCount
()
*
2
;
if
(
matCount
>
1
)
{
var
ddCount
=
matCount
/
2
;
var
attackCards
=
Enemy
.
GetMonsters
().
GetMatchingCards
((
c
)
=>
c
.
IsAttack
());
List
<
ClientCard
>
targets
=
new
List
<
ClientCard
>();
int
totalDamage
=
0
;
while
(
targets
.
Count
<
ddCount
&&
attackCards
.
Count
>
0
)
{
var
card
=
attackCards
.
GetLowestAttackMonster
();
targets
.
Add
(
card
);
attackCards
.
Remove
(
card
);
totalDamage
+=
7200
-
card
.
Attack
;
}
totalDamage
+=
7200
*
(
ddCount
-
targets
.
Count
);
if
(
totalDamage
>=
Enemy
.
LifePoints
||
totalDamage
>
5000
)
{
AI
.
SelectMaterials
(
叮当素材
);
return
true
;
}
}
return
false
;
}
private
bool
HasSpSummonableNonTuner
(
ClientCard
ex
)
{
...
...
WindBot.csproj
View file @
c69d4a4b
...
...
@@ -9,7 +9,7 @@
<AppDesignerFolder>
Properties
</AppDesignerFolder>
<RootNamespace>
WindBot
</RootNamespace>
<AssemblyName>
WindBot
</AssemblyName>
<TargetFrameworkVersion>
v4.
0
</TargetFrameworkVersion>
<TargetFrameworkVersion>
v4.
8
</TargetFrameworkVersion>
<FileAlignment>
512
</FileAlignment>
<TargetFrameworkProfile
/>
</PropertyGroup>
...
...
@@ -21,6 +21,7 @@
<PlatformTarget>
x86
</PlatformTarget>
<ErrorReport>
prompt
</ErrorReport>
<CodeAnalysisRuleSet>
MinimumRecommendedRules.ruleset
</CodeAnalysisRuleSet>
<Prefer32Bit>
false
</Prefer32Bit>
</PropertyGroup>
<PropertyGroup
Condition=
"'$(Configuration)|$(Platform)' == 'Release|x86'"
>
<OutputPath>
bin\Release\
</OutputPath>
...
...
@@ -30,6 +31,7 @@
<PlatformTarget>
x86
</PlatformTarget>
<ErrorReport>
prompt
</ErrorReport>
<CodeAnalysisRuleSet>
MinimumRecommendedRules.ruleset
</CodeAnalysisRuleSet>
<Prefer32Bit>
false
</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<StartupObject
/>
...
...
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