Commit cc103646 authored by mercury233's avatar mercury233

update scripts

parent 76a31c77
...@@ -37,9 +37,9 @@ function c101010091.target1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -37,9 +37,9 @@ function c101010091.target1(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function c101010091.activate1(e,tp,eg,ep,ev,re,r,rp) function c101010091.activate1(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
end end
end end
function c101010091.cfilter2(c) function c101010091.cfilter2(c)
return c:IsFaceup() and c:IsCode(1050355) return c:IsFaceup() and c:IsCode(1050355)
......
...@@ -66,7 +66,7 @@ function c101011008.srop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,7 +66,7 @@ function c101011008.srop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c101011008.srfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c101011008.srfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
function c101011008.thcon(e,tp,eg,ep,ev,re,r,rp) function c101011008.thcon(e,tp,eg,ep,ev,re,r,rp)
...@@ -75,14 +75,13 @@ end ...@@ -75,14 +75,13 @@ end
function c101011008.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101011008.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function c101011008.thop(e,tp,eg,ep,ev,re,r,rp) function c101011008.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end end
end end
...@@ -55,6 +55,7 @@ function c101011013.atkval(e,c) ...@@ -55,6 +55,7 @@ function c101011013.atkval(e,c)
end end
function c101011013.xatkcon(e,tp,eg,ep,ev,re,r,rp) function c101011013.xatkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0) return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0)
and Duel.IsAbleToEnterBP()
end end
function c101011013.xatktg(e,tp,eg,ep,ev,re,r,rp,chk) function c101011013.xatktg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -93,9 +93,7 @@ function c101011019.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -93,9 +93,7 @@ function c101011019.spop(e,tp,eg,ep,ev,re,r,rp)
end end
function c101011019.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c101011019.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
local g=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end end
function c101011019.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c101011019.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
......
...@@ -72,10 +72,11 @@ end ...@@ -72,10 +72,11 @@ end
function c101011024.eqop(e,tp,eg,ep,ev,re,r,rp) function c101011024.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and c:IsControler(tp) then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
if tc:IsControler(1-tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then local p=c:GetControler()
Duel.Destroy(tc,REASON_RULE) if Duel.GetLocationCount(p,LOCATION_SZONE)<=0 then
Duel.SendtoGrave(tc,REASON_RULE)
return return
end end
if not Duel.Equip(tp,tc,c,false) then return end if not Duel.Equip(tp,tc,c,false) then return end
......
...@@ -21,7 +21,7 @@ function c101011026.initial_effect(c) ...@@ -21,7 +21,7 @@ function c101011026.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCountLimit(1,101011126) e2:SetCountLimit(1,101011126)
e2:SetCondition(c101011026.spcon2) e2:SetCondition(c101011026.spcon2)
e2:SetTarget(c101011026.sptg2) e2:SetTarget(c101011026.sptg2)
......
...@@ -61,6 +61,5 @@ function c101011028.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,6 +61,5 @@ function c101011028.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_REMOVED) and c:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_REMOVED) and c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end end
end end
...@@ -56,7 +56,7 @@ function c101011029.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,7 @@ function c101011029.atkop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c101011029.rcon(e,tp,eg,ep,ev,re,r,rp) function c101011029.rcon(e,tp,eg,ep,ev,re,r,rp)
return aux.exccon(e) and bit.band(r,REASON_COST)~=0 and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_XYZ) return aux.exccon(e) and bit.band(r,REASON_COST)~=0 and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_XYZ)
and re:GetHandler():GetOverlayCount()>=ev-1 and e:GetHandler():IsAbleToRemoveAsCost() and ep==e:GetOwnerPlayer() and re:GetHandler():GetOverlayCount()>=ev-1 and e:GetHandler():IsAbleToRemoveAsCost() and ep==e:GetOwnerPlayer()
end end
function c101011029.rop(e,tp,eg,ep,ev,re,r,rp) function c101011029.rop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -31,6 +31,9 @@ function c101011054.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -31,6 +31,9 @@ function c101011054.target(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,nil,c101011054.filter,e,tp,mg,mg2,Card.GetLevel,"Greater") return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,nil,c101011054.filter,e,tp,mg,mg2,Card.GetLevel,"Greater")
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
if e:GetLabel()==1 then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_GRAVE)
end
end end
function c101011054.activate(e,tp,eg,ep,ev,re,r,rp) function c101011054.activate(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsSetCard,nil,0x235) local mg=Duel.GetRitualMaterial(tp):Filter(Card.IsSetCard,nil,0x235)
......
...@@ -19,7 +19,7 @@ function c101011066.costfilter(c) ...@@ -19,7 +19,7 @@ function c101011066.costfilter(c)
end end
function c101011066.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c101011066.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101011066.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c101011066.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101011066.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c101011066.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
......
...@@ -22,6 +22,7 @@ function c101011074.initial_effect(c) ...@@ -22,6 +22,7 @@ function c101011074.initial_effect(c)
--special summon --special summon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101011074,0)) e3:SetDescription(aux.Stringid(101011074,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
......
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