Commit 084a91d2 authored by DailyShana's avatar DailyShana

fix (20/80)

parent f92af55d
...@@ -15,8 +15,8 @@ function c33656832.initial_effect(c) ...@@ -15,8 +15,8 @@ function c33656832.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CHAIN_NEGATED) e2:SetCode(EVENT_CHAIN_NEGATED)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
...@@ -51,19 +51,15 @@ function c33656832.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,19 +51,15 @@ function c33656832.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_RULE) Duel.SendtoGrave(c,REASON_RULE)
end end
end end
function c33656832.spcon2(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c33656832.pentg(e,tp,eg,ep,ev,re,r,rp,chk) function c33656832.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7) end if chk==0 then return Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7) end
end end
function c33656832.penop(e,tp,eg,ep,ev,re,r,rp) function c33656832.penop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) and (Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7)) then if e:GetHandler():IsRelateToEffect(e)
and (Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7)) then
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end end
end end
function c33656832.spcon2(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c33656832.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
...@@ -41,18 +41,20 @@ function c34079868.initial_effect(c) ...@@ -41,18 +41,20 @@ function c34079868.initial_effect(c)
e3:SetOperation(c34079868.operation) e3:SetOperation(c34079868.operation)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c34079868.rfilter(c,tp)
return c:IsSetCard(0xc7) and Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,c,0xda)
end
function c34079868.spcon(e,c) function c34079868.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
and Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0xc7) and Duel.CheckReleaseGroup(tp,c34079868.rfilter,1,nil,tp)
and Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0xda)
end end
function c34079868.spop(e,tp,eg,ep,ev,re,r,rp,c) function c34079868.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g1=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0xc7) local g1=Duel.SelectReleaseGroup(tp,,c34079868.rfilter,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g2=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0xda) local g2=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,g1:GetFirst(),0xda)
g1:Merge(g2) g1:Merge(g2)
Duel.Release(g1,REASON_COST) Duel.Release(g1,REASON_COST)
end end
...@@ -77,23 +79,26 @@ end ...@@ -77,23 +79,26 @@ end
function c34079868.condition(e,tp,eg,ep,ev,re,r,rp) function c34079868.condition(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and e:GetHandler():GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD) return rp~=tp and e:GetHandler():GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD)
end end
function c34079868.spfilter(c,e,tp,set) function c34079868.spfilter1(c,e,tp)
return c:IsSetCard(set) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0xc7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c34079868.spfilter2,tp,LOCATION_DECK,0,1,c,e,tp,0xda)
end
function c34079868.spfilter2(c,e,tp)
return c:IsSetCard(0xda) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c34079868.target(e,tp,eg,ep,ev,re,r,rp,chk) function c34079868.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and not Duel.IsPlayerAffectedByEffect(tp,59822133) and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.IsExistingMatchingCard(c34079868.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,0xc7) and Duel.IsExistingMatchingCard(c34079868.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c34079868.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,0xda) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_DECK)
end end
function c34079868.operation(e,tp,eg,ep,ev,re,r,rp) function c34079868.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 if Duel.GetLocationCount(tp,LOCATION_MZONE)<2
or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,c34079868.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,0xc7) local g1=Duel.SelectMatchingCard(tp,c34079868.spfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,c34079868.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,0xda) local g2=Duel.SelectMatchingCard(tp,c34079868.spfilter2,tp,LOCATION_DECK,0,1,1,g1:GetFirst(),e,tp)
g1:Merge(g2) g1:Merge(g2)
if g1:GetCount()==2 then if g1:GetCount()==2 then
Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP)
......
...@@ -15,13 +15,14 @@ function c34379489.initial_effect(c) ...@@ -15,13 +15,14 @@ function c34379489.initial_effect(c)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(c34379489.con) e3:SetCondition(c34379489.condition)
e3:SetOperation(c34379489.op) e3:SetOperation(c34379489.operation)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c34379489.filter(c,tp) function c34379489.filter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
and not c:IsType(TYPE_PENDULUM) and c:GetSummonLocation()==LOCATION_EXTRA and not c:IsReason(REASON_REPLACE) and not c:IsType(TYPE_PENDULUM) and c:GetSummonLocation()==LOCATION_EXTRA
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end end
function c34379489.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c34379489.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c34379489.filter,1,nil,tp) and not e:GetHandler():IsStatus(STATUS_DESTROY_CONFIRMED) end if chk==0 then return eg:IsExists(c34379489.filter,1,nil,tp) and not e:GetHandler():IsStatus(STATUS_DESTROY_CONFIRMED) end
...@@ -33,10 +34,10 @@ end ...@@ -33,10 +34,10 @@ end
function c34379489.repop(e,tp,eg,ep,ev,re,r,rp) function c34379489.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE) Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE)
end end
function c34379489.con(e,tp,eg,ep,ev,re,r,rp) function c34379489.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_EXTRA) return e:GetHandler():IsPreviousLocation(LOCATION_EXTRA)
end end
function c34379489.op(e,tp,eg,ep,ev,re,r,rp) function c34379489.operation(e,tp,eg,ep,ev,re,r,rp)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
......
...@@ -66,8 +66,7 @@ end ...@@ -66,8 +66,7 @@ end
function c35191415.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c35191415.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c35191415.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c35191415.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c35191415.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingTarget(c35191415.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
and e:GetHandler():IsLocation(LOCATION_MZONE) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c35191415.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c35191415.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
......
...@@ -19,7 +19,7 @@ function c41546.initial_effect(c) ...@@ -19,7 +19,7 @@ function c41546.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,41546) e2:SetCountLimit(1,41547)
e2:SetTarget(c41546.destg) e2:SetTarget(c41546.destg)
e2:SetOperation(c41546.desop) e2:SetOperation(c41546.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -75,10 +75,10 @@ function c41546.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,10 +75,10 @@ function c41546.desop(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
local e3=Effect.CreateEffect(e:GetHandler()) end
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CHANGE_DAMAGE) e3:SetCode(EFFECT_CHANGE_DAMAGE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......
...@@ -9,7 +9,6 @@ function c45591967.initial_effect(c) ...@@ -9,7 +9,6 @@ function c45591967.initial_effect(c)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCountLimit(1,45591967) e1:SetCountLimit(1,45591967)
e1:SetCondition(c45591967.dmcon)
e1:SetCost(c45591967.dmcost) e1:SetCost(c45591967.dmcost)
e1:SetTarget(c45591967.dmtg) e1:SetTarget(c45591967.dmtg)
e1:SetOperation(c45591967.dmop) e1:SetOperation(c45591967.dmop)
...@@ -29,10 +28,7 @@ function c45591967.initial_effect(c) ...@@ -29,10 +28,7 @@ function c45591967.initial_effect(c)
Duel.AddCustomActivityCounter(45591967,ACTIVITY_SPSUMMON,c45591967.counterfilter) Duel.AddCustomActivityCounter(45591967,ACTIVITY_SPSUMMON,c45591967.counterfilter)
end end
function c45591967.counterfilter(c) function c45591967.counterfilter(c)
return not bit.band(c:GetSummonType(),SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM return bit.band(c:GetSummonType(),SUMMON_TYPE_PENDULUM)~=SUMMON_TYPE_PENDULUM
end
function c45591967.dmcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1
end end
function c45591967.dmcost(e,tp,eg,ep,ev,re,r,rp,chk) function c45591967.dmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(45591967,tp,ACTIVITY_SPSUMMON)==0 end if chk==0 then return Duel.GetCustomActivityCount(45591967,tp,ACTIVITY_SPSUMMON)==0 end
......
...@@ -11,7 +11,7 @@ function c46035545.initial_effect(c) ...@@ -11,7 +11,7 @@ function c46035545.initial_effect(c)
e1:SetCondition(aux.nfbdncon) e1:SetCondition(aux.nfbdncon)
e1:SetTarget(c46035545.splimit) e1:SetTarget(c46035545.splimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Increase --atk up
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(46035545,0)) e2:SetDescription(aux.Stringid(46035545,0))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE) e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
...@@ -24,16 +24,16 @@ function c46035545.initial_effect(c) ...@@ -24,16 +24,16 @@ function c46035545.initial_effect(c)
e2:SetOperation(c46035545.atkop) e2:SetOperation(c46035545.atkop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
-- --
local e6=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_TOHAND) e3:SetCategory(CATEGORY_TOHAND)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_DESTROYED) e3:SetCode(EVENT_DESTROYED)
e6:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e6:SetCountLimit(1,46035545) e3:SetCountLimit(1,46035545)
e6:SetCondition(c46035545.thcon) e3:SetCondition(c46035545.thcon)
e6:SetTarget(c46035545.thtg) e3:SetTarget(c46035545.thtg)
e6:SetOperation(c46035545.thop) e3:SetOperation(c46035545.thop)
c:RegisterEffect(e6) c:RegisterEffect(e3)
end end
function c46035545.splimit(e,c,sump,sumtype,sumpos,targetp) function c46035545.splimit(e,c,sump,sumtype,sumpos,targetp)
return not c:IsSetCard(0xaf) and bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM return not c:IsSetCard(0xaf) and bit.band(sumtype,SUMMON_TYPE_PENDULUM)==SUMMON_TYPE_PENDULUM
...@@ -74,31 +74,30 @@ function c46035545.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,31 +74,30 @@ function c46035545.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and (c:GetPreviousSequence()==6 or c:GetPreviousSequence()==7) return c:IsPreviousLocation(LOCATION_SZONE) and (c:GetPreviousSequence()==6 or c:GetPreviousSequence()==7)
end end
function c46035545.thfilter1(c) function c46035545.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0x10af) and c:IsAbleToHand() return c:IsFaceup() and c:IsSetCard(0x10af) and c:IsAbleToHand()
end end
function c46035545.thfilter2(c) function c46035545.pfilter(c)
return c:IsFaceup() and c:IsSetCard(0xaf) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() return c:IsFaceup() and c:IsSetCard(0xaf) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end end
function c46035545.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c46035545.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c46035545.thfilter1(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c46035545.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c46035545.thfilter1,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c46035545.thfilter,tp,LOCATION_MZONE,0,1,nil)
and (Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7)) and (Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7))
and Duel.IsExistingMatchingCard(c46035545.thfilter2,tp,LOCATION_EXTRA,0,1,nil) end and Duel.IsExistingMatchingCard(c46035545.pfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c46035545.thfilter1,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,c46035545.thfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function c46035545.thop(e,tp,eg,ep,ev,re,r,rp) function c46035545.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0
and tc:IsLocation(LOCATION_HAND) then
local ct=0 local ct=0
if Duel.CheckLocation(tp,LOCATION_SZONE,6) then ct=ct+1 end if Duel.CheckLocation(tp,LOCATION_SZONE,6) then ct=ct+1 end
if Duel.CheckLocation(tp,LOCATION_SZONE,7) then ct=ct+1 end if Duel.CheckLocation(tp,LOCATION_SZONE,7) then ct=ct+1 end
if ct==0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0
and tc:IsLocation(LOCATION_HAND) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,c46035545.thfilter2,tp,LOCATION_EXTRA,0,1,ct,nil) local g=Duel.SelectMatchingCard(tp,c46035545.pfilter,tp,LOCATION_EXTRA,0,1,ct,nil)
local pc=g:GetFirst() local pc=g:GetFirst()
while pc do while pc do
Duel.MoveToField(pc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(pc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
......
...@@ -49,8 +49,8 @@ function c71696014.filter(c,e,tp) ...@@ -49,8 +49,8 @@ function c71696014.filter(c,e,tp)
return c:IsCode(46986414) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(46986414) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c71696014.target1(e,tp,eg,ep,ev,re,r,rp,chk) function c71696014.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71696014.filter,tp,LOCATION_DECK,0,1,nil,e,tp) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end and Duel.IsExistingMatchingCard(c71696014.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 c71696014.operation1(e,tp,eg,ep,ev,re,r,rp) function c71696014.operation1(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -33,19 +33,20 @@ function c71863024.initial_effect(c) ...@@ -33,19 +33,20 @@ function c71863024.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c71863024.atkfilter(c) function c71863024.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x9f) return c:IsFaceup() and c:IsSetCard(0x9f) and c:GetAttack()>0
end end
function c71863024.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71863024.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil)
and Duel.IsExistingTarget(c71863024.atkfilter,tp,LOCATION_MZONE,0,1,nil) end and Duel.IsExistingTarget(c71863024.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g1=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
e:SetLabelObject(g1:GetFirst()) e:SetLabelObject(g:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local g2=Duel.SelectTarget(tp,c71863024.atkfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c71863024.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c71863024.atkop(e,tp,eg,ep,ev,re,r,rp) function c71863024.atkop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local hc=e:GetLabelObject() local hc=e:GetLabelObject()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=g:GetFirst() local tc=g:GetFirst()
...@@ -71,14 +72,14 @@ function c71863024.hspcon(e,c) ...@@ -71,14 +72,14 @@ function c71863024.hspcon(e,c)
and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE) and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
end end
function c71863024.atktg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71863024.atktg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil)
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g1=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
e:SetLabelObject(g1:GetFirst()) e:SetLabelObject(g:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local g2=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c71863024.atkop2(e,tp,eg,ep,ev,re,r,rp) function c71863024.atkop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -86,14 +87,15 @@ function c71863024.atkop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -86,14 +87,15 @@ function c71863024.atkop2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc==hc then tc=g:GetNext() end if tc==hc then tc=g:GetNext() end
if hc:IsFaceup() and hc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then if hc:IsFaceup() and hc:IsRelateToEffect(e) and not hc:IsImmuneToEffect(e) then
local atk=c:GetAttack() local atk=c:GetAttack()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-atk) e1:SetValue(-atk)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
if hc:RegisterEffect(e1) then hc:RegisterEffect(e1)
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_UPDATE_ATTACK)
......
...@@ -43,6 +43,7 @@ function c71985676.dmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,6 +43,7 @@ function c71985676.dmop(e,tp,eg,ep,ev,re,r,rp)
end end
function c71985676.damop(e,tp,eg,ep,ev,re,r,rp) function c71985676.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(tp,0) Duel.ChangeBattleDamage(tp,0)
Duel.ChangeBattleDamage(1-tp,0)
end end
function c71985676.spcon(e,tp,eg,ep,ev,re,r,rp) function c71985676.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil
......
...@@ -11,7 +11,7 @@ function c72318602.initial_effect(c) ...@@ -11,7 +11,7 @@ function c72318602.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c72318602.filter(c) function c72318602.filter(c)
return c:IsSetCard(0x1045) and c:IsFaceup() return c:IsFaceup() and c:IsSetCard(0x1045)
end end
function c72318602.condition(e,tp,eg,ep,ev,re,r,rp) function c72318602.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and Duel.IsExistingMatchingCard(c72318602.filter,tp,LOCATION_MZONE,0,1,nil) return ep~=tp and Duel.IsExistingMatchingCard(c72318602.filter,tp,LOCATION_MZONE,0,1,nil)
......
...@@ -53,7 +53,6 @@ function c7268133.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -53,7 +53,6 @@ function c7268133.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,0,0)
end end
function c7268133.atkop(e,tp,eg,ep,ev,re,r,rp) function c7268133.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
...@@ -61,7 +60,6 @@ function c7268133.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,7 +60,6 @@ function c7268133.atkop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1000) e1:SetValue(1000)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
......
...@@ -10,22 +10,9 @@ function c72708264.initial_effect(c) ...@@ -10,22 +10,9 @@ function c72708264.initial_effect(c)
e1:SetCost(c72708264.copycost) e1:SetCost(c72708264.copycost)
e1:SetOperation(c72708264.copyop) e1:SetOperation(c72708264.copyop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if not c72708264.global_check then
c72708264.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetLabel(72708264)
ge1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
ge1:SetOperation(aux.sumreg)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(ge2,0)
end
end end
function c72708264.copycon(e,tp,eg,ep,ev,re,r,rp) function c72708264.copycon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(72708264)>0 return e:GetHandler():IsStatus(STATUS_SUMMON_TURN+STATUS_SPSUMMON_TURN)
end end
function c72708264.costfilter(c) function c72708264.costfilter(c)
return c:IsSetCard(0x99) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() return c:IsSetCard(0x99) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
......
...@@ -43,6 +43,7 @@ function c73534250.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,6 +43,7 @@ function c73534250.spop(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
end end
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
...@@ -52,7 +53,6 @@ function c73534250.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,7 +53,6 @@ function c73534250.spop(e,tp,eg,ep,ev,re,r,rp)
e3:SetTarget(c73534250.splimit) e3:SetTarget(c73534250.splimit)
e3:SetReset(RESET_PHASE+PHASE_END) e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
Duel.SpecialSummonComplete()
end end
function c73534250.splimit(e,c,sump,sumtype,sumpos,targetp,se) function c73534250.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x33) and c:IsLocation(LOCATION_EXTRA) return not c:IsSetCard(0x33) and c:IsLocation(LOCATION_EXTRA)
......
--EMゴムゴムートン --EMゴムゴムートン
function c8384771.initial_effect(c) function c8384771.initial_effect(c)
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
--P.Zone --indes
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetCondition(c8384771.con) e1:SetCondition(c8384771.condition)
e1:SetTarget(c8384771.tg) e1:SetTarget(c8384771.target)
e1:SetOperation(c8384771.op1) e1:SetOperation(c8384771.operation1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--M.Zone
local e2=e1:Clone() local e2=e1:Clone()
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetOperation(c8384771.op2) e2:SetOperation(c8384771.operation2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c8384771.con(e,tp,eg,ep,ev,re,r,rp) function c8384771.condition(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
if not d or a:GetControler()==d:GetControler() then return false end if not d or a:GetControler()==d:GetControler() then return false end
if a:IsControler(tp) then e:SetLabelObject(a) else e:SetLabelObject(d) end if a:IsControler(tp) then e:SetLabelObject(a) else e:SetLabelObject(d) end
return true return true
end end
function c8384771.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c8384771.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetTargetCard(e:GetLabelObject()) Duel.SetTargetCard(e:GetLabelObject())
end end
function c8384771.op1(e,tp,eg,ep,ev,re,r,rp) function c8384771.operation1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
...@@ -40,7 +39,7 @@ function c8384771.op1(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,7 +39,7 @@ function c8384771.op1(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
function c8384771.op2(e,tp,eg,ep,ev,re,r,rp) function c8384771.operation2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -17,10 +17,10 @@ function c8706701.initial_effect(c) ...@@ -17,10 +17,10 @@ function c8706701.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND) e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,8706702) e2:SetCountLimit(1,8706702)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c8706701.thcon) e2:SetCondition(c8706701.thcon)
e2:SetTarget(c8706701.thtg) e2:SetTarget(c8706701.thtg)
e2:SetOperation(c8706701.thop) e2:SetOperation(c8706701.thop)
...@@ -50,9 +50,11 @@ function c8706701.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,9 +50,11 @@ function c8706701.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
end end
function c8706701.cfilter(c,tp)
return c:GetSummonType()==SUMMON_TYPE_SYNCHRO and c:GetSummonPlayer()==tp
end
function c8706701.thcon(e,tp,eg,ep,ev,re,r,rp) function c8706701.thcon(e,tp,eg,ep,ev,re,r,rp)
local ec=eg:GetFirst() return eg:IsExists(c8706701.cfilter,1,nil) and aux.exccon(e)
return ec:GetSummonType()==SUMMON_TYPE_SYNCHRO and ec:GetSummonPlayer()==tp and aux.exccon(e)
end end
function c8706701.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c8706701.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end if chk==0 then return e:GetHandler():IsAbleToHand() end
......
...@@ -9,18 +9,19 @@ function c9106362.initial_effect(c) ...@@ -9,18 +9,19 @@ function c9106362.initial_effect(c)
e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCondition(c9106362.dmcon1) e1:SetCondition(c9106362.dmcon1)
e1:SetOperation(c9106362.dmop) e1:SetOperation(c9106362.dmop1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Negate damage (monster) --Negate damage (monster)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c9106362.dmcon2) e2:SetCondition(c9106362.dmcon2)
e2:SetOperation(c9106362.dmop2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c9106362.dmcon1(e,tp,eg,ep,ev,re,r,rp) function c9106362.dmcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil
end end
function c9106362.dmop(e,tp,eg,ep,ev,re,r,rp) function c9106362.dmop1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local 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)
...@@ -37,3 +38,11 @@ function c9106362.dmcon2(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,3 +38,11 @@ function c9106362.dmcon2(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
return d and a:GetControler()~=d:GetControler() return d and a:GetControler()~=d:GetControler()
end end
function c9106362.dmop2(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e1:SetOperation(c9106362.damop)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e1,tp)
end
...@@ -5,7 +5,7 @@ function c9929398.initial_effect(c) ...@@ -5,7 +5,7 @@ function c9929398.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCondition(c9929398.spcon) e1:SetCondition(c9929398.spcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -26,7 +26,6 @@ function c9929398.initial_effect(c) ...@@ -26,7 +26,6 @@ function c9929398.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCost(c9929398.cost)
e3:SetTarget(c9929398.target) e3:SetTarget(c9929398.target)
e3:SetOperation(c9929398.operation) e3:SetOperation(c9929398.operation)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -56,7 +55,6 @@ function c9929398.tknop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +55,6 @@ function c9929398.tknop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UNRELEASABLE_SUM) e1:SetCode(EFFECT_UNRELEASABLE_SUM)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(1) e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
token:RegisterEffect(e1,true) token:RegisterEffect(e1,true)
...@@ -73,31 +71,23 @@ end ...@@ -73,31 +71,23 @@ end
function c9929398.cfilter(c) function c9929398.cfilter(c)
return c:IsFaceup() and not c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost() return c:IsFaceup() and not c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost()
end end
function c9929398.spfilter(c,e,tp) function c9929398.spfilter(c,e,tp,ct)
local rlv=c:GetLevel()-e:GetHandler():GetLevel() local rlv=c:GetLevel()-e:GetHandler():GetLevel()
if rlv<1 then return false end if rlv<1 then return false end
local rg=Duel.GetMatchingGroup(c9929398.cfilter,tp,LOCATION_MZONE,0,e:GetHandler()) local rg=Duel.GetMatchingGroup(c9929398.cfilter,tp,LOCATION_MZONE,0,e:GetHandler())
return c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0x33) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_SYNCHRO) and c:IsSetCard(0x33) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and rg:CheckWithSumEqual(Card.GetLevel,rlv,1,63) and rg:CheckWithSumEqual(Card.GetLevel,rlv,ct,63)
end
function c9929398.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return true end
end end
function c9929398.target(e,tp,eg,ep,ev,re,r,rp,chk) function c9929398.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then local ct=-Duel.GetLocationCount(tp,LOCATION_MZONE)
if e:GetLabel()~=100 then return false end if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
e:SetLabel(0) and Duel.IsExistingTarget(c9929398.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,ct) end
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
and Duel.IsExistingTarget(c9929398.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and e:GetHandler():IsAbleToRemoveAsCost()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c9929398.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c9929398.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,ct)
local rlv=g:GetFirst():GetLevel()-e:GetHandler():GetLevel() local rlv=g:GetFirst():GetLevel()-e:GetHandler():GetLevel()
local rg=Duel.GetMatchingGroup(c9929398.cfilter,tp,LOCATION_MZONE,0,e:GetHandler()) local rg=Duel.GetMatchingGroup(c9929398.cfilter,tp,LOCATION_MZONE,0,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=rg:SelectWithSumEqual(tp,Card.GetLevel,rlv,1,63) local g2=rg:SelectWithSumEqual(tp,Card.GetLevel,rlv,ct,63)
g2:AddCard(e:GetHandler()) g2:AddCard(e:GetHandler())
Duel.Remove(g2,POS_FACEUP,REASON_COST) Duel.Remove(g2,POS_FACEUP,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment