Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test AI #21

Merged
merged 2 commits into from
Apr 4, 2018
Merged

test AI #21

merged 2 commits into from
Apr 4, 2018

Conversation

handsomekiwi
Copy link
Contributor

update LightswornShaddoldinosour.cs

update LightswornShaddoldinosourExecutor
@mercury233
Copy link
Collaborator

did you forgot the ydk?

@handsomekiwi
Copy link
Contributor Author

ok了

@mercury233
Copy link
Collaborator

good job, 我回家再仔细看

@handsomekiwi
Copy link
Contributor Author

handsomekiwi commented Apr 3, 2018 via email

@mercury233
Copy link
Collaborator

简单测试了一下,没有导致崩溃的问题,不过还有很多细节得调,等用户的反馈吧

你是否愿意以「奇异果」的名字把这个卡组上线233服的AI?

@handsomekiwi
Copy link
Contributor Author

好的
是否能教一下如何写简单的FUSION呢,感觉每次出来的FUSION_MONSTER跟预想的不一样

@mercury233
Copy link
Collaborator

首先用AI.SelectCard选择融合怪兽,然后AI.SelectMaterials选择素材。你的选法好像是先选素材了

@mercury233
Copy link
Collaborator

可以参考zoodiac的那个写法
但bot不能直接获取卡组里的卡(和你玩的时候只能查看额外不能查看卡组一样),所以影依融合得用列卡片ID的方式(可以用Bot.GetRemainingCount看是否卡组里有剩余的素材)

@handsomekiwi
Copy link
Contributor Author

好的,我之后会改改看,还有关于多重选择、效果的问题,
wiki上的说法是用SelectCard或ActivateDescription来处理,
像这张卡Double Evolution Pill,效果如下

Banish 1 Dinosaur monster and 1 non-Dinosaur monster from your hand and/or GY; Special Summon 1 Level 7 or higher Dinosaur monster from your hand or Deck, ignoring its Summoning conditions. You can only activate 1 "Double Evolution Pill" per turn.

所以我是用SelectCard、SelectNextCard选第一、二张,
SelectThirdCard选择要召唤的monster吗?

@mercury233
Copy link
Collaborator

是的,因为代码里选恐龙和非恐龙是分开的

@handsomekiwi
Copy link
Contributor Author

但我只用SelectCard SelectThirdCard 但有时特召出来的monster不是我要的

@mercury233
Copy link
Collaborator

确定那个时候手卡·卡组里有你要的怪兽吗?

@handsomekiwi
Copy link
Contributor Author

是的

@handsomekiwi
Copy link
Contributor Author

我用ai打ai的方式 5次大概有2次会错

@mercury233
Copy link
Collaborator

必须先用SelectNextCard,SelectThirdCard 才会生效


你有QQ或者discord吗,方便沟通

@handsomekiwi
Copy link
Contributor Author

没有 我只有FB LINE

@handsomekiwi
Copy link
Contributor Author

好的,我之后加进去,有个多重效果的问题
Keeper of Dragonic Magic,以下是效果

If this card is Normal or Special Summoned: You can discard 1 card; add 1 "Polymerization" Normal Spell or "Fusion" Normal Spell from your Deck to your hand. You can reveal 1 Fusion Monster in your Extra Deck; Special Summon 1 of the Fusion Materials whose name is specifically listed on that card from your GY in face-down Defense Position. You can only use each effect of "Keeper of Dragonic Magic" once per turn. You cannot Special Summon monsters from the Extra Deck, except Fusion Monsters, the turn you activate either of this card's effects.

这个选择比WIKI上多太多,他的效果都在场上,我用Selectcard好像没办法判断我发的是哪个效果
而ActivateDescription,我无法知道他1或2

@mercury233
Copy link
Collaborator

这个可以参考DragonSpiritOfWhite和BlueEyesSpiritDragon,诱发效果的ActivateDescription一般是-1

@handsomekiwi
Copy link
Contributor Author

好的,那在使用windbot的时候如何让windbot固定选择一副牌组呢?
我是用vb编译加命令列引数deck=xx,但直接开编译好的windbot.exe,它就变成随机的了

@mercury233
Copy link
Collaborator

用cmd打开windbot.exe,在命令行后面加参数
image

@handsomekiwi
Copy link
Contributor Author

handsomekiwi commented Apr 4, 2018

好的谢谢,最后一个问题,DefaultBreakthroughSkill 好像只能连锁效果发动 但不能指向发效果的monster,假设场上有两隻效果monster A、B,
A发效果,DefaultBreakthroughSkill发动,但有时候他会选择B,要如何修正呢?

@mercury233
Copy link
Collaborator

在DefaultBreakthroughSkill里加上AI.SelectCard(LastChainCard)应该就可以了

@handsomekiwi
Copy link
Contributor Author

请问一下,您会merge我修改的项目吗

@mercury233
Copy link
Collaborator

mercury233 commented Apr 4, 2018

会,改完上面说的问题就merge
我正在做一些其他的修改,需要涉及你的卡组的部分我来合并也行

@handsomekiwi
Copy link
Contributor Author

我不是contributors,我没办法自己合併 (;´༎ຶД༎ຶ`),希望你能帮我合併,
我才可以从master去更新我没有的,请问你这次的修改有修正DefaultBreakthroughSkill的问题吗

@mercury233
Copy link
Collaborator

你可以继续在你的fork上修改的啊,pull一下https://github.com/IceYGO/windbot/ 就可以了
DefaultBreakthroughSkill刚刚修复了

@handsomekiwi
Copy link
Contributor Author

我是指从IceYGO/windbot下载更新

@mercury233 mercury233 merged commit 85d5c5e into IceYGO:master Apr 4, 2018
@mercury233
Copy link
Collaborator

那我就先合并了,虽然其实不影响你的更新……

@handsomekiwi
Copy link
Contributor Author

谢谢,我还是GitHub新手,还不知道在自己fork后且额外修改过的code,如果原本的project更新后,要怎么同步

@mercury233
Copy link
Collaborator

mercury233 commented Apr 4, 2018

一般来说准备开pull request给上游合并的修改应该在单独,基于上游的branch进行,例如
git fetch https://github.com/IceYGO/windbot
git checkout FETCH_HEAD -b feature-xxx
然后在 feature-xxx 这个分支做修改,改完提交pull request给上游

@handsomekiwi
Copy link
Contributor Author

SelectMaterials()
能放的函数值有
1.(int cardId)
2.(ClientCard card)
3.(IList cards)
4.IList ids
5.(CardLocation loc)
除了1、2以外,其他的有没有范例可以看呢,谢谢

@mercury233
Copy link
Collaborator

目前好像只用过3,其他的没用过
4是优先选指定ID,5是优先选指定位置的卡

@handsomekiwi
Copy link
Contributor Author

所以
AI.SelectMaterials(new[]
{CardId.a,
CardId.b,
CardId.c,
CardId.d,
});
這樣可以嗎

@handsomekiwi
Copy link
Contributor Author

我有办discord了,要如何加你,我的id好像就是kiwi

@mercury233
Copy link
Collaborator

理论上可以,我好像测试过又好像没有……

@mercury233
Copy link
Collaborator

我的是Mercury233#3745

szefo09 referenced this pull request in szefo09/windbot Feb 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants