Commit ff98ea01 authored by POLYMER's avatar POLYMER

fix

parent ec7c5662
......@@ -70,7 +70,7 @@ function cm.initial_effect(c)
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_SZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......@@ -107,7 +107,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetCountLimit(1)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ev==ev0 end)
e1:SetOperation(cm.rsop)
......@@ -119,7 +119,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if e:GetCode()==EVENT_CHAIN_SOLVING and rc:IsRelateToEffect(re) then
if e:GetCode()==EVENT_CHAIN_SOLVED and rc:IsRelateToEffect(re) then
rc:SetStatus(STATUS_EFFECT_ENABLED,true)
end
if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) and not (rc:IsOnField() and rc:IsFacedown()) then
......@@ -140,6 +140,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Debug.Message(e:GetActivateLocation())
--if e:IsHasType(EFFECT_TYPE_ACTIVATE) then Duel.SetChainLimit(aux.FALSE) end
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -109,7 +109,7 @@ function cm.initial_effect(c)
end
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_MZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......
......@@ -10,6 +10,7 @@ function cm.initial_effect(c)
e1:SetRange(LOCATION_HAND+LOCATION_EXTRA)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
--e1:SetProperty(0,EFFECT_FLAG2_SPOSITCH)
e1:SetHintTiming(TIMING_DRAW_PHASE,TIMING_DRAW_PHASE+TIMING_TOHAND)
--e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetCost(cm.cost)
......@@ -119,7 +120,7 @@ function cm.initial_effect(c)
end
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_MZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......
......@@ -108,7 +108,7 @@ function cm.initial_effect(c)
end
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_MZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......
......@@ -110,7 +110,7 @@ function cm.initial_effect(c)
end
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_MZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......
......@@ -95,7 +95,7 @@ function cm.initial_effect(c)
end
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_MZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......@@ -259,7 +259,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetCountLimit(1)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ev==ev0 end)
e1:SetOperation(cm.rsop)
......@@ -282,7 +282,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if e:GetCode()==EVENT_CHAIN_SOLVING and rc:IsRelateToEffect(re) then
if e:GetCode()==EVENT_CHAIN_SOLVED and rc:IsRelateToEffect(re) then
rc:SetStatus(STATUS_EFFECT_ENABLED,true)
end
if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) and not (rc:IsOnField() and rc:IsFacedown()) then
......
......@@ -88,7 +88,7 @@ function cm.initial_effect(c)
end
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_MZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......
......@@ -29,7 +29,8 @@ function cm.initial_effect(c)
e3:SetTarget(cm.sumtg)
e3:SetOperation(cm.sumop)
c:RegisterEffect(e3)
cm.hand_effect=e3
cm.hand_effect=cm.hand_effect or {}
cm.hand_effect[c]=e3
end
function cm.filter(c)
return c:GetOriginalType()&TYPE_LINK==0
......@@ -80,10 +81,13 @@ function cm.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
--Debug.Message(Duel.GetMatchingGroupCount(cm.smfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,fg,e,tp,fg))
Duel.SendtoHand(fg,nil,REASON_COST)
end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsCostChecked() end --Duel.IsExistingMatchingCard(cm.smfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,e,tp) end
function cm.sumtg(e,tp,eg,ep,ev,re,r,rp,chk,exchk)
if chk==0 then return e:IsCostChecked() or (exchk==100 and Duel.IsExistingMatchingCard(cm.smfilter11,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil)) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function cm.smfilter11(c)
return c:IsSummonable(true,nil) or c:IsMSetable(true,nil)
end
function cm.smfilter(c,e,tp,fg)
local eset1={c:IsHasEffect(EFFECT_LIMIT_SUMMON_PROC)}
local eset2={c:IsHasEffect(EFFECT_SUMMON_PROC)}
......
......@@ -31,7 +31,7 @@ function cm.initial_effect(c)
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetHandler():GetOriginalCode()==m then
return LOCATION_SZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......
......@@ -19,7 +19,7 @@ function cm.initial_effect(c)
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetHandler():GetOriginalCode()==m then
return LOCATION_SZONE+LOCATION_PZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......
......@@ -53,7 +53,7 @@ function cm.initial_effect(c)
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_SZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......@@ -130,7 +130,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCode(EVENT_CHAIN_SOLVED)
if te:IsHasType(EFFECT_TYPE_QUICK_O) then
c:CancelToGrave(false)
local te2=te:Clone()
......@@ -150,7 +150,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if e:GetCode()==EVENT_CHAIN_SOLVING and rc:IsRelateToEffect(re) then
if e:GetCode()==EVENT_CHAIN_SOLVED and rc:IsRelateToEffect(re) then
rc:SetStatus(STATUS_EFFECT_ENABLED,true)
end
if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) and not (rc:IsOnField() and rc:IsFacedown()) then
......
......@@ -40,7 +40,7 @@ function cm.initial_effect(c)
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_SZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......
......@@ -75,7 +75,7 @@ function cm.initial_effect(c)
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_SZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......
......@@ -58,7 +58,7 @@ function cm.initial_effect(c)
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_SZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......@@ -101,7 +101,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetCountLimit(1)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ev==ev0 end)
e1:SetOperation(cm.rsop)
......@@ -113,7 +113,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if e:GetCode()==EVENT_CHAIN_SOLVING and rc:IsRelateToEffect(re) then
if e:GetCode()==EVENT_CHAIN_SOLVED and rc:IsRelateToEffect(re) then
rc:SetStatus(STATUS_EFFECT_ENABLED,true)
end
if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) and not (rc:IsOnField() and rc:IsFacedown()) then
......
......@@ -12,7 +12,8 @@ function cm.initial_effect(c)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
cm.hand_effect=e1
cm.hand_effect=cm.hand_effect or {}
cm.hand_effect[c]=e1
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
......@@ -102,8 +103,9 @@ function cm.efffilter(c,tp,eg,ep,ev,re,r,rp)
if not (c:IsSetCard(0x3978) and c:IsType(TYPE_MONSTER)) then return false end
local te=c.hand_effect
if not te then return false end
te=c.hand_effect[c]
local tg=te:GetTarget()
return not tg or (tg and tg(te,tp,eg,ep,ev,re,r,rp,0))
return not tg or (tg and tg(te,tp,eg,ep,ev,re,r,rp,0,100))
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -117,7 +119,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) and c:GetColumnGroupCount()==0 and #hg>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2))
local tc=hg:Select(tp,1,1,nil):GetFirst()
local te=tc.hand_effect
local te=tc.hand_effect[tc]
local op=te:GetOperation()
if op then
tc:CreateEffectRelation(te)
......
......@@ -59,7 +59,7 @@ function cm.initial_effect(c)
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_SZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......
......@@ -59,7 +59,7 @@ function cm.initial_effect(c)
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_SZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......
......@@ -59,7 +59,7 @@ function cm.initial_effect(c)
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_SZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......
......@@ -59,7 +59,7 @@ function cm.initial_effect(c)
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_SZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......
......@@ -59,7 +59,7 @@ function cm.initial_effect(c)
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_SZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......
......@@ -59,7 +59,7 @@ function cm.initial_effect(c)
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_SZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......
......@@ -45,7 +45,7 @@ function cm.initial_effect(c)
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_SZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......
......@@ -59,7 +59,7 @@ function cm.initial_effect(c)
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_SZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......
......@@ -86,7 +86,7 @@ function cm.initial_effect(c)
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_SZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......
......@@ -57,7 +57,7 @@ function cm.initial_effect(c)
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_SZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......
......@@ -58,7 +58,7 @@ function cm.initial_effect(c)
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_SZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......@@ -95,7 +95,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetCountLimit(1)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ev==ev0 end)
e1:SetOperation(cm.rsop)
......@@ -107,7 +107,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if e:GetCode()==EVENT_CHAIN_SOLVING and rc:IsRelateToEffect(re) then
if e:GetCode()==EVENT_CHAIN_SOLVED and rc:IsRelateToEffect(re) then
rc:SetStatus(STATUS_EFFECT_ENABLED,true)
end
if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) and not (rc:IsOnField() and rc:IsFacedown()) then
......
......@@ -63,7 +63,7 @@ function cm.initial_effect(c)
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_SZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......@@ -100,7 +100,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetCountLimit(1)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ev==ev0 end)
e1:SetOperation(cm.rsop)
......@@ -112,7 +112,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if e:GetCode()==EVENT_CHAIN_SOLVING and rc:IsRelateToEffect(re) then
if e:GetCode()==EVENT_CHAIN_SOLVED and rc:IsRelateToEffect(re) then
rc:SetStatus(STATUS_EFFECT_ENABLED,true)
end
if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) and not (rc:IsOnField() and rc:IsFacedown()) then
......
......@@ -63,7 +63,7 @@ function cm.initial_effect(c)
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_SZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......@@ -100,7 +100,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetCountLimit(1)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ev==ev0 end)
e1:SetOperation(cm.rsop)
......@@ -112,7 +112,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if e:GetCode()==EVENT_CHAIN_SOLVING and rc:IsRelateToEffect(re) then
if e:GetCode()==EVENT_CHAIN_SOLVED and rc:IsRelateToEffect(re) then
rc:SetStatus(STATUS_EFFECT_ENABLED,true)
end
if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) and not (rc:IsOnField() and rc:IsFacedown()) then
......
......@@ -61,7 +61,7 @@ function cm.initial_effect(c)
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_SZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......@@ -120,7 +120,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetCountLimit(1)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ev==ev0 end)
e1:SetOperation(cm.rsop)
......@@ -132,7 +132,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if e:GetCode()==EVENT_CHAIN_SOLVING and rc:IsRelateToEffect(re) then
if e:GetCode()==EVENT_CHAIN_SOLVED and rc:IsRelateToEffect(re) then
rc:SetStatus(STATUS_EFFECT_ENABLED,true)
end
if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) and not (rc:IsOnField() and rc:IsFacedown()) then
......
......@@ -37,7 +37,7 @@ function cm.initial_effect(c)
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_FZONE+LOCATION_SZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......
......@@ -71,7 +71,7 @@ function cm.initial_effect(c)
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_SZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......
......@@ -29,8 +29,8 @@ function cm.initial_effect(c)
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
if e:GetHandler():IsType(TYPE_FIELD) then return LOCATION_FZONE+LOCATION_SZONE end
return LOCATION_SZONE
if e:GetHandler():IsType(TYPE_FIELD) then return _GetActivateLocation(e) end
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......
......@@ -62,7 +62,7 @@ function cm.initial_effect(c)
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
return LOCATION_SZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......@@ -107,7 +107,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetCountLimit(1)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ev==ev0 end)
e1:SetOperation(cm.rsop)
......@@ -119,7 +119,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
if e:GetCode()==EVENT_CHAIN_SOLVING and rc:IsRelateToEffect(re) then
if e:GetCode()==EVENT_CHAIN_SOLVED and rc:IsRelateToEffect(re) then
rc:SetStatus(STATUS_EFFECT_ENABLED,true)
end
if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) and not (rc:IsOnField() and rc:IsFacedown()) then
......
......@@ -25,7 +25,7 @@ function cm.initial_effect(c)
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()>=aux.Stringid(m,1) and e:GetDescription()<=aux.Stringid(m,7) then
return LOCATION_SZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......@@ -50,7 +50,7 @@ function cm.initial_effect(c)
local _GetActivateSequence=Effect.GetActivateSequence
function Effect.GetActivateLocation(e)
if e:GetDescription()>=aux.Stringid(m,1) and e:GetDescription()<=aux.Stringid(m,7) then
return LOCATION_SZONE
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......
......@@ -78,8 +78,8 @@ function cm.initial_effect(c)
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
if e:GetHandler():IsType(TYPE_FIELD) then return LOCATION_FZONE end
return LOCATION_SZONE
if e:GetHandler():IsType(TYPE_FIELD) then return _GetActivateLocation(e) end
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......
......@@ -80,8 +80,8 @@ function cm.initial_effect(c)
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) or e:GetDescription()==aux.Stringid(m,1) then
if e:GetHandler():IsType(TYPE_FIELD) then return LOCATION_FZONE end
return LOCATION_SZONE
if e:GetHandler():IsType(TYPE_FIELD) then return _GetActivateLocation(e) end
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......
......@@ -47,8 +47,8 @@ function cm.initial_effect(c)
local _NegateActivation=Duel.NegateActivation
function Effect.GetActivateLocation(e)
if e:GetDescription()==aux.Stringid(m,0) then
if e:GetHandler():IsType(TYPE_FIELD) then return LOCATION_FZONE end
return LOCATION_SZONE
if e:GetHandler():IsType(TYPE_FIELD) then return _GetActivateLocation(e) end
return _GetActivateLocation(e)
end
return _GetActivateLocation(e)
end
......
......@@ -64,9 +64,10 @@ function c11560305.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(dg,POS_FACEUP,REASON_EFFECT)
end
end
function c11560305.ngcon(e,tp,eg,ep,ev,re,r,rp)
local te=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT)
return rp==1-tp and te and te:GetHandler().SetCard_XdMcy and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
function c11560305.ngcon(e,tp,eg,ep,ev,re,r,rp)
local n=Duel.GetCurrentChain()
local te,p=Duel.GetChainInfo(n-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return rp==1-tp and p==tp and te and te:GetHandler().SetCard_XdMcy and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c11560305.ngckfil(c,rtype)
return c:IsType(rtype) and c:IsAbleToRemoveAsCost()
......@@ -86,39 +87,40 @@ function c11560305.ngtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c11560305.ngop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
-- if Duel.IsChainDisablable(0) then
-- local sel=1
-- local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND+LOCATION_ONFIELD,nil)
-- Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(11560305,0))
-- if g:GetCount()>0 then
-- sel=Duel.SelectOption(1-tp,1213,1214)
-- else
-- sel=Duel.SelectOption(1-tp,1214)+1
-- end
-- if sel==0 then
-- Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
-- local sg=g:Select(1-tp,1,1,nil)
-- Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
-- Duel.NegateEffect(0)
-- return
-- end
-- end
-- if Duel.IsChainDisablable(0) then
-- local sel=1
-- local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND+LOCATION_ONFIELD,nil)
-- Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(11560305,0))
-- if g:GetCount()>0 then
-- sel=Duel.SelectOption(1-tp,1213,1214)
-- else
-- sel=Duel.SelectOption(1-tp,1214)+1
-- end
-- if sel==0 then
-- Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
-- local sg=g:Select(1-tp,1,1,nil)
-- Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
-- Duel.NegateEffect(0)
-- return
-- end
-- end
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
function c11560305.rspcon(e,tp,eg,ep,ev,re,r,rp)
local te=Duel.GetChainInfo(ev-1,CHAININFO_TRIGGERING_EFFECT)
return rp==1-tp and te and te:GetHandler().SetCard_XdMcy and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
local n=Duel.GetCurrentChain()
local te,p=Duel.GetChainInfo(n-1,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
return rp==1-tp and p==tp and te and te:GetHandler().SetCard_XdMcy and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c11560305.rsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c11560305.rspop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.SpecialSummon(c,SUMMON_TYPE_RITUAL,tp,tp,true,false,POS_FACEUP)
Duel.SpecialSummon(c,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
......
......@@ -56,7 +56,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,2,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
......
......@@ -42,31 +42,45 @@ function s.counterfilter(c)
end
function s.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)<2 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(s.checkop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(92345028)
e3:SetTargetRange(1,0)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
if Duel.GetCustomActivityCount(id,tp,ACTIVITY_SPSUMMON)<1 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetOperation(s.checkop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(92345028)
e3:SetTargetRange(1,0)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
else
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,0)
e4:SetTarget(s.splimit2)
e4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e4,tp)
end
end
function s.splimit(e,c,sump,sumtype,sumpos,targetp)
function s.splimit1(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_FUSION) and aux.ExtraDeckSummonCountLimit[sump]<=0
end
function s.splimit2(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_FUSION)
end
function s.ckfilter(c,tp)
return c:IsSummonPlayer(tp) and (c:IsPreviousLocation(LOCATION_EXTRA) and not c:IsType(TYPE_FUSION))
end
......
......@@ -50,7 +50,7 @@ function c98920369.cfilter1(c,tp)
return c:IsRace(RACE_REPTILE) and Duel.GetMZoneCount(tp,c)>0
end
function c98920369.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroupEx(tp,c98920369.cfilter1,1,nil,tp) end
if chk==0 then return Duel.CheckReleaseGroupEx(tp,c98920369.cfilter1,1,nil,REASON_COST,true,tp) end
local g=Duel.SelectReleaseGroupEx(tp,c98920369.cfilter1,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
......
--黑羽-顺风之赛克罗
function c98940034.initial_effect(c)
SetSPSummonOnce(c,98940034)
c:SetSPSummonOnce(c,98940034)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x33),2,2)
......
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