太阳神三国杀lua吧 关注:2,637贴子:73,377
  • 8回复贴,共1

时隔多日后创建技能卡再次失败

只看楼主收藏回复

用了on_use,无法选择角色
LuaWanhuaCard = sgs.CreateSkillCard{
name = "LuaWanhuaCard" ,
target_fixed = true,
will_throw = true,
on_use = function(self, room, source, targets)
local dest = targets[1]
local choice = room:askForChoice(source, self:objectName(), "xvzuo+tianzhao+yuedu")
if choice == "xvzuo" then
if not dest:hasSkill("#LuaXvzuo") then
room:acquireSkill(dest, "#LuaTianzhao")
end
dest:gainMark("@tianzhao", 7)
room:loseHp(source, 1)
end
if choice == "tianzhao" then
if not dest:hasSkill("#LuaTianzhao") then
room:acquireSkill(dest, "#LuaTianzhao")
end
dest:gainMark("@tianzhao", 7)
room:loseHp(source, 1)
end
if choice == "yuedu" then
if not dest:hasSkill("#LuaYuedu") then
room:acquireSkill(dest, "#LuaYuedu")
end
dest:gainMark("@yuedu", 7)
room:loseHp(source, 1)
end
end
}


1楼2015-09-19 14:41回复
    求解@youko1316


    2楼2015-09-19 14:42
    收起回复
      target_fixed 填了true 所以不能选角色 因为这个默认false 所以不要写这一行了
      然后你确定不能选角色? 那你参考一下其他技能的filter 的写法、


      IP属地:内蒙古3楼2015-09-19 19:31
      收起回复