Commit d241796a authored by mercury233's avatar mercury233

fix

parent 01a4ef22
...@@ -72,10 +72,10 @@ function c100425023.spfilter(c,e,tp) ...@@ -72,10 +72,10 @@ function c100425023.spfilter(c,e,tp)
return c:IsLevelBelow(9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c100425023.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100425023.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c100425023.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100425023.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingTarget(c100425023.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingTarget(c100425023.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and e:GetHandler():IsAbleToDeck() end and e:GetHandler():IsAbleToExtra() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100425023.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c100425023.spfilter,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)
...@@ -84,7 +84,7 @@ end ...@@ -84,7 +84,7 @@ end
function c100425023.spop(e,tp,eg,ep,ev,re,r,rp) function c100425023.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,2,REASON_EFFECT)~=0 and tc:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,2,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_EXTRA) and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
...@@ -20,6 +20,7 @@ function c100425036.initial_effect(c) ...@@ -20,6 +20,7 @@ function c100425036.initial_effect(c)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCondition(c100425036.thcon)
e2:SetCost(c100425036.thcost) e2:SetCost(c100425036.thcost)
e2:SetTarget(c100425036.thtg) e2:SetTarget(c100425036.thtg)
e2:SetOperation(c100425036.thop) e2:SetOperation(c100425036.thop)
...@@ -39,21 +40,26 @@ end ...@@ -39,21 +40,26 @@ end
function c100425036.atkval(e,c) function c100425036.atkval(e,c)
return c:GetOverlayCount()*500 return c:GetOverlayCount()*500
end end
function c100425036.filter1(c,e,tp) function c100425036.thcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsSummonPlayer(1-tp) and c:IsLocation(LOCATION_MZONE) and c:IsCanBeEffectTarget(e) return eg:IsExists(Card.IsSummonPlayer,1,nil,1-tp)
and c:IsAbleToHand()
end end
function c100425036.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c100425036.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c100425036.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100425036.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end local g=eg:Filter(Card.IsAbleToHand,nil):Filter(Card.IsLocation,nil,LOCATION_MZONE)
if chk==0 then return eg and eg:IsExists(c100425036.filter1,1,nil,e,tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and aux.IsInGroup(chkc,g) end
if chk==0 then return Duel.IsExistingTarget(aux.IsInGroup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,g) end
local sg
if g:GetCount()==1 then
sg=g:Clone()
Duel.SetTargetCard(sg)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=eg:FilterSelect(tp,c100425036.filter1,1,1,nil,e,tp) sg=Duel.SelectTarget(tp,aux.IsInGroup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,g)
Duel.SetTargetCard(g) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,1,0,0)
end end
function c100425036.thop(e,tp,eg,ep,ev,re,r,rp) function c100425036.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
...@@ -66,12 +72,12 @@ function c100425036.recon(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,12 +72,12 @@ function c100425036.recon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and c:IsPreviousControler(tp) return rp==1-tp and c:IsPreviousControler(tp)
end end
function c100425036.filter2(c) function c100425036.filter2(c)
return c:IsSetCard(0xf7) and c:IsAbleToHand() return c:IsSetCard(0xf7) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function c100425036.retg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100425036.retg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100425036.filter2(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100425036.filter2(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c100425036.filter2,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingTarget(c100425036.filter2,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c100425036.filter2,tp,LOCATION_GRAVE,0,1,1,e:GetHandler()) local g=Duel.SelectTarget(tp,c100425036.filter2,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
......
...@@ -12,13 +12,14 @@ function c100425037.initial_effect(c) ...@@ -12,13 +12,14 @@ function c100425037.initial_effect(c)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetValue(c100425037.atkval) e1:SetValue(c100425037.atkval)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--destroy --to deck
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100425037,0)) e2:SetDescription(aux.Stringid(100425037,0))
e2:SetCategory(CATEGORY_TODECK) e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetCost(c100425037.descost) e2:SetCost(c100425037.descost)
e2:SetTarget(c100425037.destg) e2:SetTarget(c100425037.destg)
e2:SetOperation(c100425037.desop) e2:SetOperation(c100425037.desop)
...@@ -27,7 +28,7 @@ function c100425037.initial_effect(c) ...@@ -27,7 +28,7 @@ function c100425037.initial_effect(c)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100425037,1)) e3:SetDescription(aux.Stringid(100425037,1))
e3:SetCategory(CATEGORY_ATKCHANGE) e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_START) e3:SetCode(EVENT_BATTLE_START)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c100425037.condition) e3:SetCondition(c100425037.condition)
...@@ -59,12 +60,10 @@ function c100425037.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,12 +60,10 @@ function c100425037.desop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c100425037.condition(e,tp,eg,ep,ev,re,r,rp) function c100425037.condition(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
return (a:GetControler()==tp and a~=e:GetHandler() and a:IsRelateToBattle()) return (a:IsControler(tp) and a:IsFaceup() and a~=e:GetHandler() and a:IsRelateToBattle())
or (d and d:GetControler()==tp and d~=e:GetHandler() and d:IsRelateToBattle()) or (d and d:IsControler(tp) and d:IsFaceup() and d~=e:GetHandler() and d:IsRelateToBattle())
end end
function c100425037.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c100425037.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -79,10 +78,12 @@ function c100425037.operation(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -79,10 +78,12 @@ function c100425037.operation(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.GetTurnPlayer()~=tp then a=Duel.GetAttackTarget() end if Duel.GetTurnPlayer()~=tp then a=Duel.GetAttackTarget() end
if not a:IsRelateToBattle() then return end if not a:IsRelateToBattle() then return end
if a==e:GetHandler() then return end if a==e:GetHandler() then return end
if a:IsFaceup() then
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:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(ct*300) e1:SetValue(ct*300)
a:RegisterEffect(e1) a:RegisterEffect(e1)
end
end end
...@@ -51,7 +51,7 @@ function c101105018.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,7 +51,7 @@ function c101105018.spop(e,tp,eg,ep,ev,re,r,rp)
end end
function c101105018.tcfilter(c,tp) function c101105018.tcfilter(c,tp)
local lv=c:GetLevel() local lv=c:GetLevel()
return c:IsFaceup() and lv>0 and aux.AtkEqualsDef(c) return c:IsFaceup() and lv>0 and aux.AtkEqualsDef(c) and c:IsRace(RACE_MACHINE)
and Duel.IsExistingMatchingCard(c101105018.tgfilter,tp,LOCATION_DECK,0,1,nil,lv) and Duel.IsExistingMatchingCard(c101105018.tgfilter,tp,LOCATION_DECK,0,1,nil,lv)
end end
function c101105018.tgfilter(c,lv) function c101105018.tgfilter(c,lv)
......
...@@ -11,9 +11,11 @@ function c101105044.initial_effect(c) ...@@ -11,9 +11,11 @@ function c101105044.initial_effect(c)
e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(TIMINGS_CHECK_MONSTER+TIMING_END_PHASE+TIMING_DAMAGE_STEP)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCondition(aux.dscon)
e1:SetTarget(c101105044.atktg) e1:SetTarget(c101105044.atktg)
e1:SetOperation(c101105044.atkop) e1:SetOperation(c101105044.atkop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -37,7 +39,8 @@ function c101105044.atkfilter(c) ...@@ -37,7 +39,8 @@ function c101105044.atkfilter(c)
end end
function c101105044.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101105044.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.IsExistingTarget(c101105044.atkfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.IsExistingTarget(c101105044.atkfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp) local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
e:SetLabelObject(g:GetFirst()) e:SetLabelObject(g:GetFirst())
...@@ -52,6 +55,7 @@ function c101105044.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,6 +55,7 @@ function c101105044.atkop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or not sc:IsRelateToEffect(e) then return end if tc:IsFacedown() or not tc:IsRelateToEffect(e) or not sc:IsRelateToEffect(e) then return end
local ac=e:GetLabelObject() local ac=e:GetLabelObject()
if tc==ac then tc=sc end if tc==ac then tc=sc end
if not ac:IsImmuneToEffect(e) then
local atk=tc:GetAttack() local atk=tc:GetAttack()
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -59,9 +63,11 @@ function c101105044.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,9 +63,11 @@ function c101105044.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(math.ceil(atk/2)) e1:SetValue(math.ceil(atk/2))
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
ac:RegisterEffect(e1) ac:RegisterEffect(e1)
if e:GetHandler():IsRelateToEffect(e) then if not ac:IsHasEffect(EFFECT_REVERSE_UPDATE) and e:GetHandler():IsRelateToEffect(e) then
Duel.BreakEffect()
Duel.Overlay(e:GetHandler(),tc) Duel.Overlay(e:GetHandler(),tc)
end end
end
end end
function c101105044.discon(e,tp,eg,ep,ev,re,r,rp) function c101105044.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and re:IsActiveType(TYPE_MONSTER) return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and re:IsActiveType(TYPE_MONSTER)
......
...@@ -21,45 +21,55 @@ function c101105048.initial_effect(c) ...@@ -21,45 +21,55 @@ function c101105048.initial_effect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e2:SetCategory(CATEGORY_SEARCH+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:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101105048) e2:SetCountLimit(1,101105048+100)
e2:SetCondition(c101105048.thcon) e2:SetCondition(c101105048.thcon)
e2:SetTarget(c101105048.thtg) e2:SetTarget(c101105048.thtg)
e2:SetOperation(c101105048.thop) e2:SetOperation(c101105048.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c101105048.tefilter(c)
return c:GetOriginalType()&TYPE_PENDULUM~=0
end
function c101105048.chkfilter(c,odevity) function c101105048.chkfilter(c,odevity)
return c:GetCurrentScale()%2==odevity return c:GetCurrentScale()%2==odevity
end end
function c101105048.thfilter(c,e,tp,odevity) function c101105048.thfilter(c,odevity)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:GetCurrentScale()%2==odevity return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:GetCurrentScale()%2==1-odevity
and c:IsAbleToHand() and c:IsAbleToHand()
end end
function c101105048.chkcon(g,e,tp,odevity) function c101105048.chkcon(g,tp,odevity)
return g:IsExists(c101105048.chkfilter,1,nil,odevity) and Duel.IsExistingMatchingCard(c101105048.thfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,odevity) return g:IsExists(c101105048.chkfilter,1,nil,odevity) and Duel.IsExistingMatchingCard(c101105048.thfilter,tp,LOCATION_EXTRA,0,1,nil,odevity)
end end
function c101105048.tetg(e,tp,eg,ep,ev,re,r,rp,chk) function c101105048.tetg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c101105048.tefilter,tp,LOCATION_HAND,0,nil) local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND,0,nil,TYPE_PENDULUM)
if chk==0 then return c101105048.chkcon(g,e,tp,0) or c101105048.chkcon(g,e,tp,1) end if chk==0 then return c101105048.chkcon(g,tp,0) or c101105048.chkcon(g,tp,1) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA)
end end
function c101105048.teop(e,tp,eg,ep,ev,re,r,rp) function c101105048.teop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND,0,nil,TYPE_PENDULUM)
local b1=c101105048.chkcon(g,tp,0)
local b2=c101105048.chkcon(g,tp,1)
local sg=Group.CreateGroup()
if b1 and not b2 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(101105048,3)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(101105048,3))
local g=Duel.SelectMatchingCard(tp,c101105048.tefilter,tp,LOCATION_HAND,0,1,1,nil) sg=g:FilterSelect(tp,c101105048.chkfilter,1,1,nil,0)
if g:GetCount()>0 then end
Duel.SendtoExtraP(g,tp,REASON_EFFECT) if not b1 and b2 then
local odevity=g:GetFirst():GetCurrentScale()%2 Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(101105048,3))
sg=g:FilterSelect(tp,c101105048.chkfilter,1,1,nil,1)
end
if b1 and b2 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(101105048,3))
sg=g:Select(tp,1,1,nil)
end
local tc=sg:GetFirst()
if tc and Duel.SendtoExtraP(tc,tp,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_EXTRA) then
local odevity=tc:GetCurrentScale()%2
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101105048.thfilter,tp,LOCATION_EXTRA,0,1,1,nil,odevity) local g2=Duel.SelectMatchingCard(tp,c101105048.thfilter,tp,LOCATION_EXTRA,0,1,1,nil,odevity)
if g:GetCount()>0 then if g2:GetCount()>0 then
Duel.BreakEffect() Duel.SendtoHand(g2,nil,REASON_EFFECT)
Duel.SendtoHand(g,tp,REASON_EFFECT) Duel.ConfirmCards(1-tp,g2)
Duel.ConfirmCards(1-tp,g)
end end
end end
end end
...@@ -70,10 +80,10 @@ function c101105048.tgfilter(c,tp,g) ...@@ -70,10 +80,10 @@ function c101105048.tgfilter(c,tp,g)
return g:IsContains(c) and Duel.IsExistingMatchingCard(c101105048.adfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode()) return g:IsContains(c) and Duel.IsExistingMatchingCard(c101105048.adfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end end
function c101105048.adfilter(c,scale) function c101105048.adfilter(c,scale)
return c:IsSetCard(0x162) and c:IsType(TYPE_MONSTER) and not c:GetLevel()==scale and c:IsAbleToHand() return c:IsSetCard(0x162) and c:IsType(TYPE_PENDULUM) and c:IsLevel(scale) and c:IsAbleToHand()
end end
function c101105048.thcon(e,tp,eg,ep,ev,re,r,rp) function c101105048.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and eg:IsExists(c101105048.cfilter,1,nil,tp) return eg:IsExists(c101105048.cfilter,1,nil,tp)
end end
function c101105048.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101105048.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=eg:Filter(c101105048.cfilter,nil,tp) local g=eg:Filter(c101105048.cfilter,nil,tp)
......
...@@ -109,7 +109,7 @@ function c101105076.naop(e,tp,eg,ep,ev,re,r,rp) ...@@ -109,7 +109,7 @@ function c101105076.naop(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 ec=e:GetHandler():GetEquipTarget() local ec=e:GetHandler():GetEquipTarget()
if Duel.NegateAttack()~=0 and ec then if Duel.NegateAttack()~=0 and ec then
Duel.GetControl(ec,1-tp,PHASE_BATTLE,1) Duel.GetControl(ec,1-ec:GetControler(),PHASE_BATTLE,1)
end end
end end
function c101105076.thcon(e,tp,eg,ep,ev,re,r,rp) function c101105076.thcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -13,13 +13,16 @@ function c101105080.initial_effect(c) ...@@ -13,13 +13,16 @@ function c101105080.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c101105080.target(e,tp,eg,ep,ev,re,r,rp,chk) function c101105080.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end end
function c101105080.activate(e,tp,eg,ep,ev,re,r,rp,chk) function c101105080.activate(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then
Duel.SendtoDeck(g,nil,1,REASON_EFFECT)
else
local opt=Duel.SelectOption(tp,aux.Stringid(101105080,0),aux.Stringid(101105080,1)) local opt=Duel.SelectOption(tp,aux.Stringid(101105080,0),aux.Stringid(101105080,1))
if opt==0 then if opt==0 then
Duel.SendtoDeck(g,nil,0,REASON_EFFECT) Duel.SendtoDeck(g,nil,0,REASON_EFFECT)
...@@ -27,4 +30,5 @@ function c101105080.activate(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -27,4 +30,5 @@ function c101105080.activate(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(g,nil,1,REASON_EFFECT) Duel.SendtoDeck(g,nil,1,REASON_EFFECT)
end end
end end
end
end 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