Commit 81986892 authored by Nemo Ma's avatar Nemo Ma

fix

parent daced1b3
......@@ -72,8 +72,7 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
else
res=(c:CheckActivateEffect(false,false,false)~=nil)
end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return res and ((ft>0 and c:IsLocation(LOCATION_HAND)) or (((Duel.GetLocationCountFromEx(tp,tp,nil,c,0x60)>0 and ft>0) or (Duel.GetLocationCountFromEx(tp,tp,nil,c,0x1f)>0 and ft>1)) and c:IsLocation(LOCATION_EXTRA)))
return res and ((Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsLocation(LOCATION_HAND)) or (Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsLocation(LOCATION_EXTRA)))
end
end
function cm.ngfilter(c)
......@@ -161,7 +160,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local te=e:GetLabelObject()
Duel.MoveToField(c,tp,tp,LOCATION_MZONE,POS_FACEUP,false)
c:CreateEffectRelation(te)
c:CreateEffectRelation(te)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_ADD_TYPE)
......@@ -171,6 +170,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local te2=te:Clone()
e:SetLabelObject(te2)
te:SetType(26)
c:RegisterEffect(te2,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
......@@ -189,7 +189,6 @@ function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local te2=e:GetLabelObject()
re:Reset()
rc:RegisterEffect(te2,true)
if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) then
rc:CancelToGrave(false)
if KOISHI_CHECK then
......@@ -220,7 +219,7 @@ end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_DECK+LOCATION_ONFIELD,0,1,nil) end
local g=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_DECK+LOCATION_ONFIELD,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
......
......@@ -154,6 +154,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local te2=te:Clone()
e:SetLabelObject(te2)
te:SetType(26)
c:RegisterEffect(te2,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
......@@ -172,7 +173,6 @@ function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local te2=e:GetLabelObject()
re:Reset()
rc:RegisterEffect(te2,true)
if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) then
rc:CancelToGrave(false)
if KOISHI_CHECK then
......
......@@ -116,6 +116,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local te2=te:Clone()
e:SetLabelObject(te2)
te:SetType(26)
c:RegisterEffect(te2,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
......@@ -134,7 +135,6 @@ function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local te2=e:GetLabelObject()
re:Reset()
rc:RegisterEffect(te2,true)
if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) then
rc:CancelToGrave(false)
if KOISHI_CHECK then
......
......@@ -122,6 +122,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local te2=te:Clone()
e:SetLabelObject(te2)
te:SetType(26)
c:RegisterEffect(te2,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
......@@ -140,7 +141,6 @@ function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local te2=e:GetLabelObject()
re:Reset()
rc:RegisterEffect(te2,true)
if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) then
rc:CancelToGrave(false)
if KOISHI_CHECK then
......
......@@ -57,6 +57,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local te2=te:Clone()
e:SetLabelObject(te2)
te:SetType(26)
c:RegisterEffect(te2,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
......@@ -75,7 +76,6 @@ function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local te2=e:GetLabelObject()
re:Reset()
rc:RegisterEffect(te2,true)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_END and Duel.GetCurrentChain()==0
......
......@@ -43,14 +43,8 @@ function c22348013.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c22348013.costfilter,tp,LOCATION_HAND,0,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local tc=g:Select(tp,1,1,nil):GetFirst()
if te then
te:UseCountLimit(tp)
Duel.Release(e:GetHandler(),REASON_COST)
Duel.SendtoGrave(tc,REASON_COST)
else
Duel.Release(e:GetHandler(),REASON_COST)
Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD)
end
Duel.Release(e:GetHandler(),REASON_COST)
Duel.SendtoGrave(tc,REASON_COST+REASON_DISCARD)
end
function c22348013.spfilter(c,e,tp)
return c:IsSetCard(0x613) and not c:IsCode(22348013) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -50,7 +50,7 @@ function cm.initial_effect(c)
e6:SetOperation(cm.drop)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_XMATERIAL+EFFECT_TYPE_SINGLE)
e7:SetType(EFFECT_TYPE_XMATERIAL)
e7:SetCode(EFFECT_ADD_TYPE)
e7:SetValue(TYPE_EFFECT)
c:RegisterEffect(e7)
......
......@@ -19,13 +19,14 @@ function cm.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(3,m+100)
e2:SetCountLimit(3,m+10000
)
e2:SetTarget(cm.seqtg)
e2:SetOperation(cm.seqop)
c:RegisterEffect(e2)
end
function cm.tdfilter(c,tp)
return c:IsSetCard(0x156) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsAbleToHandAsCost() and Duel.IsExistingMatchingCard(cm.thcheck,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,c)
return c:IsSetCard(0x156) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and c:IsAbleToHandAsCost() and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,c)
end
function cm.thfilter(c)
return c:IsSetCard(0x156) and c:IsAbleToDeckAsCost() and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
......@@ -37,7 +38,7 @@ function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,e:GetHandler(),tp)
and Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,e:GetHandler(),tp)
end
function cm.check(c)
return c:IsSetCard(0x156) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
......
......@@ -45,7 +45,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function s.thfilter(c)
return c.setname=="Zx02" and not c:IsForbidden()
return c.setname=="Zx02" and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function s.mfilter(c)
return c.setname=="Zx02" and c:IsPreviousLocation(LOCATION_MZONE) and c:IsType(TYPE_MONSTER)
......
......@@ -50,7 +50,7 @@ function cm.filter(c)
return c:IsSetCard(0x29b) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.intg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil) end
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.inop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -50,7 +50,7 @@ function cm.filter(c)
return c:IsSetCard(0x29b) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.intg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.inop(e,tp,eg,ep,ev,re,r,rp)
......
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