Commit 1b05ecfd authored by mercury233's avatar mercury233

fix

parent fc3ab2da
...@@ -43,12 +43,13 @@ end ...@@ -43,12 +43,13 @@ end
function c100266009.atkcon(e,tp,eg,ep,ev,re,r,rp) function c100266009.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local bc=c:GetBattleTarget() local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc and bc:IsFaceup() and bc:IsRelateToBattle() and bc:IsDefenseAbove(0) and bc:GetAttack()~=bc:GetDefense() return c:IsRelateToBattle() and bc and bc:IsFaceup() and bc:IsRelateToBattle() and bc:IsDefenseAbove(0)
and bc:GetAttack()~=bc:GetDefense() and bc:IsControler(1-tp)
end end
function c100266009.atkop(e,tp,eg,ep,ev,re,r,rp) function c100266009.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=c:GetBattleTarget() local tc=c:GetBattleTarget()
if tc:IsFaceup() and tc:IsRelateToBattle() then if tc:IsFaceup() and tc:IsRelateToBattle() and tc:IsControler(1-tp) then
local atk=tc:GetAttack() local atk=tc:GetAttack()
local def=tc:GetDefense() local def=tc:GetDefense()
if atk==def then return end if atk==def then return end
...@@ -56,13 +57,13 @@ function c100266009.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,13 +57,13 @@ function c100266009.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(def) e1:SetValue(def)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_DAMAGE) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_DEFENSE_FINAL) e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetValue(atk) e2:SetValue(atk)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_DAMAGE) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
end end
......
...@@ -48,6 +48,8 @@ function c100266033.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,6 +48,8 @@ function c100266033.operation(e,tp,eg,ep,ev,re,r,rp)
end end
function c100266033.discon(e,tp,eg,ep,ev,re,r,rp) function c100266033.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local ph=Duel.GetCurrentPhase()
if not (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) then return false end
return not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainDisablable(ev) and ep==1-tp return not c:IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainDisablable(ev) and ep==1-tp
and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,0,1,c) and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,0,1,c)
end end
......
...@@ -46,6 +46,7 @@ function c101012087.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -46,6 +46,7 @@ function c101012087.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c101012087.spop(e,tp,eg,ep,ev,re,r,rp) function c101012087.spop(e,tp,eg,ep,ev,re,r,rp)
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)
local g=Duel.SelectMatchingCard(tp,c101012087.spfilter,tp,LOCATION_SZONE+LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c101012087.spfilter,tp,LOCATION_SZONE+LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
...@@ -84,6 +85,8 @@ function c101012087.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,6 +85,8 @@ function c101012087.disop(e,tp,eg,ep,ev,re,r,rp)
and c:GetEquipGroup():IsExists(c101012087.eqfilter,1,nil) and c:GetEquipGroup():IsExists(c101012087.eqfilter,1,nil)
and Duel.IsExistingMatchingCard(c101012087.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c101012087.thfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(101012087,2)) then and Duel.SelectYesNo(tp,aux.Stringid(101012087,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101012087.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c101012087.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
......
...@@ -89,10 +89,12 @@ function c101012090.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -89,10 +89,12 @@ function c101012090.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(p,LOCATION_HAND,0) local g=Duel.GetFieldGroup(p,LOCATION_HAND,0)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.ConfirmCards(1-p,g) Duel.ConfirmCards(1-p,g)
Duel.Hint(HINT_SELECTMSG,1-p,HINTMSG_DISCARD)
local sg=g:Filter(c101012090.tgfilter1,nil) local sg=g:Filter(c101012090.tgfilter1,nil)
sg=g:Select(1-p,1,1,nil) Duel.Hint(HINT_SELECTMSG,1-p,HINTMSG_TOGRAVE)
Duel.SendtoGrave(sg,REASON_EFFECT) local tg=sg:Select(1-p,1,1,nil)
if tg:GetCount()>0 then
Duel.SendtoGrave(tg,REASON_EFFECT)
end
Duel.ShuffleHand(p) Duel.ShuffleHand(p)
end end
end end
...@@ -101,9 +103,10 @@ function c101012090.tgtg2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -101,9 +103,10 @@ function c101012090.tgtg2(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_EXTRA)
end end
function c101012090.tgop2(e,tp,eg,ep,ev,re,r,rp) function c101012090.tgop2(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA) local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
Duel.ConfirmCards(tp,tg) Duel.ConfirmCards(tp,g)
tg=tg:Filter(Card.IsAbleToGrave,nil) local tg=g:Filter(Card.IsAbleToGrave,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=tg:Select(tp,1,1,nil):GetFirst() local tc=tg:Select(tp,1,1,nil):GetFirst()
if tc then if tc then
Duel.SendtoGrave(tc,REASON_EFFECT) Duel.SendtoGrave(tc,REASON_EFFECT)
......
...@@ -34,7 +34,7 @@ function c101012091.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,7 +34,7 @@ function c101012091.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101012091.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c101012091.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c101012091.drfilter(c) function c101012091.drfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EQUIP) return (c:IsFaceup() or c:GetEquipTarget()) and c:IsType(TYPE_EQUIP)
end end
function c101012091.target(e,tp,eg,ep,ev,re,r,rp,chk) function c101012091.target(e,tp,eg,ep,ev,re,r,rp,chk)
local i=Duel.GetMatchingGroupCount(c101012091.drfilter,tp,LOCATION_ONFIELD,0,nil) local i=Duel.GetMatchingGroupCount(c101012091.drfilter,tp,LOCATION_ONFIELD,0,nil)
...@@ -80,6 +80,7 @@ function c101012091.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,6 +80,7 @@ function c101012091.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end
if c:IsForbidden() or not c:CheckUniqueOnField(tp,LOCATION_SZONE) then return end if c:IsForbidden() or not c:CheckUniqueOnField(tp,LOCATION_SZONE) then return end
local g=eg:Filter(c101012091.exfilter,nil,tp) local g=eg:Filter(c101012091.exfilter,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local sg=Duel.SelectMatchingCard(tp,c101012091.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,g) local sg=Duel.SelectMatchingCard(tp,c101012091.eqfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,g)
local tc=sg:GetFirst() local tc=sg:GetFirst()
if tc then if tc then
......
...@@ -17,15 +17,15 @@ end ...@@ -17,15 +17,15 @@ end
function c101101003.rfilter(c,tp) function c101101003.rfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>0 return Duel.GetMZoneCount(tp,c)>0
end end
function c101101003.spfilter(c,e,tp)
return (c:IsSetCard(0xbd) or c:IsLevel(5) and c:IsRace(RACE_DRAGON)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101101003.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c101101003.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c101101003.rfilter,1,nil,tp) end if chk==0 then return Duel.CheckReleaseGroup(tp,c101101003.rfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c101101003.rfilter,1,1,nil,tp) local g=Duel.SelectReleaseGroup(tp,c101101003.rfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c101101003.spfilter(c,e,tp)
return (c:IsSetCard(0xbd) or c:IsLevel(5) and c:IsRace(RACE_DRAGON)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101101003.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101101003.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101101003.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c101101003.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) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
......
...@@ -33,7 +33,8 @@ function c101101008.cfilter(c) ...@@ -33,7 +33,8 @@ function c101101008.cfilter(c)
end end
function c101101008.spcon(e,tp,eg,ep,ev,re,r,rp) function c101101008.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return Duel.IsExistingMatchingCard(c101101008.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
and Duel.IsExistingMatchingCard(c101101008.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end end
function c101101008.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101101008.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -45,7 +46,10 @@ function c101101008.ofilter(c) ...@@ -45,7 +46,10 @@ function c101101008.ofilter(c)
end end
function c101101008.spop(e,tp,eg,ep,ev,re,r,rp) function c101101008.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsExistingMatchingCard(c101101008.ofilter,tp,LOCATION_MZONE,0,1,c) and Duel.IsExistingMatchingCard(aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(101101008,2)) then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0
and Duel.IsExistingMatchingCard(c101101008.ofilter,tp,LOCATION_MZONE,0,1,c)
and Duel.IsExistingMatchingCard(aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(101101008,2)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectMatchingCard(tp,aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
......
...@@ -36,7 +36,8 @@ end ...@@ -36,7 +36,8 @@ end
function c101101010.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101101010.sptg(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.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.IsExistingTarget(c101101010.cfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,4,nil) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false)
and Duel.IsExistingTarget(c101101010.cfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,4,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c101101010.cfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,4,4,nil) local g=Duel.SelectTarget(tp,c101101010.cfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,4,4,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
......
...@@ -40,7 +40,7 @@ function c101101017.cfilter(c,sp) ...@@ -40,7 +40,7 @@ function c101101017.cfilter(c,sp)
return c:GetSummonPlayer()==sp return c:GetSummonPlayer()==sp
end end
function c101101017.thcon(e,tp,eg,ep,ev,re,r,rp) function c101101017.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101101017.cfilter,1,nil,1-tp) and not eg:IsContains(e:GetHandler()) return eg:IsExists(c101101017.cfilter,1,nil,1-tp)
end end
function c101101017.thcon2(e,tp,eg,ep,ev,re,r,rp) function c101101017.thcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) return Duel.GetAttacker():IsControler(1-tp)
...@@ -56,7 +56,10 @@ function c101101017.thfilter(c,e,tp) ...@@ -56,7 +56,10 @@ function c101101017.thfilter(c,e,tp)
end end
function c101101017.thop(e,tp,eg,ep,ev,re,r,rp) function c101101017.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c101101017.thfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(101101017,2)) then if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_HAND)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101101017.thfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(101101017,2)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101101017.thfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c101101017.thfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
......
...@@ -40,7 +40,7 @@ function c101101019.cfilter(c,sp) ...@@ -40,7 +40,7 @@ function c101101019.cfilter(c,sp)
return c:GetSummonPlayer()==sp return c:GetSummonPlayer()==sp
end end
function c101101019.thcon(e,tp,eg,ep,ev,re,r,rp) function c101101019.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101101019.cfilter,1,nil,1-tp) and not eg:IsContains(e:GetHandler()) return eg:IsExists(c101101019.cfilter,1,nil,1-tp)
end end
function c101101019.thcon2(e,tp,eg,ep,ev,re,r,rp) function c101101019.thcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) return Duel.GetAttacker():IsControler(1-tp)
...@@ -56,7 +56,10 @@ function c101101019.thfilter(c,e,tp) ...@@ -56,7 +56,10 @@ function c101101019.thfilter(c,e,tp)
end end
function c101101019.thop(e,tp,eg,ep,ev,re,r,rp) function c101101019.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_HAND) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c101101019.thfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(101101019,2)) then if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_HAND)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101101019.thfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(101101019,2)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101101019.thfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c101101019.thfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
......
...@@ -40,7 +40,7 @@ function c101101020.cfilter(c,sp) ...@@ -40,7 +40,7 @@ function c101101020.cfilter(c,sp)
return c:GetSummonPlayer()==sp return c:GetSummonPlayer()==sp
end end
function c101101020.thcon(e,tp,eg,ep,ev,re,r,rp) function c101101020.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101101020.cfilter,1,nil,1-tp) and not eg:IsContains(e:GetHandler()) return eg:IsExists(c101101020.cfilter,1,nil,1-tp)
end end
function c101101020.thcon2(e,tp,eg,ep,ev,re,r,rp) function c101101020.thcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) return Duel.GetAttacker():IsControler(1-tp)
...@@ -55,12 +55,13 @@ function c101101020.thfilter(c) ...@@ -55,12 +55,13 @@ function c101101020.thfilter(c)
end end
function c101101020.thop(e,tp,eg,ep,ev,re,r,rp) function c101101020.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_HAND) and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c101101020.thfilter),tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(101101020,2)) then if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_HAND)
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c101101020.thfilter),tp,LOCATION_GRAVE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(101101020,2)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101101020.thfilter),tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101101020.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end end
end end
function c101101020.spcon(e,tp,eg,ep,ev,re,r,rp) function c101101020.spcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -34,7 +34,8 @@ function c101101021.tgfilter(c) ...@@ -34,7 +34,8 @@ function c101101021.tgfilter(c)
end end
function c101101021.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101101021.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101101021.cfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101101021.cfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101101021.cfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(c101101021.tgfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c101101021.cfilter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingMatchingCard(c101101021.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,c101101021.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,c101101021.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
......
...@@ -49,7 +49,8 @@ function c101101023.atkfilter(c) ...@@ -49,7 +49,8 @@ function c101101023.atkfilter(c)
return c:IsFaceup() and c:IsRace(RACE_FAIRY) return c:IsFaceup() and c:IsRace(RACE_FAIRY)
end end
function c101101023.atktg(e,tp,eg,ep,ev,re,r,rp,chk) function c101101023.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101101023.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c101101023.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
end end
function c101101023.atkop(e,tp,eg,ep,ev,re,r,rp) function c101101023.atkop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c101101023.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local ct=Duel.GetMatchingGroupCount(c101101023.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
......
...@@ -32,7 +32,8 @@ function c101101024.fcheck2(c) ...@@ -32,7 +32,8 @@ function c101101024.fcheck2(c)
end end
function c101101024.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101101024.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c101101024.filter,tp,LOCATION_HAND+LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(c101101024.filter,tp,LOCATION_HAND+LOCATION_DECK,0,nil)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 and g:CheckSubGroup(c101101024.fselect,2,2,e,tp) end if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0
and g:CheckSubGroup(c101101024.fselect,2,2,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
......
...@@ -10,7 +10,7 @@ function c101101026.initial_effect(c) ...@@ -10,7 +10,7 @@ function c101101026.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE) e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetHintTiming(0,TIMING_MAIN_END+TIMING_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCountLimit(1,101101026) e1:SetCountLimit(1,101101026)
e1:SetCondition(aux.dscon) e1:SetCondition(aux.dscon)
e1:SetCost(c101101026.atkcost) e1:SetCost(c101101026.atkcost)
...@@ -22,7 +22,7 @@ function c101101026.initial_effect(c) ...@@ -22,7 +22,7 @@ function c101101026.initial_effect(c)
e2:SetDescription(aux.Stringid(101101026,1)) e2:SetDescription(aux.Stringid(101101026,1))
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_BATTLE_DESTROYED) e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101101126) e2:SetCountLimit(1,101101126)
...@@ -59,10 +59,9 @@ function c101101026.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,10 +59,9 @@ function c101101026.atkop(e,tp,eg,ep,ev,re,r,rp)
end end
function c101101026.thcon(e,tp,eg,ep,ev,re,r,rp) function c101101026.thcon(e,tp,eg,ep,ev,re,r,rp)
if eg:IsContains(e:GetHandler()) then return false end if eg:IsContains(e:GetHandler()) then return false end
local tc=eg:GetFirst() local rc=eg:GetFirst()
local bc=tc:GetBattleTarget() return rc:IsRelateToBattle() and rc:IsStatus(STATUS_OPPO_BATTLE)
return eg:GetCount()==1 and tc:IsReason(REASON_BATTLE) and rc:IsFaceup() and rc:IsSetCard(0x36) and rc:IsControler(tp)
and bc:IsRelateToBattle() and bc:IsStatus(STATUS_OPPO_BATTLE) and bc:IsControler(tp) and bc:IsSetCard(0x36)
end end
function c101101026.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101101026.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
......
...@@ -93,7 +93,8 @@ function c101101027.con(e,tp,eg,ep,ev,re,r,rp) ...@@ -93,7 +93,8 @@ function c101101027.con(e,tp,eg,ep,ev,re,r,rp)
return c:IsReason(REASON_DESTROY) and c:GetPreviousLocation()==LOCATION_SZONE and not c:IsReason(REASON_LOST_TARGET) return c:IsReason(REASON_DESTROY) and c:GetPreviousLocation()==LOCATION_SZONE and not c:IsReason(REASON_LOST_TARGET)
end end
function c101101027.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c101101027.tg(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 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) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c101101027.op(e,tp,eg,ep,ev,re,r,rp) function c101101027.op(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -28,7 +28,8 @@ function c101101028.spfilter(c,e,tp) ...@@ -28,7 +28,8 @@ function c101101028.spfilter(c,e,tp)
end end
function c101101028.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101101028.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101101028.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101101028.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c101101028.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101101028.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101101028.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c101101028.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)
......
...@@ -28,12 +28,12 @@ function c101101030.initial_effect(c) ...@@ -28,12 +28,12 @@ function c101101030.initial_effect(c)
e2:SetOperation(c101101030.tgop) e2:SetOperation(c101101030.tgop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c101101030.spfilter(c) function c101101030.spfilter(c,tp)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp
and (c:GetPreviousRaceOnField()&RACE_ROCK)>0 and (c:GetPreviousRaceOnField()&RACE_ROCK)>0
end end
function c101101030.spcon(e,tp,eg,ep,ev,re,r,rp) function c101101030.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101101030.spfilter,1,nil) return eg:IsExists(c101101030.spfilter,1,nil,tp)
end end
function c101101030.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101101030.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -47,7 +47,7 @@ function c101101030.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,7 +47,7 @@ function c101101030.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c101101030.thfilter(c) function c101101030.thfilter(c)
return (not c:IsCode(101101030)) and (aux.IsCodeListed(c,36623431) or c:IsCode(36623431)) return c:IsAbleToHand() and (not c:IsCode(101101030)) and (aux.IsCodeListed(c,36623431) or c:IsCode(36623431))
end end
function c101101030.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101101030.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101101030.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c101101030.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -108,7 +108,8 @@ function c101101032.filter(c) ...@@ -108,7 +108,8 @@ function c101101032.filter(c)
end end
function c101101032.retg(e,tp,eg,ep,ev,re,r,rp,chk) function c101101032.retg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101101032.filter,tp,0,LOCATION_GRAVE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c101101032.filter,tp,0,LOCATION_GRAVE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,0)
end end
function c101101032.reop(e,tp,eg,ep,ev,re,r,rp,chk) function c101101032.reop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
......
...@@ -9,7 +9,7 @@ function c101101035.initial_effect(c) ...@@ -9,7 +9,7 @@ function c101101035.initial_effect(c)
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_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMINGS_CHECK_MONSTER+TIMING_DAMAGE_STEP)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCondition(aux.dscon) e1:SetCondition(aux.dscon)
......
...@@ -24,7 +24,7 @@ function c101101039.initial_effect(c) ...@@ -24,7 +24,7 @@ function c101101039.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_DAMAGE_STEP+TIMING_END_PHASE) e2:SetHintTiming(0,TIMING_DAMAGE_STEP+TIMING_END_PHASE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCondition(aux.dscon) e2:SetCondition(aux.dscon)
e2:SetTarget(c101101039.atktg) e2:SetTarget(c101101039.atktg)
...@@ -64,7 +64,8 @@ function c101101039.tgfilter(c) ...@@ -64,7 +64,8 @@ function c101101039.tgfilter(c)
end end
function c101101039.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101101039.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101101039.atkfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101101039.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101101039.atkfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c101101039.tgfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c101101039.atkfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c101101039.tgfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101101039.atkfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c101101039.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
......
...@@ -35,12 +35,11 @@ function c101101042.destg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -35,12 +35,11 @@ function c101101042.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c101101042.desop(e,tp,eg,ep,ev,re,r,rp) function c101101042.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.HintSelection(g)
local sg=g:Select(tp,1,1,nil) Duel.Destroy(g,REASON_EFFECT)
Duel.HintSelection(sg)
Duel.Destroy(sg,REASON_EFFECT)
end end
end end
function c101101042.eqfilter(c,ec,tp) function c101101042.eqfilter(c,ec,tp)
......
...@@ -46,7 +46,8 @@ function c101101045.ovfilter(c) ...@@ -46,7 +46,8 @@ function c101101045.ovfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsRace(RACE_BEAST) and c:IsCanOverlay() return (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsRace(RACE_BEAST) and c:IsCanOverlay()
end end
function c101101045.ovtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101101045.ovtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and Duel.IsExistingMatchingCard(c101101045.ovfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,e:GetHandler()) end if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(c101101045.ovfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,e:GetHandler()) end
end end
function c101101045.ovop(e,tp,eg,ep,ev,re,r,rp) function c101101045.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -48,7 +48,8 @@ end ...@@ -48,7 +48,8 @@ end
function c101101047.spfilter(c,e,tp) function c101101047.spfilter(c,e,tp)
return c:IsLevelBelow(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c101101047.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101101047.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101101047.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp)>0 if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingTarget(c101101047.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c101101047.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -59,6 +59,7 @@ function c101101049.thfilter1(c) ...@@ -59,6 +59,7 @@ function c101101049.thfilter1(c)
end end
function c101101049.target1(e,tp,eg,ep,ev,re,r,rp,chk) function c101101049.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101101049.thfilter1,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c101101049.thfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c101101049.activate1(e,tp,eg,ep,ev,re,r,rp) function c101101049.activate1(e,tp,eg,ep,ev,re,r,rp)
...@@ -84,6 +85,7 @@ function c101101049.thfilter2(c) ...@@ -84,6 +85,7 @@ function c101101049.thfilter2(c)
end end
function c101101049.target2(e,tp,eg,ep,ev,re,r,rp,chk) function c101101049.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101101049.thfilter2,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c101101049.thfilter2,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c101101049.activate2(e,tp,eg,ep,ev,re,r,rp) function c101101049.activate2(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -70,7 +70,8 @@ function c101101051.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,7 +70,8 @@ function c101101051.desop(e,tp,eg,ep,ev,re,r,rp)
end end
function c101101051.tgcon(e,tp,eg,ep,ev,re,r,rp) function c101101051.tgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_FZONE) and c:GetPreviousControler()==tp and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_FZONE) and c:GetPreviousControler()==tp
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp
end end
function c101101051.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101101051.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_EXTRA,0,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,LOCATION_EXTRA,0,nil)
......
...@@ -69,7 +69,7 @@ function c101101066.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,7 +69,7 @@ function c101101066.activate(e,tp,eg,ep,ev,re,r,rp)
local l1,l2=e:GetLabel() local l1,l2=e:GetLabel()
if l2==1 and e:IsHasType(EFFECT_TYPE_ACTIVATE) then check=true end if l2==1 and e:IsHasType(EFFECT_TYPE_ACTIVATE) then check=true end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(101101066,2)) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c101101066.thfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,ft,check) local g=Duel.SelectMatchingCard(tp,c101101066.thfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,ft,check)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
...@@ -104,9 +104,7 @@ function c101101066.cfilter(c) ...@@ -104,9 +104,7 @@ function c101101066.cfilter(c)
return c:IsSetCard(0x12c) and c:IsAbleToHand() return c:IsSetCard(0x12c) and c:IsAbleToHand()
end end
function c101101066.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101101066.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then return Duel.IsExistingMatchingCard(c101101066.cfilter,tp,LOCATION_DECK,0,1,nil) end
return Duel.IsExistingMatchingCard(c101101066.cfilter,tp,LOCATION_DECK,0,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c101101066.thop(e,tp,eg,ep,ev,re,r,rp) function c101101066.thop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -29,7 +29,7 @@ end ...@@ -29,7 +29,7 @@ end
function c101101069.activate(e,tp,eg,ep,ev,re,r,rp) function c101101069.activate(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 tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 and tc:IsFaceup() and tc:IsCode(66889139) then if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 and tc:IsCode(66889139) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
......
...@@ -35,7 +35,7 @@ function c101101070.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,7 +35,7 @@ function c101101070.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101101070.tgfilter,tp,LOCATION_EXTRA,0,1,1,nil,atk) local g=Duel.SelectMatchingCard(tp,c101101070.tgfilter,tp,LOCATION_EXTRA,0,1,1,nil,atk)
local gc=g:GetFirst() local gc=g:GetFirst()
if gc and Duel.SendtoGrave(gc,REASON_EFFECT)~=0 and gc:IsLocation(LOCATION_GRAVE) and tc:IsRelateToEffect(e) then if gc and Duel.SendtoGrave(gc,REASON_EFFECT)~=0 and gc:IsLocation(LOCATION_GRAVE) then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
......
...@@ -29,7 +29,9 @@ function c101101071.spfilter(c,e,tp) ...@@ -29,7 +29,9 @@ function c101101071.spfilter(c,e,tp)
return (c:IsSetCard(0x249) and c:IsType(TYPE_MONSTER) or c:IsCode(101101011)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return (c:IsSetCard(0x249) and c:IsType(TYPE_MONSTER) or c:IsCode(101101011)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c101101071.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101101071.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c101101071.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101101071.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c101101071.spop(e,tp,eg,ep,ev,re,r,rp) function c101101071.spop(e,tp,eg,ep,ev,re,r,rp)
...@@ -47,6 +49,7 @@ function c101101071.thfilter(c,e,tp) ...@@ -47,6 +49,7 @@ function c101101071.thfilter(c,e,tp)
end end
function c101101071.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101101071.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101101071.thfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c101101071.thfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_GRAVE)
end end
......
...@@ -22,6 +22,7 @@ function c101101074.initial_effect(c) ...@@ -22,6 +22,7 @@ function c101101074.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCost(c101101074.descost) e2:SetCost(c101101074.descost)
e2:SetTarget(c101101074.destg) e2:SetTarget(c101101074.destg)
......
...@@ -33,10 +33,8 @@ function c101101077.cfilter(c) ...@@ -33,10 +33,8 @@ function c101101077.cfilter(c)
end end
function c101101077.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101101077.target(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 if chk==0 then return Duel.IsExistingTarget(c101101077.cfilter,tp,LOCATION_MZONE,0,1,nil)
return Duel.IsExistingTarget(c101101077.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) end
and Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local g1=Duel.SelectTarget(tp,c101101077.cfilter,tp,LOCATION_MZONE,0,1,1,nil) local g1=Duel.SelectTarget(tp,c101101077.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
...@@ -54,9 +52,8 @@ function c101101077.spfilter(c,e,tp) ...@@ -54,9 +52,8 @@ function c101101077.spfilter(c,e,tp)
return c:IsSetCard(0x133) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE) return c:IsSetCard(0x133) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end end
function c101101077.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101101077.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c101101077.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) and Duel.IsExistingMatchingCard(c101101077.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end end
function c101101077.spop(e,tp,eg,ep,ev,re,r,rp) function c101101077.spop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -19,10 +19,8 @@ function c101101079.spfilter(c,e,tp) ...@@ -19,10 +19,8 @@ function c101101079.spfilter(c,e,tp)
end end
function c101101079.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101101079.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c101101079.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c101101079.spfilter(chkc,e,tp) end
if chk==0 then if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
return Duel.IsExistingTarget(c101101079.spfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp) and Duel.IsExistingTarget(c101101079.spfilter,tp,0,LOCATION_GRAVE,1,nil,e,tp) end
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101101079.spfilter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c101101079.spfilter,tp,0,LOCATION_GRAVE,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)
......
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