Commit e5e8aed7 authored by Nemo Ma's avatar Nemo Ma

fix

parent c57ae431
No preview for this file type
...@@ -6,7 +6,7 @@ function c10700459.initial_effect(c) ...@@ -6,7 +6,7 @@ function c10700459.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetCondition(c10700459.atcon) e1:SetCondition(c10700459.atcon2)
e1:SetValue(1) e1:SetValue(1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
...@@ -14,7 +14,7 @@ function c10700459.initial_effect(c) ...@@ -14,7 +14,7 @@ function c10700459.initial_effect(c)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetCondition(c10700459.atcon2) e4:SetCondition(c10700459.atcon)
e4:SetValue(1) e4:SetValue(1)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--search --search
......
...@@ -128,7 +128,7 @@ end ...@@ -128,7 +128,7 @@ end
function cm.stcon(e,tp,eg,ep,ev,re,r,rp) function cm.stcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local flag=c:GetFlagEffectLabel(m+1) local flag=c:GetFlagEffectLabel(m+1)
return re:GetHandler()~=c and tp==c:GetOwner() --and (not flag or flag<3) return re:GetHandler()~=c and tp==c:GetOwner() and (not flag or flag<3)
end end
function cm.sttg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -78,7 +78,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,7 +78,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local _SendToGrave=Duel.SendtoGrave local _SendToGrave=Duel.SendtoGrave
Duel.SendtoGrave=function(tg,r) Duel.SendtoGrave=function(tg,r)
if r==REASON_MATERIAL+REASON_LINK then if r==REASON_MATERIAL+REASON_LINK then
local ct=Duel.Destroy(tg,r) local ct=Duel.Destroy(tg,r|REASON_RULE)
Duel.SendtoGrave=_SendToGrave Duel.SendtoGrave=_SendToGrave
return ct return ct
else else
......
...@@ -167,7 +167,7 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -167,7 +167,7 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
e3:SetRange(LOCATION_ONFIELD) e3:SetRange(LOCATION_ONFIELD)
e3:SetCode(EFFECT_IMMUNE_EFFECT) e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetCondition(cm.econ) e3:SetCondition(cm.econ)
e3:SetValue(cm.efilter) e3:SetValue(cm.eval)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3) tc:RegisterEffect(e3)
end end
......
...@@ -146,7 +146,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -146,7 +146,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g1:Select(tp,1,ct1,nil) local sg=g1:Select(tp,1,ct1,nil)
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.SSet(tp,sg:GetFirst()) Duel.SSet(tp,sg)
end end
end end
broken=true broken=true
......
...@@ -124,7 +124,7 @@ function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -124,7 +124,7 @@ function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.activate1(e,tp,eg,ep,ev,re,r,rp) function cm.activate1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_GRAVE,0,nil) local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_GRAVE,0,nil)
local g1=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,tama.tamas_sumElements(g),e,tp) local g1=Duel.GetMatchingGroup(cm.spfilter1,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,tama.tamas_sumElements(g),e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g1:Select(tp,1,1,nil) local tg=g1:Select(tp,1,1,nil)
local tc=tg:GetFirst() local tc=tg:GetFirst()
......
...@@ -67,14 +67,14 @@ function cm.filter(c,sp) ...@@ -67,14 +67,14 @@ function cm.filter(c,sp)
end end
function cm.drcon1(e,tp,eg,ep,ev,re,r,rp) function cm.drcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter,1,nil,1-tp) return eg:IsExists(cm.filter,1,nil,1-tp)
and (not re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS)) and (not re or (not re:IsHasType(EFFECT_TYPE_ACTIONS) or re:IsHasType(EFFECT_TYPE_CONTINUOUS)))
end end
function cm.drop1(e,tp,eg,ep,ev,re,r,rp) function cm.drop1(e,tp,eg,ep,ev,re,r,rp)
Duel.DiscardDeck(tp,1,REASON_EFFECT) Duel.DiscardDeck(tp,1,REASON_EFFECT)
end end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp) function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter,1,nil,1-tp) return eg:IsExists(cm.filter,1,nil,1-tp)
and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS) and re and re:IsHasType(EFFECT_TYPE_ACTIONS) and not re:IsHasType(EFFECT_TYPE_CONTINUOUS)
end end
function cm.regop(e,tp,eg,ep,ev,re,r,rp) function cm.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,m,RESET_CHAIN,0,1) Duel.RegisterFlagEffect(tp,m,RESET_CHAIN,0,1)
......
...@@ -7,8 +7,8 @@ function c22020780.initial_effect(c) ...@@ -7,8 +7,8 @@ function c22020780.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SPSUMMON) e1:SetCode(EVENT_SPSUMMON)
e1:SetCountLimit(1,22020780+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,22020780+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c22020780.cost)
e1:SetCondition(c22020780.condition) e1:SetCondition(c22020780.condition)
e1:SetCost(c22020780.cost)
e1:SetTarget(c22020780.target) e1:SetTarget(c22020780.target)
e1:SetOperation(c22020780.activate) e1:SetOperation(c22020780.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -25,17 +25,19 @@ function c22020780.filter(c) ...@@ -25,17 +25,19 @@ function c22020780.filter(c)
return c:IsCode(22020770) and c:IsFaceup() return c:IsCode(22020770) and c:IsFaceup()
end end
function c22020780.target(e,tp,eg,ep,ev,re,r,rp,chk) function c22020780.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22020780.filter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0) if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end end
function c22020780.operation(e,tp,eg,ep,ev,re,r,rp) function c22020780.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.NegateSummon(eg) Duel.NegateSummon(eg)
Duel.SelectOption(tp,aux.Stringid(22020780,1))
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
local g=Duel.SelectMatchingCard(tp,c22020780.filter,tp,LOCATION_ONFIELD,0,1,1,nil) local g=Duel.GetMatchingGroup(c22020780.filter,tp,LOCATION_ONFIELD,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.BreakEffect() Duel.SelectOption(tp,aux.Stringid(22020780,1))
Duel.SelectOption(tp,aux.Stringid(22020780,2)) Duel.SelectOption(tp,aux.Stringid(22020780,2))
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......
...@@ -25,7 +25,6 @@ function c22020820.initial_effect(c) ...@@ -25,7 +25,6 @@ function c22020820.initial_effect(c)
e3:SetType(EFFECT_TYPE_EQUIP) e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_ATTACK) e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(2000) e3:SetValue(2000)
e3:SetCondition(aux.IsUnionState)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--attack all --attack all
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
......
...@@ -11,23 +11,12 @@ function c29010009.initial_effect(c) ...@@ -11,23 +11,12 @@ function c29010009.initial_effect(c)
e1:SetTarget(c29010009.target) e1:SetTarget(c29010009.target)
e1:SetOperation(c29010009.activate) e1:SetOperation(c29010009.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetCost(c29010009.spcost)
e2:SetTarget(c29010009.sptg)
e2:SetOperation(c29010009.spop)
c:RegisterEffect(e2)
end end
function c29010009.costfilter(c,e,tp) function c29010009.costfilter(c,e,tp)
return c:IsDiscardable() and Duel.IsExistingMatchingCard(c29010009.filter,tp,LOCATION_DECK,0,1,c,e,tp) return c:IsDiscardable() and Duel.IsExistingMatchingCard(c29010009.filter,tp,LOCATION_DECK,0,1,c,e,tp)
end end
function c29010009.filter(c,e,tp) function c29010009.filter(c,e,tp)
return c:IsSetCard(0x77af) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x87af) and c:IsRace(RACE_FISH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c29010009.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c29010009.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_COST) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_COST) end
...@@ -37,45 +26,24 @@ function c29010009.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -37,45 +26,24 @@ function c29010009.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c29010009.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c29010009.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c29010009.setfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsFaceup()
end
function c29010009.cfilter(c,e,tp)
return c:IsRace(RACE_FISH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c29010009.activate(e,tp,eg,ep,ev,re,r,rp) function c29010009.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
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,c29010009.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c29010009.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) if c:IsRelateToEffect(e) and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) then
e:GetHandler():CancelToGrave() local g2=Duel.GetMatchingGroup(c29010009.setfilter,tp,LOCATION_DECK,0,nil)
end if g2:GetCount()>0 and Duel.IsExistingMatchingCard(c29010009.cfilter,tp,0,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(29010009,0)) then
function c29010009.spcost(e,tp,eg,ep,ev,re,r,rp,chk) Duel.BreakEffect()
e:SetLabel(1) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
return true local sg=g2:Select(tp,1,1,nil)
end Duel.SSet(tp,sg)
function c29010009.ckfil(c,e,tp) end
return c:IsControler(1-tp) and c:IsAttribute(ATTRIBUTE_WATER)
end
function c29010009.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,29010009,0,0x4011,0,0,8,RACE_AQUA,ATTRIBUTE_WATER) and eg:IsExists(c29010009.ckfil,1,nil,e,tp) end
e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c29010009.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsPlayerCanSpecialSummonMonster(tp,29010009,0,0x4011,0,0,8,RACE_AQUA,ATTRIBUTE_WATER) then
c:AddMonsterAttribute(TYPE_NORMAL)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
end end
end end
\ No newline at end of file
--荒败之城 盐风 --荒败之城 盐风
function c29010022.initial_effect(c) function c29010022.initial_effect(c)
--Activate --activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCountLimit(1,29010022+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetOperation(c29010022.activate) e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1)
e1:SetTarget(c29010022.totg)
e1:SetOperation(c29010022.toop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--change code --special summon
aux.EnableChangeCode(c,22702055)
--to hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_SZONE) e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1,29010022) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e2:SetCost(c29010022.tkcost) e2:SetRange(LOCATION_FZONE)
e2:SetTarget(c29010022.tktg) e2:SetCountLimit(1)
e2:SetOperation(c29010022.tkop) e2:SetCondition(c29010022.spcon)
e2:SetTarget(c29010022.sptg)
e2:SetOperation(c29010022.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c29010022.activate(e,tp,eg,ep,ev,re,r,rp) function c29010022.totg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>1
--effect gain and Duel.IsPlayerCanSpecialSummonMonster(tp,29010025,nil,TYPES_TOKEN_MONSTER,1500,1500,1,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP,1-tp) end
local e1=Effect.CreateEffect(c) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
e1:SetType(EFFECT_TYPE_SINGLE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
e1:SetCode(EFFECT_XYZ_LEVEL)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c29010022.xyzlv)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER))
e2:SetLabelObject(e1)
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ADD_TYPE)
e3:SetValue(TYPE_EFFECT)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(aux.TargetBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER))
e4:SetLabelObject(e3)
e4:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e4,tp)
end end
function c29010022.xyzlv(e,c,rc) function c29010022.toop(e,tp,eg,ep,ev,re,r,rp)
return 0x80000+e:GetHandler():GetLevel() if Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,29010025,nil,TYPES_TOKEN_MONSTER,1500,1500,1,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP,1-tp) then return end
local token=Duel.CreateToken(tp,29010025)
Duel.SpecialSummon(token,0,tp,1-tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
token:RegisterEffect(e2,true)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
token:RegisterEffect(e3,true)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
token:RegisterEffect(e4,true)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
token:RegisterEffect(e5,true)
Duel.SpecialSummonComplete()
end end
function c29010022.tkcost(e,tp,eg,ep,ev,re,r,rp,chk) function c29010022.spcon(e,tp,eg,ep,ev,re,r,rp)
if chk==0 then return Duel.CheckLPCost(tp,800) end return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
Duel.PayLPCost(tp,800)
end end
function c29010022.thfilter(c) function c29010022.spfilter(c,e,tp)
return c:IsSetCard(0x77af) and c:IsType(TYPE_MONSTER) and (c:IsAbleToHand() or c:IsAbleToGrave()) return c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c29010022.tktg(e,tp,eg,ep,ev,re,r,rp,chk) function c29010022.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,29010023,0,TYPES_TOKEN_MONSTER,1500,1500,1,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP,1-tp) and Duel.IsExistingMatchingCard(c29010022.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c29010022.thfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0)
end end
function c29010022.tkop(e,tp,eg,ep,ev,re,r,rp) function c29010022.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,29010023,0,TYPES_TOKEN_MONSTER,1500,1500,1,RACE_AQUA,ATTRIBUTE_WATER,POS_FACEUP,1-tp) then if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local token=Duel.CreateToken(tp,29010023) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if Duel.SpecialSummon(token,0,tp,1-tp,false,false,POS_FACEUP)~=0 local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c29010022.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
and Duel.IsExistingMatchingCard(c29010022.thfilter,tp,LOCATION_DECK,0,1,nil) then if g:GetCount()>0 then
local g=Duel.SelectMatchingCard(tp,c29010022.thfilter,tp,LOCATION_DECK,0,1,1,nil) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
if g:GetCount()>0 then
local tc=g:GetFirst()
if tc and tc:IsAbleToHand()
and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1190,1191)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
end
end end
end end
\ No newline at end of file
...@@ -5,25 +5,35 @@ function cm.initial_effect(c) ...@@ -5,25 +5,35 @@ function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,function(c)return c:GetOriginalType()&TYPE_TRAP~=0 and c:IsFusionType(TYPE_MONSTER)end,2,true) aux.AddFusionProcFunRep(c,function(c)return c:GetOriginalType()&TYPE_TRAP~=0 and c:IsFusionType(TYPE_MONSTER)end,2,true)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2)) e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_HANDES+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(2,m) e2:SetCountLimit(2,m)
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)return eg:IsExists(Card.IsControler,1,nil,1-tp)end) e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)return eg:IsExists(Card.IsControler,1,nil,1-tp)end)
e2:SetTarget(cm.alctg) e2:SetTarget(cm.alctg1)
e2:SetOperation(cm.alcop) e2:SetOperation(cm.alcop1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c) local e4=e2:Clone()
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e4:SetDescription(aux.Stringid(m,1))
e4:SetCode(EVENT_SPSUMMON_SUCCESS) e4:SetCategory(CATEGORY_TOEXTRA)
e4:SetCondition(cm.con) e4:SetTarget(cm.alctg2)
e4:SetOperation(cm.op) e4:SetOperation(cm.alcop2)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_SPSUMMON_SUCCESS)
e6:SetCondition(cm.con)
e6:SetOperation(cm.op)
c:RegisterEffect(e6)
end end
function cm.filter(c,tp) function cm.filter(c,tp)
return aux.NegateMonsterFilter(c) and c:IsControler(1-tp) and Duel.IsExistingMatchingCard(cm.setfilter1,tp,LOCATION_ONFIELD,0,1,nil,c:GetCode()) return aux.NegateMonsterFilter(c) and c:IsControler(1-tp) and Duel.IsExistingMatchingCard(cm.setfilter1,tp,LOCATION_ONFIELD,0,1,nil,c:GetCode())
...@@ -37,68 +47,62 @@ end ...@@ -37,68 +47,62 @@ end
function cm.setfilter2(c) function cm.setfilter2(c)
return c:IsFaceup() and c:IsCanTurnSet() and c:GetType()&0x20004==0x20004 return c:IsFaceup() and c:IsCanTurnSet() and c:GetType()&0x20004==0x20004
end end
function cm.alctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.alctg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local b1=eg:IsExists(cm.filter,1,nil,tp) and Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)~=0 if chk==0 then return eg:IsExists(cm.filter,1,nil,tp) and Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)~=0 end
local b2=Duel.IsExistingMatchingCard(cm.tefilter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(cm.setfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) Duel.SetTargetCard(eg)
if chk==0 then return b1 or b2 end local g=eg:Filter(cm.filter,nil,tp)
local op=0 Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1)) elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(m,0)) else op=Duel.SelectOption(tp,aux.Stringid(m,1))+1 end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_HAND)
e:SetLabel(op) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
if op==0 then end
e:SetCategory(CATEGORY_HANDES+CATEGORY_TOGRAVE) function cm.alctg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetTargetCard(eg) if chk==0 then return Duel.IsExistingMatchingCard(cm.tefilter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(cm.setfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=eg:Filter(cm.filter,nil,tp) Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_HAND) end
else function cm.alcop1(e,tp,eg,ep,ev,re,r,rp)
e:SetCategory(CATEGORY_TOEXTRA) local g=eg:Filter(cm.filter,nil,tp):Filter(Card.IsRelateToEffect,nil,e)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_ONFIELD) local tc=g:GetFirst()
end if not tc then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
if #g>1 then tc=g:Select(tp,1,1,nil):GetFirst() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=Duel.SelectMatchingCard(tp,cm.setfilter1,tp,LOCATION_ONFIELD,0,1,1,nil,tc:GetCode())
local sc=sg:GetFirst()
if not sc then return end
Duel.HintSelection(Group.FromCards(sc,tc))
sc:CancelToGrave()
local pos=Duel.ChangePosition(sc,POS_FACEDOWN)
if pos==0 then return end
if sc:IsType(TYPE_SPELL+TYPE_TRAP) then Duel.RaiseEvent(sc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) end
if tc:IsDisabled() then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
Duel.AdjustInstantly()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local hg=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0)
if #hg==0 then return end
local gg=hg:RandomSelect(1-tp,1)
Duel.SendtoGrave(Group.__add(tc,gg),REASON_EFFECT)
end end
function cm.alcop(e,tp,eg,ep,ev,re,r,rp) function cm.alcop2(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=eg:Filter(cm.filter,nil,tp):Filter(Card.IsRelateToEffect,nil,e) local g=Duel.SelectMatchingCard(tp,cm.tefilter,tp,LOCATION_ONFIELD,0,1,1,nil)
local tc=g:GetFirst() if #g==0 then return end
if not tc then return end if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)==0 or not g:GetFirst():IsLocation(LOCATION_EXTRA) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
if #g>1 then tc=g:Select(tp,1,1,nil):GetFirst() end local sg=Duel.SelectMatchingCard(tp,cm.setfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) if #sg==0 then return end
local sg=Duel.SelectMatchingCard(tp,cm.setfilter1,tp,LOCATION_ONFIELD,0,1,1,nil,tc:GetCode()) Duel.HintSelection(sg)
local sc=sg:GetFirst() local rg=Group.CreateGroup()
if not sc then return end for tc in aux.Next(sg) do
Duel.HintSelection(Group.FromCards(sc,tc)) tc:CancelToGrave()
sc:CancelToGrave() if Duel.ChangePosition(tc,POS_FACEDOWN)~=0 and tc:IsFacedown() then rg:AddCard(tc) end
local pos=Duel.ChangePosition(sc,POS_FACEDOWN)
if pos==0 then return end
if sc:IsType(TYPE_SPELL+TYPE_TRAP) then Duel.RaiseEvent(sc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) end
if tc:IsDisabled() then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
Duel.AdjustInstantly()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local hg=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0)
if #hg==0 then return end
local gg=hg:RandomSelect(1-tp,1)
Duel.SendtoGrave(Group.__add(tc,gg),REASON_EFFECT)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.tefilter,tp,LOCATION_ONFIELD,0,1,1,nil)
if #g==0 then return end
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)==0 or not g:GetFirst():IsLocation(LOCATION_EXTRA) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=Duel.SelectMatchingCard(tp,cm.setfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,nil)
if #sg==0 then return end
Duel.HintSelection(sg)
local rg=Group.CreateGroup()
for tc in aux.Next(sg) do
tc:CancelToGrave()
if Duel.ChangePosition(tc,POS_FACEDOWN)~=0 and tc:IsFacedown() then rg:AddCard(tc) end
end
Duel.RaiseEvent(rg,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end end
Duel.RaiseEvent(rg,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
......
...@@ -4,25 +4,31 @@ cm.name="ALC之脑 TIS" ...@@ -4,25 +4,31 @@ cm.name="ALC之脑 TIS"
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddFusionProcFunRep(c,function(c)return c:GetOriginalType()&TYPE_TRAP~=0 and c:IsFusionType(TYPE_MONSTER)end,2,true) aux.AddFusionProcFunRep(c,function(c)return c:GetOriginalType()&TYPE_TRAP~=0 and c:IsFusionType(TYPE_MONSTER)end,2,true)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3)) e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_DESTROY) e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(2,m) e3:SetCountLimit(2,m)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetTarget(cm.alctg) e3:SetTarget(cm.alctg1)
e3:SetOperation(cm.alcop) e3:SetOperation(cm.alcop1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c) local e4=e3:Clone()
e4:SetDescription(aux.Stringid(m,2)) e4:SetDescription(aux.Stringid(m,1))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetCategory(CATEGORY_TOEXTRA)
e4:SetCode(EVENT_SPSUMMON_SUCCESS) e4:SetTarget(cm.alctg2)
e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetOperation(cm.alcop2)
e4:SetCondition(cm.con)
e4:SetTarget(cm.tg)
e4:SetOperation(cm.op)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,2))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCondition(cm.con)
e5:SetTarget(cm.tg)
e5:SetOperation(cm.op)
c:RegisterEffect(e5)
end end
function cm.setfilter1(c,tp) function cm.setfilter1(c,tp)
return c:IsFaceup() and c:IsCanTurnSet() and Duel.IsExistingMatchingCard(function(c,code)return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsCode(code)end,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil,c:GetCode()) return c:IsFaceup() and c:IsCanTurnSet() and Duel.IsExistingMatchingCard(function(c,code)return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsCode(code)end,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil,c:GetCode())
...@@ -33,67 +39,61 @@ end ...@@ -33,67 +39,61 @@ end
function cm.setfilter2(c) function cm.setfilter2(c)
return c:IsFaceup() and c:IsCanTurnSet() and c:GetType()&0x20004==0x20004 return c:IsFaceup() and c:IsCanTurnSet() and c:GetType()&0x20004==0x20004
end end
function cm.alctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.alctg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local b1=Duel.IsExistingMatchingCard(cm.setfilter1,tp,LOCATION_ONFIELD,0,1,nil,tp) and Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0)>4 if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter1,tp,LOCATION_ONFIELD,0,1,nil,tp) and Duel.GetFieldGroupCount(1-tp,LOCATION_DECK,0)>4 end
local b2=Duel.IsExistingMatchingCard(cm.tefilter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(cm.setfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,5,1-tp,LOCATION_DECK)
if chk==0 then return b1 or b2 end Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local op=0 end
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1)) elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(m,0)) else op=Duel.SelectOption(tp,aux.Stringid(m,1))+1 end function cm.alctg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
e:SetLabel(op) if chk==0 then return Duel.IsExistingMatchingCard(cm.tefilter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(cm.setfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
if op==0 then Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_ONFIELD)
e:SetCategory(CATEGORY_REMOVE) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,5,1-tp,LOCATION_DECK) end
else function cm.alcop1(e,tp,eg,ep,ev,re,r,rp)
e:SetCategory(CATEGORY_TOEXTRA) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_ONFIELD) local sg=Duel.SelectMatchingCard(tp,cm.setfilter1,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
local sc=sg:GetFirst()
if not sc then return end
Duel.HintSelection(sg)
sc:CancelToGrave()
local pos=Duel.ChangePosition(sc,POS_FACEDOWN)
if pos==0 then return end
if sc:IsType(TYPE_SPELL+TYPE_TRAP) then Duel.RaiseEvent(sc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) end
local g=Duel.GetDecktopGroup(1-tp,5)
if #g>0 then
Duel.BreakEffect()
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end end
end end
function cm.alcop(e,tp,eg,ep,ev,re,r,rp) function cm.alcop2(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) local g=Duel.SelectMatchingCard(tp,cm.tefilter,tp,LOCATION_ONFIELD,0,1,1,nil)
local sg=Duel.SelectMatchingCard(tp,cm.setfilter1,tp,LOCATION_ONFIELD,0,1,1,nil,tp) if #g==0 then return end
local sc=sg:GetFirst() if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)==0 or not g:GetFirst():IsLocation(LOCATION_EXTRA) then return end
if not sc then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
Duel.HintSelection(sg) local sg=Duel.SelectMatchingCard(tp,cm.setfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,99,nil)
sc:CancelToGrave() if #sg==0 then return end
local pos=Duel.ChangePosition(sc,POS_FACEDOWN) Duel.HintSelection(sg)
if pos==0 then return end local rg=Group.CreateGroup()
if sc:IsType(TYPE_SPELL+TYPE_TRAP) then Duel.RaiseEvent(sc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) end for tc in aux.Next(sg) do
local g=Duel.GetDecktopGroup(1-tp,5) tc:CancelToGrave()
if #g>0 then if Duel.ChangePosition(tc,POS_FACEDOWN)~=0 and tc:IsFacedown() then rg:AddCard(tc) end
Duel.BreakEffect() end
Duel.DisableShuffleCheck() Duel.RaiseEvent(rg,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) for rc in aux.Next(rg) do
end local e1=Effect.CreateEffect(e:GetHandler())
else e1:SetType(EFFECT_TYPE_SINGLE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) e1:SetCode(EFFECT_CANNOT_TRIGGER)
local g=Duel.SelectMatchingCard(tp,cm.tefilter,tp,LOCATION_ONFIELD,0,1,1,nil) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
if #g==0 then return end rc:RegisterEffect(e1,true)
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)==0 or not g:GetFirst():IsLocation(LOCATION_EXTRA) then return end local e2=Effect.CreateEffect(e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
local sg=Duel.SelectMatchingCard(tp,cm.setfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,99,nil) e2:SetCode(EVENT_CHAINING)
if #sg==0 then return end e2:SetOperation(cm.reset)
Duel.HintSelection(sg) e2:SetLabelObject(e1)
local rg=Group.CreateGroup() e2:SetReset(RESET_PHASE+PHASE_END)
for tc in aux.Next(sg) do Duel.RegisterEffect(e2,tp)
tc:CancelToGrave()
if Duel.ChangePosition(tc,POS_FACEDOWN)~=0 and tc:IsFacedown() then rg:AddCard(tc) end
end
Duel.RaiseEvent(rg,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
for rc in aux.Next(rg) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
rc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_CHAINING)
e2:SetOperation(cm.reset)
e2:SetLabelObject(e1)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end end
end end
function cm.reset(e,tp,eg,ep,ev,re,r,rp) function cm.reset(e,tp,eg,ep,ev,re,r,rp)
...@@ -109,6 +109,7 @@ function cm.setfilter3(c) ...@@ -109,6 +109,7 @@ function cm.setfilter3(c)
end end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter3,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter3,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function cm.op(e,tp,eg,ep,ev,re,r,rp) function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
......
...@@ -5,15 +5,23 @@ function cm.initial_effect(c) ...@@ -5,15 +5,23 @@ function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,function(c)return c:GetOriginalType()&TYPE_TRAP~=0 and c:IsFusionType(TYPE_MONSTER)end,2,true) aux.AddFusionProcFunRep(c,function(c)return c:GetOriginalType()&TYPE_TRAP~=0 and c:IsFusionType(TYPE_MONSTER)end,2,true)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2)) e2:SetDescription(aux.Stringid(m,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)return eg:IsExists(Card.IsSummonLocation,1,nil,LOCATION_EXTRA)end) e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)return eg:IsExists(Card.IsSummonLocation,1,nil,LOCATION_EXTRA)end)
e2:SetTarget(cm.alctg) e2:SetTarget(cm.alctg1)
e2:SetOperation(cm.alcop) e2:SetOperation(cm.alcop1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TOEXTRA)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(cm.alctg2)
e3:SetOperation(cm.alcop2)
c:RegisterEffect(e3)
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)
...@@ -24,57 +32,50 @@ end ...@@ -24,57 +32,50 @@ end
function cm.setfilter(c) function cm.setfilter(c)
return c:IsFaceup() and c:IsCanTurnSet() and c:GetType()&0x20004==0x20004 return c:IsFaceup() and c:IsCanTurnSet() and c:GetType()&0x20004==0x20004
end end
function cm.alctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.alctg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c,g=e:GetHandler(),eg:Filter(Card.IsSummonLocation,nil,LOCATION_EXTRA) local c,g=e:GetHandler(),eg:Filter(Card.IsSummonLocation,nil,LOCATION_EXTRA)
if chkc then return chkc:IsOnField() and chkc~=e:GetHandler() and not g:IsContains(chkc) end if chkc then return chkc:IsOnField() and chkc~=e:GetHandler() and not g:IsContains(chkc) end
local b1=Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,g) and Duel.GetFlagEffect(tp,m)==0 if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,g) and Duel.GetFlagEffect(tp,m)==0 end
local b2=c:IsAbleToExtra() and Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.GetFlagEffect(tp,m+50)==0 Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
if chk==0 then return b1 or b2 end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local op=0 local dg=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,g)
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1)) elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(m,0)) else op=Duel.SelectOption(tp,aux.Stringid(m,1))+1 end Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,0,0)
e:SetLabel(op) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
if op==0 then end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1) function cm.alctg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
e:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE) local c,g=e:GetHandler(),eg:Filter(Card.IsSummonLocation,nil,LOCATION_EXTRA)
e:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) if chk==0 then return c:IsAbleToExtra() and Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.GetFlagEffect(tp,m+50)==0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.RegisterFlagEffect(tp,m+50,RESET_PHASE+PHASE_END,0,1)
local dg=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,g) Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,1,0,0) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
else end
Duel.RegisterFlagEffect(tp,m+50,RESET_PHASE+PHASE_END,0,1) function cm.alcop1(e,tp,eg,ep,ev,re,r,rp)
e:SetCategory(CATEGORY_TOEXTRA) local tc=Duel.GetFirstTarget()
e:SetProperty(EFFECT_FLAG_DELAY) if not tc:IsRelateToEffect(e) then return end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,c,1,0,0) Duel.Destroy(tc,REASON_EFFECT)
end local dc=Duel.GetOperatedGroup():GetFirst()
if not dc then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
if not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,nil,dc:GetCode()) then return end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,3,nil)
if #rg>0 then Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) end
end end
function cm.alcop(e,tp,eg,ep,ev,re,r,rp) function cm.alcop2(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then local c=e:GetHandler()
local tc=Duel.GetFirstTarget() if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
if not tc:IsRelateToEffect(e) then return end if Duel.SendtoDeck(c,nil,2,REASON_EFFECT)==0 or not c:IsLocation(LOCATION_EXTRA) then return end
Duel.Destroy(tc,REASON_EFFECT) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local dc=Duel.GetOperatedGroup():GetFirst() local sg=Duel.SelectMatchingCard(tp,cm.setfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,nil)
if not dc then return end if #sg==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.HintSelection(sg)
if not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,nil,dc:GetCode()) then return end local rg=Group.CreateGroup()
Duel.BreakEffect() for tc in aux.Next(sg) do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) tc:CancelToGrave()
local rg=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,3,nil) if Duel.ChangePosition(tc,POS_FACEDOWN)~=0 and tc:IsFacedown() then rg:AddCard(tc) end
if #rg>0 then Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) end
else
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
if Duel.SendtoDeck(c,nil,2,REASON_EFFECT)==0 or not c:IsLocation(LOCATION_EXTRA) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=Duel.SelectMatchingCard(tp,cm.setfilter2,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,2,nil)
if #sg==0 then return end
Duel.HintSelection(sg)
local rg=Group.CreateGroup()
for tc in aux.Next(sg) do
tc:CancelToGrave()
if Duel.ChangePosition(tc,POS_FACEDOWN)~=0 and tc:IsFacedown() then rg:AddCard(tc) end
end
Duel.RaiseEvent(rg,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end end
Duel.RaiseEvent(rg,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
......
...@@ -5,16 +5,23 @@ function cm.initial_effect(c) ...@@ -5,16 +5,23 @@ function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,function(c)return c:GetOriginalType()&TYPE_TRAP~=0 and c:IsFusionType(TYPE_MONSTER)end,2,true) aux.AddFusionProcFunRep(c,function(c)return c:GetOriginalType()&TYPE_TRAP~=0 and c:IsFusionType(TYPE_MONSTER)end,2,true)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2)) e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(2,m) e2:SetCountLimit(2,m)
e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)return rp~=tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)end) e2:SetCondition(function(e,tp,eg,ep,ev,re,r,rp)return rp~=tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)end)
e2:SetTarget(cm.alctg) e2:SetTarget(cm.alctg1)
e2:SetOperation(cm.alcop) e2:SetOperation(cm.alcop1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_TOEXTRA)
e3:SetTarget(cm.alctg2)
e3:SetOperation(cm.alcop2)
c:RegisterEffect(e3)
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)
...@@ -31,50 +38,44 @@ end ...@@ -31,50 +38,44 @@ end
function cm.setfilter2(c) function cm.setfilter2(c)
return c:GetType()&0x20004==0x20004 and c:IsSSetable() return c:GetType()&0x20004==0x20004 and c:IsSSetable()
end end
function cm.alctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.alctg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local b1=Duel.IsExistingMatchingCard(cm.setfilter1,tp,LOCATION_ONFIELD,0,1,nil,eg:GetFirst():GetCode()) and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter1,tp,LOCATION_ONFIELD,0,1,nil,eg:GetFirst():GetCode()) and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil) end
local b2=Duel.IsExistingMatchingCard(cm.tefilter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(cm.setfilter2,tp,LOCATION_GRAVE,0,1,nil) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if chk==0 then return b1 or b2 end Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_ONFIELD)
local op=0 Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1)) elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(m,0)) else op=Duel.SelectOption(tp,aux.Stringid(m,1))+1 end end
e:SetLabel(op) function cm.alctg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if op==0 then if chk==0 then return Duel.IsExistingMatchingCard(cm.tefilter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(cm.setfilter2,tp,LOCATION_GRAVE,0,1,nil) end
e:SetCategory(CATEGORY_NEGATE+CATEGORY_TOGRAVE) Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_ONFIELD)
else
e:SetCategory(CATEGORY_TOEXTRA)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_ONFIELD)
end
end end
function cm.alcop(e,tp,eg,ep,ev,re,r,rp) function cm.alcop1(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) local sc=Duel.SelectMatchingCard(tp,cm.setfilter1,tp,LOCATION_ONFIELD,0,1,1,nil,eg:GetFirst():GetCode()):GetFirst()
local sc=Duel.SelectMatchingCard(tp,cm.setfilter1,tp,LOCATION_ONFIELD,0,1,1,nil,eg:GetFirst():GetCode()):GetFirst() if not sc then return end
if not sc then return end Duel.HintSelection(Group.FromCards(sc))
Duel.HintSelection(Group.FromCards(sc)) sc:CancelToGrave()
sc:CancelToGrave() local pos=Duel.ChangePosition(sc,POS_FACEDOWN)
local pos=Duel.ChangePosition(sc,POS_FACEDOWN) if pos==0 then return end
if pos==0 then return end if sc:IsType(TYPE_SPELL+TYPE_TRAP) then Duel.RaiseEvent(sc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) end
if sc:IsType(TYPE_SPELL+TYPE_TRAP) then Duel.RaiseEvent(sc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) end if not Duel.NegateActivation(ev) then return end
if not Duel.NegateActivation(ev) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,1,nil)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,1,nil) if g:GetCount()>0 then
if g:GetCount()>0 then Duel.HintSelection(g)
Duel.HintSelection(g) Duel.SendtoGrave(g,REASON_EFFECT)
Duel.SendtoGrave(g,REASON_EFFECT)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.tefilter,tp,LOCATION_ONFIELD,0,1,1,nil)
if #g==0 then return end
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)==0 or not g:GetFirst():IsLocation(LOCATION_EXTRA) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.setfilter2),tp,LOCATION_GRAVE,0,1,1,nil)
if #sg==0 then return end
Duel.SSet(tp,sg:GetFirst())
end end
end end
function cm.alcop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.tefilter,tp,LOCATION_ONFIELD,0,1,1,nil)
if #g==0 then return end
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)==0 or not g:GetFirst():IsLocation(LOCATION_EXTRA) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.setfilter2),tp,LOCATION_GRAVE,0,1,1,nil)
if #sg==0 then return end
Duel.SSet(tp,sg:GetFirst())
end
function cm.con(e,tp,eg,ep,ev,re,r,rp) function cm.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION) return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end end
......
...@@ -51,13 +51,26 @@ function cm.remcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -51,13 +51,26 @@ function cm.remcost(e,tp,eg,ep,ev,re,r,rp,chk)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END) if Duel.GetCurrentPhase()==PHASE_END then
e1:SetReset(RESET_PHASE+PHASE_END,2)
e1:SetValue(Duel.GetTurnCount())
rc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
else
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(0)
rc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
e1:SetLabelObject(rc) e1:SetLabelObject(rc)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCondition(cm.retcon)
e1:SetOperation(cm.retop) e1:SetOperation(cm.retop)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
end end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnCount()==e:GetValue() then return false end
return e:GetLabelObject():GetFlagEffect(m)~=0
end
function cm.retop(e,tp,eg,ep,ev,re,r,rp) function cm.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject()) Duel.ReturnToField(e:GetLabelObject())
end end
......
...@@ -3,7 +3,7 @@ local m=64800134 ...@@ -3,7 +3,7 @@ local m=64800134
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(nil),aux.NonTuner(nil),1) aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit() c:EnableReviveLimit()
--decrease atk/def --decrease atk/def
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
......
...@@ -69,6 +69,7 @@ function c67200320.target(event) ...@@ -69,6 +69,7 @@ function c67200320.target(event)
local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true) local te,ceg,cep,cev,cre,cr,crp=g:GetFirst():CheckActivateEffect(false,true,true)
Duel.GetCurrentChain=_GetCurrentChain Duel.GetCurrentChain=_GetCurrentChain
Duel.SendtoHand(g,nil,REASON_COST) Duel.SendtoHand(g,nil,REASON_COST)
Duel.ConfirmCards(1-tp,g)
e:SetProperty(te:GetProperty()) e:SetProperty(te:GetProperty())
local tg=te:GetTarget() local tg=te:GetTarget()
if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end if tg then tg(e,tp,ceg,cep,cev,cre,cr,crp,1) end
......
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