Commit 89e03d53 authored by Nemo Ma's avatar Nemo Ma

fix

parent 0f2c01e9
......@@ -48,15 +48,14 @@ function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp,e:GetLabel())
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK)
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp,e:GetLabel())
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end
end
end
end
function cm.cfilter(c,tp)
return c:IsSetCard(0x24) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:IsReason(REASON_EFFECT)
end
......
......@@ -186,7 +186,7 @@ function c87498781.pspfil(c,e,tp)
local rsc=rc:GetRightScale()
if lsc>rsc then lsc,rsc=rsc,lsc end
local lv=c:GetOriginalLevel()
return c:IsSetCard(0x143) and c:IsType(TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_PENDULUM,tp,true,false) and lv>0 and lv>lsc and lv<rsc
return c:IsSetCard(0x143) and c:IsType(TYPE_TRAP) and c:IsType(TYPE_CONTINUOUS) and Duel.IsPlayerCanSpecialSummonMonster(tp,c:GetCode(),0x143,TYPES_NORMAL_TRAP_MONSTER,c:GetTextAttack(),c:GetTextDefense(),c:GetOriginalLevel(),c:GetOriginalRace(),c:GetOriginalAttribute(),POS_FACEUP,tp,SUMMON_TYPE_PENDULUM) and lv>0 and lv>lsc and lv<rsc
end
function c87498781.psptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c87498781.pspfil,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 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