各位大佬,我是AI完全小白,AI文盲,想跟各位求一个最基础的【选择友军角色施放技能】的AI,技能如下(技能描述:出牌开始前,你可以选择一名角色,令其摸一张牌)
yautodraw = sgs.CreateTriggerSkill{
name = "yautodraw",
events = {sgs.EventPhaseStart},
frequency = sgs.Skill_Frequent,
on_trigger = function(self, event,player,data)
local room = player:getRoom()
if event == sgs.EventPhaseStart and player:getPhase() == sgs.Player_Play then
if room:askForSkillInvoke(player, self:objectName()) then
local alist=room:getOtherPlayers(player)
local to = room:askForPlayerChosen(player,alist , self:objectName(), "choose losehp", true, true)
to:drawCards(1)
end
end
end,
}
希望能为此技能制作一个选择施放目标的AI,实现的目标
1)选择手牌数量最少的【友军】角色来施放
2)施放之后,其他AI能识别我的身份。(比如我向主公施放,则其他AI会识别我是忠臣)
3)如果大神不嫌弃,也请指教一下最基础的【选择体力最低的敌军角色施放技能】,该怎么写?
谢谢各位大神!
yautodraw = sgs.CreateTriggerSkill{
name = "yautodraw",
events = {sgs.EventPhaseStart},
frequency = sgs.Skill_Frequent,
on_trigger = function(self, event,player,data)
local room = player:getRoom()
if event == sgs.EventPhaseStart and player:getPhase() == sgs.Player_Play then
if room:askForSkillInvoke(player, self:objectName()) then
local alist=room:getOtherPlayers(player)
local to = room:askForPlayerChosen(player,alist , self:objectName(), "choose losehp", true, true)
to:drawCards(1)
end
end
end,
}
希望能为此技能制作一个选择施放目标的AI,实现的目标
1)选择手牌数量最少的【友军】角色来施放
2)施放之后,其他AI能识别我的身份。(比如我向主公施放,则其他AI会识别我是忠臣)
3)如果大神不嫌弃,也请指教一下最基础的【选择体力最低的敌军角色施放技能】,该怎么写?
谢谢各位大神!