太阳神三国杀lua吧 关注:2,640贴子:73,408
  • 13回复贴,共1

【新手求助】关于香香的结姻技能问题

只看楼主收藏回复

香香的结姻技能
出牌阶段限一次,你可以弃置两张手牌并选择一名已受伤的男性角色,你和该角色各回复1点体力。
求大神把技能改成是对一名已受伤的(女性角色),你和该角色各回复1点体力
引用:LuaJieyin
状态:1217验证通过
]]--
LuazongshouCard = sgs.CreateSkillCard{
name = "LuaJieyinCard" ,
target_fixed = false ,
will_throw = true ,--(试过改成will_throw =false )
filter = function(self, targets, to_select)
if #targets ~= 0 then return false end
return to_select:isMale() and to_select:isWounded() and (to_select:objectName() ~= sgs.Self:objectName())
end ,
on_effect = function(self, effect)
local room = effect.from:getRoom()
local recover = sgs.RecoverStruct()
recover.card = self
recover.who = effect.from
room:recover(effect.from, recover, true)--(试过改成false)
room:recover(effect.to, recover, true)--(试过改成false)
end
}
Luazongshou = sgs.CreateViewAsSkill{
name = "Luazongshou" ,
n = 2 ,
view_filter = function(self, selected, to_select)
if (#selected > 1) or sgs.Self:isJilei(to_select) then return false end
return not to_select:isEquipped()
end ,
view_as = function(self, cards)
if #cards ~= 2 then return nil end
jieyin_card = LuaJieyinCard:clone()
jieyin_card:addSubcard(cards[1])
jieyin_card:addSubcard(cards[2])
return jieyin_card
end ,
enabled_at_play = function(self, target)
return (target:getHandcardNum() >= 2) and (not target:hasUsed("#LuazongshouCard"))
end
}
sgs.LoadTranslationTable{
["Luazongshou"] = "总受",
[":Luamogu"] = "出牌阶段限一次,你可以弃置两张手牌并选择一名已受伤的女性角色,你和该角色各回复1点体力。",
}
求大神帮忙谢谢!!技能是如何选择性别?为什么把true改成false但还是男角色?就不能女和女的吗?真是的讨厌!


1楼2015-03-31 23:27回复
    return to slect 那块才是重点,你改的不是地方


    IP属地:辽宁来自Android客户端2楼2015-03-31 23:41
    收起回复
      加个not括起来


      IP属地:四川3楼2015-04-01 02:36
      回复
        首先你要看懂原来的


        IP属地:广东来自Android客户端4楼2015-04-01 10:18
        收起回复
          isMale改成isFemale 此帖终结


          IP属地:北京来自Android客户端5楼2015-04-01 19:01
          收起回复