Commit 1bdd8788 authored by Nemo Ma's avatar Nemo Ma

fix

parent 5b0d4893
--人理之基 夏洛克·福尔摩斯
function c22020490.initial_effect(c)
c:EnableReviveLimit()
--disable spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22020490,0))
......
......@@ -32,7 +32,7 @@ function c22022010.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c22022010.thfilter(c)
return c:IsSetCard(0xff1) and c:IsAbleToHand()
return c:IsSetCard(0xff1) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c22022010.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22022010.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -6,12 +6,17 @@ function c22022110.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22022110,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(1,22022110)
e1:SetCost(c22022110.rmcost)
e1:SetTarget(c22022110.tftg)
e1:SetOperation(c22022110.tfop)
c:RegisterEffect(e1)
end
function c22022110.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c22022110.tffilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsType(TYPE_FIELD) and c:IsCode(22022100)
and not c:IsForbidden() and c:CheckUniqueOnField(tp)
......
......@@ -35,14 +35,15 @@ function cm.initial_effect(c)
e3:SetOperation(c22348098.thop)
c:RegisterEffect(e3)
end
function c22348098.cfilter(c,tp)
function c22348098.cfilter(c)
local tp=c:GetControler()
return c:IsFaceup() and c:IsSetCard(0x703) and c:IsControler(tp) and c:IsAbleToGrave()
end
function c22348098.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c22348098.cfilter,1,nil,tp)
end
function c22348098.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if chk==0 then return eg:IsExists(c22348098.cfilter,1,nil,tp) end
local tg=Group.Filter(eg,c22348098.cfilter,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,tg,0,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK)
......
......@@ -39,13 +39,16 @@ function cm.initial_effect(c)
end
function c22348111.disfilter(c,seq2)
local seq1=aux.MZoneSequence(c:GetSequence())
return c:IsFaceup() and c:IsSetCard(0x704) and seq1==4-seq2
return c:IsFaceup() and c:IsSetCard(0x704) and seq1==4-seq2 and c:IsType(TYPE_MONSTER)
end
function c22348111.disfilter2(c)
return c:IsFaceup() and c:IsSetCard(0x704) and c:IsType(TYPE_MONSTER)
end
function c22348111.discon(e,tp,eg,ep,ev,re,r,rp)
local htp1=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
local htp2=Duel.GetFieldGroupCount(1-tp,LOCATION_MZONE,0)
local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
return not Duel.IsExistingMatchingCard(c22348111.disfilter,tp,LOCATION_MZONE,0,1,nil,seq) and re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE and htp1<htp2
return not Duel.IsExistingMatchingCard(c22348111.disfilter,tp,LOCATION_MZONE,0,1,nil,seq) and re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE and htp1<htp2 and Duel.IsExistingMatchingCard(c22348111.disfilter2,tp,LOCATION_MZONE,0,1,nil) and not re:GetHandler():IsSetCard(0x704)
end
function c22348111.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,22348111)
......
......@@ -48,14 +48,16 @@ function c25000036.eftg(e,c)
end
function c25000036.xxtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=c:GetLinkedGroupCount()==c:GetLinkedGroup():GetClassCount(Card.GetAttribute)
local b2=c:GetLinkedGroupCount()==c:GetLinkedGroup():GetClassCount(Card.GetRace)
local lct=c:GetLinkedGroupCount()
local b1=lct>1 and lct==c:GetLinkedGroup():GetClassCount(Card.GetAttribute)
local b2=lct>1 and lct==c:GetLinkedGroup():GetClassCount(Card.GetRace)
if chk==0 then return b1 or b2 end
end
function c25000036.xxop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local b1=c:GetLinkedGroupCount()==c:GetLinkedGroup():GetClassCount(Card.GetAttribute)
local b2=c:GetLinkedGroupCount()==c:GetLinkedGroup():GetClassCount(Card.GetRace)
local lct=c:GetLinkedGroupCount()
local b1=lct>1 and lct==c:GetLinkedGroup():GetClassCount(Card.GetAttribute)
local b2=lct>1 and lct==c:GetLinkedGroup():GetClassCount(Card.GetRace)
if b1 then
--negate
local e1=Effect.CreateEffect(c)
......
......@@ -20,7 +20,7 @@ local e0=Effect.CreateEffect(c)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_LSCALE)
e3:SetCode(EFFECT_UPDATE_RSCALE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_PZONE)
e3:SetCondition(c4877055.condition)
......
......@@ -20,7 +20,7 @@ local e0=Effect.CreateEffect(c)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_LSCALE)
e3:SetCode(EFFECT_UPDATE_RSCALE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_PZONE)
e3:SetCondition(c4877057.condition)
......
function c4877066.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,2,c4877066.lcheck)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkType,TYPE_EFFECT),2,2,c4877066.lcheck)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(4877066,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,4877066)
e1:SetCondition(c4877066.hspcon)
e1:SetTarget(c4877066.gytg)
e1:SetOperation(c4877066.rmop)
c:RegisterEffect(e1)
e1:SetDescription(aux.Stringid(4877066,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,4877066)
e1:SetCondition(c4877066.hspcon)
e1:SetTarget(c4877066.gytg)
e1:SetOperation(c4877066.rmop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4877066,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
......@@ -19,7 +19,7 @@ function c4877066.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,4877067)
e2:SetCountLimit(1,4877067)
e2:SetCondition(c4877066.seqcon)
e2:SetTarget(c4877066.thtg)
e2:SetOperation(c4877066.thop)
......@@ -36,7 +36,7 @@ function c4877066.cfilter(c,lg)
return c:IsType(TYPE_EFFECT) and lg:IsContains(c)
end
function c4877066.seqcon(e,tp,eg,ep,ev,re,r,rp)
local lg=e:GetHandler():GetLinkedGroup()
local lg=e:GetHandler():GetLinkedGroup()
return eg:IsExists(c4877066.cfilter,1,nil,lg)
end
function c4877066.thfilter(c)
......@@ -49,30 +49,26 @@ end
function c4877066.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c4877066.thfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
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:SetTargetRange(1,0)
e1:SetTarget(c4877066.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
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:SetTargetRange(1,0)
e1:SetTarget(c4877066.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c4877066.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsSummonableCard()
return c:IsSummonableCard()
end
function c4877066.hspcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c4877066.lcheck(g,lc)
return g:IsExists(c4877066.filter1,1,nil,nil)
return g:IsExists(c4877066.filter1,1,nil,nil)
end
function c4877066.ovfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM)
end
function c4877066.gyfilter(c,g)
return g:IsContains(c)
......@@ -85,16 +81,16 @@ function c4877066.gytg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,1-tp,LOCATION_PZONE)
end
function c4877066.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c4877066.tgfilter,tp,LOCATION_PZONE,0,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c4877066.tgfilter,tp,LOCATION_PZONE,0,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
tc=g:GetFirst()
if Duel.SendtoHand(g,tp,REASON_EFFECT)>0 and tc:IsType(TYPE_RITUAL) then
Duel.BreakEffect()
if Duel.SendtoHand(g,tp,REASON_EFFECT)>0 and tc:IsType(TYPE_RITUAL) and Duel.SelectYesNo(tp,aux.Stringid(4877066,0)) then
Duel.BreakEffect()
local g1=Duel.SelectMatchingCard(tp,c4877066.filter1,tp,LOCATION_DECK,0,1,1,nil)
local tc1=g1:GetFirst()
Duel.MoveToField(tc1,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
end
end
\ No newline at end of file
......@@ -20,7 +20,7 @@ function c4877072.initial_effect(c)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_LSCALE)
e3:SetCode(EFFECT_UPDATE_RSCALE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_PZONE)
e3:SetCondition(c4877072.condition)
......
......@@ -16,7 +16,7 @@ local e0=Effect.CreateEffect(c)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_LSCALE)
e3:SetCode(EFFECT_UPDATE_RSCALE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_PZONE)
e3:SetCondition(c4877079.condition)
......
......@@ -16,7 +16,7 @@ local e0=Effect.CreateEffect(c)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_LSCALE)
e3:SetCode(EFFECT_UPDATE_RSCALE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_PZONE)
e3:SetCondition(c4877083.condition)
......
......@@ -20,7 +20,7 @@ function c4877088.initial_effect(c)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_LSCALE)
e3:SetCode(EFFECT_UPDATE_RSCALE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_PZONE)
e3:SetCondition(c4877088.condition)
......
......@@ -20,7 +20,7 @@ local e0=Effect.CreateEffect(c)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_LSCALE)
e3:SetCode(EFFECT_UPDATE_RSCALE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_PZONE)
e3:SetCondition(c4877097.condition)
......
......@@ -20,7 +20,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e0)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_LSCALE)
e3:SetCode(EFFECT_UPDATE_RSCALE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_PZONE)
e3:SetCondition(cm.condition)
......
......@@ -83,5 +83,5 @@ function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.setfilter(c)
return c.SetCard_VastWitch and not c:IsType(TYPE_FIELD)
return c.SetCard_VastWitch and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_FIELD)
end
......@@ -40,7 +40,7 @@ function c67200610.tefilter(c)
return c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end
function c67200610.tetg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c67200610.tefilter,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c67200610.tefilter,tp,LOCATION_DECK,0,1,nil) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) end
end
function c67200610.teop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -67,11 +67,11 @@ function c9911111.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c9911111.drop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local ct=tg:FilterCount(Card.IsLocation,nil,LOCATION_DECK)
local ct=Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
local ht=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
if ct>0 and ht<ct and Duel.IsPlayerCanDraw(tp,ct-ht) and Duel.SelectYesNo(tp,aux.Stringid(9911111,2)) then
Duel.Draw(tp,ct-ht,REASON_EFFECT)
......
......@@ -24,7 +24,7 @@ end
function c9911113.condition(e,tp,eg,ep,ev,re,r,rp)
for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp~=tp and (te:IsActiveType(TYPE_MONSTER) or te:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(i) then
if tgp~=tp and Duel.IsChainNegatable(i) then
return true
end
end
......
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