luaganglie = sgs.CreateTriggerSkill
{--刚烈 by ibicdlcod
name = "luaganglie",
events = {sgs.Damaged},
on_trigger=function(self, event, player, data)
local room = player:getRoom()
local from = data:toDamage().from
source = sgs.QVariant(0)
source:setValue(from)
if(from and from:isAlive() and room:askForSkillInvoke(player, "luaganglie", source)) then
room:playSkillEffect("luaganglie")
local judge = sgs.JudgeStruct()
judge.pattern = sgs.QRegExp("(.*):(heart):(.*)")
judge.good = false
judge.reason = self:objectName()
judge.who = player
room:judge(judge)
if(judge:isGood()) then
if(not room:askForDiscard(from, "luaganglie", 2, true)) then
local damage = sgs.DamageStruct()
damage.from = player
damage.to = from
room:damage(damage)
end
room:setEmotion(player, "good")
else
room:setEmotion(player, "bad")
end
end
end
}
(踏青,涅盘专用)
{--刚烈 by ibicdlcod
name = "luaganglie",
events = {sgs.Damaged},
on_trigger=function(self, event, player, data)
local room = player:getRoom()
local from = data:toDamage().from
source = sgs.QVariant(0)
source:setValue(from)
if(from and from:isAlive() and room:askForSkillInvoke(player, "luaganglie", source)) then
room:playSkillEffect("luaganglie")
local judge = sgs.JudgeStruct()
judge.pattern = sgs.QRegExp("(.*):(heart):(.*)")
judge.good = false
judge.reason = self:objectName()
judge.who = player
room:judge(judge)
if(judge:isGood()) then
if(not room:askForDiscard(from, "luaganglie", 2, true)) then
local damage = sgs.DamageStruct()
damage.from = player
damage.to = from
room:damage(damage)
end
room:setEmotion(player, "good")
else
room:setEmotion(player, "bad")
end
end
end
}
(踏青,涅盘专用)