Commit 76d0480c authored by POLYMER's avatar POLYMER

fix

parent d2e30957
No preview for this file type
......@@ -19,7 +19,7 @@ function cm.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetCountLimit(1,m)
e2:SetTarget(cm.target)
e2:SetOperation(cm.activate)
c:RegisterEffect(e2)
......@@ -29,7 +29,7 @@ function cm.initial_effect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m)
e3:SetCountLimit(1)
e3:SetCost(cm.thcost1)
e3:SetTarget(cm.thtg1)
e3:SetOperation(cm.thop1)
......
......@@ -14,6 +14,7 @@ function cm.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(cm.condition)
e2:SetCost(cm.cost)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
......@@ -62,6 +63,9 @@ function cm.initial_effect(c)
c:RegisterEffect(e9)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()==1
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)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
--古代的机械征召
function c98921003.initial_effect(c)
aux.AddCodeList(c,83104731)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,98921003+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c98921003.cost)
e1:SetTarget(c98921003.destg)
e1:SetOperation(c98921003.desop)
c:RegisterEffect(e1)
Duel.AddCustomActivityCounter(98921003,ACTIVITY_SPSUMMON,c98921003.counterfilter)
end
function c98921003.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA) or c:IsSetCard(0x7)
end
function c98921003.filter(c,e,tp)
return ((c:IsSetCard(0x46) and c:IsType(TYPE_SPELL)) or c:IsCode(83104731)) and c:IsAbleToHand()
end
function c98921003.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(98921003,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c98921003.splimit)
Duel.RegisterEffect(e1,tp)
end
function c98921003.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0x7)
end
function c98921003.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
and Duel.IsExistingMatchingCard(c98921003.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c98921003.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c98921003.filter,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
end
\ No newline at end of file
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