Commit 7dfedd2e authored by POLYMER's avatar POLYMER

fix

parent 7af7fc5e
...@@ -5,7 +5,6 @@ function c13015713.initial_effect(c) ...@@ -5,7 +5,6 @@ function c13015713.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,13015713)
e1:SetOperation(c13015713.activate) e1:SetOperation(c13015713.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--change effect type --change effect type
...@@ -31,11 +30,12 @@ function c13015713.thfilter(c) ...@@ -31,11 +30,12 @@ function c13015713.thfilter(c)
end end
function c13015713.activate(e,tp,eg,ep,ev,re,r,rp) function c13015713.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c13015713.thfilter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(c13015713.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(13015713,0)) then if g:GetCount()>0 and Duel.GetFlagEffect(tp,13015713)==0 and Duel.SelectYesNo(tp,aux.Stringid(13015713,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
Duel.RegisterFlagEffect(tp,13015713,RESET_PHASE+PHASE_END,0,1)
end end
end end
if not aux.sh_qh_qechk then if not aux.sh_qh_qechk then
......
...@@ -74,12 +74,15 @@ end ...@@ -74,12 +74,15 @@ end
function c13015724.splimit(e,c) function c13015724.splimit(e,c)
return not (c:IsRace(RACE_AQUA) and c:IsAttribute(ATTRIBUTE_WATER)) return not (c:IsRace(RACE_AQUA) and c:IsAttribute(ATTRIBUTE_WATER))
end end
function c13015724.spfilter(c,e)
return not c:IsImmuneToEffect(e)
end
function c13015724.spcon(e,tp,eg,ep,ev,re,r,rp) function c13015724.spcon(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end end
function c13015724.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c13015724.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsReleasable,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c13015724.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,e) end
local g=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c13015724.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,e)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c13015724.cfilter(c) function c13015724.cfilter(c)
......
...@@ -29,10 +29,13 @@ local e2=Effect.CreateEffect(c) ...@@ -29,10 +29,13 @@ local e2=Effect.CreateEffect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
c13090003.star_knight_summon_effect=e2 c13090003.star_knight_summon_effect=e2
end end
function cm.spfilter(c,e)
return not c:IsImmuneToEffect(e)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsReleasable,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,e) end
local tc=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil) local tc=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,e)
Duel.Release(tc,REASON_COST) Duel.Release(tc,REASON_COST)
end end
function cm.thfilter(c) function cm.thfilter(c)
...@@ -78,7 +81,7 @@ end ...@@ -78,7 +81,7 @@ end
function cm.setop(e,tp,eg,ep,ev,re,r,rp) function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.penfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.penfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc:IsType(TYPE_PENDULUM) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then if tc:IsType(TYPE_PENDULUM) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
......
...@@ -8,6 +8,7 @@ function s.initial_effect(c) ...@@ -8,6 +8,7 @@ function s.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTarget(s.tg) e1:SetTarget(s.tg)
...@@ -56,7 +57,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +57,7 @@ function s.op(e,tp,eg,ep,ev,re,r,rp)
e4:SetTarget(function(e,c) e4:SetTarget(function(e,c)
return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA) return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA)
end) end)
e4:SetReset(RESET_EVENT+RESETS_STANDARD) e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e4) tc:RegisterEffect(e4)
local lv1=c:GetLevel() local lv1=c:GetLevel()
...@@ -70,21 +71,16 @@ function s.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,21 +71,16 @@ function s.op(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
function s.distg(e,c)
return not c:IsType(TYPE_SYNCHRO)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local tc=c:GetBattleTarget() local tc=Duel.GetAttacker()
if chk==0 then return tc and tc:IsFaceup() and not tc:IsType(TYPE_TUNER) end if tc==c then tc=Duel.GetAttackTarget() end
local g=Group.FromCards(c,tc) if chk==0 then return tc and tc:IsFaceup() and not tc:IsType(TYPE_SYNCHRO) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
end end
function s.desop(e,tp,eg,ep,ev,re,r,rp) function s.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=c:GetBattleTarget() local tc=Duel.GetAttacker()
if c:IsRelateToBattle() and tc:IsRelateToBattle() then if tc==c then tc=Duel.GetAttackTarget() end
Duel.Destroy(tc,REASON_EFFECT) if tc:IsRelateToBattle() then Duel.Destroy(tc,REASON_EFFECT) 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