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