Commit 4f4e4008 authored by 苍蓝's avatar 苍蓝

update TheLegend

parent 8026386f
...@@ -18,3 +18,8 @@ SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE SUPPORT_MASTER_RULE_2020 ...@@ -18,3 +18,8 @@ SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE SUPPORT_MASTER_RULE_2020
Name=大恐龙驾 Deck=DinocarriageDynarmix Dialog=zh-CN Name=大恐龙驾 Deck=DinocarriageDynarmix Dialog=zh-CN
恐龙卡组。 恐龙卡组。
SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE SUPPORT_MASTER_RULE_2020 SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE SUPPORT_MASTER_RULE_2020
!传说子
Name=传说子 Deck=TheLegend Dialog=rd
大量传说卡堆成的卡组。
SUPPORT_MASTER_RULE_3 SUPPORT_NEW_MASTER_RULE SUPPORT_MASTER_RULE_2020
\ No newline at end of file
#created by ...
#main
120120000
120120000
120170000
120170000
120110001
120110001
120110001
120183000
120194002
120194002
120194002
120194003
120194003
120194003
120151010
120151010
120151010
120110009
120110009
120110009
120170035
120170035
120120017
120120017
120120017
120151023
120151023
120151023
120181003
120181003
120181003
120151018
120151018
120151018
120194004
120194005
120194005
120150019
120150019
120150019
#extra
!side
120198003
120198003
120198003
\ No newline at end of file
{
"welcome": [
"你好,我是一个机器人,咱的名字叫羽柔子,但咱并不是本体,只是一个幻术分身哦。",
"那我们开始吧,我已经布置好隔音符文和隐身符文了,不会有人打扰我们的哦",
"AI功能正在测试中,遇到问题请及时反馈。"
],
"deckerror": [
"怎么回事,居然不让咱使用{0}!"
],
"duelstart": [
"我可是认真的",
"咱可不会手下留情的哦",
"前辈最好打起精神哦",
"另外...今天我的道号是什么呢,我的阿爹还没给咱想好呢"
],
"newturn": [
"又到咱的回合了,抽卡",
"嘻嘻!偷偷使用个幻术,从卡组挑选了1张卡。"
],
"endturn": [
"前辈的小心点哦,下个回合你得加油了。",
"咱的回合结束了,我使用了瞳术天赋,你的下抽是什么我都知道了哦"
],
"directattack": [
"哈哈,咱就不客气了哦,咱偷偷给{0}加个力量符文",
"前辈,你已经没有怪兽了呢,看咱给{0}加个加速符文吧",
"前辈,你松懈了哦,啊不好,咱不小心弄丢了宋前辈给我的{0}",
"咱的{0}可是附加了加倍符文哦,前辈要小心了"
],
"attack": [
"前辈的{1}好像打不过咱的{0}哦",
"{1}肯定不如{0}的,咱的{0}可是附加了敏捷符文哦~",
"{1}看起来不行了呢,咱的{0}可是带了三品法宝的哦"
],
"ondirectattack": [
"前辈,你都不让一下咱的吗",
"哇,你的{0}我好想要一只哦",
"前辈欺负咱,咱可要告诉阿爹去了!"
],
"facedownmonstername": "怪兽",
"activate": [
"咱的{0}亮出你的符文吧!",
"咱的{0}快使用你的御剑术!",
"咱的{0}快拿出你的法宝!"
],
"summon": [
"哈哈,咱从一寸蛇袋里找到了一只{0},前辈要小心了",
"嘻嘻,这只{0}是黄山前辈送咱的呢",
"太好了,我从阿爹给我的乾坤袋中找到了一只{0}。",
"前辈你好像大意了哦,触发了我的召唤符文,{0}是给前辈的惊喜呢"
],
"setmonster": [
"偷偷布置一个符文,千万别被前辈发现了呢",
"猜猜我设下的是什么阵法呢"
],
"chaining": [
"哎呀,咱好像不小心碰到什么机关了,原来,白前辈送我的{0}竟然有螺旋升天的符文呢",
"前辈小心了,{0}可是七生符前辈送咱的符文呢",
"哈哈,前辈,喜欢咱的{0}这个惊喜吗"
]
}
...@@ -55,13 +55,15 @@ namespace WindBot.Game.AI.Decks ...@@ -55,13 +55,15 @@ 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.SpellSet, CardId.对死者的供奉); AddExecutor(ExecutorType.SpellSet, CardId.对死者的供奉);
AddExecutor(ExecutorType.MonsterSet, CardId.凤凰龙, monsterset); AddExecutor(ExecutorType.Activate, CardId.凤凰龙);
AddExecutor(ExecutorType.Summon, CardId.凤凰龙, 凤凰龙summon);
AddExecutor(ExecutorType.MonsterSet, CardId.凤凰龙);
AddExecutor(ExecutorType.MonsterSet, CardId.火星心少女, monsterset); AddExecutor(ExecutorType.MonsterSet, CardId.火星心少女, monsterset);
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.Summon, CardId.凤凰龙);
AddExecutor(ExecutorType.Activate, CardId.凤凰龙);
AddExecutor(ExecutorType.SummonOrSet, DefaultMonsterSummon); AddExecutor(ExecutorType.SummonOrSet, DefaultMonsterSummon);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos); AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
AddExecutor(ExecutorType.SpellSet); AddExecutor(ExecutorType.SpellSet);
...@@ -188,11 +190,13 @@ namespace WindBot.Game.AI.Decks ...@@ -188,11 +190,13 @@ namespace WindBot.Game.AI.Decks
{ {
foreach (ClientCard m in Bot.Hand) foreach (ClientCard m in Bot.Hand)
AI.SelectCard(m); AI.SelectCard(m);
if (Enemy.GetMonsters().GetHighestAttackMonster() == null) foreach (ClientCard mon in Enemy.GetMonsters())
{ if (mon.Level >= 9)
AI.SelectNextCard(Enemy.MonsterZone.GetHighestDefenseMonster()); AI.SelectNextCard(mon);
} else if (mon.Level >= 8)
AI.SelectNextCard(Enemy.MonsterZone.GetHighestAttackMonster()); AI.SelectNextCard(mon);
else if (mon.Level >= 7)
AI.SelectNextCard(mon);
return true; return true;
} }
return false; return false;
...@@ -202,7 +206,12 @@ namespace WindBot.Game.AI.Decks ...@@ -202,7 +206,12 @@ namespace WindBot.Game.AI.Decks
AI.SelectCard(Enemy.GetMonsters().GetHighestAttackMonster()); AI.SelectCard(Enemy.GetMonsters().GetHighestAttackMonster());
return true; return true;
} }
private bool 凤凰龙summon()
{
if (Bot.HasInGraveyard(new[] { CardId.连击龙, CardId.青眼白龙 }))
return true;
return false;
}
......
...@@ -61,13 +61,15 @@ namespace WindBot.Game.AI.Decks ...@@ -61,13 +61,15 @@ 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.SpellSet, CardId.对死者的供奉); AddExecutor(ExecutorType.SpellSet, CardId.对死者的供奉);
AddExecutor(ExecutorType.MonsterSet, CardId.凤凰龙, monsterset); AddExecutor(ExecutorType.Activate, CardId.凤凰龙);
AddExecutor(ExecutorType.Summon, CardId.凤凰龙, 凤凰龙summon);
AddExecutor(ExecutorType.MonsterSet, CardId.凤凰龙);
AddExecutor(ExecutorType.MonsterSet, CardId.火星心少女, monsterset); AddExecutor(ExecutorType.MonsterSet, CardId.火星心少女, monsterset);
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.Summon, CardId.凤凰龙);
AddExecutor(ExecutorType.Activate, CardId.凤凰龙);
AddExecutor(ExecutorType.SummonOrSet, DefaultMonsterSummon); AddExecutor(ExecutorType.SummonOrSet, DefaultMonsterSummon);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos); AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
AddExecutor(ExecutorType.SpellSet); AddExecutor(ExecutorType.SpellSet);
...@@ -186,11 +188,17 @@ namespace WindBot.Game.AI.Decks ...@@ -186,11 +188,17 @@ namespace WindBot.Game.AI.Decks
} }
private bool 死供Effect() private bool 死供Effect()
{ {
if (Util.IsOneEnemyBetterThanValue(1900, true)) if (Util.IsOneEnemyBetterThanValue(1900, false))
{ {
foreach (ClientCard m in Bot.Hand) foreach (ClientCard m in Bot.Hand)
AI.SelectCard(m); AI.SelectCard(m);
AI.SelectNextCard(Enemy.GetMonsters().GetHighestAttackMonster()); foreach (ClientCard mon in Enemy.GetMonsters())
if (mon.Level >= 9)
AI.SelectNextCard(mon);
else if (mon.Level >= 8)
AI.SelectNextCard(mon);
else if (mon.Level >= 7)
AI.SelectNextCard(mon);
return true; return true;
} }
return false; return false;
...@@ -204,7 +212,12 @@ namespace WindBot.Game.AI.Decks ...@@ -204,7 +212,12 @@ namespace WindBot.Game.AI.Decks
AI.SelectYesNo(true); AI.SelectYesNo(true);
return true; return true;
} }
private bool 凤凰龙summon()
{
if (Bot.HasInGraveyard(new[] { CardId.连击龙, CardId.青眼白龙 }))
return true;
return false;
}
} }
......
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("TheLegend", "AI_TheLegend")]
public class TheLegendExecutor : DefaultExecutor
{
public class CardId
{
public const int 青眼白龙 = 120120000;
public const int 破坏之剑士 = 120170000;
public const int 连击龙 = 120110001;
public const int 电子科技翼龙 = 120183000;
public const int 血腥魔兽人 = 120194002;
public const int 圣精灵 = 120194003;
public const int 成金恐龙王 = 120151010;
public const int 机器栗子 = 120120017;
public const int 斗牛士 = 120170035;
public const int 凤凰龙 = 120110009;
public const int 七星道法师 = 120130016;
public const int 死苏 = 120194004;
public const int 成金哥布林 = 120151018;
public const int 强欲之壶 = 120181003;
public const int 对死者的供奉 = 120151023;
public const int 落穴 = 120150019;
public const int 圣防 = 120198003;
public const int 炸甲 = 120194005;
}
public TheLegendExecutor(GameAI ai, Duel duel)
: base(ai, duel)
{
AddExecutor(ExecutorType.SpSummon);
AddExecutor(ExecutorType.Activate, CardId.强欲之壶);
AddExecutor(ExecutorType.Activate, CardId.成金哥布林);
AddExecutor(ExecutorType.Activate, CardId.成金恐龙王, 成金恐龙王Effect);
AddExecutor(ExecutorType.Activate, CardId.机器栗子);
AddExecutor(ExecutorType.Activate, CardId.连击龙);
AddExecutor(ExecutorType.Activate, CardId.斗牛士, 斗牛士Effect);
AddExecutor(ExecutorType.SummonOrSet, CardId.青眼白龙, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.破坏之剑士, DefaultMonsterSummon);
AddExecutor(ExecutorType.SummonOrSet, CardId.连击龙, DefaultMonsterSummon);
AddExecutor(ExecutorType.SummonOrSet, CardId.电子科技翼龙, DefaultMonsterSummon);
AddExecutor(ExecutorType.Summon, CardId.机器栗子,栗子summon);
AddExecutor(ExecutorType.Activate, CardId.死苏, 死苏effect);
AddExecutor(ExecutorType.Activate, CardId.死苏, 死苏effect2);
AddExecutor(ExecutorType.Summon, CardId.斗牛士);
AddExecutor(ExecutorType.Activate, CardId.凤凰龙);
AddExecutor(ExecutorType.Activate, CardId.对死者的供奉, 死供Effect);
AddExecutor(ExecutorType.SummonOrSet, CardId.成金恐龙王, 成金恐龙王Summon);
AddExecutor(ExecutorType.Summon, CardId.血腥魔兽人);
AddExecutor(ExecutorType.Summon, CardId.凤凰龙, 凤凰龙summon);
AddExecutor(ExecutorType.SpellSet, CardId.圣防);
AddExecutor(ExecutorType.SpellSet, CardId.落穴);
AddExecutor(ExecutorType.Activate, CardId.落穴, 落穴Effect);
AddExecutor(ExecutorType.Activate, CardId.圣防, 圣防Effect);
AddExecutor(ExecutorType.Activate, CardId.炸甲, 炸甲Effect);
AddExecutor(ExecutorType.SpellSet, CardId.对死者的供奉);
AddExecutor(ExecutorType.MonsterSet, CardId.圣精灵);
AddExecutor(ExecutorType.MonsterSet, CardId.凤凰龙);
AddExecutor(ExecutorType.MonsterSet, CardId.斗牛士, monsterset);
AddExecutor(ExecutorType.MonsterSet, CardId.机器栗子);
AddExecutor(ExecutorType.MonsterSet, CardId.成金恐龙王);
AddExecutor(ExecutorType.Activate, DefaultDontChainMyself);
AddExecutor(ExecutorType.SummonOrSet, DefaultMonsterSummon);
AddExecutor(ExecutorType.Repos, DefaultMonsterRepos);
AddExecutor(ExecutorType.SpellSet);
//AddExecutor(ExecutorType.Activate, CardId.sionmax, sionmaxEffect);
}
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.破坏之剑士,
}))
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.GetTotalAttackingMonsterAttack(1) > 1900)
return true;
return false;
}
private bool 炸甲Effect()
{
if (Enemy.BattlingMonster.Attack > 1900)
return true;
return false;
}
private bool 死苏effect()
{
IList<int> targets = new[] {
CardId.青眼白龙,
CardId.破坏之剑士,
CardId.连击龙,
CardId.电子科技翼龙,
};
if (!Bot.HasInGraveyard(targets) || !Enemy.HasInGraveyard(targets))
{
return false;
}
AI.SelectCard(targets);
return true;
}
private bool 死苏effect2()
{
if (!Util.IsAllEnemyBetter(true))
return false;
ClientCard selected = Enemy.Graveyard.GetMatchingCards(card => card.IsCanRevive()).OrderByDescending(card => card.Attack).FirstOrDefault();
if (selected.Attack >=2400)
{
AI.SelectCard(selected);
return true;
}
return false;
}
private bool 成金恐龙王Effect()
{
AI.SelectCard(CardId.成金哥布林);
return true;
}
private bool 成金恐龙王Summon()
{
if (Enemy.GetHandCount() < 1) return true;
return false;
}
private bool 栗子summon()
{
if (Bot.HasInHand(CardId.机器栗子) && (Bot.GetMonstersInMainZone().Count == 0))
return true;
return false;
}
private bool 凤凰龙summon()
{
if (Bot.HasInGraveyard(new[] { CardId.连击龙, CardId.青眼白龙 }))
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;
}
private bool 死供Effect()
{
if (Util.IsOneEnemyBetterThanValue(1900, false))
{
foreach (ClientCard m in Bot.Hand)
AI.SelectCard(m);
foreach (ClientCard mon in Enemy.GetMonsters())
if (mon.Level >= 9)
AI.SelectNextCard(mon);
else if (mon.Level >= 8)
AI.SelectNextCard(mon);
else if (mon.Level >= 7)
AI.SelectNextCard(mon);
return true;
}
return false;
}
private bool 斗牛士Effect()
{
//if (Util.IsOneEnemyBetterThanValue(1900, false))
{
foreach (ClientCard o in Bot.Graveyard)
AI.SelectCard(o);
if (Enemy.GetMonsters().GetHighestAttackMonster() == null)
AI.SelectNextCard(Enemy.MonsterZone.GetHighestAttackMonster());
return true;
}
// return false;
}
private bool 七星道法师Effect()
{
AI.SelectCard(Enemy.GetMonsters().GetHighestAttackMonster());
return true;
}
}
}
...@@ -697,8 +697,8 @@ namespace WindBot.Game.AI ...@@ -697,8 +697,8 @@ namespace WindBot.Game.AI
if (Card.Level <= 4) if (Card.Level <= 4)
return true; return true;
if (!UniqueFaceupMonster()) //if (!UniqueFaceupMonster())
return false; // return false;
int tributecount = (int)Math.Ceiling((Card.Level - 4.0d) / 2.0d); int tributecount = (int)Math.Ceiling((Card.Level - 4.0d) / 2.0d);
for (int j = 0; j < 7; ++j) for (int j = 0; j < 7; ++j)
{ {
......
...@@ -85,6 +85,7 @@ ...@@ -85,6 +85,7 @@
<Compile Include="Game\AI\Decks\SkyStrikerExecutor.cs" /> <Compile Include="Game\AI\Decks\SkyStrikerExecutor.cs" />
<Compile Include="Game\AI\Decks\MokeyMokeyKingExecutor.cs" /> <Compile Include="Game\AI\Decks\MokeyMokeyKingExecutor.cs" />
<Compile Include="Game\AI\Decks\MokeyMokeyExecutor.cs" /> <Compile Include="Game\AI\Decks\MokeyMokeyExecutor.cs" />
<Compile Include="Game\AI\Decks\TheLegendExecutor.cs" />
<Compile Include="Game\AI\Decks\TimeThiefExecutor.cs" /> <Compile Include="Game\AI\Decks\TimeThiefExecutor.cs" />
<Compile Include="Game\AI\Decks\ToadallyAwesomeExecutor.cs" /> <Compile Include="Game\AI\Decks\ToadallyAwesomeExecutor.cs" />
<Compile Include="Game\AI\Decks\NekrozExecutor.cs" /> <Compile Include="Game\AI\Decks\NekrozExecutor.cs" />
......
...@@ -15,6 +15,12 @@ ...@@ -15,6 +15,12 @@
"name": "大恐龙架", "name": "大恐龙架",
"deck": "DinocarriageDynarmix", "deck": "DinocarriageDynarmix",
"dialog": "zh-CN" "dialog": "zh-CN"
},
{
"name": "传说子",
"deck": "TheLegend",
"dialog": "rd"
} }
] ]
} }
\ No newline at end of file
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