Commit 65e5baa1 authored by gg123gg's avatar gg123gg Committed by GitHub

fix Frederica

parent d8045d41
...@@ -28,7 +28,7 @@ end ...@@ -28,7 +28,7 @@ end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end
local cc=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil) local cc=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
Duel.SendtoGrave(cc,REASON_COST) Duel.SendtoGrave(cc,REASON_COST+REASON_RETURN)
end end
function cm.thfilter(c) function cm.thfilter(c)
return c:IsSetCard(0xafaa) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0xafaa) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
......
...@@ -52,7 +52,7 @@ end ...@@ -52,7 +52,7 @@ end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end
local cc=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil) local cc=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
Duel.SendtoGrave(cc,REASON_COST) Duel.SendtoGrave(cc,REASON_COST+REASON_RETURN)
end end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() end if chk==0 then return e:GetHandler():IsAbleToRemove() end
......
Duel.LoadScript("c12043000.lua") Duel.LoadScript("c12043000.lua")
--同步的两人 高音协曲 --同步的两人 高音协曲
local m=12043030 local m=12043030
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
c:SetSPSummonOnce(m) c:SetSPSummonOnce(m)
aux.AddFusionProcFun2(c,cm.mfiter,cm.mfiter1,true) aux.AddFusionProcFun2(c,cm.mfiter,cm.mfiter1,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_ONFIELD+LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_COST) aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_ONFIELD+LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_COST)
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(cm.splimit) e1:SetValue(cm.splimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--draw --draw
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW) e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetCost(cm.thcost) e1:SetCost(cm.thcost)
e1:SetTarget(cm.thtg) e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop) e1:SetOperation(cm.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Remove --Remove
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_DRAW) e2:SetCode(EVENT_DRAW)
e2:SetCountLimit(1,m+100) e2:SetCountLimit(1,m+100)
e2:SetCondition(cm.condition) e2:SetCondition(cm.condition)
e2:SetOperation(cm.operation) e2:SetOperation(cm.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.mfiter(c) function cm.mfiter(c)
return c:IsSetCard(0xafaa) return c:IsSetCard(0xafaa) and c:IsType(TYPE_MONSTER)
end end
function cm.mfiter1(c) function cm.mfiter1(c)
return c:IsSetCard(0xcfaa) return c:IsSetCard(0xcfaa) and c:IsType(TYPE_MONSTER)
end end
function cm.splimit(e,se,sp,st) function cm.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end end
function cm.costfilter(c) function cm.costfilter(c)
return c:IsAbleToGraveAsCost() return c:IsAbleToGraveAsCost()
end end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) end
local cc=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil) local cc=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
Duel.SendtoGrave(cc,REASON_COST) Duel.SendtoGrave(cc,REASON_COST)
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local h1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) local h1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local h2=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) local h2=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
return Duel.GetCurrentPhase()~=PHASE_DRAW and Duel.IsPlayerCanRemove(tp) and Duel.IsPlayerCanRemove(1-tp) and h1>0 and h2>0 return Duel.GetCurrentPhase()~=PHASE_DRAW and Duel.IsPlayerCanRemove(tp) and Duel.IsPlayerCanRemove(1-tp) and h1>0 and h2>0
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local h1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) local h1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local h2=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) local h2=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
if h1<1 or h2<1 then return end if h1<1 or h2<1 then return end
local turnp=Duel.GetTurnPlayer() local turnp=Duel.GetTurnPlayer()
Duel.Hint(HINT_SELECTMSG,turnp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,turnp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(turnp,aux.TRUE,turnp,LOCATION_HAND,0,1,1,nil) local g1=Duel.SelectMatchingCard(turnp,aux.TRUE,turnp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-turnp,g1) Duel.ConfirmCards(1-turnp,g1)
Duel.Hint(HINT_SELECTMSG,1-turnp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,1-turnp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(1-turnp,aux.TRUE,1-turnp,LOCATION_HAND,0,1,1,nil) local g2=Duel.SelectMatchingCard(1-turnp,aux.TRUE,1-turnp,LOCATION_HAND,0,1,1,nil)
g1:Merge(g2) g1:Merge(g2)
Duel.Remove(g1,POS_FACEUP,REASON_EFFECT) Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)
end end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment