Commit 9cbf42c5 authored by Nemo Ma's avatar Nemo Ma

Add and Sync

parent f4474215
No preview for this file type
...@@ -61,8 +61,8 @@ function c33700085.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,8 +61,8 @@ function c33700085.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function c33700085.confilter(c) function c33700085.confilter(c,ec)
return c:IsSetCard(0x442) and c:IsFaceup() and c:IsAbleToGraveAsCost() and c:GetLevel()>0 and c:IsSummonableCard() return c:IsCanBeSynchroMaterial(ec) and c:IsSetCard(0x442) and c:IsFaceup() and c:IsAbleToGraveAsCost() and c:GetLevel()>0 and c:IsSummonableCard()
end end
function c33700085.gcheck(g,tp,fc) function c33700085.gcheck(g,tp,fc)
return Duel.GetLocationCountFromEx(tp,tp,g,fc)>0 and g:GetSum(Card.GetLevel)==4 return Duel.GetLocationCountFromEx(tp,tp,g,fc)>0 and g:GetSum(Card.GetLevel)==4
...@@ -70,11 +70,11 @@ end ...@@ -70,11 +70,11 @@ end
function c33700085.spcon(e,c) function c33700085.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c33700085.confilter,tp,LOCATION_MZONE,0,nil) local mg=Duel.GetMatchingGroup(c33700085.confilter,tp,LOCATION_MZONE,0,nil,c)
return Senya.CheckGroup(mg,c33700085.gcheck,nil,1,4,tp,c) return Senya.CheckGroup(mg,c33700085.gcheck,nil,1,4,tp,c)
end end
function c33700085.spop(e,tp,eg,ep,ev,re,r,rp,c) function c33700085.spop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c33700085.confilter,tp,LOCATION_MZONE,0,nil) local mg=Duel.GetMatchingGroup(c33700085.confilter,tp,LOCATION_MZONE,0,nil,c)
local g=Senya.SelectGroup(tp,HINTMSG_TOGRAVE,mg,c33700085.gcheck,nil,1,4,tp,c) local g=Senya.SelectGroup(tp,HINTMSG_TOGRAVE,mg,c33700085.gcheck,nil,1,4,tp,c)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
\ No newline at end of file
...@@ -23,7 +23,7 @@ function c33700175.initial_effect(c) ...@@ -23,7 +23,7 @@ function c33700175.initial_effect(c)
e3:SetCategory(CATEGORY_DRAW) e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_FZONE) e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1) e3:SetCountLimit(1,33700175)
e3:SetCondition(c33700175.thcon) e3:SetCondition(c33700175.thcon)
e3:SetTarget(c33700175.thtg) e3:SetTarget(c33700175.thtg)
e3:SetOperation(c33700175.thop) e3:SetOperation(c33700175.thop)
...@@ -49,7 +49,8 @@ function c33700175.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,7 +49,8 @@ function c33700175.op(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c33700175.thcon(e,tp,eg,ep,ev,re,r,rp) function c33700175.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 local g=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 and g:GetClassCount(Card.GetCode)==g:GetCount()
end end
function c33700175.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c33700175.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(nil,tp,0,LOCATION_HAND,nil) local ct=Duel.GetMatchingGroupCount(nil,tp,0,LOCATION_HAND,nil)
...@@ -62,12 +63,13 @@ function c33700175.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,12 +63,13 @@ function c33700175.thop(e,tp,eg,ep,ev,re,r,rp)
local ct1=Duel.GetFieldGroupCount(p,0,LOCATION_HAND) local ct1=Duel.GetFieldGroupCount(p,0,LOCATION_HAND)
local ct2=ct1-Duel.GetFieldGroupCount(p,LOCATION_HAND,0) local ct2=ct1-Duel.GetFieldGroupCount(p,LOCATION_HAND,0)
if ct2>0 then if ct2>0 then
Duel.Draw(tp,ct2,REASON_EFFECT) Duel.Draw(p,ct2,REASON_EFFECT)
end end
local sg=Duel.GetOperatedGroup() local sg=Duel.MatchingGroup(function(c) return c:IsFaceup() or not c:IsOnField() end,p,LOCATION_GRAVE+LOCATION_HAND+LOCATION_ONFIELD,0,nil)
Duel.ConfirmCards(1-p,sg) local hg=Duel.GetFieldGroup(p,LOCATION_HAND,0)
Duel.ConfirmCards(1-p,hg)
if sg:GetClassCount(Card.GetCode)==sg:GetCount() then if sg:GetClassCount(Card.GetCode)==sg:GetCount() then
local gt=sg:FilterSelect(p,Card.IsDiscardable,1,sg:GetCount(),nil) local gt=hg:FilterSelect(p,Card.IsDiscardable,0,hg:GetCount(),nil)
Duel.SendtoGrave(gt,REASON_EFFECT+REASON_DISCARD) Duel.SendtoGrave(gt,REASON_EFFECT+REASON_DISCARD)
local ct3=gt:GetCount() local ct3=gt:GetCount()
local tg=Duel.GetMatchingGroup(Card.IsAbleToHand,p,LOCATION_GRAVE,0,nil) local tg=Duel.GetMatchingGroup(Card.IsAbleToHand,p,LOCATION_GRAVE,0,nil)
...@@ -78,8 +80,9 @@ function c33700175.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,8 +80,9 @@ function c33700175.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(sel,nil,REASON_EFFECT) Duel.SendtoHand(sel,nil,REASON_EFFECT)
Duel.ConfirmCards(1-p,sel) Duel.ConfirmCards(1-p,sel)
end end
Duel.ShuffleHand(p)
else else
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT) Duel.SendtoDeck(hg,nil,2,REASON_EFFECT)
Duel.Destroy(e:GetHandler(),REASON_EFFECT) Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -59,7 +59,7 @@ function cm.initial_effect(c) ...@@ -59,7 +59,7 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCondition(function(e,tp) e2:SetCondition(function(e,tp)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE,0) local g=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
return g:GetClassCount(Card.GetCode)==g:GetCount() return g:GetClassCount(Card.GetCode)==g:GetCount()
end) end)
e2:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk) e2:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
......
--朱雀的净化
function c33700175.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SOUND,0,aux.Stringid(33700175,1))
end)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c33700175.cost)
e2:SetTarget(c33700175.tg)
e2:SetOperation(c33700175.op)
c:RegisterEffect(e2)
--draw
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(33700175,0))
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1)
e3:SetCondition(c33700175.thcon)
e3:SetTarget(c33700175.thtg)
e3:SetOperation(c33700175.thop)
c:RegisterEffect(e3)
end
function c33700175.filter(c)
return c:IsCode(33700083) and c:IsAbleToRemoveAsCost()
end
function c33700175.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33700175.filter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c33700175.filter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c33700175.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c33700175.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SSet(tp,c)
end
end
function c33700175.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0
end
function c33700175.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(nil,tp,0,LOCATION_HAND,nil)
if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(tp,ct) end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,ct,tp,0)
end
function c33700175.thop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local ct1=Duel.GetFieldGroupCount(p,0,LOCATION_HAND)
local ct2=ct1-Duel.GetFieldGroupCount(p,LOCATION_HAND,0)
if ct2>0 then
Duel.Draw(tp,ct2,REASON_EFFECT)
end
local sg=Duel.GetOperatedGroup()
Duel.ConfirmCards(1-p,sg)
if sg:GetClassCount(Card.GetCode)==sg:GetCount() then
local gt=sg:FilterSelect(p,Card.IsDiscardable,1,sg:GetCount(),nil)
Duel.SendtoGrave(gt,REASON_EFFECT+REASON_DISCARD)
local ct3=gt:GetCount()
local tg=Duel.GetMatchingGroup(Card.IsAbleToHand,p,LOCATION_GRAVE,0,nil)
if ct3>0 and tg:GetCount()>=ct3 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_ATOHAND)
local sel=tg:Select(p,ct3,ct3,nil)
Duel.SendtoHand(sel,nil,REASON_EFFECT)
Duel.ConfirmCards(1-p,sel)
end
else
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end
\ No newline at end of file
--珊瑚海
local m=33700503
local cm=_G["c"..m]
function cm.initial_effect(c)
cm[c]=0
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return true end
local c=e:GetHandler()
local op=Duel.SelectOption(tp,m*16,m*16+1)
cm[c]=op
if op==0 then
c:SetEntityCode(m)
else
c:SetEntityCode(m+1)
end
end)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
local l=e:GetLabel()
e:SetLabel(0)
if chk==0 then return l==1 end
end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g0=Duel.GetMatchingGroup(Card.IsFaceup,cm.GetNorthPlayer(c,tp),LOCATION_MZONE,0,nil)
local g1=Duel.GetMatchingGroup(Card.IsFaceup,cm.GetNorthPlayer(c,tp),0,LOCATION_MZONE,nil)
local dg=Group.CreateGroup()
local d0=cm.GetData(g0,Card.GetRace)
local d1=cm.GetData(g1,Card.GetAttribute)
if cm.GetDataCount(g0,Card.GetRace)>1 and Duel.SelectYesNo(cm.GetNorthPlayer(c,tp),m*16+2) then
Duel.Hint(HINT_SELECTMSG,cm.GetNorthPlayer(c,tp),m*16+5)
local ds=Duel.AnnounceRace(cm.GetNorthPlayer(c,tp),1,d0)
dg=dg+g0:Filter(function(c) return not c:IsRace(ds) end,nil)
end
if cm.GetDataCount(g1,Card.GetAttribute)>1 and Duel.SelectYesNo(1-cm.GetNorthPlayer(c,tp),m*16+2) then
Duel.Hint(HINT_SELECTMSG,1-cm.GetNorthPlayer(c,tp),m*16+6)
local ds=Duel.AnnounceAttribute(1-cm.GetNorthPlayer(c,tp),1,d1)
dg=dg+g1:Filter(function(c) return not c:IsAttribute(ds) end,nil)
end
if #dg>0 then
Duel.SendtoGrave(dg,REASON_EFFECT)
end
end)
c:RegisterEffect(e1)
local e8=Effect.CreateEffect(c)
e8:SetDescription(m*16+3)
e8:SetCategory(CATEGORY_DAMAGE)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e8:SetCode(EVENT_PHASE+PHASE_END)
e8:SetRange(LOCATION_FZONE)
e8:SetCountLimit(1)
e8:SetCondition(cm.damcon)
e8:SetTarget(cm.damtg)
e8:SetOperation(cm.damop)
c:RegisterEffect(e8)
local e8=Effect.CreateEffect(c)
e8:SetDescription(m*16+4)
e8:SetCategory(CATEGORY_DAMAGE)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e8:SetCode(EVENT_PHASE+PHASE_END)
e8:SetRange(LOCATION_FZONE)
e8:SetCountLimit(1)
e8:SetCondition(cm.damcon1)
e8:SetTarget(cm.damtg1)
e8:SetOperation(cm.damop1)
c:RegisterEffect(e8)
end
function cm.GetData(g,f)
local v=0
for tc in aux.Next(g) do
v=v|f(tc)
end
return v
end
function cm.GetNorthPlayer(c,tp)
if cm[c]==0 then
return tp
else
return 1-tp
end
end
function cm.GetDataCount(g,f)
local v=cm.GetData(g,f)
local col=1
local count=0
while col<=v do
if col&v>0 then count=count+1 end
col=col<<1
end
return count
end
function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,cm.GetNorthPlayer(c,tp),LOCATION_MZONE,0,nil)
return cm.GetDataCount(g,Card.GetRace)>1
end
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local g=Duel.GetMatchingGroup(Card.IsFaceup,cm.GetNorthPlayer(c,tp),LOCATION_MZONE,0,nil)
local d=cm.GetDataCount(g,Card.GetRace)*700
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,cm.GetNorthPlayer(c,tp),d)
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsFaceup,cm.GetNorthPlayer(c,tp),LOCATION_MZONE,0,nil)
local d=cm.GetDataCount(g,Card.GetRace)*700
Duel.Damage(cm.GetNorthPlayer(c,tp),d,REASON_EFFECT)
end
function cm.damcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsFaceup,1-cm.GetNorthPlayer(c,tp),LOCATION_MZONE,0,nil)
return cm.GetDataCount(g,Card.GetAttribute)>1
end
function cm.damtg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return true end
local g=Duel.GetMatchingGroup(Card.IsFaceup,1-cm.GetNorthPlayer(c,tp),LOCATION_MZONE,0,nil)
local d=cm.GetDataCount(g,Card.GetAttribute)*1000
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-cm.GetNorthPlayer(c,tp),d)
end
function cm.damop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsFaceup,1-cm.GetNorthPlayer(c,tp),LOCATION_MZONE,0,nil)
local d=cm.GetDataCount(g,Card.GetAttribute)*1000
Duel.Damage(1-cm.GetNorthPlayer(c,tp),d,REASON_EFFECT)
end
#222DIY
#Nemoma 337 0x440-0x44f
#狂
!setname 0x442 动物朋友
!counter 0x442 太阳之道指示物
#纸
!setname 0x443 霓火
#纸
!setname 0x3440 Proto-Summoner
!setname 0x6440 Protoform
!setname 0x5440 琪比摩斯
#???
!setname 0x1449 无心械姬
!setname 0x3449 慧心花姬
\ 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