Commit 78ebe5af authored by DailyShana's avatar DailyShana

fix

other MACR cards except the fustion proc of Zarc
parent b9be9487
......@@ -49,7 +49,7 @@ function c13035077.thfilter(c)
return c:IsSetCard(0xf9) and c:IsAbleToHand()
end
function c13035077.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler())
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler())
and Duel.IsExistingMatchingCard(c13035077.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
......@@ -57,7 +57,7 @@ end
function c13035077.desop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler())
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler())
if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c13035077.thfilter,tp,LOCATION_DECK,0,1,1,nil)
......
......@@ -346,9 +346,8 @@ function c13331639.ddfilter(c,tp)
return c:IsControler(1-tp) and c:IsPreviousLocation(LOCATION_DECK)
end
function c13331639.ddtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=nil
if eg then g=eg:Filter(c13331639.ddfilter,nil,tp) end
if chk==0 then return g and g:GetCount()>0 end
local g=eg:Filter(c13331639.ddfilter,nil,tp)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c13331639.ddop(e,tp,eg,ep,ev,re,r,rp)
......@@ -376,9 +375,9 @@ function c13331639.spfilter(c,e,tp)
return c:IsSetCard(0x20f8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c13331639.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c13331639.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil,e,tp)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c13331639.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function c13331639.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
......
......@@ -70,7 +70,5 @@ function c14970113.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c14970113.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetOverlayCount()>0 then
c:RemoveOverlayCard(tp,1,1,REASON_EFFECT)
end
end
......@@ -46,7 +46,7 @@ function c20155904.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetOriginalRace()==RACE_BEASTWARRIOR
and not c:IsStatus(STATUS_BATTLE_DESTROYED) and ep==1-tp
and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev)
and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)
and Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):IsContains(c)
end
......@@ -60,5 +60,5 @@ function c20155904.distg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c20155904.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
Duel.NegateActivation(ev)
end
--真竜剣皇マスターP
function c21377582.initial_effect(c)
--summon with s & t
--summon with s/t
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(21377582,0))
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -47,34 +47,28 @@ end
function c21377582.otcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c21377582.otfilter,tp,LOCATION_ONFIELD,0,nil)
return (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and mg:GetCount()>=2)
or (Duel.CheckTribute(c,1) and mg:GetCount()>=1)
local mg=Duel.GetMatchingGroup(c21377582.otfilter,tp,LOCATION_SZONE,0,nil)
return c:GetLevel()>6 and minc<=2
and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and mg:GetCount()>=2
or Duel.CheckTribute(c,1) and mg:GetCount()>=1)
or c:GetLevel()>4 and c:GetLevel()<=6 and minc<=1
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and mg:GetCount()>=1
end
function c21377582.otop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c21377582.otfilter,tp,LOCATION_ONFIELD,0,nil)
local ct=2
local g=Group.CreateGroup()
if Duel.GetTributeCount(c)<ct then
local mg=Duel.GetMatchingGroup(c21377582.otfilter,tp,LOCATION_SZONE,0,nil)
local b1=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and mg:GetCount()>=2
local b2=Duel.CheckTribute(c,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g2=mg:Select(tp,ct-Duel.GetTributeCount(c),ct-Duel.GetTributeCount(c),nil)
g:Merge(g2)
mg:Sub(g2)
ct=ct-g2:GetCount()
end
if ct>0 and Duel.GetTributeCount(c)>=ct and mg:GetCount()>0
and (g:GetCount()==0 or Duel.SelectYesNo(tp,aux.Stringid(21377582,1))) then
local ect=ct
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then ect=ect-1 end
ect=math.min(mg:GetCount(),ect)
local g=mg:Select(tp,1,1,nil)
if c:GetLevel()>6 then
local g2=nil
if b1 and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(21377582,1))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g3=mg:Select(tp,1,ect,nil)
g:Merge(g3)
ct=ct-g3:GetCount()
g2=mg:Select(tp,1,1,g:GetFirst())
else
g2=Duel.SelectTribute(tp,c,1,1)
end
if ct>0 then
local g4=Duel.SelectTribute(tp,c,ct,ct)
g:Merge(g4)
g:Merge(g2)
end
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
......
--真竜戦士イグニスH
function c22499034.initial_effect(c)
--summon with 1 tribute
--summon with s/t
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22499034,0))
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -29,12 +29,12 @@ end
function c22499034.otcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
return c:GetLevel()>4 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c22499034.otfilter,tp,LOCATION_ONFIELD,0,1,nil)
return c:GetLevel()>4 and minc<=1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c22499034.otfilter,tp,LOCATION_SZONE,0,1,nil)
end
function c22499034.otop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=Duel.SelectMatchingCard(tp,c22499034.otfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
local sg=Duel.SelectMatchingCard(tp,c22499034.otfilter,tp,LOCATION_SZONE,0,1,1,nil)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
......@@ -43,7 +43,7 @@ function c22499034.thcon(e,tp,eg,ep,ev,re,r,rp)
end
function c22499034.thfilter(c,tp)
return c:IsSetCard(0xf9) and c:GetType()==0x20002
and (c:IsAbleToHand() or (c:GetActivateEffect():IsActivatable(tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0))
and (c:IsAbleToHand() or c:GetActivateEffect():IsActivatable(tp))
end
function c22499034.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22499034.thfilter,tp,LOCATION_DECK,0,1,nil,tp) end
......@@ -55,7 +55,7 @@ function c22499034.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
if tc then
local b1=tc:IsAbleToHand()
local b2=tc:GetActivateEffect():IsActivatable(tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
local b2=tc:GetActivateEffect():IsActivatable(tp)
if b1 and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(22499034,2))) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
......
......@@ -21,7 +21,7 @@ function c29432356.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_SPSUMMON_PROC)
e3:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetRange(LOCATION_EXTRA)
e3:SetCondition(c29432356.hspcon)
e3:SetOperation(c29432356.hspop)
......
......@@ -40,9 +40,9 @@ function c33280639.filter(c,e,tp)
return c:IsCode(11790356) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33280639.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c33280639.filter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,nil,e,tp)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c33280639.filter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA+LOCATION_GRAVE)
end
function c33280639.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
......
......@@ -39,9 +39,9 @@ function c34302287.condition(e,tp,eg,ep,ev,re,r,rp)
end
function c34302287.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c34302287.activate(e,tp,eg,ep,ev,re,r,rp)
......@@ -61,27 +61,23 @@ function c34302287.eqcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c34302287.efilter(c,e)
return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsCanBeEffectTarget(e)
function c34302287.efilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_NORMAL)
and Duel.IsExistingMatchingCard(c34302287.eqfilter,tp,LOCATION_SZONE,0,1,nil,c)
end
function c34302287.eqfilter(c,g)
return c:IsFaceup() and c:IsType(TYPE_EQUIP) and c:IsSetCard(0xfa) and g:IsExists(c34302287.eqcheck,1,nil,c)
end
function c34302287.eqcheck(c,ec)
return ec:CheckEquipTarget(c)
function c34302287.eqfilter(c,tc)
return c:IsFaceup() and c:IsType(TYPE_EQUIP) and c:IsSetCard(0xfa) and c:CheckEquipTarget(tc)
end
function c34302287.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(c34302287.efilter,tp,LOCATION_MZONE,0,nil,e)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c34302287.efilter(chkc,e) end
if chk==0 then return g:GetCount()>0 and Duel.IsExistingMatchingCard(c34302287.eqfilter,tp,LOCATION_SZONE,0,1,nil,g) end
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c34302287.efilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c34302287.efilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c34302287.efilter,tp,LOCATION_MZONE,0,1,1,nil,e)
Duel.SelectTarget(tp,c34302287.efilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
end
function c34302287.eqop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=tg:GetFirst()
local tc=Duel.GetFirstTarget()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c34302287.eqfilter,tp,LOCATION_SZONE,0,nil,tg)
local g=Duel.GetMatchingGroup(c34302287.eqfilter,tp,LOCATION_SZONE,0,nil,tc)
local eq=g:GetFirst()
while eq do
Duel.Equip(tp,eq,tc,true,true)
......
......@@ -134,9 +134,9 @@ function c35125879.descon(e,tp,eg,ep,ev,re,r,rp)
end
function c35125879.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c35125879.desop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -65,7 +65,6 @@ function c41375811.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c41375811.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
......
......@@ -42,41 +42,33 @@ function c57761191.initial_effect(c)
c:RegisterEffect(e5)
end
function c57761191.otfilter(c)
return c:IsType(TYPE_CONTINUOUS) and not c:IsType(TYPE_MONSTER) and c:IsReleasable()
return c:IsType(TYPE_CONTINUOUS) and c:IsReleasable()
end
function c57761191.ttcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c57761191.otfilter,tp,LOCATION_ONFIELD,0,nil)
return (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and mg:GetCount()>=3)
or (Duel.CheckTribute(c,1) and mg:GetCount()>=2)
or (Duel.CheckTribute(c,2) and mg:GetCount()>=1)
or (Duel.CheckTribute(c,3))
local mg=Duel.GetMatchingGroup(c57761191.otfilter,tp,LOCATION_SZONE,0,nil)
return minc<=3 and (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and mg:GetCount()>=3
or Duel.CheckTribute(c,1) and mg:GetCount()>=2
or Duel.CheckTribute(c,2) and mg:GetCount()>=1
or Duel.CheckTribute(c,3))
end
function c57761191.ttop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c57761191.otfilter,tp,LOCATION_ONFIELD,0,nil)
local ct=3
local mg=Duel.GetMatchingGroup(c57761191.otfilter,tp,LOCATION_SZONE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Group.CreateGroup()
if Duel.GetTributeCount(c)<ct then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g2=mg:Select(tp,ct-Duel.GetTributeCount(c),ct-Duel.GetTributeCount(c),nil)
g:Merge(g2)
mg:Sub(g2)
ct=ct-g2:GetCount()
end
if ct>0 and Duel.GetTributeCount(c)>=ct and mg:GetCount()>0
and Duel.SelectYesNo(tp,aux.Stringid(57761191,0)) then
local ect=ct
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then ect=ect-1 end
ect=math.min(mg:GetCount(),ect)
local ct=3
while mg:GetCount()>0 and (ct>1 and Duel.CheckTribute(c,ct-1) or ct>0 and ft>0)
and (not Duel.CheckTribute(c,ct) or Duel.SelectYesNo(tp,aux.Stringid(57761191,0))) do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g3=mg:Select(tp,1,ect,nil)
g:Merge(g3)
ct=ct-g3:GetCount()
local g1=mg:Select(tp,1,1,nil)
g:Merge(g1)
mg:Sub(g1)
ct=ct-1
end
if ct>0 then
local g4=Duel.SelectTribute(tp,c,ct,ct)
g:Merge(g4)
if g:GetCount()<3 then
local g2=Duel.SelectTribute(tp,c,3-g:GetCount(),3-g:GetCount())
g:Merge(g2)
end
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
......
--真竜機士ダイナマイトK
function c58984738.initial_effect(c)
--summon with 1 tribute
--summon with s/t
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(58984738,0))
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -29,12 +29,12 @@ end
function c58984738.otcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
return c:GetLevel()>4 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c58984738.otfilter,tp,LOCATION_ONFIELD,0,1,nil)
return c:GetLevel()>4 and minc<=1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c58984738.otfilter,tp,LOCATION_SZONE,0,1,nil)
end
function c58984738.otop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=Duel.SelectMatchingCard(tp,c58984738.otfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
local sg=Duel.SelectMatchingCard(tp,c58984738.otfilter,tp,LOCATION_SZONE,0,1,1,nil)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
......@@ -43,7 +43,7 @@ function c58984738.thcon(e,tp,eg,ep,ev,re,r,rp)
end
function c58984738.thfilter(c,tp)
return c:IsSetCard(0xf9) and c:GetType()==0x20004
and (c:IsAbleToHand() or (c:GetActivateEffect():IsActivatable(tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0))
and (c:IsAbleToHand() or c:GetActivateEffect():IsActivatable(tp))
end
function c58984738.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c58984738.thfilter,tp,LOCATION_DECK,0,1,nil,tp) end
......@@ -55,7 +55,7 @@ function c58984738.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
if tc then
local b1=tc:IsAbleToHand()
local b2=tc:GetActivateEffect():IsActivatable(tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
local b2=tc:GetActivateEffect():IsActivatable(tp)
if b1 and (not b2 or Duel.SelectYesNo(tp,aux.Stringid(58984738,2))) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
......
......@@ -86,29 +86,25 @@ function c61397885.eqcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c61397885.efilter(c,e)
return c:IsFaceup() and c:IsType(TYPE_NORMAL) and c:IsCanBeEffectTarget(e)
function c61397885.efilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_NORMAL)
and Duel.IsExistingMatchingCard(c61397885.eqfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,c)
end
function c61397885.eqfilter(c,g)
return c:IsType(TYPE_EQUIP) and c:IsSetCard(0xfa) and g:IsExists(c61397885.eqcheck,1,nil,c)
end
function c61397885.eqcheck(c,ec)
return ec:CheckEquipTarget(c)
function c61397885.eqfilter(c,tc)
return c:IsType(TYPE_EQUIP) and c:IsSetCard(0xfa) and c:CheckEquipTarget(tc)
end
function c61397885.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(c61397885.efilter,tp,LOCATION_MZONE,0,nil,e)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c61397885.efilter(chkc,e) end
if chk==0 then return g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c61397885.eqfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,g) end
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c61397885.efilter(chkc,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c61397885.efilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c61397885.efilter,tp,LOCATION_MZONE,0,1,1,nil,e)
Duel.SelectTarget(tp,c61397885.efilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
end
function c61397885.eqop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=tg:GetFirst()
local tc=Duel.GetFirstTarget()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c61397885.eqfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,tg)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c61397885.eqfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,tc)
local eq=g:GetFirst()
if eq then
Duel.Equip(tp,eq,tc,true)
......
......@@ -147,9 +147,9 @@ function c61529473.descon(e,tp,eg,ep,ev,re,r,rp)
end
function c61529473.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c61529473.desop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -23,17 +23,7 @@ function c73468603.operation(e,tp,eg,ep,ev,re,r,rp)
g:Remove(Card.IsCode,nil,tg1:GetFirst():GetCode())
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(73468603,1))
local tg2=g:Select(tp,1,1,nil)
local fc1=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
if fc1 then
Duel.SendtoGrave(fc1,REASON_RULE)
Duel.BreakEffect()
end
Duel.SSet(tp,tg1)
local fc2=Duel.GetFieldCard(1-tp,LOCATION_SZONE,5)
if fc2 then
Duel.SendtoGrave(fc2,REASON_RULE)
Duel.BreakEffect()
end
Duel.SSet(1-tp,tg2)
tg1:GetFirst():RegisterFlagEffect(73468603,RESET_EVENT+0x1fe0000,0,1)
tg2:GetFirst():RegisterFlagEffect(73468603,RESET_EVENT+0x1fe0000,0,1)
......
......@@ -36,7 +36,7 @@ function c74580251.activate(e,tp,eg,ep,ev,re,r,rp)
end
function c74580251.repfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xc4) and c:IsLocation(LOCATION_ONFIELD)
and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE)
and c:IsControler(tp)
end
function c74580251.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and aux.exccon(e) and eg:IsExists(c74580251.repfilter,1,nil,tp) end
......
......@@ -73,8 +73,7 @@ function c81109178.damop2(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local c=e:GetHandler()
local ct=c:GetCounter(0x42)
if ct>0 then
c:RemoveCounter(tp,0x42,ct,REASON_EFFECT)
if c:RemoveCounter(tp,0x42,ct,REASON_EFFECT) then
Duel.Damage(p,ct*300,REASON_EFFECT)
end
end
......@@ -66,7 +66,7 @@ function c82821760.ctop(e,tp,eg,ep,ev,re,r,rp)
end
function c82821760.rcttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if e:GetHandler():IsCanRemoveCounter(tp,0x1f,1,REASON_EFFECT) then
if not e:GetHandler():IsCanRemoveCounter(tp,0x1f,1,REASON_EFFECT) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
end
......
......@@ -57,15 +57,8 @@ function c86937530.thop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if Duel.IsChainDisablable(0) then
local sel=1
local g=Duel.GetMatchingGroup(c86937530.cfilter,tp,0,LOCATION_DECK+LOCATION_EXTRA,nil,tc:GetCode())
Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(86937530,2))
if g:GetCount()>0 then
sel=Duel.SelectOption(1-tp,1213,1214)
else
sel=Duel.SelectOption(1-tp,1214)+1
end
if sel==0 then
if g:GetCount()>0 and Duel.SelectYesNo(1-tp,aux.Stringid(86937530,2)) then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local sg=g:Select(1-tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
......
--真竜騎将ドライアスⅢ世
function c94982447.initial_effect(c)
--summon with 1 tribute
--summon with s/t
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(94982447,0))
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -23,16 +23,16 @@ function c94982447.initial_effect(c)
--cannot be target
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(c94982447.tgtg)
e3:SetValue(aux.tgoval)
e3:SetValue(c94982447.indval)
c:RegisterEffect(e3)
--indes
local e4=e3:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetValue(c94982447.indval)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
c:RegisterEffect(e4)
end
function c94982447.otfilter(c)
......@@ -41,12 +41,12 @@ end
function c94982447.otcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
return c:GetLevel()>4 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c94982447.otfilter,tp,LOCATION_ONFIELD,0,1,nil)
return c:GetLevel()>4 and minc<=1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c94982447.otfilter,tp,LOCATION_SZONE,0,1,nil)
end
function c94982447.otop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=Duel.SelectMatchingCard(tp,c94982447.otfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
local sg=Duel.SelectMatchingCard(tp,c94982447.otfilter,tp,LOCATION_SZONE,0,1,1,nil)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
......@@ -61,7 +61,7 @@ end
function c94982447.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c94982447.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c94982447.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
--真竜導士マジェスティM
function c95004025.initial_effect(c)
--summon with 1 tribute
--summon with s/t
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(95004025,0))
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -29,12 +29,12 @@ end
function c95004025.otcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
return c:GetLevel()>4 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c95004025.otfilter,tp,LOCATION_ONFIELD,0,1,nil)
return c:GetLevel()>4 and minc<=1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c95004025.otfilter,tp,LOCATION_SZONE,0,1,nil)
end
function c95004025.otop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=Duel.SelectMatchingCard(tp,c95004025.otfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
local sg=Duel.SelectMatchingCard(tp,c95004025.otfilter,tp,LOCATION_SZONE,0,1,1,nil)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
......
......@@ -6,7 +6,6 @@ function c96857854.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_DESTROYED)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCountLimit(1)
e1:SetCondition(c96857854.condition)
e1:SetTarget(c96857854.target)
e1:SetOperation(c96857854.operation)
......
......@@ -99,7 +99,7 @@ function c975299.ctfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x15) and c:IsControler(tp)
end
function c975299.ctcon(e,tp,eg,ep,ev,re,r,rp)
return eg and eg:IsExists(c975299.ctfilter,1,nil,tp)
return eg:IsExists(c975299.ctfilter,1,nil,tp)
end
function c975299.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -64,5 +64,7 @@ function c98918572.xyzop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
local xc=g:GetNext()
if xc==e:GetLabelObject() then tc,xc=xc,tc end
if not tc:IsImmuneToEffect(e) then
Duel.Overlay(tc,Group.FromCards(xc))
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