Commit 3dd40b18 authored by POLYMER's avatar POLYMER

fix

parent efb1ddd6
No preview for this file type
......@@ -22,7 +22,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.thfilter(c)
return (c:IsCode(10000000,10000010,10000020) or (aux.IsCodeListed(c,10000020) and not c:IsCode(m))) and c:IsAbleToHand()
return (c:IsCode(10000000,10000010,10000020) or (aux.IsCodeListed(c,10000010) and not c:IsCode(m))) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -46,6 +46,8 @@ function cm.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCode(EVENT_LEAVE_FIELD)
local e21=aux.AddThisCardInGraveAlreadyCheck(c)
e2:SetLabelObject(e21)
e2:SetCondition(cm.actcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.actg)
......@@ -210,12 +212,14 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end--]]
end
end
function cm.actfilter(c)
function cm.actfilter(c,se)
if not (se==nil or c:GetReasonEffect()~=se) then return false end
local code1,code2=c:GetPreviousCodeOnField()
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and (code1==11451631 or code2==11451631)
end
function cm.actcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.actfilter,1,nil) and (not eg:IsContains(e:GetHandler()) or e:GetHandler():IsLocation(LOCATION_HAND))
local se=e:GetLabelObject():GetLabelObject()
return eg:IsExists(cm.actfilter,1,nil,se) and (not eg:IsContains(e:GetHandler()) or e:GetHandler():IsLocation(LOCATION_HAND))
end
function cm.setfilter(c)
return c:IsSetCard(0x979) and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
......
......@@ -46,6 +46,8 @@ function cm.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCode(EVENT_LEAVE_FIELD)
local e21=aux.AddThisCardInGraveAlreadyCheck(c)
e2:SetLabelObject(e21)
e2:SetCondition(cm.actcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.actg)
......@@ -210,12 +212,14 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end--]]
end
end
function cm.actfilter(c)
function cm.actfilter(c,se)
if not (se==nil or c:GetReasonEffect()~=se) then return false end
local code1,code2=c:GetPreviousCodeOnField()
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and (code1==11451631 or code2==11451631)
end
function cm.actcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.actfilter,1,nil) and (not eg:IsContains(e:GetHandler()) or e:GetHandler():IsLocation(LOCATION_HAND))
local se=e:GetLabelObject():GetLabelObject()
return eg:IsExists(cm.actfilter,1,nil,se) and (not eg:IsContains(e:GetHandler()) or e:GetHandler():IsLocation(LOCATION_HAND))
end
function cm.actg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
......
......@@ -46,6 +46,8 @@ function cm.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCode(EVENT_LEAVE_FIELD)
local e21=aux.AddThisCardInGraveAlreadyCheck(c)
e2:SetLabelObject(e21)
e2:SetCondition(cm.actcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.actg)
......@@ -210,12 +212,14 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end--]]
end
end
function cm.actfilter(c)
function cm.actfilter(c,se)
if not (se==nil or c:GetReasonEffect()~=se) then return false end
local code1,code2=c:GetPreviousCodeOnField()
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and (code1==11451631 or code2==11451631)
end
function cm.actcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.actfilter,1,nil) and (not eg:IsContains(e:GetHandler()) or e:GetHandler():IsLocation(LOCATION_HAND))
local se=e:GetLabelObject():GetLabelObject()
return eg:IsExists(cm.actfilter,1,nil,se) and (not eg:IsContains(e:GetHandler()) or e:GetHandler():IsLocation(LOCATION_HAND))
end
function cm.actg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToDeck() end
......
......@@ -46,6 +46,8 @@ function cm.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCode(EVENT_LEAVE_FIELD)
local e21=aux.AddThisCardInGraveAlreadyCheck(c)
e2:SetLabelObject(e21)
e2:SetCondition(cm.actcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.actg)
......@@ -210,12 +212,14 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end--]]
end
end
function cm.actfilter(c)
function cm.actfilter(c,se)
if not (se==nil or c:GetReasonEffect()~=se) then return false end
local code1,code2=c:GetPreviousCodeOnField()
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and (code1==11451631 or code2==11451631)
end
function cm.actcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.actfilter,1,nil) and (not eg:IsContains(e:GetHandler()) or e:GetHandler():IsLocation(LOCATION_HAND))
local se=e:GetLabelObject():GetLabelObject()
return eg:IsExists(cm.actfilter,1,nil,se) and (not eg:IsContains(e:GetHandler()) or e:GetHandler():IsLocation(LOCATION_HAND))
end
function cm.desfilter(c)
return (c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsOnField()) or (c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsLocation(LOCATION_DECK) and c:IsAbleToGrave())
......
......@@ -46,6 +46,8 @@ function cm.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCode(EVENT_LEAVE_FIELD)
local e21=aux.AddThisCardInGraveAlreadyCheck(c)
e2:SetLabelObject(e21)
e2:SetCondition(cm.actcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.actg)
......@@ -210,12 +212,14 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end--]]
end
end
function cm.actfilter(c)
function cm.actfilter(c,se)
if not (se==nil or c:GetReasonEffect()~=se) then return false end
local code1,code2=c:GetPreviousCodeOnField()
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and (code1==11451631 or code2==11451631)
end
function cm.actcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.actfilter,1,nil) and (not eg:IsContains(e:GetHandler()) or e:GetHandler():IsLocation(LOCATION_HAND))
local se=e:GetLabelObject():GetLabelObject()
return eg:IsExists(cm.actfilter,1,nil,se) and (not eg:IsContains(e:GetHandler()) or e:GetHandler():IsLocation(LOCATION_HAND))
end
function cm.thfilter(c)
return c:GetType()==TYPE_TRAP and c:IsAbleToHand()
......
......@@ -46,6 +46,8 @@ function cm.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCode(EVENT_LEAVE_FIELD)
local e21=aux.AddThisCardInGraveAlreadyCheck(c)
e2:SetLabelObject(e21)
e2:SetCondition(cm.actcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.actg)
......@@ -210,12 +212,14 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
end--]]
end
end
function cm.actfilter(c)
function cm.actfilter(c,se)
if not (se==nil or c:GetReasonEffect()~=se) then return false end
local code1,code2=c:GetPreviousCodeOnField()
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and (code1==11451631 or code2==11451631)
end
function cm.actcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.actfilter,1,nil) and (not eg:IsContains(e:GetHandler()) or e:GetHandler():IsLocation(LOCATION_HAND))
local se=e:GetLabelObject():GetLabelObject()
return eg:IsExists(cm.actfilter,1,nil,se) and (not eg:IsContains(e:GetHandler()) or e:GetHandler():IsLocation(LOCATION_HAND))
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x979) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c,0x60)>0
......
......@@ -33,6 +33,8 @@ function cm.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCode(EVENT_LEAVE_FIELD)
local e21=aux.AddThisCardInGraveAlreadyCheck(c)
e2:SetLabelObject(e21)
e2:SetCondition(cm.actcon)
e2:SetCost(aux.bfgcost)
e2:SetOperation(cm.actop)
......@@ -229,12 +231,14 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
tc:CompleteProcedure()
end
end
function cm.actfilter(c)
function cm.actfilter(c,se)
if not (se==nil or c:GetReasonEffect()~=se) then return false end
local code1,code2=c:GetPreviousCodeOnField()
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) and (code1==11451631 or code2==11451631)
end
function cm.actcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.actfilter,1,nil) and (not eg:IsContains(e:GetHandler()) or e:GetHandler():IsLocation(LOCATION_HAND))
local se=e:GetLabelObject():GetLabelObject()
return eg:IsExists(cm.actfilter,1,nil,se) and (not eg:IsContains(e:GetHandler()) or e:GetHandler():IsLocation(LOCATION_HAND))
end
function cm.actop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
......
......@@ -70,6 +70,12 @@ function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterFlagEffect(tp,id+o*4,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
Duel.SetTargetCard(rc)
if rc:IsLocation(LOCATION_GRAVE) then
e:SetCategory(CATEGORY_GRAVE_SPSUMMON)
end
if rc:IsLocation(LOCATION_DECK) then
e:SetCategory(CATEGORY_DECKDES+CATEGORY_SPECIAL_SUMMON)
end
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
--执棋者 -方舟骑士-
function c29065506.initial_effect(c)
aux.AddCodeList(c,29065502)
--add code
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_ADD_CODE)
e2:SetValue(29065502)
c:RegisterEffect(e2)
--splimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c29065506.splimit)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65518099,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,29065506)
e2:SetCost(c29065506.thco)
e2:SetTarget(c29065506.thtg)
e2:SetOperation(c29065506.thop)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(2414168,0))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DAMAGE)
e3:SetRange(LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE)
e3:SetCost(aux.bfgcost)
e3:SetCondition(c29065506.rmcon)
e3:SetTarget(c29065506.rmtg)
e3:SetOperation(c29065506.rmop)
c:RegisterEffect(e3)
end
function c29065506.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
--e3
function c29065506.rmcon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
return ep==tp and Duel.GetAttackTarget()==nil and tc:IsAbleToRemove(1-tp,POS_FACEDOWN,REASON_RULE)
end
function c29065506.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetAttacker()
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0)
end
function c29065506.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
if tc:IsRelateToBattle() then
Duel.Remove(tc,POS_FACEDOWN,REASON_RULE,1-tp)
end
end
--e2
function c29065506.thco(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,600) end
Duel.PayLPCost(tp,600)
end
function c29065506.thfilter(c)
return c:IsSetCard(0x87af) and c:IsAbleToHand() and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil,c:GetCode())
end
function c29065506.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c29065506.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c29065506.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c29065506.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
......@@ -77,7 +77,6 @@ function c65840030.activate1(e,tp,eg,ep,ev,re,r,rp)
Duel.AdjustInstantly()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
......
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