Commit bfc645b3 authored by Nemo Ma's avatar Nemo Ma

fix

parent cc30ec7a
No preview for this file type
--波动中枢·物质波调谐器 --波动中枢·物质波调谐器
local m=11451456 local m=11451456
local cm=_G["c"..m] local cm=_G["c"..m]
local prime={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997}
function cm.initial_effect(c) function cm.initial_effect(c)
c:SetSPSummonOnce(m) c:SetSPSummonOnce(m)
--link summon --link summon
...@@ -62,13 +61,17 @@ end ...@@ -62,13 +61,17 @@ end
function cm.mzfilter(c) function cm.mzfilter(c)
return c:IsLinkRace(RACE_PSYCHO) and c:IsLinkAttribute(ATTRIBUTE_LIGHT) and c:GetLevel()>=3 and c:GetLevel()<=10 return c:IsLinkRace(RACE_PSYCHO) and c:IsLinkAttribute(ATTRIBUTE_LIGHT) and c:GetLevel()>=3 and c:GetLevel()<=10
end end
function cm.isprime(num)
if num<2 then return false elseif num==2 then return true end
for i=2,(num-1) do
if num%i==0 then return false end
end
return true
end
function cm.spcon(e,c) function cm.spcon(e,c)
local g=Duel.GetMatchingGroup(Card.IsFaceup,0,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,0,LOCATION_MZONE,LOCATION_MZONE,nil)
local num=g:GetSum(Card.GetLevel) local num=g:GetSum(Card.GetLevel)
for _,i in ipairs(prime) do return not cm.isprime(num)
if i==num then return false elseif i>num then return true end
end
return true
end end
function cm.filter(c) function cm.filter(c)
return c:IsFaceup() and c:GetLevel()>0 return c:IsFaceup() and c:GetLevel()>0
......
...@@ -67,6 +67,11 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,6 +67,11 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.filter2(c,e,tp,rc) function cm.filter2(c,e,tp,rc)
if not (c:IsType(TYPE_SYNCHRO) and (rc%c:GetLevel()==0) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)) then return false end if not (c:IsType(TYPE_SYNCHRO) and (rc%c:GetLevel()==0) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)) then return false end
--continuously updating
local tab={14000248,14010109,79029117,98731001}
for _,code in pairs(tab) do
if c:GetOriginalCode()==code then return true end
end
local eset={c:IsHasEffect(EFFECT_SPSUMMON_CONDITION)} local eset={c:IsHasEffect(EFFECT_SPSUMMON_CONDITION)}
for _,te in pairs(eset) do for _,te in pairs(eset) do
if te:GetValue()==0 then return true end if te:GetValue()==0 then return true end
......
--魔能(飞球)反应炉 --魔能(飞球)反应炉
local m=c13254053 local m=13254053
local cm=_G["c"..m] local cm=_G["c"..m]
xpcall(function() require("expansions/script/tama") end,function() require("script/tama") end) xpcall(function() require("expansions/script/tama") end,function() require("script/tama") end)
function cm.initial_effect(c) function cm.initial_effect(c)
......
...@@ -54,8 +54,7 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,8 +54,7 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local eq=c:GetEquipGroup() local eq=c:GetEquipGroup()
local g=eq:Filter(Card.IsAbleToDeck,nil) local g=eq:Filter(Card.IsAbleToDeck,nil)
local op=0 if c:IsFacedown() then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
......
...@@ -14,6 +14,7 @@ function cm.initial_effect(c) ...@@ -14,6 +14,7 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetCost(cm.eqcost) e2:SetCost(cm.eqcost)
e2:SetTarget(cm.eqtg) e2:SetTarget(cm.eqtg)
e2:SetOperation(cm.eqop) e2:SetOperation(cm.eqop)
......
...@@ -29,6 +29,7 @@ function cm.initial_effect(c) ...@@ -29,6 +29,7 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetCost(cm.bmcost) e2:SetCost(cm.bmcost)
e2:SetTarget(cm.bmtg) e2:SetTarget(cm.bmtg)
e2:SetOperation(cm.bmop) e2:SetOperation(cm.bmop)
......
...@@ -71,7 +71,7 @@ function c15000057.chainfilter(re,tp,cid) ...@@ -71,7 +71,7 @@ function c15000057.chainfilter(re,tp,cid)
return not re:GetHandler():IsCode(15000060) return not re:GetHandler():IsCode(15000060)
end end
function c15000057.ffilter(c,fc,sub,mg,sg) function c15000057.ffilter(c,fc,sub,mg,sg)
return not sg or sg:FilterCount(aux.TRUE,c)==0 or sg:IsExists(c15000057.f2filter,1,c,c:GetLeftScale()) return c:IsType(TYPE_PENDULUM) and (not sg or sg:FilterCount(aux.TRUE,c)==0 or sg:IsExists(c15000057.f2filter,1,c,c:GetLeftScale()))
end end
function c15000057.f2filter(c,les) function c15000057.f2filter(c,les)
return c:IsFusionType(TYPE_PENDULUM) and (c:GetLeftScale()==les or c:GetLeftScale()==les+1 or c:GetLeftScale()==les-1) return c:IsFusionType(TYPE_PENDULUM) and (c:GetLeftScale()==les or c:GetLeftScale()==les+1 or c:GetLeftScale()==les-1)
...@@ -141,7 +141,7 @@ function c15000057.thop(e) ...@@ -141,7 +141,7 @@ function c15000057.thop(e)
end end
end end
function c15000057.limcon(e,tp,eg,ep,ev,re,r,rp) function c15000057.limcon(e,tp,eg,ep,ev,re,r,rp)
return (re:IsHasType(EFFECT_TYPE_TRIGGER_F) or re:IsHasType(EFFECT_TYPE_TRIGGER_O)or re:IsHasType(EFFECT_TYPE_QUICK_F) or re:IsHasType(EFFECT_TYPE_QUICK_O)) and re:IsHasProperty(EFFECT_FLAG_DELAY) and (re:GetCode(EVENT_SUMMON_SUCCESS) or re:GetCode(EVENT_SPSUMMON_SUCCESS)) and re:GetHandler():IsLocation(LOCATION_MZONE) return re:IsHasType(EFFECT_TYPE_SINGLE) and (re:IsHasType(EFFECT_TYPE_TRIGGER_F) or re:IsHasType(EFFECT_TYPE_TRIGGER_O) or re:IsHasType(EFFECT_TYPE_QUICK_F) or re:IsHasType(EFFECT_TYPE_QUICK_O)) and re:IsHasProperty(EFFECT_FLAG_DELAY) and (bit.band(re:GetCode(),EVENT_SUMMON_SUCCESS)~=0 or bit.band(re:GetCode(),EVENT_SPSUMMON_SUCCESS)~=0) and re:GetHandler():IsLocation(LOCATION_MZONE)
end end
function c15000057.limop(e,tp,eg,ep,ev,re,r,rp) function c15000057.limop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev) Duel.NegateActivation(ev)
......
...@@ -21,7 +21,6 @@ function cm.initial_effect(c) ...@@ -21,7 +21,6 @@ function cm.initial_effect(c)
e1:SetDescription(aux.Stringid(m,1)) e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.operation) e1:SetOperation(cm.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -102,9 +101,6 @@ end ...@@ -102,9 +101,6 @@ end
function cm.filter(c) function cm.filter(c)
return c:IsCanOverlay() return c:IsCanOverlay()
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)==0
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 chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsCanOverlay() end if chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsCanOverlay() end
if chk==0 then return Duel.IsExistingTarget(Card.IsCanOverlay,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsCanOverlay,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
...@@ -134,8 +130,7 @@ end ...@@ -134,8 +130,7 @@ 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 true end if chk==0 then return true end
local pos=Duel.SelectPosition(tp,e:GetHandler(),POS_FACEUP_ATTACK+POS_FACEUP_DEFENSE) local pos=Duel.SelectPosition(tp,e:GetHandler(),POS_FACEUP_ATTACK+POS_FACEUP_DEFENSE)
Duel.ChangePosition(e:GetHandler(),pos) Duel.ChangePosition(e:GetHandler(),pos,pos,pos,pos,true)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
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 chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsCanOverlay() end if chkc then return chkc:IsLocation(LOCATION_ONFIELD+LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsCanOverlay() end
......
...@@ -8,7 +8,6 @@ function cm.initial_effect(c) ...@@ -8,7 +8,6 @@ function cm.initial_effect(c)
e1:SetDescription(aux.Stringid(m,1)) e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.operation) e1:SetOperation(cm.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -43,9 +42,6 @@ end ...@@ -43,9 +42,6 @@ end
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
return c:IsSetCard(0xf3b) and c:IsType(TYPE_MONSTER) and not c:IsCode(15000541) and (c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)) return c:IsSetCard(0xf3b) and c:IsType(TYPE_MONSTER) and not c:IsCode(15000541) and (c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) or c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE))
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)==0
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.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
...@@ -73,8 +69,7 @@ function cm.sp2con(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,8 +69,7 @@ function cm.sp2con(e,tp,eg,ep,ev,re,r,rp)
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 true end if chk==0 then return true end
Duel.ChangePosition(e:GetHandler(),POS_FACEUP) Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,true)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
end end
function cm.sp2tg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sp2tg(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
......
...@@ -8,7 +8,6 @@ function cm.initial_effect(c) ...@@ -8,7 +8,6 @@ function cm.initial_effect(c)
e1:SetDescription(aux.Stringid(m,1)) e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.operation) e1:SetOperation(cm.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -40,9 +39,6 @@ function cm.initial_effect(c) ...@@ -40,9 +39,6 @@ function cm.initial_effect(c)
e3:SetOperation(cm.spop1) e3:SetOperation(cm.spop1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)==0
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.IsExistingTarget(aux.TURE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.TURE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.SelectTarget(tp,aux.TURE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.TURE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
...@@ -63,8 +59,7 @@ function cm.tgcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,8 +59,7 @@ function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
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 true end if chk==0 then return true end
Duel.ChangePosition(e:GetHandler(),POS_FACEUP) Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,true)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
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.IsExistingTarget(aux.TURE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.TURE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
......
...@@ -8,7 +8,6 @@ function cm.initial_effect(c) ...@@ -8,7 +8,6 @@ function cm.initial_effect(c)
e1:SetDescription(aux.Stringid(m,2)) e1:SetDescription(aux.Stringid(m,2))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.operation) e1:SetOperation(cm.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -43,9 +42,6 @@ end ...@@ -43,9 +42,6 @@ end
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
return c:IsSetCard(0xf3b) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() return c:IsSetCard(0xf3b) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)==0
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(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
...@@ -64,8 +60,7 @@ function cm.sp2con(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,8 +60,7 @@ function cm.sp2con(e,tp,eg,ep,ev,re,r,rp)
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 true end if chk==0 then return true end
Duel.ChangePosition(e:GetHandler(),POS_FACEUP) Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,true)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
end end
function cm.sp2tg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sp2tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
......
...@@ -8,7 +8,6 @@ function cm.initial_effect(c) ...@@ -8,7 +8,6 @@ function cm.initial_effect(c)
e1:SetDescription(aux.Stringid(m,1)) e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.operation) e1:SetOperation(cm.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -43,9 +42,6 @@ end ...@@ -43,9 +42,6 @@ end
function cm.filter(c) function cm.filter(c)
return c:IsType(TYPE_FLIP) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(15000547) return c:IsType(TYPE_FLIP) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(15000547)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)==0
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(cm.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.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)
...@@ -63,8 +59,7 @@ function cm.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,8 +59,7 @@ function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
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 true end if chk==0 then return true end
Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENSE) Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,true)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
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.IsExistingMatchingCard(aux.NecroValleyFilter(cm.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.filter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
......
...@@ -8,7 +8,6 @@ function cm.initial_effect(c) ...@@ -8,7 +8,6 @@ function cm.initial_effect(c)
e1:SetDescription(aux.Stringid(m,1)) e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.operation) e1:SetOperation(cm.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -43,9 +42,6 @@ end ...@@ -43,9 +42,6 @@ end
function cm.filter(c) function cm.filter(c)
return ((c:IsType(TYPE_FLIP) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0xf3b)) and c:IsAbleToDeck() return ((c:IsType(TYPE_FLIP) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0xf3b)) and c:IsAbleToDeck()
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(m)==0
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()
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsPlayerCanDraw(tp,1) end
...@@ -69,8 +65,7 @@ function cm.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,8 +65,7 @@ function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
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 true end if chk==0 then return true end
Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENSE) Duel.ChangePosition(e:GetHandler(),POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,POS_FACEUP_DEFENSE,true)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1)
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)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -51,9 +51,11 @@ function cm.initial_effect(c) ...@@ -51,9 +51,11 @@ function cm.initial_effect(c)
c:RegisterEffect(e6) c:RegisterEffect(e6)
--search --search
local e7=Effect.CreateEffect(c) local e7=Effect.CreateEffect(c)
e7:SetCategory(CATEGORY_TODECK)
e7:SetType(EFFECT_TYPE_QUICK_O) e7:SetType(EFFECT_TYPE_QUICK_O)
e7:SetCode(EVENT_FREE_CHAIN) e7:SetCode(EVENT_FREE_CHAIN)
e7:SetRange(LOCATION_HAND) e7:SetRange(LOCATION_HAND)
e7:SetCountLimit(1,190001)
e7:SetCost(cm.efcost) e7:SetCost(cm.efcost)
e7:SetTarget(cm.eftg) e7:SetTarget(cm.eftg)
e7:SetOperation(cm.efop) e7:SetOperation(cm.efop)
...@@ -125,6 +127,8 @@ function cm.efop(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -125,6 +127,8 @@ function cm.efop(e,tp,eg,ep,ev,re,r,rp,chk)
e4:SetValue(1) e4:SetValue(1)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e4,true) tc:RegisterEffect(e4,true)
Duel.BreakEffect()
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_EFFECT)
end end
end end
function cm.e2filter(e,re) function cm.e2filter(e,re)
......
...@@ -62,7 +62,7 @@ function cm.sprcon(e,c) ...@@ -62,7 +62,7 @@ function cm.sprcon(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 g=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_HAND,LOCATION_ONFIELD,LOCATION_GRAVE,0,nil) local g=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_HAND,LOCATION_ONFIELD,LOCATION_GRAVE,0,nil)
return g:CheckSubGroup(cm.fselect,9,9,tp,sc) return g:CheckSubGroup(cm.fselect,9,9,tp,c)
end end
function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c) function cm.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_HAND,LOCATION_ONFIELD,LOCATION_GRAVE,0,nil) local g=Duel.GetMatchingGroup(cm.sprfilter,tp,LOCATION_HAND,LOCATION_ONFIELD,LOCATION_GRAVE,0,nil)
......
...@@ -7,6 +7,7 @@ function c40009560.initial_effect(c) ...@@ -7,6 +7,7 @@ function c40009560.initial_effect(c)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetOperation(c40009560.op) e1:SetOperation(c40009560.op)
e1:SetCountLimit(1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
......
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