Commit f63f4a07 authored by POLYMER's avatar POLYMER

fix

parent 06ffaef9
......@@ -28,7 +28,7 @@ function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
--e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(cm.descon)
e1:SetOperation(cm.desop2)
Duel.RegisterEffect(e1,0)
......
--龙神迷子·铃音
function c130006027.initial_effect(c)
--囚徒与恶眼
local cm,m=GetID()
function cm.initial_effect(c)
--search limit
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CUSTOM+m)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
if not cm.global_check then
cm.global_check=true
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCondition(cm.descon)
e1:SetOperation(cm.desop2)
Duel.RegisterEffect(e1,0)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(e2,0)
local e3=e1:Clone()
e3:SetCode(EVENT_MOVE)
Duel.RegisterEffect(e3,0)
end
end
function cm.filter(c,e)
return c:GetPreviousLocation()==LOCATION_DECK and c:IsOnField() and (c:IsStatus(STATUS_EFFECT_ENABLED) or not c:IsLocation(LOCATION_MZONE) or c:IsStatus(STATUS_CHAINING) or c:IsFacedown()) and not ((Duel.CheckEvent(EVENT_SUMMON_SUCCESS) or Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS)) and e:GetCode()==EVENT_MOVE and c:IsLocation(LOCATION_MZONE))
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter,1,nil,e)
end
function cm.desop2(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseEvent(eg,EVENT_CUSTOM+m,re,r,rp,ep,ev)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
g:KeepAlive()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CUSTOM+m)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) local g=eg:Filter(cm.filter,nil,e) e:GetLabelObject():GetLabelObject():Merge(g) end)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,0)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ADJUST)
--e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetLabelObject(g)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) local g=e:GetLabelObject() Duel.SendtoDeck(g,nil,0,REASON_RULE) g:Clear() end)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,0)
e1:SetLabelObject(e2)
end
\ No newline at end of file
......@@ -169,7 +169,7 @@ end
function cm.chainop2(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if rc:IsType(0x6) and rc:IsOnField() and not rc:IsLocation(0x200) and rc:IsRelateToChain(re) and rc:IsCanTurnSet() and re:GetActivateLocation()&0x0f~=0 then
if rc:IsType(0x6) and rc:IsOnField() and not rc:IsLocation(0x200) and rc:IsCanTurnSet() and re:GetActivateLocation()&0x0f~=0 then
if rc:IsStatus(STATUS_LEAVE_CONFIRMED) then
rc:CancelToGrave()
end
......
......@@ -30,6 +30,7 @@ function cm.rop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Remove(c,POS_FACEUP,REASON_EFFECT)~=0 and Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)<=1 then
Duel.Draw(e:GetHandlerPlayer(),1,REASON_EFFECT)
end
Duel.Readjust()
end
function cm.otg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -30,6 +30,7 @@ function cm.rop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Remove(c,POS_FACEUP,REASON_EFFECT)~=0 and Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)<=1 then
Duel.Draw(e:GetHandlerPlayer(),1,REASON_EFFECT)
end
Duel.Readjust()
end
function cm.otg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -30,6 +30,7 @@ function cm.rop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Remove(c,POS_FACEUP,REASON_EFFECT)~=0 and Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_HAND,0)<=1 then
Duel.Draw(e:GetHandlerPlayer(),1,REASON_EFFECT)
end
Duel.Readjust()
end
function cm.otg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -6,7 +6,7 @@ function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c60151906.e1con)
e1:SetCondition(c60151905.e1con)
e1:SetOperation(c60151905.e1op)
c:RegisterEffect(e1)
--special summon
......
......@@ -128,7 +128,7 @@ function c60151909.e1ope5filter(e,re)
end
function c60151909.e1ope6tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsSSetable() end
if chk==0 then return c:IsCanTurnSet() end
Duel.SetOperationInfo(0,CATEGORY_POSITION,c,1,0,0)
end
function c60151909.e1ope6op(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -59,7 +59,7 @@ function c60152903.check(c)
return c
end
function c60152903.checkop(e,tp,eg,ep,ev,re,r,rp)
if c60152903.check(Duel.GetBattleTarget())~=nil then
if c60152903.check(Duel.GetAttacker()) and c60152903.check(Duel.GetAttackTarget()) then
Duel.RegisterFlagEffect(tp,60152903,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(1-tp,60152903,RESET_PHASE+PHASE_END,0,1)
end
......
This diff is collapsed.
......@@ -62,14 +62,12 @@ function c60152921.e1op(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local tc2=g:GetFirst()
if Duel.GetMatchingGroup(c60152921.filter,tp,LOCATION_GRAVE,0,nil,tc2)>0 then
local g2=Duel.GetMatchingGroup(c60152921.filter,tp,LOCATION_GRAVE,0,nil,tc2)
if g2:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(3072077,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g3=Duel.SelectMatchingCard(tp,c60152921.filter,tp,LOCATION_GRAVE,0,1,1,nil,tc2)
if g3:GetCount()>0 then
Duel.SendtoHand(g3,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g3)
end
local sg=g2:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
end
......
......@@ -4,7 +4,7 @@ function c60152927.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c60152925.e1con)
e1:SetCondition(c60152927.e1con)
c:RegisterEffect(e1)
--cannot be target
local e2=Effect.CreateEffect(c)
......@@ -36,11 +36,11 @@ function c60152927.initial_effect(c)
e5:SetRange(LOCATION_MZONE)
e5:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e5:SetCountLimit(1)
e5:SetTarget(c6142488.e5tg)
e5:SetOperation(c6142488.e5op)
e5:SetTarget(c60152927.e5tg)
e5:SetOperation(c60152927.e5op)
c:RegisterEffect(e5)
end
function c60152925.e1con(e,tp,eg,ep,ev,re,r,rp)
function c60152927.e1con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(Card.IsFacedown,tp,LOCATION_EXTRA,0,nil)==0
end
function c60152927.target(e,c)
......@@ -75,7 +75,7 @@ end
function c60152927.filter(c,e,tp)
return c:IsSetCard(0x3b29) and c:IsType(TYPE_RITUAL)
end
function c6483224.filter2(c)
function c60152927.filter2(c)
return c:IsFaceup() and (c:IsType(TYPE_FUSION) or c:IsType(TYPE_SYNCHRO) or c:IsType(TYPE_XYZ) or c:IsType(TYPE_LINK))
end
function c60152927.e5tg(e,tp,eg,ep,ev,re,r,rp,chk)
......
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