Commit 261f9df0 authored by Huangnan's avatar Huangnan

fix

parent 097b9b5c
...@@ -58,7 +58,7 @@ function s.stcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,7 +58,7 @@ function s.stcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler()~=e:GetHandler() return re:GetHandler()~=e:GetHandler()
end end
function s.thfilter(c) function s.thfilter(c)
return c:IsSetCard(0x32a1) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0x32a1,0x52a1) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function s.sttg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
...@@ -92,7 +92,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,7 +92,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,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)
local g3=Duel.GetMatchingGroup(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,nil,nil) local g3=Duel.GetMatchingGroup(Card.IsXyzSummonable,tp,LOCATION_EXTRA,0,nil)
if g3:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then if g3:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g3:Select(tp,1,1,nil) local tg=g3:Select(tp,1,1,nil)
......
...@@ -101,6 +101,7 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp) ...@@ -101,6 +101,7 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp)
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(s,id+40000)
e2:SetTarget(s.cptg) e2:SetTarget(s.cptg)
e2:SetOperation(s.cpop) e2:SetOperation(s.cpop)
rc:RegisterEffect(e2,true) rc:RegisterEffect(e2,true)
......
...@@ -65,11 +65,9 @@ function cm.damop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,11 +65,9 @@ function cm.damop(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 tg=g:Filter(Card.IsRelateToEffect,nil,e) local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then if tg:GetCount()>0 then
if Duel.Destroy(tg,REASON_EFFECT)>0 then Duel.Destroy(tg,REASON_EFFECT)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,tg:GetCount()+1,nil) local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,tg:GetCount()+1,nil)
Duel.Destroy(g,REASON_EFFECT) if g:GetCount()>0 then
else
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
if Duel.IsExistingMatchingCard(cm.cfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,3,nil) then if Duel.IsExistingMatchingCard(cm.cfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,3,nil) then
......
...@@ -68,7 +68,7 @@ function cm.lcheck(g,lc) ...@@ -68,7 +68,7 @@ function cm.lcheck(g,lc)
end end
function cm.condition(e) function cm.condition(e)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE return (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ((Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.IsPlayerAffectedByEffect(tp,18700468))
end end
function cm.mvcon(e,tp,eg,ep,ev,re,r,rp) function cm.mvcon(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
......
...@@ -77,7 +77,7 @@ end ...@@ -77,7 +77,7 @@ end
function cm.posop(e,tp,eg,ep,ev,re,r,rp) function cm.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.matfilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler(),c) local g=Duel.GetMatchingGroup(cm.matfilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler(),c)
if #g>0 then if #g>0 and c:IsLocation(LOCATION_ONFIELD) and c:IsRelateToEffect(e) then
Duel.Hint(HINTMSG_SELECT,tp,HINTMSG_OPERATECARD) Duel.Hint(HINTMSG_SELECT,tp,HINTMSG_OPERATECARD)
local tc=g:Select(tp,1,1,nil):GetFirst() local tc=g:Select(tp,1,1,nil):GetFirst()
if not tc:IsImmuneToEffect(e) then if not tc:IsImmuneToEffect(e) then
...@@ -107,7 +107,7 @@ end ...@@ -107,7 +107,7 @@ end
function cm.ovop(e,tp,eg,ep,ev,re,r,rp) function cm.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.matfilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler(),c) local g=Duel.GetMatchingGroup(cm.matfilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler(),c)
if #g>0 then if #g>0 and c:IsLocation(LOCATION_ONFIELD) and c:IsRelateToEffect(e) then
Duel.Hint(HINTMSG_SELECT,tp,HINTMSG_OPERATECARD) Duel.Hint(HINTMSG_SELECT,tp,HINTMSG_OPERATECARD)
local tc=g:Select(tp,1,1,nil):GetFirst() local tc=g:Select(tp,1,1,nil):GetFirst()
if not tc:IsImmuneToEffect(e) then if not tc:IsImmuneToEffect(e) then
......
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