太阳神三国杀lua吧 关注:2,643贴子:73,419
  • 5回复贴,共1

把一张牌视为火攻但无法火攻自己。

只看楼主收藏回复

huoshen = sgs.CreateFilterSkill{
name = "huoshen",
view_filter = function(self, to_select)
local room = sgs.Sanguosha:currentRoom()
local place = room:getCardPlace(to_select:getEffectiveId())
if place == sgs.Player_PlaceHand then
return to_select:objectName() == "slash"
end
return false
end,
view_as = function(self, card)
local suit = card:getSuit()
local point = card:getNumber()
local id = card:getId()
local fire_slash = sgs.Sanguosha:cloneCard("fire_slash", suit, point)
fire_slash:setSkillName(self:objectName())
local vs_card = sgs.Sanguosha:getWrappedCard(id)
vs_card:takeOver(fire_slash)
return vs_card
end
}
哪里写错了,为什么不能火攻自己?


IP属地:广东1楼2013-01-02 13:27回复
    抱歉,我知道哪错了,我忘记加头像了。


    IP属地:广东2楼2013-01-02 13:32
    收起回复
      ssssss = sgs.CreateTriggerSkill{
      name = "ssssss",
      frequency = sgs.Skill_NotFrequent,
      events = {sgs.DamageCaused},
      on_trigger = function(self, event, player, data)
      local damage = data:toDamage()
      local source = damage.from
      local victim = damage.to
      local count = damage.damage
      local room = player:getRoom()
      if damage.nature == sgs.DamageStruct_Fire then
      if player:hasSkill(self:objectName()) then
      if source:objectName() ~= player:objectName() then return false end
      if player:askForSkillInvoke(self:objectName()) then
      local n= count*2
      player:drawCards(n)
      end
      end
      end
      return false
      end,
      }
      你问我的那个技能:你每造成一点火伤时,可摸2牌。
      PS:不小心删掉了你的回复,抱歉啊...


      3楼2013-01-02 15:28
      收起回复