注意:该技能是通过调低优先度来实现与天妒(天妒优先)兼容的,所以如果有其他获得他人生效后的判定牌的技能的话,很可能会优先发动(这明明是天妒技能引起的冲突啊,真正的解决方法应该是提高天妒的优先度吧,估计设计天妒的时候就没考虑过技能冲突,根本不说是天妒先还是标准洛神先,就拿都是获得牌当借口
)
LuaLuoshenGuo = sgs.CreateTriggerSkill{
name = "LuaLuoshenGuo",——不知道国战技能一般是怎么命名的,所以姑且就这样命名吧
frequency = sgs.Skill_Frequent,——默认发动
events = {sgs.EventPhaseStart, sgs.FinishJudge},
on_trigger = function(self, event, player, data)
local room = player:getRoom()
local dummy = sgs.Sanguosha:cloneCard("slash", sgs.Card_NoSuit, 0)
if event == sgs.EventPhaseStart then
if player:getPhase() == sgs.Player_Start then
while player:askForSkillInvoke(self:objectName()) do
local judge = sgs.JudgeStruct()
judge.pattern = ".|black"
judge.good = true
judge.reason = self:objectName()
judge.who = player
room:judge(judge)
if judge:isGood() then
dummy:addSubcard(judge.card)
elseif judge:isBad() then
break
end
end
player:obtainCard(dummy)
end
elseif event == sgs.FinishJudge then——必须在这个时机就把判定区的判定牌移到处理区,否则会被弃置
local judge = data:toJudge()
if judge.reason == self:objectName() and judge.card:isBlack() and room:getCardPlace(judge.card:getEffectiveId()) == sgs.Player_PlaceJudge then——移到处理区的牌如果没有重新移动就会一直放在那,所以必须再移动一次,例如使用上面的player:obtainCard(dummy),room:getCardPlace是为了避免天妒得到的牌又被移到处理区
local reason = sgs.CardMoveReason(sgs.CardMoveReason_S_REASON_JUDGEDONE, self:objectName())
room:moveCardTo(judge.card, player, sgs.Player_PlaceTable, reason, true)
end
end
end,
priority = 0——优先度调低是为了先发动天妒,后洛神收牌
}
依旧是感谢@youko1316 ,同时如果使用该技能有遇到任何bug的话,我很乐意修改

LuaLuoshenGuo = sgs.CreateTriggerSkill{
name = "LuaLuoshenGuo",——不知道国战技能一般是怎么命名的,所以姑且就这样命名吧
frequency = sgs.Skill_Frequent,——默认发动
events = {sgs.EventPhaseStart, sgs.FinishJudge},
on_trigger = function(self, event, player, data)
local room = player:getRoom()
local dummy = sgs.Sanguosha:cloneCard("slash", sgs.Card_NoSuit, 0)
if event == sgs.EventPhaseStart then
if player:getPhase() == sgs.Player_Start then
while player:askForSkillInvoke(self:objectName()) do
local judge = sgs.JudgeStruct()
judge.pattern = ".|black"
judge.good = true
judge.reason = self:objectName()
judge.who = player
room:judge(judge)
if judge:isGood() then
dummy:addSubcard(judge.card)
elseif judge:isBad() then
break
end
end
player:obtainCard(dummy)
end
elseif event == sgs.FinishJudge then——必须在这个时机就把判定区的判定牌移到处理区,否则会被弃置
local judge = data:toJudge()
if judge.reason == self:objectName() and judge.card:isBlack() and room:getCardPlace(judge.card:getEffectiveId()) == sgs.Player_PlaceJudge then——移到处理区的牌如果没有重新移动就会一直放在那,所以必须再移动一次,例如使用上面的player:obtainCard(dummy),room:getCardPlace是为了避免天妒得到的牌又被移到处理区
local reason = sgs.CardMoveReason(sgs.CardMoveReason_S_REASON_JUDGEDONE, self:objectName())
room:moveCardTo(judge.card, player, sgs.Player_PlaceTable, reason, true)
end
end
end,
priority = 0——优先度调低是为了先发动天妒,后洛神收牌
}
依旧是感谢@youko1316 ,同时如果使用该技能有遇到任何bug的话,我很乐意修改