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)
return re:GetHandler()~=e:GetHandler()
end
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
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
......@@ -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)
if g:GetCount()>0 then
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g3:Select(tp,1,1,nil)
......
......@@ -101,6 +101,7 @@ function s.effop(e,tp,eg,ep,ev,re,r,rp)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(s,id+40000)
e2:SetTarget(s.cptg)
e2:SetOperation(s.cpop)
rc:RegisterEffect(e2,true)
......
......@@ -65,11 +65,9 @@ function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
if Duel.Destroy(tg,REASON_EFFECT)>0 then
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,tg:GetCount()+1,nil)
Duel.Destroy(g,REASON_EFFECT)
else
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.Destroy(tg,REASON_EFFECT)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,tg:GetCount()+1,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
if Duel.IsExistingMatchingCard(cm.cfilter2,tp,LOCATION_MZONE+LOCATION_GRAVE,0,3,nil) then
......
......@@ -68,7 +68,7 @@ function cm.lcheck(g,lc)
end
function cm.condition(e)
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
function cm.mvcon(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
......
......@@ -77,7 +77,7 @@ end
function cm.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
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)
local tc=g:Select(tp,1,1,nil):GetFirst()
if not tc:IsImmuneToEffect(e) then
......@@ -107,7 +107,7 @@ end
function cm.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
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)
local tc=g:Select(tp,1,1,nil):GetFirst()
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