Commit fc791054 authored by POLYMER's avatar POLYMER

fix

parent e161f6d0
......@@ -135,7 +135,8 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if cm[rp+10] then Duel.RegisterFlagEffect(rp,m+2,RESET_CHAIN,0,1) end
return
end
if Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 then
if Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) then
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,4))
Duel.ConfirmCards(1-rp,tc)
--Duel.HintSelection(Group.FromCards(tc))
local e1=Effect.CreateEffect(e:GetHandler())
......@@ -144,16 +145,22 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,4))
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVED)
e2:SetCountLimit(1)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetLabelObject(tc)
e2:SetCondition(cm.descon)
e2:SetOperation(cm.desop)
Duel.RegisterEffect(e2,tp)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
Duel.AdjustAll()
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetCountLimit(1)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetLabelObject(tc)
e3:SetCondition(cm.descon)
e3:SetOperation(cm.desop)
Duel.RegisterEffect(e3,tp)
end
end
end
......
......@@ -154,6 +154,7 @@ function s.lmop(e)
e3:SetTargetRange(1,1)
e3:SetValue(0)
Duel.RegisterEffect(e3,tp)
Duel.RegisterFlagEffect(0,id,0,0,1)
end
end
function s.incremental(code,tp)
......
......@@ -221,7 +221,7 @@ function s.spop3(e,tp,eg,ep,ev,re,r,rp)
local ss=Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)
if ss>0 then
local token=Duel.CreateToken(tp,57300402)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK,zone)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP_ATTACK,zone)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ADJUST)
......@@ -230,6 +230,20 @@ function s.spop3(e,tp,eg,ep,ev,re,r,rp)
e1:SetOperation(s.backop)
token:RegisterEffect(e1)
Duel.SpecialSummonComplete()
local fid=token:GetFieldID()
token:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
local ct=Duel.GetTurnCount(tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EVENT_PHASE+PHASE_END,2)
e2:SetReset(RESET_PHASE+PHASE_END,2)
e2:SetCountLimit(1)
e2:SetLabel(fid,ct)
e2:SetLabelObject(token)
e2:SetCondition(s.descon3)
e2:SetOperation(s.desop3)
Duel.RegisterEffect(e2,tp)
else
return
end
......@@ -237,4 +251,24 @@ end
function s.backop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Exile(c,0)
end
function s.desfilter(c,fid)
return c:GetFlagEffectLabel(id)==fid
end
function s.descon3(e,tp,eg,ep,ev,re,r,rp)
local fid,ct=e:GetLabel()
local g=e:GetLabelObject()
if ct==Duel.GetTurnCount(tp) return false end
if not g:IsExists(s.desfilter,1,nil,fid) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function s.desop3(e,tp,eg,ep,ev,re,r,rp)
local fid,ct=e:GetLabel()
local g=e:GetLabelObject()
local dg=g:Filter(s.desfilter,nil,fid)
g:DeleteGroup()
Duel.Destroy(dg,REASON_EFFECT)
end
\ No newline at end of file
......@@ -3,4 +3,32 @@ Duel.LoadScript("c57300400.lua")
local s,id,o=GetID()
function s.initial_effect(c)
Zombie_Characteristics(c,1000)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_CONFIRM)
e1:SetTarget(s.targ)
e1:SetOperation(s.op)
c:RegisterEffect(e1)
end
function s.targ(e,tp,eg,ep,ev,re,r,rp,chk)
local t=Duel.GetAttackTarget()
if chk==0 then return Duel.GetAttacker()==e:GetHandler() and t~=nil and not t:IsAttackPos() and t:IsAbleToGrave() and t:IsDefenseBelow(800) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,t,1,0,0)
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local t=Duel.GetAttackTarget()
if t~=nil and t:IsRelateToBattle() and not t:IsAttackPos() then
Duel.SendtoGrave(t,REASON_EFFECT)
if c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(800)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
end
end
\ No newline at end of file
......@@ -13,7 +13,7 @@ function s.initial_effect(c)
c:RegisterEffect(e1)
end
function s.deffilter(c,tp)
return c:IsDefenseAbove(1) and c:IsFaceup() and c:IsControler(1-tp) and not (c:GetFlagEffect(57300424)~=0)
return c:IsType(TYPE_MONSTER) and c:IsDefenseAbove(1) and c:IsFaceup() and c:IsControler(1-tp) and not (c:GetFlagEffect(57300424)~=0)
end
function s.deftg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -16,5 +16,5 @@ function s.initial_effect(c)
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
c:RegisterFlagEffect(57300424,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
\ No newline at end of file
......@@ -21,7 +21,7 @@ end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
tc:RegisterFlagEffect(57300424,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
......
......@@ -40,31 +40,29 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e3,tp)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,0)
g:ForEach(
function (tc)
if tc:IsSetCard(0x17f) and tc:IsType(TYPE_QUICKPLAY) then
local eset={tc:GetActivateEffect()}
for _,te in pairs(eset) do
local ne=Effect.CreateEffect(tc)
ne:SetDescription(te:GetDescription())
ne:SetCategory(te:GetCategory())
ne:SetProperty(te:GetProperty())
ne:SetType(EFFECT_TYPE_ACTIVATE)
ne:SetCode(te:GetCode())
if te:GetCondition() then
ne:SetCondition(te:GetCondition())
end
if te:GetCost() then
ne:SetCost(te:GetCost())
end
ne:SetTarget(te:GetTarget())
ne:SetOperation(te:GetOperation())
tc:RegisterEffect(ne)
te:Reset()
for tc in aux.Next(g) do
if tc:IsSetCard(0x17f) and tc:IsType(TYPE_QUICKPLAY) then
local eset={tc:GetActivateEffect()}
for _,te in pairs(eset) do
local ne=Effect.CreateEffect(tc)
ne:SetDescription(te:GetDescription())
ne:SetCategory(te:GetCategory())
ne:SetProperty(te:GetProperty())
ne:SetType(EFFECT_TYPE_ACTIVATE)
ne:SetCode(te:GetCode())
if te:GetCondition() then
ne:SetCondition(te:GetCondition())
end
if te:GetCost() then
ne:SetCost(te:GetCost())
end
ne:SetTarget(te:GetTarget())
ne:SetOperation(te:GetOperation())
tc:RegisterEffect(ne)
te:Reset()
end
end
)
end
end
function cm.filter(c,e)
return c:IsSetCard(0x17f) and c:IsType(TYPE_QUICKPLAY) and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e)
......
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