Commit 32512e75 authored by wind2009's avatar wind2009

Fix

parent bc1a71da
No preview for this file type
pics/101303082.jpg

92.1 KB | W: | H:

pics/101303082.jpg

91.9 KB | W: | H:

pics/101303082.jpg
pics/101303082.jpg
pics/101303082.jpg
pics/101303082.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/101303085.jpg

88.8 KB | W: | H:

pics/101303085.jpg

87.8 KB | W: | H:

pics/101303085.jpg
pics/101303085.jpg
pics/101303085.jpg
pics/101303085.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/101303088.jpg

92.9 KB | W: | H:

pics/101303088.jpg

94 KB | W: | H:

pics/101303088.jpg
pics/101303088.jpg
pics/101303088.jpg
pics/101303088.jpg
  • 2-up
  • Swipe
  • Onion skin
...@@ -14,19 +14,19 @@ function s.initial_effect(c) ...@@ -14,19 +14,19 @@ function s.initial_effect(c)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetTarget(s.tgtg) e1:SetTarget(s.tgtg)
e1:SetOperation(s.tgop) e1:SetOperation(s.tgop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Destroy --Destroy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_DESTROYED)
e2:SetCondition(s.descon) e2:SetCondition(s.descon)
e2:SetCost(s.descost) e2:SetCost(s.descost)
e2:SetTarget(s.destg) e2:SetTarget(s.destg)
e2:SetOperation(s.desop) e2:SetOperation(s.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.tgfilter(c,e,tp,check) function s.tgfilter(c,e,tp,check)
return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_TUNER) and c:IsRace(RACE_MACHINE) return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_TUNER) and c:IsRace(RACE_MACHINE)
...@@ -34,7 +34,7 @@ function s.tgfilter(c,e,tp,check) ...@@ -34,7 +34,7 @@ function s.tgfilter(c,e,tp,check)
end end
function s.cfilter(c) function s.cfilter(c)
local lv=c:GetOriginalLevel() local lv=c:GetOriginalLevel()
return c:IsFaceup() and not c:IsLevel(lv) return c:IsFaceup() and not c:IsLevel(lv) and c:IsLevelAbove(1)
end end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
...@@ -53,26 +53,25 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,26 +53,25 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
if check and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) if check and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1191,1152)==1) then and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1191,1152)==1) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else elseif tc:IsAbleToGrave() then
Duel.SendtoGrave(tc,REASON_EFFECT) Duel.SendtoGrave(tc,REASON_EFFECT)
end end
end end
end end
function s.descon(e,tp,eg,ep,ev,re,r,rp) function s.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end end
function s.costfilter(c) function s.costfilter(c)
return c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost() return c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost()
end end
function s.descost(e,tp,eg,ep,ev,re,r,rp,chk) function s.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_GRAVE,0,1,nil) end
local rt=Duel.GetTargetCount(nil,tp,0,LOCATION_ONFIELD,nil) local rt=Duel.GetTargetCount(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_GRAVE,0,1,rt,nil) local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_GRAVE,0,1,rt,nil)
local cg=Duel.Remove(g,POS_FACEUP,REASON_COST) local ct=Duel.Remove(g,POS_FACEUP,REASON_COST)
e:SetLabel(cg) e:SetLabel(ct)
end end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end if chkc then return chkc:IsOnField() end
...@@ -83,9 +82,8 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -83,9 +82,8 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,ct,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,ct,0,0)
end end
function s.desop(e,tp,eg,ep,ev,re,r,rp) function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tg=Duel.GetTargetsRelateToChain():Filter(Card.IsOnField,nil)
local rg=tg:Filter(Card.IsRelateToChain,nil) if #tg>0 then
if #rg>0 then Duel.Destroy(tg,REASON_EFFECT)
Duel.Destroy(rg,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -84,4 +84,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,4 +84,4 @@ function s.spop2(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
end end
\ No newline at end of file
--Shipping Archifiend --Shipping Archifiend
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--race&ATTRIBUTE --change race/attribute
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
...@@ -10,8 +10,8 @@ function s.initial_effect(c) ...@@ -10,8 +10,8 @@ function s.initial_effect(c)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetTarget(s.artg) e1:SetTarget(s.artg)
e1:SetOperation(s.arop) e1:SetOperation(s.arop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --tohand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND) e2:SetCategory(CATEGORY_TOHAND)
...@@ -25,69 +25,67 @@ function s.initial_effect(c) ...@@ -25,69 +25,67 @@ function s.initial_effect(c)
e2:SetOperation(s.thop) e2:SetOperation(s.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.arfilter(c) function s.arfilter(c,e)
return c:IsFaceup() return c:IsFaceup() and c:IsCanBeEffectTarget(e)
end end
function s.gcheck(g) function s.gcheck(g)
local att=0 local att=0
local race=0 local race=0
for tc in aux.Next(g) do for tc in aux.Next(g) do
local c_att=tc:GetAttribute() att=bit.band(att,tc:GetAttribute())
local c_race=tc:GetRace() race=bit.band(race,tc:GetRace())
att=bit.bor(att,c_att)
race=bit.bor(race,c_race)
end end
return att~=ATTRIBUTE_ALL or race~=RACE_ALL return att~=ATTRIBUTE_ALL or race~=RACE_ALL
end end
function s.artg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.artg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=Duel.GetMatchingGroup(s.arfilter,tp,LOCATION_MZONE,0,nil,e) local tg=Duel.GetMatchingGroup(s.arfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.thfilter(chkc) end if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and s.thfilter(chkc) end
if chk==0 then return tg:CheckSubGroup(s.gcheck,1,99) end if chk==0 then return tg:CheckSubGroup(s.gcheck,1,99) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=tg:SelectSubGroup(tp,s.gcheck,false,1,99) local g=tg:SelectSubGroup(tp,s.gcheck,false,1,99)
local att=0 local att=0
local race=0 local race=0
for tc in aux.Next(g) do for tc in aux.Next(g) do
local c_att=tc:GetAttribute() att=bit.band(att,tc:GetAttribute())
local c_race=tc:GetRace() race=bit.band(race,tc:GetRace())
att=bit.bor(att,c_att)
race=bit.bor(race,c_race)
end end
local b1=att~=ATTRIBUTE_ALL local b1=att~=ATTRIBUTE_ALL
local b2=race~=RACE_ALL local b2=race~=RACE_ALL
local op=aux.SelectFromOptions(tp, local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,2),1}, {b1,aux.Stringid(id,2),1},
{b2,aux.Stringid(id,3),2}) {b2,aux.Stringid(id,3),2})
local annouce=0
if op==1 then if op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATTRIBUTE)
ar=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-att) annouce=Duel.AnnounceAttribute(tp,1,ATTRIBUTE_ALL-att)
else elseif op==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RACE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RACE)
ar=Duel.AnnounceRace(tp,1,RACE_ALL-race) annouce=Duel.AnnounceRace(tp,1,RACE_ALL-race)
end end
e:SetLabel(op,ar) e:SetLabel(op,annouce)
Duel.SetTargetCard(g) Duel.SetTargetCard(g)
end end
function s.arop(e,tp,eg,ep,ev,re,r,rp) function s.arop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tg=Duel.GetTargetsRelateToChain():Filter(Card.IsFaceup,nil)
local tg=g:Filter(Card.IsRelateToChain,nil):Filter(Card.IsFaceup,nil)
local c=e:GetHandler() local c=e:GetHandler()
local op,ar=e:GetLabel() local op,val=e:GetLabel()
if op==1 then if op==1 then
for tc in aux.Next(tg) do for tc in aux.Next(tg) do
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetValue(ar) e1:SetValue(val)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
else elseif op==2 then
for tc in aux.Next(tg) do for tc in aux.Next(tg) do
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_RACE) e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetValue(ar) e1:SetValue(val)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
...@@ -100,7 +98,7 @@ function s.thfilter(c,e) ...@@ -100,7 +98,7 @@ function s.thfilter(c,e)
return c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsCanBeEffectTarget(e) return c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsCanBeEffectTarget(e)
end end
function s.fselect(g) function s.fselect(g)
return g:GetClassCount(Card.GetAttribute) == 1 and g:GetClassCount(Card.GetRace) == 1 and g:GetClassCount(Card.GetControler) == 2 return aux.SameValueCheck(g,Card.GetAttribute) and aux.SameValueCheck(g,Card.GetRace) and g:GetClassCount(Card.GetControler)==2
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -113,8 +111,8 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -113,8 +111,8 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToChain,nil) local g=Duel.GetTargetsRelateToChain()
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
end end
end end
\ No newline at end of file
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