贴吧用户_0V343Q3 -
路过围观竟躺着中枪,时耶,命耶?
关注数: 34 粉丝数: 74 发帖数: 4,135 关注贴吧数: 47
SlashSkill可以添加view_as_skill吗 tianyicard=sgs.CreateSkillCard{ name="tianyi", will_throw = false, filter=function(self,targets,to_select,player) if (#targets>=1) then return false end return not to_select:isKongcheng() end, on_effect=function(self,effect) local room=effect.from:getRoom() local tiger =effect.to room:playSkillEffect("tianyi",1) if (effect.from:pindian(tiger,"tianyi",self)) then --拼点成功则 room:setPlayerFlag(effect.from,"tysuccess") else room:setPlayerFlag(effect.from,"tyfailed") end end } tianyivs=sgs.CreateViewAsSkill{ --吞狼视为 name="tianyi", n=1, view_filter=function(self, selected, to_select) return not to_select:isEquipped() end, view_as=function(self, cards) if #cards==1 then local acard=tianyicard:clone() acard:addSubcard(cards[1]) acard:setSkillName("tianyi") return acard end end, enabled_at_play=function(self,player) return not player:hasUsed("#tianyi") end, enabled_at_response=function(self,player,pattern) return false end } tianyi = sgs.CreateSlashSkill { name = "tianyi", frequency=sgs.Skill_NotFrequent, view_as_skill=tianyivs, s_extra_func = function(self, from, to, slash) -- from:使用者;to:目标;slash:所用的杀。这三个参数除了from,其余都是可有可无的 if from:hasSkill("tianyi") and slash and from:hasFlag("tysuccess") then --注意必须先判断from是否有这个技能,否则谁都会发动的 return 1 -- 这张杀可以指定一个额外目标,注意加上原本的,一共两个目标 end end, -- 攻击范围 s_range_func = function(self, from, to, slash) if from:hasSkill("tianyi") and slash and from:hasFlag("tysuccess") then return -33 -- 注意这里因为是锁定攻击范围,所以前面要加个负号,如果不加,则累加攻击范围 end end, s_residue_func = function(self, from) if from:hasFlag("tysuccess") then return 1 elseif from:hasFlag("tyfailed") then return -33 end end, }
1 下一页