Commit f0801d2e authored by Huangnan's avatar Huangnan

fix

parent cb1d8010
Pipeline #42177 failed with stages
in 3 minutes and 40 seconds
......@@ -103,7 +103,7 @@ function cm.con6(e,tp,eg,ep,ev,re,r,rp)
local tg=tc:GetColumnGroup()
tg:AddCard(tc)
local tp=tc:GetControler()
return #tg>0 and tg:FilterCount(Card.IsAbleToRemove,nil,tp,POS_FACEDOWN,REASON_EFFECT)>0 and c:IsAbleToGrave() and Duel.GetFlagEffect(tp,m)==0
return #tg>0 and tg:FilterCount(Card.IsAbleToRemove,nil,tp,POS_FACEDOWN,REASON_EFFECT)>0 and re:GetHandler()==tc and c:IsAbleToGrave() and Duel.GetFlagEffect(tp,m)==0
end
function cm.op6(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -67,9 +67,14 @@ function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(rp,id,RESET_PHASE+PHASE_END,0,1)
end
function cm.indescon(e,tp,eg,ep,ev,re,r,rp)
local a,d=Duel.GetBattleMonster(tp)
e:SetLabelObject(a)
return a and d and a:IsFaceup() and a:IsSetCard(0x3a70)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if not a:IsControler(tp) then a,d=d,a end
if a and a:IsControler(tp) and a:IsFaceup() and a:IsSetCard(0x3a70) then
e:SetLabelObject(a)
return true
end
return false
end
function cm.indescost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -60,15 +60,19 @@ end
function s.eqfilter2(c)
return aux.IsCodeListed(c,12866755) and c:IsType(TYPE_FUSION)
end
function s.eqfilter3(c,tp)
return (c:IsRace(RACE_WARRIOR) or c:IsRace(RACE_FIEND)) and
c:CheckUniqueOnField(tp) and not c:IsForbidden() and aux.IsCodeListed(c,12866755) and c:IsType(TYPE_FUSION)
end
function s.check(g)
return g:IsExists(s.eqfilter2,1,nil)
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.eqfilter1,tp,LOCATION_GRAVE,0,nil,e,tp)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and s.eqfilter1(chkc,e,tp) and chkc:IsControler(tp) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and s.eqfilter3(chkc,e,tp) and chkc:IsControler(tp) end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if chk==0 then return ft>0 and #g>0 end
if chk==0 then return ft>0 and Duel.IsExistingTarget(s.eqfilter3,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local ct=math.min(ft,2)
local sg=g:SelectSubGroup(tp,s.check,false,1,ct)
......
......@@ -21,7 +21,7 @@ function cm.initial_effect(c)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(2,id)
e1:SetCountLimit(2,m)
e1:SetCondition(cm.cpcon)
e1:SetTarget(cm.cptg)
e1:SetOperation(cm.cpop)
......@@ -160,4 +160,4 @@ function cm.cpop(e,tp,eg,ep,ev,re,r,rp)
e:SetLabelObject(te:GetLabelObject())
local op=te:GetOperation()
if op then op(e,tp,eg,ep,ev,re,r,rp) end
end
\ No newline at end of file
end
......@@ -139,11 +139,14 @@ function cm.check_effect_usable(e,te,tp,eg,ep,ev,re,r,rp)
local tg=e:GetTarget() or aux.TRUE
local op=e:GetOperation()
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
if (te:GetCode()==e:GetCode() and Duel.CheckEvent(e:GetCode())) then
return e:IsActivatable(tp,true)
if te:GetCode()==e:GetCode() then
local con=e:GetCondition() or aux.TRUE
return con(te,tp,eg,ep,ev,re,r,rp) and tg(te,tp,eg,ep,ev,re,r,rp,0)
end
else
return te:GetCode()==EVENT_FREE_CHAIN and op and tg(te,tp,eg,ep,ev,re,r,rp,0)
end
return op and tg(te,tp,eg,ep,ev,re,r,rp,0)
return false
end
function cm.cpfilter(c,e,tp,eg,ep,ev,re,r,rp)
local tab=c.activate_effect
......
......@@ -131,11 +131,14 @@ function cm.check_effect_usable(e,te,tp,eg,ep,ev,re,r,rp)
local tg=e:GetTarget() or aux.TRUE
local op=e:GetOperation()
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
if (te:GetCode()==e:GetCode() and Duel.CheckEvent(e:GetCode())) then
return e:IsActivatable(tp,true)
if te:GetCode()==e:GetCode() then
local con=e:GetCondition() or aux.TRUE
return con(te,tp,eg,ep,ev,re,r,rp) and tg(te,tp,eg,ep,ev,re,r,rp,0)
end
else
return te:GetCode()==EVENT_FREE_CHAIN and op and tg(te,tp,eg,ep,ev,re,r,rp,0)
end
return op and tg(te,tp,eg,ep,ev,re,r,rp,0)
return false
end
function cm.cpfilter(c,e,tp,eg,ep,ev,re,r,rp)
local tab=c.activate_effect
......
......@@ -106,14 +106,14 @@ end
function s.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,30901021,0,0xc82,0,0,1,RACE_PLANT,ATTRIBUTE_WATER) and not Duel.IsPlayerAffectedByEffect(tp,59822133) end
and Duel.IsPlayerCanSpecialSummonMonster(tp,30901021,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_PLANT,ATTRIBUTE_WATER) and not Duel.IsPlayerAffectedByEffect(tp,59822133) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function s.operation1(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,30901021,0xc82,TYPES_TOKEN_MONSTER,0,0,1,RACE_PLANT,ATTRIBUTE_WATER) then
if Duel.IsPlayerCanSpecialSummonMonster(tp,30901021,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_PLANT,ATTRIBUTE_WATER) then
local token=Duel.CreateToken(tp,30901021)
local token1=Duel.CreateToken(tp,30901021)
local c=e:GetHandler()
......
......@@ -68,19 +68,16 @@ function s.op(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1)
end
end
function s.cfilter(c)
return c:IsCode(32500015) and c:IsFaceup()
end
function s.thcon(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return (c:IsPreviousLocation(LOCATION_HAND))
and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsEnvironment(32500015,tp,LOCATION_FZONE)
end
function s.thtg(e, tp, eg, ep, ev, re, r, rp, chk)
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk == 0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function s.thop(e, tp, eg, ep, ev, re, r, rp)
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c = e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
......
......@@ -76,13 +76,10 @@ end
function s.splimit(e,c)
return not (c:IsRace(RACE_WARRIOR) and c:GetAttack() >= 1000)
end
function s.cfilter(c)
return c:IsCode(32500015) and c:IsFaceup()
end
function s.thcon(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
return (c:IsPreviousLocation(LOCATION_HAND) or c:IsPreviousLocation(LOCATION_ONFIELD))
and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsEnvironment(32500015,tp,LOCATION_FZONE)
end
function s.thtg(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then return e:GetHandler():IsAbleToHand() end
......
......@@ -92,11 +92,8 @@ end
function s.splimit(e,c)
return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA)
end
function s.ddd(c)
return c:IsCode(32500015) and c:IsFaceup()
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.ddd,tp,LOCATION_ONFIELD,0,1,nil)
return Duel.IsEnvironment(32500015,tp,LOCATION_FZONE)
end
function s.thtg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_DECK,0,1,nil) end
......@@ -121,7 +118,7 @@ end
function s.thcon(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
return (c:IsPreviousLocation(LOCATION_HAND))
and Duel.IsExistingMatchingCard(s.ddd,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsEnvironment(32500015,tp,LOCATION_FZONE)
end
function s.thtg(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then return e:GetHandler():IsAbleToHand() end
......
......@@ -59,11 +59,8 @@ function s.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(eg,REASON_EFFECT)
end
end
function s.ddd(c)
return c:IsCode(32500015) and c:IsFaceup()
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.ddd,tp,LOCATION_ONFIELD,0,1,nil)
return Duel.IsEnvironment(32500015,tp,LOCATION_FZONE)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.fil,tp,0,LOCATION_ONFIELD,1,e:GetHandler()) end
......
......@@ -23,11 +23,8 @@ c32500023.material_type=TYPE_SYNCHRO
function s.synfilter(c)
return aux.IsCodeListed(c,32500015)
end
function s.ddd(c)
return c:IsCode(32500015) and c:IsFaceup()
end
function s.remcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.ddd,tp,LOCATION_ONFIELD,0,1,nil)
return Duel.IsEnvironment(32500015,tp,LOCATION_FZONE)
end
function s.disable(e,c)
return (c:IsType(TYPE_EFFECT) or c:GetOriginalType()&TYPE_EFFECT~=0) and c:IsStatus(STATUS_SPSUMMON_TURN)
......
......@@ -19,11 +19,8 @@ function s.initial_effect(c)
e2:SetOperation(s.act2)
c:RegisterEffect(e2)
end
function s.ddd(c)
return c:IsCode(32500015) and c:IsFaceup()
end
function s.remcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.ddd,tp,LOCATION_ONFIELD,0,1,nil)
return Duel.IsEnvironment(32500015,tp,LOCATION_FZONE)
end
function s.cost2(e, tp, eg, ep, ev, re, r, rp, chk)
local c=e:GetHandler()
......
......@@ -54,12 +54,9 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Equip(tp,e:GetHandler(),tc)
end
end
function s.ddd(c)
return c:IsCode(32500015) and c:IsFaceup()
end
function s.negcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and re:IsActiveType(TYPE_TRAP+TYPE_SPELL) and Duel.IsChainNegatable(ev)
and Duel.IsExistingMatchingCard(s.ddd,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsEnvironment(32500015,tp,LOCATION_FZONE)
end
function s.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -65,14 +65,11 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g = Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0, CATEGORY_DESTROY,g,1,0,0)
end
function s.ddd(c)
return c:IsCode(32500015) and c:IsFaceup()
end
function s.desop(e, tp, eg, ep, ev, re, r, rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
local has_c=Duel.IsExistingMatchingCard(s.ddd,tp,LOCATION_ONFIELD,0,1,nil)
local has_c=Duel.IsEnvironment(32500015,tp,LOCATION_ONFIELD)
if Duel.Destroy(tc,REASON_EFFECT)>0 and has_c then
if tc:IsLocation(LOCATION_GRAVE) then
local e1=Effect.CreateEffect(c)
......
......@@ -25,11 +25,8 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.ConfirmCards(1-tp,cg)
Duel.ShuffleHand(tp)
end
function s.ddd(c)
return c:IsCode(32500015) and c:IsFaceup()
end
function s.remcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.ddd,tp,LOCATION_ONFIELD,0,1,nil)
return Duel.IsEnvironment(32500015,tp,LOCATION_ONFIELD)
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 end
......
......@@ -63,7 +63,7 @@ function s.desfilter(c)
return c:IsFaceup() and c:GetAttack()>=0
end
function s.gcheck(g)
return g:GetSum(Card.GetAttack)<=2100
return g:GetSum(Card.GetAttack)>=2100
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -129,12 +129,12 @@ function s.actop(e,tp,eg,ep,ev,re,r,rp)
if Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
local g=Duel.GetMatchingGroup(s.spcfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
local owner=c:GetOwner()
......
......@@ -77,7 +77,13 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end
tc:AddMonsterAttribute(mt)
Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP_DEFENSE)
tc.effonfield(tc)
if oid>=47370201 and oid<=47370207 then
tc.effonfield(tc)
end
if oid==47370208 and oid==47370209 then
tc.effonfield1(tc)
tc.effonfield2(tc)
end
Duel.SpecialSummonComplete()
end
end
......
......@@ -10,6 +10,7 @@ function c47530005.initial_effect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c47530005.tgcon)
e1:SetTarget(c47530005.tgtg)
e1:SetOperation(c47530005.tgop)
......@@ -19,20 +20,19 @@ function c47530005.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c47530005.tgfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER)
return c:IsAbleToGrave()
end
function c47530005.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c47530005.tgfilter,tp,0,LOCATION_MZONE,1,nil,e,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(c47530005.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_MZONE)
end
function c47530005.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c47530005.tgfilter,tp,0,LOCATION_MZONE,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c47530005.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local c=e:GetHandler()
local tc=g:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT) then
local code=tc:GetOriginalCode()
local atk=tc:GetTextAttack()
c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD,1)
end
end
\ No newline at end of file
......@@ -52,7 +52,7 @@ function c47530009.eqop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetProperty(EFFECT_FLAG_COPY+EFFECT_FLAG_OWNER_RELATE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c47530009.eqlimit)
tc:RegisterEffect(e1)
......@@ -60,7 +60,7 @@ function c47530009.eqop(e,tp,eg,ep,ev,re,r,rp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e3:SetTargetRange(1,0)
e3:SetTarget(c47530009.splimit)
e3:SetReset(RESET_PHASE+PHASE_END)
......
--魔惧会 布鲁斯『双人同心』
local s,id,o=GetID()
s.named_with_Diablotherhood=1
function s.Diablotherhood(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Diablotherhood
end
function s.initial_effect(c)
--Link Summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_FIEND),2,2,s.lcheck)
--Copy Effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetCondition(s.cpcon)
e1:SetCost(s.cpcost)
e1:SetOperation(s.cpop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(aux.TRUE) -- Default Ignition condition
c:RegisterEffect(e2)
--Tag out
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+o)
e3:SetCost(s.spcost)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
end
--Material Check
function s.lcheck(g,lc,sumtype,tp)
return g:IsExists(Card.IsLinkCode,1,nil,40009560,40010230,40010756)
end
--Effect 1: Copy
function s.cpcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.cpfilter(c)
return s.Diablotherhood(c) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function s.cpcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cpfilter,tp,LOCATION_GRAVE+LOCATION_MZONE+LOCATION_EXTRA,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.cpfilter,tp,LOCATION_GRAVE+LOCATION_MZONE+LOCATION_EXTRA,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
e:SetLabel(g:GetFirst():GetOriginalCode())
end
function s.cpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local code=e:GetLabel()
if c:IsRelateToChain() and c:IsFaceup() then
c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,2))
end
end
--Effect 2: Special Summon
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtraAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,SEQ_DECKSHUFFLE,REASON_COST)
end
function s.spfilter(c,e,tp)
return c:IsCode(40009560) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
--Double Attack
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,3))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
......@@ -18,7 +18,7 @@ function cm.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e02:SetCountLimit(1,m)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
......
......@@ -89,7 +89,7 @@ function c92369087.spop(e,tp,eg,ep,ev,re,r,rp)
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.BreakEffect()
local g=Duel.GetDecktopGroup(tp,3)
if Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)==3 and (Duel.IsExistingMatchingCard(function(c) return c:IsFaceup() and c:IsCode(92369028) end,tp,LOCATION_ONFIELD,0,1,nil) or Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,3,nil)) and Duel.IsExistingMatchingCard(function(c) return c:IsFacedown() and c:IsAbleToHand() end,tp,LOCATION_REMOVED,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(92369087,1)) then
if Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)==3 and (Duel.IsExistingMatchingCard(function(c) return c:IsFaceup() and c:IsCode(92369028) end,tp,LOCATION_ONFIELD,0,1,nil) or Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,3,nil)) and Duel.IsExistingMatchingCard(function(c) return c:IsFacedown() and c:IsAbleToHand() end,tp,LOCATION_REMOVED,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(92369087,0)) then
local sg=Duel.SelectMatchingCard(tp,function(c) return c:IsFacedown() and c:IsAbleToHand() end,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
......
......@@ -76,7 +76,7 @@ function c92369093.hdop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
local rc=g:RandomSelect(tp,1):GetFirst()
local fid=c:GetFieldID()
if rc and Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)>0 then
if rc and Duel.Remove(rc,POS_FACEDOWN,REASON_EFFECT)>0 then
rc:RegisterFlagEffect(92369093,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,5,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......
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