Commit e028acd9 authored by wind2009's avatar wind2009

Fix

parent 6604ef88
No preview for this file type
......@@ -21,7 +21,7 @@ function s.initial_effect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(s.descon)
e2:SetCost(s.descost)
e2:SetTarget(s.destg)
......@@ -60,7 +60,8 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
end
function s.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
return c:IsReason(REASON_EFFECT) and c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function s.costfilter(c)
return c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost()
......
......@@ -42,8 +42,8 @@ function s.lvfilter2(c)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetMatchingGroup(s.lvfilter,tp,0,LOCATION_MZONE,nil)
for tc in aux.Next(tg) do
local og=Duel.GetMatchingGroup(s.lvfilter,tp,0,LOCATION_MZONE,nil)
for tc in aux.Next(og) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
......@@ -51,8 +51,9 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
local tg=Duel.GetMatchingGroup(s.lvfilter2,tp,LOCATION_MZONE,0,nil)
for tc in aux.Next(tg) do
if og:GetCount()>0 then Duel.BreakEffect() end
local sg=Duel.GetMatchingGroup(s.lvfilter2,tp,LOCATION_MZONE,0,nil)
for tc in aux.Next(sg) do
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UPDATE_LEVEL)
......
--Shipping Archifiend
--Shipping Archfiend
local s,id,o=GetID()
function s.initial_effect(c)
--change race/attribute
......
......@@ -66,7 +66,7 @@ end
function s.mgcheck(c,mg,syncard)
local rg=mg-c
if c:IsNotTuner(syncard) and c:IsSynchroType(TYPE_SYNCHRO) then
return rg:FilterCount(Card.IsTuner,nil,c)==4
return rg:FilterCount(Card.IsTuner,nil,syncard)==4
else
return false
end
......@@ -79,8 +79,7 @@ function s.atkval(e,c)
end
function s.retg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil)
and c:IsAbleToRemove() end
if chk==0 then return c:IsAbleToRemove() end
local sg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
sg:AddCard(c)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,sg,sg:GetCount(),0,0)
......@@ -100,7 +99,7 @@ function s.reop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToChain() and c:IsAbleToRemove() then sg:AddCard(c) end
if Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)~=0 then
local og=Duel.GetOperatedGroup()
if og:IsContains(c)
if og:GetCount()>0
and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
......
......@@ -100,7 +100,7 @@ end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() and aux.NecroValleyFilter()(c) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 then
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_EXTRA,nil)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_EXTRA,nil)
if #g>=2 and Duel.SelectYesNo(tp,aux.Stringid(id,3)) then
Duel.BreakEffect()
Duel.ConfirmCards(tp,Duel.GetFieldGroup(tp,0,LOCATION_EXTRA),true)
......
......@@ -76,8 +76,8 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
local b1=tc:IsAbleToHand()
local b2=tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
local op=aux.SelectFromOptions(tp,
{b1,1190},
{b2,1152})
{b1,1190,1},
{b2,1152,2})
local res=false
if op==1 then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
......
......@@ -78,8 +78,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetDescription(aux.Stringid(id,2))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetValue(aux.indoval)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
tc:RegisterEffect(e2)
......
......@@ -72,7 +72,7 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
if tc:IsRelateToBattle() then
if tc and tc:IsRelateToBattle() then
Duel.Destroy(tc,REASON_EFFECT)
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