Commit fa2e80c6 authored by POLYMER's avatar POLYMER

fix

parent 15002eb1
......@@ -59,7 +59,7 @@ function s.pcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPublic()
end
function s.cfilter(c,ec)
return ((c:GetOriginalType()&TYPE_SPELL+TYPE_TRAP)>0 and c:IsSetCard(0x3a70) or c:IsLocation(LOCATION_ONFIELD) and ec:IsLocation(LOCATION_HAND) and ec:IsPublic()) and c:IsAbleToGraveAsCost()
return c:GetOriginalType()&(TYPE_SPELL+TYPE_TRAP)>0 and (c:IsSetCard(0x3a70) or c:IsLocation(LOCATION_ONFIELD) and ec:IsLocation(LOCATION_HAND) and ec:IsPublic()) and c:IsAbleToGraveAsCost()
end
function s.sscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -20,7 +20,6 @@ function s.initial_effect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCountLimit(1,id+100)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(s.imncon)
e2:SetOperation(s.imnop)
......@@ -114,7 +113,7 @@ end
function s.imnop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.movefilter,tp,LOCATION_MZONE,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then
if g:GetCount()>0 and Duel.GetFlagEffect(tp,id+100)==0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then
Duel.Hint(HINT_CARD,0,id)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
......@@ -125,8 +124,10 @@ function s.imnop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CLIENT_HINT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_CHAIN)
e1:SetValue(s.efilter)
tc:RegisterEffect(e1)
tc:RegisterEffect(e1,true)
end
Duel.AdjustAll()
Duel.RegisterFlagEffect(tp,id+100,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(tp,12835102,RESET_PHASE+PHASE_END,0,1)
end
end
......
--ぎりぎり対峙するG
function c49811161.initial_effect(c)
c:EnableCounterPermit(0x4981)
--change name
aux.EnableChangeCode(c,15721123,LOCATION_GRAVE)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(49811161,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c49811161.condition)
e1:SetTarget(c49811161.sptg)
e1:SetOperation(c49811161.spop)
c:RegisterEffect(e1)
--remove counter
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(49811161,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c49811161.rctcon)
e2:SetOperation(c49811161.rctop)
c:RegisterEffect(e2)
c:EnableCounterPermit(0x4981)
--change name
aux.EnableChangeCode(c,15721123,LOCATION_GRAVE)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(49811161,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c49811161.condition)
e1:SetTarget(c49811161.sptg)
e1:SetOperation(c49811161.spop)
c:RegisterEffect(e1)
--remove counter
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(49811161,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c49811161.rctcon)
e2:SetOperation(c49811161.rctop)
c:RegisterEffect(e2)
end
function c49811161.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 and rp==1-tp
local c=e:GetHandler()
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0 and rp==1-tp
end
function c49811161.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c49811161.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 then
local cn=Duel.GetMatchingGroupCount(nil,tp,LOCATION_HAND,LOCATION_HAND,nil)
c:AddCounter(0x4981,cn)
c:CompleteProcedure()
end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 then
local cn=Duel.GetMatchingGroupCount(nil,tp,LOCATION_HAND,LOCATION_HAND,nil)
c:AddCounter(0x4981,cn)
c:CompleteProcedure()
c:RegisterFlagEffect(49811161,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,0,1)
end
end
function c49811161.cfilter(c,tp)
return c:IsSummonPlayer(1-tp)
return c:IsSummonPlayer(1-tp)
end
function c49811161.rctcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c49811161.cfilter,1,nil,tp)
return eg:IsExists(c49811161.cfilter,1,nil,tp) and e:GetHandler():GetFlagEffect(49811161)~=0
end
function c49811161.rctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
if c:IsCanRemoveCounter(tp,0x4981,1,REASON_EFFECT) then
c:RemoveCounter(tp,0x4981,1,REASON_EFFECT)
else
Duel.Destroy(c,REASON_EFFECT)
local c=e:GetHandler()
--can not spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(49811161,2))
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetTargetRange(0,1)
Duel.RegisterEffect(e3,tp)
end
end
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
if c:IsCanRemoveCounter(tp,0x4981,1,REASON_EFFECT) then
c:RemoveCounter(tp,0x4981,1,REASON_EFFECT)
else
Duel.Destroy(c,REASON_EFFECT)
local c=e:GetHandler()
--can not spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(49811161,2))
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetTargetRange(0,1)
Duel.RegisterEffect(e3,tp)
end
end
end
\ No newline at end of file
......@@ -118,9 +118,8 @@ end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetLabel()==100 and Duel.IsExistingMatchingCard(cm.drfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE,0,1,nil) end
e:SetLabel(0)
local g=Duel.GetMatchingGroup(cm.drfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=g:Select(tp,1,1,nil):GetFirst()
local tc=Duel.SelectMatchingCard(tp,cm.drfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE,0,1,1,nil):GetFirst()
Duel.Remove(tc,POS_FACEUP,REASON_COST)
e:SetLabelObject(tc)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
......
......@@ -4,7 +4,7 @@ cm.name="歼世死士轮 贩子"
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DECKDES)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
......
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