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

fix Frederica

parent d8045d41
......@@ -28,7 +28,7 @@ end
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
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
function cm.thfilter(c)
return c:IsSetCard(0xafaa) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
......
......@@ -52,7 +52,7 @@ end
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
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
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() end
......
Duel.LoadScript("c12043000.lua")
--同步的两人 高音协曲
local m=12043030
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
c:SetSPSummonOnce(m)
aux.AddFusionProcFun2(c,cm.mfiter,cm.mfiter1,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_ONFIELD+LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(cm.splimit)
c:RegisterEffect(e1)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.thcost)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--Remove
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_DRAW)
e2:SetCountLimit(1,m+100)
e2:SetCondition(cm.condition)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function cm.mfiter(c)
return c:IsSetCard(0xafaa)
end
function cm.mfiter1(c)
return c:IsSetCard(0xcfaa)
end
function cm.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function cm.costfilter(c)
return c:IsAbleToGraveAsCost()
end
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
local cc=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
Duel.SendtoGrave(cc,REASON_COST)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local h1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
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
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local h1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local h2=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
if h1<1 or h2<1 then return end
local turnp=Duel.GetTurnPlayer()
Duel.Hint(HINT_SELECTMSG,turnp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(turnp,aux.TRUE,turnp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-turnp,g1)
Duel.Hint(HINT_SELECTMSG,1-turnp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(1-turnp,aux.TRUE,1-turnp,LOCATION_HAND,0,1,1,nil)
g1:Merge(g2)
Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)
Duel.LoadScript("c12043000.lua")
--同步的两人 高音协曲
local m=12043030
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
c:SetSPSummonOnce(m)
aux.AddFusionProcFun2(c,cm.mfiter,cm.mfiter1,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_ONFIELD+LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_COST)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(cm.splimit)
c:RegisterEffect(e1)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.thcost)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
--Remove
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_DRAW)
e2:SetCountLimit(1,m+100)
e2:SetCondition(cm.condition)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function cm.mfiter(c)
return c:IsSetCard(0xafaa) and c:IsType(TYPE_MONSTER)
end
function cm.mfiter1(c)
return c:IsSetCard(0xcfaa) and c:IsType(TYPE_MONSTER)
end
function cm.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function cm.costfilter(c)
return c:IsAbleToGraveAsCost()
end
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
local cc=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
Duel.SendtoGrave(cc,REASON_COST)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local h1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
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
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local h1=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local h2=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
if h1<1 or h2<1 then return end
local turnp=Duel.GetTurnPlayer()
Duel.Hint(HINT_SELECTMSG,turnp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(turnp,aux.TRUE,turnp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-turnp,g1)
Duel.Hint(HINT_SELECTMSG,1-turnp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(1-turnp,aux.TRUE,1-turnp,LOCATION_HAND,0,1,1,nil)
g1:Merge(g2)
Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)
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