Commit 61cd7876 authored by Nemo Ma's avatar Nemo Ma

fix

parent 053e64d0
...@@ -7,37 +7,36 @@ function cm.initial_effect(c) ...@@ -7,37 +7,36 @@ function cm.initial_effect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetTarget(cm.destg) e1:SetTarget(cm.destg)
e1:SetOperation(cm.desop) e1:SetOperation(cm.desop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function cm.desfilter(c,tp) function cm.desfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>0 and c:IsType(TYPE_MONSTER) and c:IsRace(RACE_BEASTWARRIOR) and c:IsAttack(1950) return (c:IsLocation(LOCATION_MZONE) or Duel.GetLocationCount(tp,LOCATION_MZONE)>0) and c:IsType(TYPE_MONSTER) and c:IsRace(RACE_BEASTWARRIOR)
end end
function cm.tgfilter(c) function cm.tgfilter(c)
return c:IsAbleToGrave() and c:IsType(TYPE_MONSTER) and c:IsRace(RACE_BEASTWARRIOR) and c:IsAttack(1950) return c:IsAbleToGrave() and c:IsType(TYPE_MONSTER) and c:IsRace(RACE_BEASTWARRIOR) and c:IsAttack(1950)
end end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and cm.desfilter(chkc,tp) end if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)and Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil,tp) and Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
and Duel.IsExistingTarget(cm.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil,tp) and Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,cm.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function cm.desop(e,tp,eg,ep,ev,re,r,rp) function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then local g=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil,tp)
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if #g>0 and Duel.Destroy(g,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) if (c:IsRelateToEffect(e) or c==Duel.GetOperatedGroup():GetFirst()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) then
local tg=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil) if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
if tg:GetCount()>0 then Duel.BreakEffect()
Duel.SendtoGrave(tg,REASON_EFFECT) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if tg:GetCount()>0 then
Duel.SendtoGrave(tg,REASON_EFFECT)
end
end end
end end
end end
......
...@@ -16,7 +16,9 @@ end ...@@ -16,7 +16,9 @@ end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CARDTYPE)
Duel.SetTargetParam(Duel.SelectOption(tp,1057,1056,1063,1073,1074,aux.Stringid(id,0))) local op=Duel.SelectOption(tp,1057,1056,1063,1345)
if op==3 then op=Duel.SelectOption(tp,1073,1074,1076)+3 end
Duel.SetTargetParam(op)
end end
function s.operation(e,tp,eg,ep,ev,re,r,rp) function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -27,7 +27,7 @@ function cm.initial_effect(c) ...@@ -27,7 +27,7 @@ function cm.initial_effect(c)
e2:SetCountLimit(1,m+1000) e2:SetCountLimit(1,m+1000)
e2:SetHintTiming(TIMING_MAIN_END,0) e2:SetHintTiming(TIMING_MAIN_END,0)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetCondition(cm.condition) e2:SetCondition(cm.condition1)
e2:SetOperation(cm.actop) e2:SetOperation(cm.actop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -52,7 +52,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,7 +52,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
end end
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 return Duel.GetCurrentPhase()==PHASE_MAIN1
end end
function cm.actop(e,tp,eg,ep,ev,re,r,rp) function cm.actop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -97,15 +97,12 @@ function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -97,15 +97,12 @@ function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_DECK,0,1,nil) end
end end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp) function cm.tdtg(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_DECK,0,nil) local g=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then local tc=g:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2)) if tc then
local tc=g:Select(tp,1,1,nil):GetFirst() Duel.ShuffleDeck(tp)
if tc:IsLocation(LOCATION_DECK) then Duel.MoveSequence(tc,SEQ_DECKTOP)
Duel.ShuffleDeck(tp) Duel.ConfirmDecktop(tp,1)
Duel.MoveSequence(tc,0)
Duel.ConfirmDecktop(tp,1)
end
end end
end end
--王冠圣域的圣佑40011094 --王冠圣域的圣佑
local m=40009774 local m=40011094
local cm=_G["c"..m] local cm=_G["c"..m]
cm.named_with_KeterSanctuary=1 cm.named_with_KeterSanctuary=1
function cm.KeterSanctuary(c) function cm.KeterSanctuary(c)
......
...@@ -39,7 +39,7 @@ function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -39,7 +39,7 @@ function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function cm.thfilter(c,code) function cm.thfilter(c,code)
return not c:IsCode(code) and c:IsAbleToHand() return c:IsSetCard(0x3b26) and c:IsType(TYPE_MONSTER) and not c:IsCode(code) and c:IsAbleToHand()
end end
function cm.desop(e,tp,eg,ep,ev,re,r,rp) function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -44,7 +44,6 @@ function c98920001.initial_effect(c) ...@@ -44,7 +44,6 @@ function c98920001.initial_effect(c)
e5:SetType(EFFECT_TYPE_IGNITION) e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetCost(aux.bfgcost) e5:SetCost(aux.bfgcost)
e5:SetCountLimit(1,98931001) e5:SetCountLimit(1,98931001)
e5:SetCondition(c98920001.ctcon)
e5:SetTarget(c98920001.cttg) e5:SetTarget(c98920001.cttg)
e5:SetOperation(c98920001.ctop) e5:SetOperation(c98920001.ctop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
......
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