Commit 1f06955d authored by CubeRuler's avatar CubeRuler
parents 0f9e894e db84ee03
Pipeline #2501 canceled with stages
in 5 minutes and 34 seconds
No preview for this file type
expansions/pics/72410680.jpg

75.3 KB | W: | H:

expansions/pics/72410680.jpg

75.2 KB | W: | H:

expansions/pics/72410680.jpg
expansions/pics/72410680.jpg
expansions/pics/72410680.jpg
expansions/pics/72410680.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/72411210.jpg

78 KB | W: | H:

expansions/pics/72411210.jpg

80.5 KB | W: | H:

expansions/pics/72411210.jpg
expansions/pics/72411210.jpg
expansions/pics/72411210.jpg
expansions/pics/72411210.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/72411240.jpg

82.3 KB | W: | H:

expansions/pics/72411240.jpg

81.8 KB | W: | H:

expansions/pics/72411240.jpg
expansions/pics/72411240.jpg
expansions/pics/72411240.jpg
expansions/pics/72411240.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/72411250.jpg

83.2 KB | W: | H:

expansions/pics/72411250.jpg

82.6 KB | W: | H:

expansions/pics/72411250.jpg
expansions/pics/72411250.jpg
expansions/pics/72411250.jpg
expansions/pics/72411250.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/72411490.jpg

131 KB | W: | H:

expansions/pics/72411490.jpg

132 KB | W: | H:

expansions/pics/72411490.jpg
expansions/pics/72411490.jpg
expansions/pics/72411490.jpg
expansions/pics/72411490.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/72411500.jpg

91.8 KB | W: | H:

expansions/pics/72411500.jpg

91.8 KB | W: | H:

expansions/pics/72411500.jpg
expansions/pics/72411500.jpg
expansions/pics/72411500.jpg
expansions/pics/72411500.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81004002.jpg

61.5 KB | W: | H:

expansions/pics/81004002.jpg

148 KB | W: | H:

expansions/pics/81004002.jpg
expansions/pics/81004002.jpg
expansions/pics/81004002.jpg
expansions/pics/81004002.jpg
  • 2-up
  • Swipe
  • Onion skin
...@@ -20,7 +20,7 @@ function cm.desop(e,tp) ...@@ -20,7 +20,7 @@ function cm.desop(e,tp)
if op==1 then if op==1 then
Duel.Damage(1-tp,1000,REASON_EFFECT) Duel.Damage(1-tp,1000,REASON_EFFECT)
elseif op==2 then elseif op==2 then
g:SelectDestroy(tp,nil,1,1,nil) g:SelectDestroy(tp,aux.TRUE,1,1,nil,{})
elseif op==3 then elseif op==3 then
if c:GetFlagEffect(m)<=0 then if c:GetFlagEffect(m)<=0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -84,7 +84,7 @@ function c10908006.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,7 +84,7 @@ function c10908006.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
if tc:IsType(TYPE_FIELD) then if tc:IsType(TYPE_FIELD) then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
else Duel.SSet(tp,tc) else Duel.SSet(tp,tc)
end end
end end
......
...@@ -106,7 +106,6 @@ function c12009044.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -106,7 +106,6 @@ function c12009044.setop(e,tp,eg,ep,ev,re,r,rp)
if tc then if tc then
if tc:IsType(TYPE_MONSTER) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE) if tc:IsType(TYPE_MONSTER) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
else else
Duel.DisableShuffleCheck()
Duel.SSet(tp,tc) Duel.SSet(tp,tc)
end end
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
......
...@@ -47,12 +47,12 @@ function cm.chainfilter(re,tp,cid) ...@@ -47,12 +47,12 @@ function cm.chainfilter(re,tp,cid)
return false return false
end end
function cm.spfilter(c) function cm.spfilter(c)
return c:IsSetCard(0x5fae) and c:IsType(TYPE_MONSTER) and not c:IsPublic() return c:IsSetCard(0x5fa9) and c:IsType(TYPE_MONSTER) and not c:IsPublic()
end end
function cm.spcon(e,c) function cm.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()
return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,3,nil) and Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 and not Duel.CheckPhaseActivity() and Duel.GetCustomActivityCount(m,tp,ACTIVITY_CHAIN)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,3,nil) and Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 and not Duel.CheckPhaseActivity() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spop(e,tp,eg,ep,ev,re,r,rp,chk)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
...@@ -81,14 +81,14 @@ function cm.actop(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,14 +81,14 @@ function cm.actop(e,tp,eg,ep,ev,re,r,rp)
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
end end
end end
function cm.costfilter(c) function cm.costfilter(c,tp)
return c:IsRace(RACE_WARRIOR) and c:IsAbleToDeckAsCost() return c:IsRace(RACE_WARRIOR) and c:IsAbleToDeckAsCost() and Duel.IsExistingMatchingCard(cm.costfilter2,tp,LOCATION_GRAVE,0,1,c)
end end
function cm.costfilter2(c) function cm.costfilter2(c)
return c:IsRace(RACE_MACHINE) and c:IsAbleToDeckAsCost() return c:IsRace(RACE_MACHINE) and c:IsAbleToDeckAsCost()
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(cm.costfilter2,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g1=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
local m=12014002 local m=12014002
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableCounterPermit(0x2fb4) c:EnableCounterPermit(0x1fb4)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
...@@ -59,7 +59,7 @@ function cm.drcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,7 +59,7 @@ function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
and rc:IsFaceup() and rc:IsSetCard(0x5fa9) and rc:IsControler(tp) and rc:IsFaceup() and rc:IsSetCard(0x5fa9) and rc:IsControler(tp)
end end
function cm.drop(e,tp,eg,ep,ev,re,r,rp) function cm.drop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x2fb4,1) e:GetHandler():AddCounter(0x1fb4,1)
end end
function cm.drcon1(e,tp,eg,ep,ev,re,r,rp) function cm.drcon1(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
...@@ -70,8 +70,8 @@ function cm.spfilter(c,e,tp) ...@@ -70,8 +70,8 @@ function cm.spfilter(c,e,tp)
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsCanRemoveCounter(tp,0x2fb4,1,REASON_COST) end if chk==0 then return c:IsCanRemoveCounter(tp,0x1fb4,1,REASON_COST) end
c:RemoveCounter(tp,0x2fb4,1,REASON_COST) c:RemoveCounter(tp,0x1fb4,1,REASON_COST)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -87,8 +87,8 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,8 +87,8 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x2fb4,7,REASON_COST) end if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1fb4,7,REASON_COST) end
c:RemoveCounter(tp,0x2fb4,7,REASON_COST) c:RemoveCounter(tp,0x1fb4,7,REASON_COST)
end end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_HAND+LOCATION_EXTRA,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_HAND+LOCATION_EXTRA,1,nil) end
......
...@@ -45,6 +45,9 @@ function cm.initial_effect(c) ...@@ -45,6 +45,9 @@ function cm.initial_effect(c)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
end end
end end
function cm.tgfilter(c)
return c:IsSetCard(0x5fa9) and c:IsAbleToHand()
end
function cm.cfilter(c,tp) function cm.cfilter(c,tp)
return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK) return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK)
end end
......
...@@ -67,6 +67,9 @@ end ...@@ -67,6 +67,9 @@ end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.tgfilter(c)
return c:IsSetCard(0x5fa9) and c:IsAbleToHand()
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local tt=1 local tt=1
......
...@@ -36,6 +36,9 @@ function cm.initial_effect(c) ...@@ -36,6 +36,9 @@ function cm.initial_effect(c)
e2:SetOperation(cm.thop) e2:SetOperation(cm.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.tgfilter(c)
return c:IsSetCard(0x5fa9) and c:IsAbleToHand()
end
function cm.cfilter(c,tp) function cm.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x5fa9) and c:IsLevelAbove(6) and c:IsControler(tp) return c:IsFaceup() and c:IsSetCard(0x5fa9) and c:IsLevelAbove(6) and c:IsControler(tp)
end end
...@@ -64,7 +67,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,7 +67,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsRace(RACE_FAIRY+RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_WARRIOR+RACE_MACHINE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
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.IsPlayerCanDiscardDeck(tp,3) end if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,3) end
......
...@@ -74,6 +74,9 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,6 +74,9 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function cm.tgfilter(c)
return c:IsSetCard(0x5fa9) and c:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_MZONE)
......
...@@ -35,6 +35,9 @@ function cm.initial_effect(c) ...@@ -35,6 +35,9 @@ function cm.initial_effect(c)
e7:SetOperation(cm.desop) e7:SetOperation(cm.desop)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
function cm.tgfilter(c)
return c:IsSetCard(0x5fa9) and c:IsAbleToHand()
end
function cm.comtfilter(c,tp) function cm.comtfilter(c,tp)
return c:IsFaceup() and c:IsAbleToHand() return c:IsFaceup() and c:IsAbleToHand()
and c:IsSetCard(0x5fa9) and Duel.GetMZoneCount(tp,c,tp)>0 and c:IsSetCard(0x5fa9) and Duel.GetMZoneCount(tp,c,tp)>0
......
...@@ -131,10 +131,23 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -131,10 +131,23 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
Duel.SetChainLimit(cm.chainlm) Duel.SetChainLimit(cm.chainlm)
end end
function cm.tgfilter(c)
return c:IsSetCard(0x5fa9) and c:IsAbleToHand()
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.Draw(tp,2,REASON_EFFECT) local tt=2
if tt>0 and Duel.IsPlayerAffectedByEffect(tp,12014002) and Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,tt,nil) and Duel.SelectYesNo(tp,aux.Stringid(12014002,4)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,tt,tt,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
elseif tt>0 then
Duel.Draw(tp,tt,REASON_EFFECT)
end
end end
\ No newline at end of file
...@@ -127,7 +127,7 @@ function c12028012.con3(e,tp,eg,ep,ev,re,r,rp) ...@@ -127,7 +127,7 @@ function c12028012.con3(e,tp,eg,ep,ev,re,r,rp)
end end
-- --
function c12028012.tfilter3(c) function c12028012.tfilter3(c)
return c:IsFaceup() and not c:IsDisabled() and c:IsType(TYPE_EFFECT) return c:IsFaceup() and not c:IsDisabled() and (c:IsType(TYPE_EFFECT) or c:IsType(TYPE_SPELL+TYPE_TRAP))
end end
function c12028012.tg3(e,tp,eg,ep,ev,re,r,rp,chk) function c12028012.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c12028012.tfilter3,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c12028012.tfilter3,tp,0,LOCATION_ONFIELD,1,nil) end
......
...@@ -45,16 +45,18 @@ function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -45,16 +45,18 @@ function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp) function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) and not e:GetHandler():IsRelateToEffect(e) then return end if ( not tc:IsRelateToEffect(e) ) or ( not e:GetHandler():IsRelateToEffect(e) ) then return end
local tt=Duel.GetFlagEffect(tp,m) local tt=Duel.GetFlagEffect(tp,m)
local tt1=(Duel.GetFlagEffect(tp,m+100)+1)*3 local tt1=(Duel.GetFlagEffect(tp,m+100)+1)*3
Debug.Message(tt)
Debug.Message(tt1)
if tt<tt1 then if tt<tt1 then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
elseif tc:IsAbleToHand() and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then elseif tc:IsAbleToHand() and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.SendtoHand(tc,tp,REASON_EFFECT) Duel.SendtoHand(tc,tp,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,m+100,nil,0,1) Duel.RegisterFlagEffect(tp,m+100,nil,0,1)
else else
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end end
end end
function cm.thtgfil(c) function cm.thtgfil(c)
...@@ -71,4 +73,4 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,4 +73,4 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
rsba.ActLimitFun(g:GetFirst(),e,tp) rsba.ActLimitFun(g:GetFirst(),e,tp)
end end
end end
\ No newline at end of file
--战场的巫鸣鸟 迦陵频伽 --战场的巫鸣鸟 迦陵频伽
local m=12037015
local cm=_G["c"..m]
function c12037015.initial_effect(c) function c12037015.initial_effect(c)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(49879995,0)) e1:SetDescription(aux.Stringid(12037015,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c12037015.spcon) e1:SetCondition(cm.spcon)
e1:SetTarget(c12037015.sptg) e1:SetTarget(cm.sptg)
e1:SetOperation(c12037015.spop) e1:SetOperation(cm.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
...@@ -21,21 +23,21 @@ function c12037015.initial_effect(c) ...@@ -21,21 +23,21 @@ function c12037015.initial_effect(c)
e3:SetValue(1) e3:SetValue(1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c12037015.filter(c) function cm.filter(c)
return c:IsAttackPos() return c:IsAttackPos()
end end
function c12037015.spcon(e,tp,eg,ep,ev,re,r,rp) function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
if not eg or #eg>1 then return false end if not eg or #eg>1 then return false end
local mat=eg:GetFirst():GetMaterial() local mat=eg:GetFirst():GetMaterial()
return mat and #mat>1 and mat:GetFirst():GetLevel()==mat:GetNext():GetLevel() return mat and #mat>1 and mat:GetFirst():GetLevel()==mat:GetNext():GetLevel()
end end
function c12037015.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c12037015.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local rc=eg:GetFirst() local rc=eg:GetFirst()
if rc:IsRelateToEffect(e) and c:IsRelateToEffect(e) then if rc:IsRelateToEffect(e) and c:IsRelateToEffect(e) then
......
...@@ -40,7 +40,7 @@ function cm.costfilter(c) ...@@ -40,7 +40,7 @@ function cm.costfilter(c)
return c:IsPublic() return c:IsPublic()
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end if chk==0 then return not Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_HAND,0,1,e:GetHandler())end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_HAND,0,e:GetHandler()) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_HAND,0,e:GetHandler())
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
...@@ -85,7 +85,7 @@ function cm.negcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -85,7 +85,7 @@ function cm.negcon(e,tp,eg,ep,ev,re,r,rp)
return true return true
end end
function filter(c,code) function filter(c,code)
return c:IsAbleToHand() and c:IsCode(code) and not re:GetHandler():IsCode(table.unpack(Sr_setback)) return c:IsAbleToHand() and c:IsCode(code) and not re:GetHandler():IsCode(table.unpack(Srprzm_setback))
end end
function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
local rc=re:GetHandler() local rc=re:GetHandler()
......
...@@ -7,6 +7,17 @@ function cm.initial_effect(c) ...@@ -7,6 +7,17 @@ function cm.initial_effect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--rec or dam
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetLabel(1)
e1:SetCondition(cm.condition1)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.operation) e1:SetOperation(cm.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -23,8 +34,11 @@ function cm.initial_effect(c) ...@@ -23,8 +34,11 @@ function cm.initial_effect(c)
e2:SetOperation(cm.plop) e2:SetOperation(cm.plop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.filter1(c) function cm.condition(e,tp,eg,ep,ev,re,r,rp,chk)
return ( c:IsSetCard(0xfbb) or c:IsSetCard(0x1fbd) )and c:IsAbleToHand() return not ( Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 and not Duel.CheckPhaseActivity() )
end
function cm.condition1(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 and not Duel.CheckPhaseActivity()
end end
function cm.cfilter(c,e,tp) function cm.cfilter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsLevel(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_DRAGON) and c:IsLevel(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
...@@ -34,11 +48,12 @@ function cm.f1(c) ...@@ -34,11 +48,12 @@ function cm.f1(c)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local b1=( Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 ) local tt=e:GetLabel()
local b1=( Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 )
local b2=( Duel.IsExistingMatchingCard(cm.f1,tp,LOCATION_HAND,0,1,nil) ) local b2=( Duel.IsExistingMatchingCard(cm.f1,tp,LOCATION_HAND,0,1,nil) )
if chk==0 then return b1 or b2 end
local b3=( Duel.CheckPhaseActivity() and b1 and b2 ) local b3=( Duel.CheckPhaseActivity() and b1 and b2 )
if b1 and b2 and b3 then op=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2),aux.Stringid(m,3)) if chk==0 then return b1 or b2 end
if b1 and b2 and tt==1 then op=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2),aux.Stringid(m,3))
elseif b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2)) elseif b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(m,1),aux.Stringid(m,2))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(m,1)) elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(m,1))
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(m,2))+1 elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(m,2))+1
...@@ -62,7 +77,7 @@ end ...@@ -62,7 +77,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local kp=Duel.GetTurnPlayer() local kp=Duel.GetTurnPlayer()
......
...@@ -61,10 +61,11 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -61,10 +61,11 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thop(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetFirstMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if tg then local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(tg,nil,REASON_EFFECT) if #g>0 then
Duel.ConfirmCards(1-tp,tg) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end end
end end
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
......
...@@ -108,10 +108,11 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -108,10 +108,11 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Release(g,REASON_COST) Duel.Release(g,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.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
local g=Duel.GetMatchingGroup(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,nil)
local dg=g:RandomSelect(tp,1) local dg=g:RandomSelect(tp,1)
Duel.HintSelection(dg) Duel.HintSelection(dg)
......
...@@ -61,10 +61,11 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -61,10 +61,11 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thop(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetFirstMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if tg then local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(tg,nil,REASON_EFFECT) if #g>0 then
Duel.ConfirmCards(1-tp,tg) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end end
end end
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
......
...@@ -62,10 +62,11 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -62,10 +62,11 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thop(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetFirstMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if tg then local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(tg,nil,REASON_EFFECT) if #g>0 then
Duel.ConfirmCards(1-tp,tg) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end end
end end
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
......
...@@ -62,10 +62,11 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -62,10 +62,11 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thop(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetFirstMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if tg then local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(tg,nil,REASON_EFFECT) if #g>0 then
Duel.ConfirmCards(1-tp,tg) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end end
end end
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
...@@ -90,8 +91,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -90,8 +91,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoHand(c,nil,REASON_COST) Duel.SendtoHand(c,nil,REASON_COST)
end end
function cm.thtg1(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function cm.thop1(e,tp,eg,ep,ev,re,r,rp) function cm.thop1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
......
...@@ -5,7 +5,7 @@ local cm=_G["c"..m] ...@@ -5,7 +5,7 @@ local cm=_G["c"..m]
cm.named_with_SkyLand=true cm.named_with_SkyLand=true
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcMix(c,false,true,cm.fusfilter1,cm.fusfilter2,cm.fusfilter3) aux.AddFusionProcMix(c,false,false,cm.fusfilter1,cm.fusfilter2,cm.fusfilter3)
aux.AddContactFusionProcedure(c,Card.IsAbleToGraveAsCost,LOCATION_MZONE,0,Duel.Remove,POS_FACEUP,REASON_COST) aux.AddContactFusionProcedure(c,Card.IsAbleToGraveAsCost,LOCATION_MZONE,0,Duel.Remove,POS_FACEUP,REASON_COST)
--draw --draw
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -21,7 +21,6 @@ function cm.initial_effect(c) ...@@ -21,7 +21,6 @@ function cm.initial_effect(c)
e2:SetOperation(cm.spop) e2:SetOperation(cm.spop)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(m,ACTIVITY_CHAIN,cm.chainfilter)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS) e4:SetCode(EVENT_SPSUMMON_SUCCESS)
...@@ -51,7 +50,7 @@ end ...@@ -51,7 +50,7 @@ end
function cm.spcon(e,c) function cm.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()
return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,3,nil) and Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 and not Duel.CheckPhaseActivity() and Duel.GetCustomActivityCount(m,tp,ACTIVITY_CHAIN)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,3,nil) and Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 and not Duel.CheckPhaseActivity() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spop(e,tp,eg,ep,ev,re,r,rp,chk)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
...@@ -81,14 +80,14 @@ function cm.actop(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,14 +80,14 @@ function cm.actop(e,tp,eg,ep,ev,re,r,rp)
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
end end
end end
function cm.costfilter(c) function cm.costfilter(c,tp)
return c:IsRace(RACE_SPELLCASTER) and c:IsAbleToDeckAsCost() return c:IsRace(RACE_SPELLCASTER) and c:IsAbleToDeckAsCost() and Duel.IsExistingMatchingCard(cm.costfilter2,tp,LOCATION_GRAVE,0,1,c)
end end
function cm.costfilter2(c) function cm.costfilter2(c)
return c:IsRace(RACE_FAIRY) and c:IsAbleToDeckAsCost() return c:IsRace(RACE_FAIRY) and c:IsAbleToDeckAsCost()
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(cm.costfilter2,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g1=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
local m=12083002 local m=12083002
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableCounterPermit(0x2fb4) c:EnableCounterPermit(0x1fb4)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
...@@ -58,15 +58,15 @@ function cm.drcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,15 +58,15 @@ function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
and rc:IsFaceup() and rc:IsSetCard(0x5fae) and rc:IsControler(tp) and rc:IsFaceup() and rc:IsSetCard(0x5fae) and rc:IsControler(tp)
end end
function cm.drop(e,tp,eg,ep,ev,re,r,rp) function cm.drop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x2fb4,1) e:GetHandler():AddCounter(0x1fb4,1)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsCanRemoveCounter(tp,0x2fb4,1,REASON_COST) end if chk==0 then return c:IsCanRemoveCounter(tp,0x1fb4,1,REASON_COST) end
c:RemoveCounter(tp,0x2fb4,1,REASON_COST) c:RemoveCounter(tp,0x1fb4,1,REASON_COST)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -82,8 +82,8 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,8 +82,8 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x2fb4,7,REASON_COST) end if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x1fb4,7,REASON_COST) end
c:RemoveCounter(tp,0x2fb4,7,REASON_COST) c:RemoveCounter(tp,0x1fb4,7,REASON_COST)
end end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_HAND+LOCATION_EXTRA,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_HAND+LOCATION_EXTRA,1,nil) end
......
...@@ -17,7 +17,7 @@ function cm.initial_effect(c) ...@@ -17,7 +17,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_DAMAGE) e1:SetCode(EVENT_DAMAGE)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetTarget(cm.sumtg) e1:SetTarget(cm.sumtg)
e1:SetOperation(cm.sumop) e1:SetOperation(cm.sumop)
......
...@@ -49,10 +49,10 @@ function cm.immop(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,10 +49,10 @@ function cm.immop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTargetRange(0,1) e1:SetTargetRange(0,1)
e2:SetValue(cm.aclimit) e1:SetValue(cm.aclimit)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -72,6 +72,7 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -72,6 +72,7 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
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 c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -29,7 +29,7 @@ function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -29,7 +29,7 @@ function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsRace(RACE_DRAGON) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsRace(RACE_DRAGON) end
if chk==0 then return Duel.IsExistingTarget(cm.gfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp) end if chk==0 then return Duel.IsExistingTarget(cm.gfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,cm.tgfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp) Duel.SelectTarget(tp,cm.gfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp)
end end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp) function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -110,6 +110,9 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -110,6 +110,9 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectMatchingCard(tp,cm.rmfilter2,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.rmfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function cm.filters(c)
return c:IsRace(RACE_WYRM)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsType,nil,TYPE_MONSTER) local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsType,nil,TYPE_MONSTER)
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
local m=14800581 local m=14800581
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--xyz summon --xyz summon
aux.AddXyzProcedureLevelFree(c,cm.mfilter,nil,2,99,cm.ovfilter,aux.Stringid(m,0),cm.xyzop) aux.AddXyzProcedureLevelFree(c,cm.mfilter,nil,2,99,cm.ovfilter,aux.Stringid(m,0),cm.xyzop)
c:EnableReviveLimit() c:EnableReviveLimit()
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
local m=14800582 local m=14800582
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
c:SetSPSummonOnce(m)
--xyz summon --xyz summon
aux.AddXyzProcedureLevelFree(c,cm.mfilter,nil,2,99,cm.ovfilter,aux.Stringid(m,0),cm.xyzop) aux.AddXyzProcedureLevelFree(c,cm.mfilter,nil,2,99,cm.ovfilter,aux.Stringid(m,0),cm.xyzop)
c:EnableReviveLimit() c:EnableReviveLimit()
......
...@@ -45,7 +45,7 @@ end ...@@ -45,7 +45,7 @@ end
function c21520122.thop(e,tp,eg,ep,ev,re,r,rp,chk) function c21520122.thop(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c21520122.thfilter,tp,LOCATION_GRAVE,0,nil) local g=Duel.GetMatchingGroup(c21520122.thfilter,tp,LOCATION_GRAVE,0,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_MESSAGE,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
......
...@@ -21,7 +21,7 @@ function c21520150.initial_effect(c) ...@@ -21,7 +21,7 @@ function c21520150.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c21520150.cfilter(c) function c21520150.cfilter(c)
return c:IsFaceup() and c:IsCode(21520133) return c:IsFaceup() and c:IsCode(21520133) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end end
function c21520150.condition(e,tp,eg,ep,ev,re,r,rp) function c21520150.condition(e,tp,eg,ep,ev,re,r,rp)
return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
...@@ -36,7 +36,7 @@ function c21520150.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -36,7 +36,7 @@ function c21520150.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function c21520150.activate(e,tp,eg,ep,ev,re,r,rp) function c21520150.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev) if not Duel.NegateActivation(ev) then return end
if re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
...@@ -47,8 +47,8 @@ function c21520150.dcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -47,8 +47,8 @@ function c21520150.dcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end end
function c21520150.dtg(e,tp,eg,ep,ev,re,r,rp,chk) function c21520150.dtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp) end
local ct=Duel.GetMatchingGroupCount(c21520150.cfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil) local ct=Duel.GetMatchingGroupCount(c21520150.cfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
if chk==0 then return Duel.IsPlayerCanDraw(tp) and ct>0 end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct) Duel.SetTargetParam(ct)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
......
...@@ -28,7 +28,7 @@ function c21520155.rfilter(c,e,tp) ...@@ -28,7 +28,7 @@ function c21520155.rfilter(c,e,tp)
and Duel.IsExistingMatchingCard(c21520155.spfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,c,e,tp) and Duel.IsExistingMatchingCard(c21520155.spfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,c,e,tp)
end end
function c21520155.spfilter(c,lc,e,tp) function c21520155.spfilter(c,lc,e,tp)
return aux.IsCodeListed(c,lc:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0xa491) and Duel.GetLocationCountFromEx(tp,tp,lc,c)>0 return aux.IsCodeListed(c,lc:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,true) and c:IsSetCard(0xa491) and Duel.GetLocationCountFromEx(tp,tp,lc,c)>0
--[[ if c:IsLocation(LOCATION_EXTRA) then --[[ if c:IsLocation(LOCATION_EXTRA) then
return aux.IsCodeListed(c,lc:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0xa491) and Duel.GetLocationCountFromEx(tp,tp,lc,c)>0 return aux.IsCodeListed(c,lc:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0xa491) and Duel.GetLocationCountFromEx(tp,tp,lc,c)>0
elseif c:IsLocation(LOCATION_GRAVE) then elseif c:IsLocation(LOCATION_GRAVE) then
...@@ -54,7 +54,7 @@ function c21520155.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,7 +54,7 @@ function c21520155.operation(e,tp,eg,ep,ev,re,r,rp)
local exg=Duel.GetMatchingGroup(c21520155.spfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,nil,rg:GetFirst(),e,tp) local exg=Duel.GetMatchingGroup(c21520155.spfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,nil,rg:GetFirst(),e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=exg:Select(tp,1,1,nil) local sg=exg:Select(tp,1,1,nil)
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then if Duel.SpecialSummon(sg,0,tp,tp,false,true,POS_FACEUP)>0 then
sg:GetFirst():CompleteProcedure() sg:GetFirst():CompleteProcedure()
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
else else
......
...@@ -29,12 +29,8 @@ function c21520156.rfilter(c,e,tp) ...@@ -29,12 +29,8 @@ function c21520156.rfilter(c,e,tp)
and Duel.IsExistingMatchingCard(c21520156.spfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,c,e,tp) and Duel.IsExistingMatchingCard(c21520156.spfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,c,e,tp)
end end
function c21520156.spfilter(c,lc,e,tp) function c21520156.spfilter(c,lc,e,tp)
if c:IsLocation(LOCATION_EXTRA) then return c:IsCanBeSpecialSummoned(e,0,tp,false,true) and c:IsSetCard(0xa491) and not c:IsCode(lc:GetCode()) and c:IsLevel(lc:GetLevel())
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0xa491) and not c:IsCode(lc:GetCode()) and c:IsLevel(lc:GetLevel())
and Duel.GetLocationCountFromEx(tp,tp,lc,c)>0 and Duel.GetLocationCountFromEx(tp,tp,lc,c)>0
elseif c:IsLocation(LOCATION_GRAVE) then
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0xa491) and not c:IsCode(lc:GetCode()) and c:IsLevel(lc:GetLevel())
and Duel.GetMZoneCount(tp,lc)>0 end
end end
function c21520156.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c21520156.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c21520156.rfilter(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c21520156.rfilter(chkc,e,tp) end
...@@ -52,7 +48,7 @@ function c21520156.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,7 +48,7 @@ function c21520156.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,false,true,POS_FACEUP)
sg:GetFirst():CompleteProcedure() sg:GetFirst():CompleteProcedure()
end end
end end
......
...@@ -2,90 +2,90 @@ ...@@ -2,90 +2,90 @@
Amana=Amana or {} Amana=Amana or {}
--Mogami Shizuka, 81018xxx, 0x81b --Mogami Shizuka, 81018xxx, 0x81b
function Amana.AttackBelow(c) function Amana.AttackBelow(c)
local ea=Effect.CreateEffect(c) local ea=Effect.CreateEffect(c)
ea:SetType(EFFECT_TYPE_SINGLE) ea:SetType(EFFECT_TYPE_SINGLE)
ea:SetCode(EFFECT_CANNOT_ATTACK) ea:SetCode(EFFECT_CANNOT_ATTACK)
ea:SetCondition(Amana.atcon) ea:SetCondition(Amana.atcon)
c:RegisterEffect(ea) c:RegisterEffect(ea)
end end
function Amana.atcon(e) function Amana.atcon(e)
return e:GetHandler():GetAttack()>=2000 return e:GetHandler():GetAttack()>=2000
end end
--majsoul --majsoul
function Amana.Majsoul(c) function Amana.Majsoul(c)
Duel.EnableGlobalFlag(GLOBALFLAG_SELF_TOGRAVE) Duel.EnableGlobalFlag(GLOBALFLAG_SELF_TOGRAVE)
aux.AddCodeList(c,26818000,26818001) aux.AddCodeList(c,26818000,26818001)
local ea=Effect.CreateEffect(c) local ea=Effect.CreateEffect(c)
ea:SetType(EFFECT_TYPE_SINGLE) ea:SetType(EFFECT_TYPE_SINGLE)
ea:SetProperty(EFFECT_FLAG_SINGLE_RANGE) ea:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
ea:SetCode(EFFECT_SELF_TOGRAVE) ea:SetCode(EFFECT_SELF_TOGRAVE)
ea:SetRange(LOCATION_MZONE) ea:SetRange(LOCATION_MZONE)
ea:SetCondition(Amana.tgcon) ea:SetCondition(Amana.tgcon)
c:RegisterEffect(ea) c:RegisterEffect(ea)
end end
function Amana.cfilter(c) function Amana.cfilter(c)
return c:IsFaceup() and c:IsCode(26818000,26818001) return c:IsFaceup() and c:IsCode(26818000,26818001)
end end
function Amana.tgcon(e) function Amana.tgcon(e)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
return Duel.GetCurrentPhase()==PHASE_END return Duel.GetCurrentPhase()==PHASE_END
and not (Duel.IsExistingMatchingCard(Amana.cfilter,tp,LOCATION_MZONE,0,1,nil) or Duel.IsPlayerAffectedByEffect(tp,26818046)) and not (Duel.IsExistingMatchingCard(Amana.cfilter,tp,LOCATION_MZONE,0,1,nil) or Duel.IsPlayerAffectedByEffect(tp,26818046))
end end
--majsoulGirl/Boy --majsoulGirl/Boy
function Amana.MajsoulGirl(c) function Amana.MajsoulGirl(c)
local ea=Effect.CreateEffect(c) local ea=Effect.CreateEffect(c)
ea:SetType(EFFECT_TYPE_SINGLE) ea:SetType(EFFECT_TYPE_SINGLE)
ea:SetProperty(EFFECT_FLAG_SINGLE_RANGE) ea:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
ea:SetCode(EFFECT_CHANGE_CODE) ea:SetCode(EFFECT_CHANGE_CODE)
ea:SetRange(LOCATION_MZONE) ea:SetRange(LOCATION_MZONE)
ea:SetCondition(Amana.namecon) ea:SetCondition(Amana.namecon)
ea:SetValue(26818000) ea:SetValue(26818000)
c:RegisterEffect(ea) c:RegisterEffect(ea)
end end
function Amana.MajsoulBoy(c) function Amana.MajsoulBoy(c)
local ea=Effect.CreateEffect(c) local ea=Effect.CreateEffect(c)
ea:SetType(EFFECT_TYPE_SINGLE) ea:SetType(EFFECT_TYPE_SINGLE)
ea:SetProperty(EFFECT_FLAG_SINGLE_RANGE) ea:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
ea:SetCode(EFFECT_CHANGE_CODE) ea:SetCode(EFFECT_CHANGE_CODE)
ea:SetRange(LOCATION_MZONE) ea:SetRange(LOCATION_MZONE)
ea:SetCondition(Amana.namecon) ea:SetCondition(Amana.namecon)
ea:SetValue(26818001) ea:SetValue(26818001)
c:RegisterEffect(ea) c:RegisterEffect(ea)
end end
function Amana.namecon(e) function Amana.namecon(e)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_END return (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_END
end end
--sliver --sliver
function Amana.SliverCost(e,tp,eg,ep,ev,re,r,rp,chk) function Amana.SliverCost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 end if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BP) e1:SetCode(EFFECT_CANNOT_BP)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function Amana.SliverSummon(c) function Amana.SliverSummon(c)
local ea=Effect.CreateEffect(c) local ea=Effect.CreateEffect(c)
ea:SetType(EFFECT_TYPE_SINGLE) ea:SetType(EFFECT_TYPE_SINGLE)
ea:SetCode(EFFECT_SPSUMMON_COST) ea:SetCode(EFFECT_SPSUMMON_COST)
ea:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) ea:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
ea:SetCost(Amana.spcost) ea:SetCost(Amana.spcost)
ea:SetOperation(Amana.spcop) ea:SetOperation(Amana.spcop)
c:RegisterEffect(ea) c:RegisterEffect(ea)
end end
function Amana.spcost(e,c,tp) function Amana.spcost(e,c)
return Duel.GetActivityCount(tp,ACTIVITY_BATTLE_PHASE)==0 return Duel.GetActivityCount(c:GetControler(),ACTIVITY_BATTLE_PHASE)==0
end end
function Amana.spcop(e,tp,eg,ep,ev,re,r,rp) function Amana.spcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BP) e1:SetCode(EFFECT_CANNOT_BP)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
...@@ -65,5 +65,5 @@ function cm.lcheck(g) ...@@ -65,5 +65,5 @@ function cm.lcheck(g)
return g:IsExists(Card.IsCode,1,nil,30003030) return g:IsExists(Card.IsCode,1,nil,30003030)
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsCode(30003030) or c:IsCode(30003040)) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and (c:IsCode(30003030) or c:IsCode(30003040)) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
\ No newline at end of file
...@@ -101,7 +101,7 @@ function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -101,7 +101,7 @@ function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) end
if chk==0 then return sc>0 and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return sc>0 and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE,nil,sc:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE,nil,sc,0,0)
end end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp) function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local sc=Duel.GetMatchingGroupCount(cm.cfilter,tp,LOCATION_MZONE,0,nil) local sc=Duel.GetMatchingGroupCount(cm.cfilter,tp,LOCATION_MZONE,0,nil)
...@@ -115,13 +115,13 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -115,13 +115,13 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(sc:GetAttack()/2) e1:SetValue(tc:GetAttack()/2)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_DEFENSE_FINAL) e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(sc:GetDefense()/2) e2:SetValue(tc:GetDefense()/2)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler()) local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -59,7 +59,7 @@ function c33401302.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -59,7 +59,7 @@ function c33401302.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end end
function c33401302.spop(e,tp,eg,ep,ev,re,r,rp) function c33401302.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c33401302.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c33401302.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -61,6 +61,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,6 +61,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1) tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(1000) e1:SetValue(1000)
......
...@@ -53,6 +53,7 @@ function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -53,6 +53,7 @@ function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.spop1(e,tp,eg,ep,ev,re,r,rp) function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local lp=Duel.GetLP(tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
......
...@@ -76,7 +76,7 @@ function cm.hop(e,tp) ...@@ -76,7 +76,7 @@ function cm.hop(e,tp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,m,0,0,1) Duel.RegisterFlagEffect(tp,m,0,0,1)
end end
function cm.atkfilter(e,c) function cm.atkfilter(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.GetAttacker() local ac=Duel.GetAttacker()
local tc=Duel.GetAttackTarget() local tc=Duel.GetAttackTarget()
if not ac:IsControler(tp) then ac,tc=tc,ac end if not ac:IsControler(tp) then ac,tc=tc,ac end
......
...@@ -29,7 +29,7 @@ function c60150810.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,7 +29,7 @@ function c60150810.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
local tc=Duel.GetFieldCard(tp,LOCATION_DECK,0) local tc=Duel.GetFieldCard(tp,LOCATION_DECK,0)
local tc2=Duel.GetFieldCard(tp,0,LOCATION_DECK) local tc2=Duel.GetFieldCard(1-tp,LOCATION_DECK,0)
if (tc:IsAbleToRemove() and tc2:IsAbleToRemove()) and Duel.SelectYesNo(tp,aux.Stringid(60150810,0)) then if (tc:IsAbleToRemove() and tc2:IsAbleToRemove()) and Duel.SelectYesNo(tp,aux.Stringid(60150810,0)) then
if Duel.SelectYesNo(tp,aux.Stringid(60150810,1)) then if Duel.SelectYesNo(tp,aux.Stringid(60150810,1)) then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -61,7 +61,7 @@ function c60150811.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,7 +61,7 @@ function c60150811.spop(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) e2:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
local tc3=Duel.GetFieldCard(tp,LOCATION_DECK,0) local tc3=Duel.GetFieldCard(tp,LOCATION_DECK,0)
local tc2=Duel.GetFieldCard(tp,0,LOCATION_DECK) local tc2=Duel.GetFieldCard(1-tp,LOCATION_DECK,0)
if (tc3:IsAbleToRemove() and tc2:IsAbleToRemove()) and Duel.SelectYesNo(tp,aux.Stringid(60150810,0)) then if (tc3:IsAbleToRemove() and tc2:IsAbleToRemove()) and Duel.SelectYesNo(tp,aux.Stringid(60150810,0)) then
if Duel.SelectYesNo(tp,aux.Stringid(60150810,1)) then if Duel.SelectYesNo(tp,aux.Stringid(60150810,1)) then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -54,7 +54,7 @@ function c60150812.activate2(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,7 +54,7 @@ function c60150812.activate2(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)
end end
local tc3=Duel.GetFieldCard(tp,LOCATION_DECK,0) local tc3=Duel.GetFieldCard(tp,LOCATION_DECK,0)
local tc2=Duel.GetFieldCard(tp,0,LOCATION_DECK) local tc2=Duel.GetFieldCard(1-tp,LOCATION_DECK,0)
if (tc3:IsAbleToRemove() and tc2:IsAbleToRemove()) and Duel.SelectYesNo(tp,aux.Stringid(60150810,0)) then if (tc3:IsAbleToRemove() and tc2:IsAbleToRemove()) and Duel.SelectYesNo(tp,aux.Stringid(60150810,0)) then
if Duel.SelectYesNo(tp,aux.Stringid(60150810,1)) then if Duel.SelectYesNo(tp,aux.Stringid(60150810,1)) then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -57,7 +57,7 @@ function c60150817.spop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,7 +57,7 @@ function c60150817.spop2(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local tc=Duel.GetFieldCard(tp,LOCATION_DECK,0) local tc=Duel.GetFieldCard(tp,LOCATION_DECK,0)
local tc2=Duel.GetFieldCard(tp,0,LOCATION_DECK) local tc2=Duel.GetFieldCard(1-tp,LOCATION_DECK,0)
if (tc:IsAbleToRemove() and tc2:IsAbleToRemove()) and Duel.SelectYesNo(tp,aux.Stringid(60150810,0)) then if (tc:IsAbleToRemove() and tc2:IsAbleToRemove()) and Duel.SelectYesNo(tp,aux.Stringid(60150810,0)) then
if Duel.SelectYesNo(tp,aux.Stringid(60150810,1)) then if Duel.SelectYesNo(tp,aux.Stringid(60150810,1)) then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -39,7 +39,7 @@ function c60150819.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,7 +39,7 @@ function c60150819.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
local tc=Duel.GetFieldCard(tp,LOCATION_DECK,0) local tc=Duel.GetFieldCard(tp,LOCATION_DECK,0)
local tc2=Duel.GetFieldCard(tp,0,LOCATION_DECK) local tc2=Duel.GetFieldCard(1-tp,LOCATION_DECK,0)
if (tc:IsAbleToRemove() and tc2:IsAbleToRemove()) and Duel.SelectYesNo(tp,aux.Stringid(60150810,0)) then if (tc:IsAbleToRemove() and tc2:IsAbleToRemove()) and Duel.SelectYesNo(tp,aux.Stringid(60150810,0)) then
if Duel.SelectYesNo(tp,aux.Stringid(60150810,1)) then if Duel.SelectYesNo(tp,aux.Stringid(60150810,1)) then
Duel.BreakEffect() Duel.BreakEffect()
......
--白虎的化身 哈克 --白虎的化身 哈克
function c60159902.initial_effect(c) function c60159902.initial_effect(c)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,60159902) e1:SetCountLimit(1,60159902)
e1:SetTarget(c60159902.target) e1:SetTarget(c60159902.target)
e1:SetOperation(c60159902.operation) e1:SetOperation(c60159902.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--tohand --tohand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60159901,0)) e2:SetDescription(aux.Stringid(60159901,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetTarget(c60159902.target2) e2:SetTarget(c60159902.target2)
e2:SetOperation(c60159902.operation2) e2:SetOperation(c60159902.operation2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--Activate --Activate
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY) e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCost(c60159902.descost) e3:SetCountLimit(1)
e3:SetTarget(c60159902.target3)
e3:SetOperation(c60159902.activate) e3:SetCost(c60159902.descost)
c:RegisterEffect(e3) e3:SetTarget(c60159902.target3)
e3:SetOperation(c60159902.activate)
c:RegisterEffect(e3)
end end
function c60159902.sfilter(c,e,tp) function c60159902.sfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c60159902.target(e,tp,eg,ep,ev,re,r,rp,chk) function c60159902.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummon(tp) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummon(tp)
and Duel.IsExistingMatchingCard(c60159902.sfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c60159902.sfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
end end
function c60159902.operation(e,tp,eg,ep,ev,re,r,rp) function c60159902.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,1) Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1) local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst() local tc=g:GetFirst()
if (tc:IsAttribute(ATTRIBUTE_WIND) or tc:IsAttribute(ATTRIBUTE_FIRE) or tc:IsAttribute(ATTRIBUTE_EARTH)) if (tc:IsAttribute(ATTRIBUTE_WIND) or tc:IsAttribute(ATTRIBUTE_FIRE) or tc:IsAttribute(ATTRIBUTE_EARTH))
and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then
if Duel.SelectYesNo(tp,aux.Stringid(60159901,1)) then if Duel.SelectYesNo(tp,aux.Stringid(60159901,1)) then
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.SendtoDeck(c,nil,2,REASON_EFFECT) Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
else else
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
end end
else else
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
end end
end end
function c60159902.filter(c) function c60159902.filter(c)
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_AQUA)) return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_AQUA))
or (c:IsAttribute(ATTRIBUTE_FIRE) and c:IsRace(RACE_WINDBEAST)) or (c:IsAttribute(ATTRIBUTE_FIRE) and c:IsRace(RACE_WINDBEAST))
or (c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_DRAGON))) or (c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_DRAGON)))
and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function c60159902.target2(e,tp,eg,ep,ev,re,r,rp,chk) function c60159902.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60159902.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c60159902.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c60159902.operation2(e,tp,eg,ep,ev,re,r,rp) function c60159902.operation2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c60159902.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c60159902.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
function c60159902.cfilter(c) function c60159902.cfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_BEAST) and c:IsAbleToRemoveAsCost() return c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_BEAST) and c:IsAbleToRemoveAsCost()
end end
function c60159902.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c60159902.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60159902.cfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c60159902.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c60159902.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c60159902.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c60159902.dfilter(c) function c60159902.dfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end end
function c60159902.target3(e,tp,eg,ep,ev,re,r,rp,chk) function c60159902.target3(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c60159902.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end if chk==0 then return Duel.IsExistingMatchingCard(c60159902.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) end
local sg=Duel.GetMatchingGroup(c60159902.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c) local sg=Duel.GetMatchingGroup(c60159902.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end end
function c60159902.activate(e,tp,eg,ep,ev,re,r,rp) function c60159902.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c60159902.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local sg=Duel.GetMatchingGroup(c60159902.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
Duel.Destroy(sg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
end end
\ No newline at end of file
--青龙的化身 木莉 --青龙的化身 木莉
function c60159903.initial_effect(c) function c60159903.initial_effect(c)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,60159903) e1:SetCountLimit(1,60159903)
e1:SetTarget(c60159903.target) e1:SetTarget(c60159903.target)
e1:SetOperation(c60159903.operation) e1:SetOperation(c60159903.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--tohand --tohand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60159901,0)) e2:SetDescription(aux.Stringid(60159901,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetTarget(c60159903.target2) e2:SetTarget(c60159903.target2)
e2:SetOperation(c60159903.operation2) e2:SetOperation(c60159903.operation2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--multiatk --multiatk
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(60159903,2)) e3:SetDescription(aux.Stringid(60159903,2))
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c60159903.atkcon) e3:SetCountLimit(1)
e3:SetCost(c60159903.atkcost) e3:SetCondition(c60159903.atkcon)
e3:SetTarget(c60159903.atktg) e3:SetCost(c60159903.atkcost)
e3:SetOperation(c60159903.atkop) e3:SetTarget(c60159903.atktg)
c:RegisterEffect(e3) e3:SetOperation(c60159903.atkop)
c:RegisterEffect(e3)
end end
function c60159903.sfilter(c,e,tp) function c60159903.sfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c60159903.target(e,tp,eg,ep,ev,re,r,rp,chk) function c60159903.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummon(tp) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummon(tp)
and Duel.IsExistingMatchingCard(c60159903.sfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c60159903.sfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
end end
function c60159903.operation(e,tp,eg,ep,ev,re,r,rp) function c60159903.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,1) Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1) local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst() local tc=g:GetFirst()
if (tc:IsAttribute(ATTRIBUTE_EARTH) or tc:IsAttribute(ATTRIBUTE_FIRE) or tc:IsAttribute(ATTRIBUTE_WATER)) if (tc:IsAttribute(ATTRIBUTE_EARTH) or tc:IsAttribute(ATTRIBUTE_FIRE) or tc:IsAttribute(ATTRIBUTE_WATER))
and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then
if Duel.SelectYesNo(tp,aux.Stringid(60159901,1)) then if Duel.SelectYesNo(tp,aux.Stringid(60159901,1)) then
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.SendtoDeck(c,nil,2,REASON_EFFECT) Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
else else
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
end end
else else
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
end end
end end
function c60159903.filter(c) function c60159903.filter(c)
return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_AQUA)) return ((c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_AQUA))
or (c:IsAttribute(ATTRIBUTE_FIRE) and c:IsRace(RACE_WINDBEAST)) or (c:IsAttribute(ATTRIBUTE_FIRE) and c:IsRace(RACE_WINDBEAST))
or (c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_BEAST))) or (c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_BEAST)))
and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function c60159903.target2(e,tp,eg,ep,ev,re,r,rp,chk) function c60159903.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60159903.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c60159903.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c60159903.operation2(e,tp,eg,ep,ev,re,r,rp) function c60159903.operation2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c60159903.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c60159903.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
function c60159903.atkcon(e,tp,eg,ep,ev,re,r,rp) function c60159903.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() return Duel.IsAbleToEnterBP()
end end
function c60159903.cfilter(c) function c60159903.cfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_DRAGON) and c:IsAbleToRemoveAsCost() return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_DRAGON) and c:IsAbleToRemoveAsCost()
end end
function c60159903.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) function c60159903.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60159903.cfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c60159903.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c60159903.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c60159903.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c60159903.atktg(e,tp,eg,ep,ev,re,r,rp,chk) function c60159903.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetEffectCount(EFFECT_EXTRA_ATTACK)==0 end if chk==0 then return e:GetHandler():GetEffectCount(EFFECT_EXTRA_ATTACK)==0 end
end end
function c60159903.atkop(e,tp,eg,ep,ev,re,r,rp) function c60159903.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
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) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EXTRA_ATTACK) e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetValue(1) e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
\ No newline at end of file
--玄武的化身 芽殃 --玄武的化身 芽殃
function c60159904.initial_effect(c) function c60159904.initial_effect(c)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,60159904) e1:SetCountLimit(1,60159904)
e1:SetTarget(c60159904.target) e1:SetTarget(c60159904.target)
e1:SetOperation(c60159904.operation) e1:SetOperation(c60159904.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--tohand --tohand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(60159901,0)) e2:SetDescription(aux.Stringid(60159901,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetTarget(c60159904.target2) e2:SetTarget(c60159904.target2)
e2:SetOperation(c60159904.operation2) e2:SetOperation(c60159904.operation2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--Activate --Activate
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DRAW) e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCost(c60159904.atkcost) e3:SetCountLimit(1)
e3:SetTarget(c60159904.ctarget) e3:SetCost(c60159904.atkcost)
e3:SetOperation(c60159904.cactivate) e3:SetTarget(c60159904.ctarget)
c:RegisterEffect(e3) e3:SetOperation(c60159904.cactivate)
c:RegisterEffect(e3)
end end
function c60159904.sfilter(c,e,tp) function c60159904.sfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c60159904.target(e,tp,eg,ep,ev,re,r,rp,chk) function c60159904.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummon(tp) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummon(tp)
and Duel.IsExistingMatchingCard(c60159904.sfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c60159904.sfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK)
end end
function c60159904.operation(e,tp,eg,ep,ev,re,r,rp) function c60159904.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,1) Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1) local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst() local tc=g:GetFirst()
if (tc:IsAttribute(ATTRIBUTE_WIND) or tc:IsAttribute(ATTRIBUTE_FIRE) or tc:IsAttribute(ATTRIBUTE_WATER)) if (tc:IsAttribute(ATTRIBUTE_WIND) or tc:IsAttribute(ATTRIBUTE_FIRE) or tc:IsAttribute(ATTRIBUTE_WATER))
and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then
if Duel.SelectYesNo(tp,aux.Stringid(60159901,1)) then if Duel.SelectYesNo(tp,aux.Stringid(60159901,1)) then
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.SendtoDeck(c,nil,2,REASON_EFFECT) Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
else else
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
end end
else else
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
end end
end end
function c60159904.filter(c) function c60159904.filter(c)
return ((c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_DRAGON)) return ((c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_DRAGON))
or (c:IsAttribute(ATTRIBUTE_FIRE) and c:IsRace(RACE_WINDBEAST)) or (c:IsAttribute(ATTRIBUTE_FIRE) and c:IsRace(RACE_WINDBEAST))
or (c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_BEAST))) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() or (c:IsAttribute(ATTRIBUTE_WATER) and c:IsRace(RACE_BEAST))) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function c60159904.target2(e,tp,eg,ep,ev,re,r,rp,chk) function c60159904.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60159904.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c60159904.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c60159904.operation2(e,tp,eg,ep,ev,re,r,rp) function c60159904.operation2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c60159904.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c60159904.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
function c60159904.cfilter(c) function c60159904.cfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsRace(RACE_DRAGON) and c:IsAbleToRemoveAsCost() return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_AQUA) and c:IsAbleToRemoveAsCost()
end end
function c60159904.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) function c60159904.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60159904.cfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c60159904.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.SelectMatchingCard(tp,c60159904.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c60159904.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c60159904.ctarget(e,tp,eg,ep,ev,re,r,rp,chk) function c60159904.ctarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2) Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end end
function c60159904.cactivate(e,tp,eg,ep,ev,re,r,rp) function c60159904.cactivate(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)
if Duel.Draw(p,d,REASON_EFFECT) then if Duel.Draw(p,d,REASON_EFFECT) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,1,nil) local g1=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,1,nil)
if g1:GetCount()>0 then if g1:GetCount()>0 then
Duel.SendtoGrave(g1,REASON_EFFECT) Duel.SendtoGrave(g1,REASON_EFFECT)
end end
end end
end end
\ No newline at end of file
...@@ -3,7 +3,7 @@ local m=81041038 ...@@ -3,7 +3,7 @@ local m=81041038
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--spsummon --spsummon
local e0=aux.AddRitualProcEqual2(c,cm.ritfilter) local e0=aux.AddRitualProcGreater2(c,cm.ritfilter)
e0:SetCountLimit(1,m) e0:SetCountLimit(1,m)
e0:SetType(EFFECT_TYPE_IGNITION) e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetCode(0) e0:SetCode(0)
......
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