Commit c69d4a4b authored by wyykak's avatar wyykak

add dingdang support

Signed-off-by: wyykak's avatarwyykak <wyy_1414@126.com>
parent 650a0ad9
<?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>
<?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
<?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>
#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
......@@ -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 (AlreadySucceeded() || ActivateDescription == 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)
{
......
......@@ -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 />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment