Commit 6a36f1b8 authored by mercury233's avatar mercury233

fix

parent 3c2d535d
......@@ -66,25 +66,15 @@ end
function c100257021.thfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsAbleToHand()
end
function c100257021.fselect(g)
if g:GetClassCount(Card.GetLevel)==g:GetCount() then
Duel.SetSelectedCard(g)
return true
else return false end
end
function c100257021.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c100257021.thfilter,tp,LOCATION_GRAVE,0,nil)
if chk==0 then return g:GetClassCount(Card.GetCode)>=2 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_GRAVE)
if chk==0 then return Duel.IsExistingMatchingCard(c100257021.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c100257021.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c100257021.thfilter),tp,LOCATION_GRAVE,0,nil)
if g:GetClassCount(Card.GetLevel)>=2 then
local sg=g:SelectSubGroup(tp,c100257021.fselect,false,2,2)
if g:GetCount()==2 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local sg=g:SelectSubGroup(tp,aux.dncheck,false,1,2)
if sg then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
......@@ -59,8 +59,8 @@ end
function c100257051.splimit(e,c,tp,sumtp,sumpos)
return bit.band(sumtp,SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK
end
function c100257051.rlfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>0
function c100257051.rselect(g,tp)
return Duel.GetMZoneCount(tp,g)>0
end
function c100257051.fselect(g,tp)
if Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,g) then
......@@ -78,7 +78,7 @@ function c100257051.rlcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetReleaseGroup(tp):Filter(Card.IsType,nil,TYPE_MONSTER)
local ct=g:GetCount()
local b1=ct>0 and g:CheckSubGroup(c100257051.fselect,1,1,tp)
local b2=ct>1 and g:IsExists(c100257051.rlfilter,1,nil,tp)
local b2=ct>1 and g:CheckSubGroup(c100257051.rselect,2,2,tp)
and Duel.IsExistingMatchingCard(c100257051.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
local b3=ct>2 and Duel.IsExistingMatchingCard(c100257051.thfilter,tp,LOCATION_GRAVE,0,1,nil)
if chk==0 then return b1 or b2 or b3 end
......@@ -108,17 +108,8 @@ function c100257051.rlcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
rg=g:SelectSubGroup(tp,c100257051.fselect,false,1,1,tp)
elseif opval[op]==2 then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
rg=g:FilterSelect(tp,c100257051.rlfilter,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local rg2=g:Select(tp,1,1,g1:GetFirst())
rg:Merge(rg2)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
rg=g:Select(tp,2,2,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
rg=g:SelectSubGroup(tp,c100257051.rselect,false,2,2,tp)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
rg=g:Select(tp,3,3,nil)
......
......@@ -22,10 +22,10 @@ function c100257076.mfilter(c)
end
function c100257076.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c100257076.stfilter,tp,LOCATION_EXTRA,0,1,nil,c:GetCode())
and Duel.IsExistingMatchingCard(c100257076.stfilter,tp,LOCATION_EXTRA+LOCATION_DECK,0,1,nil,c:GetCode())
end
function c100257076.stfilter(c,code)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x10ec) and not c:IsCode(code)
return (c:IsFaceup() or c:IsLocation(LOCATION_DECK)) and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0x10ec) and not c:IsCode(code)
end
function c100257076.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) and c100257076.spfilter(chkc,e,tp) end
......@@ -40,7 +40,7 @@ function c100257076.spop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0
and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then
local code=tc:GetCode()
local g=Duel.SelectMatchingCard(tp,c100257076.stfilter,tp,LOCATION_EXTRA,0,1,1,nil,code)
local g=Duel.SelectMatchingCard(tp,c100257076.stfilter,tp,LOCATION_EXTRA+LOCATION_DECK,0,1,1,nil,code)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
......
......@@ -62,7 +62,7 @@ end
function c100259025.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_MZONE
and re:GetHandler():IsRelateToEffect(re) and not re:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
and re:GetHandler():IsAbleToChangeControler() and Duel.SelectYesNo(tp,aux.Stringid(100259025,2)) then
and re:GetHandler():IsAbleToChangeControler() then
Duel.GetControl(re:GetHandler(),tp)
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