Commit 96107b9d authored by mercury233's avatar mercury233

update scripts

parent a6719489
...@@ -37,7 +37,7 @@ end ...@@ -37,7 +37,7 @@ end
c100227009.card_code_list={100227010} c100227009.card_code_list={100227010}
function c100227009.ntcon(e,c,minc) function c100227009.ntcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
return minc==0 and c:GetLevel()>4 and Duel.IsEnvironment(100227010) return minc==0 and c:IsLevelAbove(5) and Duel.IsEnvironment(100227010)
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end end
function c100227009.descon(e,tp,eg,ep,ev,re,r,rp) function c100227009.descon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -27,8 +27,9 @@ end ...@@ -27,8 +27,9 @@ end
function c100227020.activate(e,tp,eg,ep,ev,re,r,rp) function c100227020.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD) local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)
if ct>0 and Duel.DiscardDeck(tp,ct,REASON_EFFECT)~=0 then if ct>0 and Duel.DiscardDeck(tp,ct,REASON_EFFECT)~=0 then
Duel.BreakEffect()
local ct2=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_GRAVE):GetCount() local ct2=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_GRAVE):GetCount()
if ct2==0 then return end
Duel.BreakEffect()
if Duel.Draw(tp,1,REASON_EFFECT)~=0 then if Duel.Draw(tp,1,REASON_EFFECT)~=0 then
local tc=Duel.GetOperatedGroup():GetFirst() local tc=Duel.GetOperatedGroup():GetFirst()
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
......
...@@ -57,7 +57,7 @@ function c100227021.initial_effect(c) ...@@ -57,7 +57,7 @@ function c100227021.initial_effect(c)
end end
function c100227021.ntcon(e,c,minc) function c100227021.ntcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
return minc==0 and c:GetLevel()>4 return minc==0 and c:IsLevelAbove(5)
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end end
......
...@@ -60,7 +60,7 @@ function c100227022.initial_effect(c) ...@@ -60,7 +60,7 @@ function c100227022.initial_effect(c)
end end
function c100227022.ntcon(e,c,minc) function c100227022.ntcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
return minc==0 and c:GetLevel()>4 return minc==0 and c:IsLevelAbove(5)
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end end
......
...@@ -59,7 +59,7 @@ function c100227023.initial_effect(c) ...@@ -59,7 +59,7 @@ function c100227023.initial_effect(c)
end end
function c100227023.ntcon(e,c,minc) function c100227023.ntcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
return minc==0 and c:GetLevel()>4 return minc==0 and c:IsLevelAbove(5)
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end end
......
...@@ -60,7 +60,7 @@ function c100227024.initial_effect(c) ...@@ -60,7 +60,7 @@ function c100227024.initial_effect(c)
end end
function c100227024.ntcon(e,c,minc) function c100227024.ntcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
return minc==0 and c:GetLevel()>4 return minc==0 and c:IsLevelAbove(5)
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end end
......
...@@ -68,7 +68,7 @@ function c100227025.initial_effect(c) ...@@ -68,7 +68,7 @@ function c100227025.initial_effect(c)
end end
function c100227025.ntcon(e,c,minc) function c100227025.ntcon(e,c,minc)
if c==nil then return true end if c==nil then return true end
return minc==0 and c:GetLevel()>4 return minc==0 and c:IsLevelAbove(5)
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
......
...@@ -51,7 +51,7 @@ function c100227027.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -51,7 +51,7 @@ function c100227027.cost(e,tp,eg,ep,ev,re,r,rp,chk)
c:RegisterFlagEffect(100227027,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1) c:RegisterFlagEffect(100227027,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end end
function c100227027.drfilter(c) function c100227027.drfilter(c)
return c:GetLevel()==10 and c:IsDiscardable() return c:IsLevel(10) and c:IsDiscardable()
end end
function c100227027.drcost(e,tp,eg,ep,ev,re,r,rp,chk) function c100227027.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100227027.drfilter,tp,LOCATION_HAND,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(c100227027.drfilter,tp,LOCATION_HAND,0,1,nil)
......
...@@ -40,7 +40,7 @@ end ...@@ -40,7 +40,7 @@ end
function c100227036.ntcon(e,c,minc) function c100227036.ntcon(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 minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and ((Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0) and ((Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0)
or Duel.IsExistingMatchingCard(c100227036.cfilter,tp,LOCATION_MZONE,0,1,nil)) or Duel.IsExistingMatchingCard(c100227036.cfilter,tp,LOCATION_MZONE,0,1,nil))
end end
......
...@@ -44,7 +44,7 @@ end ...@@ -44,7 +44,7 @@ end
function c100227037.ntcon(e,c,minc) function c100227037.ntcon(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 minc==0 and c:GetLevel()>4 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and ((Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0) and ((Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0)
or Duel.IsExistingMatchingCard(c100227037.cfilter,tp,LOCATION_MZONE,0,1,nil)) or Duel.IsExistingMatchingCard(c100227037.cfilter,tp,LOCATION_MZONE,0,1,nil))
end end
......
...@@ -21,7 +21,7 @@ function c100227040.initial_effect(c) ...@@ -21,7 +21,7 @@ function c100227040.initial_effect(c)
--atk up --atk up
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100227040,1)) e2:SetDescription(aux.Stringid(100227040,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c100227040.atkcon2) e2:SetCondition(c100227040.atkcon2)
......
...@@ -5,10 +5,10 @@ function c100409034.initial_effect(c) ...@@ -5,10 +5,10 @@ function c100409034.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,nil,4,2) aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit() c:EnableReviveLimit()
--atkup --special summon (hand)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100409034,0)) e1:SetDescription(aux.Stringid(100409034,0))
e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
...@@ -37,7 +37,7 @@ function c100409034.initial_effect(c) ...@@ -37,7 +37,7 @@ function c100409034.initial_effect(c)
e3:SetTarget(aux.TargetBoolFunction(Card.IsAttackAbove,2000)) e3:SetTarget(aux.TargetBoolFunction(Card.IsAttackAbove,2000))
e3:SetValue(aux.tgoval) e3:SetValue(aux.tgoval)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--special summon --special summon (gy/banished)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100409034,1)) e4:SetDescription(aux.Stringid(100409034,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
...@@ -85,11 +85,11 @@ function c100409034.spfilter2(c,e,tp) ...@@ -85,11 +85,11 @@ function c100409034.spfilter2(c,e,tp)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsCode(93717133) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsCode(93717133) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c100409034.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100409034.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c100409034.spfilter2(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c100409034.spfilter2(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100409034.spfilter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c100409034.spfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100409034.spfilter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c100409034.spfilter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c100409034.spop2(e,tp,eg,ep,ev,re,r,rp) function c100409034.spop2(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -89,6 +89,7 @@ function c100409038.efftg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -89,6 +89,7 @@ function c100409038.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsExistingMatchingCard(c100409038.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c100409038.thfilter,tp,LOCATION_DECK,0,1,nil)
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
local b3=Duel.IsExistingMatchingCard(c100409038.costfilter3,tp,LOCATION_MZONE,0,1,nil,e,tp) local b3=Duel.IsExistingMatchingCard(c100409038.costfilter3,tp,LOCATION_MZONE,0,1,nil,e,tp)
local op=0
if b1 and b2 and b3 then if b1 and b2 and b3 then
op=Duel.SelectOption(tp,aux.Stringid(100409038,1),aux.Stringid(100409038,2),aux.Stringid(100409038,3)) op=Duel.SelectOption(tp,aux.Stringid(100409038,1),aux.Stringid(100409038,2),aux.Stringid(100409038,3))
elseif b1 and b2 then elseif b1 and b2 then
......
...@@ -49,7 +49,7 @@ function c101004084.selcheck(c,mg1,dg,mat1,rc) ...@@ -49,7 +49,7 @@ function c101004084.selcheck(c,mg1,dg,mat1,rc)
end end
local sum=mat:GetSum(Card.GetRitualLevel,rc) local sum=mat:GetSum(Card.GetRitualLevel,rc)
local lv=rc:GetLevel()-sum local lv=rc:GetLevel()-sum
return sum<=rc:GetLevel() and mg:CheckWithSumEqual(Card.GetRitualLevel,lv,0,99,rc) return rc:IsLevelAbove(sum) and mg:CheckWithSumEqual(Card.GetRitualLevel,lv,0,99,rc)
end end
function c101004084.target(e,tp,eg,ep,ev,re,r,rp,chk) function c101004084.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
......
...@@ -81,7 +81,8 @@ function c101004087.lvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,7 +81,8 @@ function c101004087.lvop(e,tp,eg,ep,ev,re,r,rp)
end end
function c101004087.rdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101004087.rdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
and e:GetHandler():IsLevelAbove(4) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
...@@ -89,7 +90,7 @@ end ...@@ -89,7 +90,7 @@ end
function c101004087.rdop(e,tp,eg,ep,ev,re,r,rp) function c101004087.rdop(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 c:IsFacedown() or not c:IsRelateToEffect(e) or c:GetLevel()<4 then return end if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsLevelBelow(3) then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetCode(EFFECT_UPDATE_LEVEL)
......
...@@ -72,7 +72,7 @@ function c101004088.negcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,7 +72,7 @@ function c101004088.negcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev) return re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev)
end end
function c101004088.negtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101004088.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return e:GetHandler():IsLevelAbove(3) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
...@@ -80,7 +80,7 @@ function c101004088.negtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -80,7 +80,7 @@ function c101004088.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c101004088.negop(e,tp,eg,ep,ev,re,r,rp) function c101004088.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) or c:GetLevel()<3 then return end if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) or c:IsLevelBelow(2) then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetCode(EFFECT_UPDATE_LEVEL)
......
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