IceYGO / windbot

A C# bot for ygopro, compatible with the ygosharp server.
MIT License
81 stars 105 forks source link

Maxx "C" solution #19

Open handsomekiwi opened 6 years ago

handsomekiwi commented 6 years ago

I want to write a function about Maxx "c" ,below is it's effect: During either player's turn: You can send this card from your hand to the Graveyard; this turn, each time your opponent Special Summons a monster(s), immediately draw 1 card. You can only use 1 "Maxx "C"" per turn.

I want to chain when enemy activate effect in special summon monster(s),but I have no idea to start,please help me.

mercury233 commented 6 years ago

Neither do I.

OhnkytaBlabdey commented 6 years ago

楼上说的对,枚举可能是最简单的办法

mercury233 commented 6 years ago

即使枚举,也很难判断有多个效果的卡发动的是否是特招效果

handsomekiwi commented 6 years ago

所以意思是目前无法对enemy所发动的效果(有特召、破坏等可辨识特定效果)去做判断吗

mercury233 commented 6 years ago

https://github.com/IceYGO/windbot/blob/master/Game/AI/DefaultExecutor.cs#L512 效果类型没有办法判断

handsomekiwi commented 6 years ago

印象中以前的版本的AI好像有,可能要研究一下怎把Lua加进c#了

mercury233 commented 6 years ago

percy的ai是直接在内核执行代码,能获取效果的category,能获取和操作不是自己的卡,windbot是客户端的,没有这些能力,所以即使上lua也不能干这事

handsomekiwi commented 6 years ago

不能撷取效果的category,这样的AI很多事都不能做了(╯°Д°)╯ ┻━┻

handsomekiwi commented 6 years ago

我想目前的办法只能从ygopro的效果动刀了,直接更改Maxx "c"发动时机?

mercury233 commented 6 years ago

不建议更改ygopro部分,因为windbot的设定是一个普通的客户端,服务端不应该迁就它