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

【水】效发一下 @拆迁队总司令 ,把好施Lua放出来

只看楼主收藏回复

--好施
luahaoshicard = sgs.CreateSkillCard{
name = "luahaoshicard",
will_throw = false,
target_fixed = false,
filter = function(self, targets, to_select)
return (#targets<1) and (not to_select:hasSkill("luahaoshi")) and (to_select:getHandcardNum() == sgs.Self:getMark("luahaoshi"))
end,
on_use = function(self, room, source, targets)
room:moveCardTo(self, targets[1], sgs.Player_Hand, false)
room:setEmotion(targets[1], "draw-card") end,
}
luahaoshivs = sgs.CreateViewAsSkill{
name = "luahaoshivs",
n = 998,
view_filter = function(self, selected, to_select)
return #selected<math.floor(sgs.Self:getHandcardNum()/2) and not to_select:isEquipped()
end,
view_as = function(self, cards)
if #cards ~= math.floor(sgs.Self:getHandcardNum()/2) then return nil end
local vscard = luahaoshicard:clone()
for _,card in ipairs(cards) do
vscard:addSubcard(card:getId())
end
return vscard
end,
enabled_at_play = function()
return false end,
enabled_at_response = function(self, player, pattern)
return pattern == "@@luahaoshicard"
end,
}
luahaoshi_give = sgs.CreateTriggerSkill{
name = "#luahaoshi_give",
priority = -1,
events = {sgs.EventPhaseEnd},--ALPHA
--events = {sgs.PhaseChange},--涅盘
on_trigger = function(self, event, player, data)
local room = player:getRoom()
if player:getPhase() == sgs.Player_Draw and player:hasFlag("luahaoshi") then
room:setPlayerFlag(player, "-luahaoshi")
if player:getHandcardNum()<=5 then return false end
local least = 998
for _,op in sgs.qlist(room:getOtherPlayers(player)) do
least = math.min(least, op:getHandcardNum())
end
room:setPlayerMark(player, "luahaoshi", least)
if not room:askForUseCard(player, "@@luahaoshi", "@luahaoshi") then
local begger = nil
for _,op in sgs.qlist(room:getOtherPlayers(player)) do
if op:getHandcardNum() == least then
begger = op
end
end
end
end
end
}
luahaoshi = sgs.CreateTriggerSkill{
name = "luahaoshi",
view_as_skill = luahaoshivs,
frequency = sgs.Skill_NotFrequent,
events = {sgs.DrawNCards},
on_trigger = function(self, event, player, data)
local room = player:getRoom()
if room:askForSkillInvoke(player, self:objectName()) then
room:setPlayerFlag(player, "luahaoshi")
data:setValue(data:toInt()+2)
end
end
}


IP属地:中国澳门1楼2012-10-26 13:54回复
    我们怎样一起去神杀吧宣传?


    来自手机贴吧2楼2012-10-26 17:59
    收起回复