Commit 5d8ede5d authored by nanahira's avatar nanahira

prescripts

parent 3775f9df
...@@ -39,7 +39,7 @@ function c100222001.initial_effect(c) ...@@ -39,7 +39,7 @@ function c100222001.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c100222001.tkcon(e,tp,eg,ep,ev,re,r,rp) function c100222001.tkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) return Duel.GetTurnPlayer()==tp and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end end
function c100222001.tktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100222001.tktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -113,11 +113,9 @@ function c100407004.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -113,11 +113,9 @@ function c100407004.eqop(e,tp,eg,ep,ev,re,r,rp)
local tc1=Duel.GetFirstTarget() local tc1=Duel.GetFirstTarget()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,c100407004.eqfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c100407004.eqfilter,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then local tc2=g:GetFirst()
local tc2=g:GetFirst() local m=_G["c"..tc2:GetCode()]
local m=_G["c"..tc2:GetCode()] if tc1:IsFaceup() and tc1:IsRelateToEffect(e) and tc1:IsControler(1-tp) and tc2 then
if tc1:IsFaceup() and tc1:IsRelateToEffect(e) and tc1:IsControler(1-tp) and tc2 then m.EquipMonster(tc2,tp,tc1)
m.EquipMonster(tc2,tp,tc1)
end
end end
end end
...@@ -50,7 +50,7 @@ function c100407008.initial_effect(c) ...@@ -50,7 +50,7 @@ function c100407008.initial_effect(c)
e5:SetCountLimit(1) e5:SetCountLimit(1)
e5:SetTarget(c100407008.sptg) e5:SetTarget(c100407008.sptg)
e5:SetOperation(c100407008.spop) e5:SetOperation(c100407008.spop)
c:RegisterEffect(e5) c:RegisterEffect(e4)
end end
function c100407008.splimit(e,se,sp,st) function c100407008.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS) return se:IsHasType(EFFECT_TYPE_ACTIONS)
......
...@@ -61,7 +61,6 @@ function c100407014.damfilter1(c,tp) ...@@ -61,7 +61,6 @@ function c100407014.damfilter1(c,tp)
return c:IsReason(REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsLocation(LOCATION_GRAVE) and c:GetPreviousControler()~=tp return c:IsReason(REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsLocation(LOCATION_GRAVE) and c:GetPreviousControler()~=tp
end end
function c100407014.damcon2(e,tp,eg,ep,ev,re,r,rp) function c100407014.damcon2(e,tp,eg,ep,ev,re,r,rp)
if not re then return false end
local rc=re:GetHandler() local rc=re:GetHandler()
return rc:IsControler(tp) and rc:GetOriginalAttribute()==ATTRIBUTE_DARK return rc:IsControler(tp) and rc:GetOriginalAttribute()==ATTRIBUTE_DARK
and rc:GetOriginalRace()==RACE_MACHINE and rc:GetOriginalRace()==RACE_MACHINE
......
...@@ -76,7 +76,6 @@ function c100407032.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,7 +76,6 @@ function c100407032.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil) local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst() local tc=tg:GetFirst()
if not tc then return end
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
aux.FCheckAdditional=c100407032.fcheck aux.FCheckAdditional=c100407032.fcheck
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
......
...@@ -65,7 +65,6 @@ function c101003002.disfilter(c,e) ...@@ -65,7 +65,6 @@ function c101003002.disfilter(c,e)
return c:IsFaceup() and c:IsRelateToEffect(e) return c:IsFaceup() and c:IsRelateToEffect(e)
end end
function c101003002.disop(e,tp,eg,ep,ev,re,r,rp) function c101003002.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c101003002.disfilter,nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c101003002.disfilter,nil,e)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
......
...@@ -55,7 +55,7 @@ function c101003007.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,7 +55,7 @@ function c101003007.desop(e,tp,eg,ep,ev,re,r,rp)
tc=g:GetFirst() tc=g:GetFirst()
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
tc=g:Select(tp,1,1,nil):GetFirst() tc=g:Select(tp,1,1,nil)
end end
local seq=tc:GetSequence() local seq=tc:GetSequence()
local dg=Group.CreateGroup() local dg=Group.CreateGroup()
......
...@@ -64,7 +64,6 @@ function c101003019.seqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,7 +64,6 @@ function c101003019.seqop(e,tp,eg,ep,ev,re,r,rp)
for i=0,4 do for i=0,4 do
if Duel.CheckLocation(tp,LOCATION_MZONE,i) then flag=bit.bor(flag,math.pow(2,i)) end if Duel.CheckLocation(tp,LOCATION_MZONE,i) then flag=bit.bor(flag,math.pow(2,i)) end
end end
flag=bit.bxor(flag,0xff)
if flag==0 then return end if flag==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,571) Duel.Hint(HINT_SELECTMSG,tp,571)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,flag) local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,flag)
......
...@@ -61,7 +61,7 @@ function c101003047.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -61,7 +61,7 @@ function c101003047.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101003047.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c101003047.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c101003047.spop(e,tp,eg,ep,ev,re,r,rp) function c101003047.operation(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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101003047.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c101003047.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
......
...@@ -29,7 +29,6 @@ function c101003064.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,7 +29,6 @@ function c101003064.activate(e,tp,eg,ep,ev,re,r,rp)
for i=0,4 do for i=0,4 do
if Duel.CheckLocation(tp,LOCATION_MZONE,i) then flag=bit.bor(flag,math.pow(2,i)) end if Duel.CheckLocation(tp,LOCATION_MZONE,i) then flag=bit.bor(flag,math.pow(2,i)) end
end end
flag=bit.bxor(flag,0xff)
if flag==0 then return end if flag==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,571) Duel.Hint(HINT_SELECTMSG,tp,571)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,flag) local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,flag)
......
...@@ -75,14 +75,14 @@ function c101003070.thfilter(c) ...@@ -75,14 +75,14 @@ function c101003070.thfilter(c)
end end
function c101003070.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101003070.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101003070.thfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101003070.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101003070.thfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingTarget(c101003070.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c101003070.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,c101003070.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function c101003070.thop(e,tp,eg,ep,ev,re,r,rp) function c101003070.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
end 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