Commit 773555f6 authored by VanillaSalt's avatar VanillaSalt

fix

parent def94600
......@@ -76,10 +76,8 @@ end
function c10045474.disop(e,tp,eg,ep,ev,re,r,rp)
local tseq=e:GetLabel()
local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
local p=re:GetHandlerPlayer()
local tp=e:GetHandlerPlayer()
if bit.band(loc,LOCATION_SZONE)~=0 and re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
and ((p==tp and seq==tseq) or (p==1-tp and seq==4-tseq)) then
and ((rp==tp and seq==tseq) or (rp==1-tp and seq==4-tseq)) then
Duel.NegateEffect(ev)
end
end
......
......@@ -6,7 +6,7 @@ function c10158145.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetTarget(c10158145.sptg)
e1:SetOperation(c10158145.spop)
c:RegisterEffect(e1)
......@@ -34,8 +34,8 @@ function c10158145.initial_effect(c)
end
function c10158145.get_zone(c,seq)
local zone=0
if seq<4 and c:IsLinkMarker(LINK_MARKER_LEFT) then zone=bit.bor(zone,math.pow(2,seq+1)) end
if seq>0 and seq<5 and c:IsLinkMarker(LINK_MARKER_RIGHT) then zone=bit.bor(zone,math.pow(2,seq-1)) end
if seq<4 and c:IsLinkMarker(LINK_MARKER_LEFT) then zone=bit.replace(zone,0x1,seq+1) end
if seq>0 and seq<5 and c:IsLinkMarker(LINK_MARKER_RIGHT) then zone=bit.replace(zone,0x1,seq-1) end
return zone
end
function c10158145.spfilter(c,e,tp,seq)
......
......@@ -34,7 +34,7 @@ function c10852583.initial_effect(c)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e5)
end
function c10852583.descon(e)
function c10852583.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSequence()~=2
end
function c10852583.desop(e,tp,eg,ep,ev,re,r,rp)
......@@ -76,9 +76,6 @@ function c10852583.mvtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=eg:GetFirst()
tc:CreateEffectRelation(e)
end
function c10852583.desfilter(c,g)
return g:IsContains(c)
end
function c10852583.mvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=eg:GetFirst()
......@@ -96,8 +93,7 @@ function c10852583.mvop(e,tp,eg,ep,ev,re,r,rp)
if seq1>seq2 and Duel.CheckLocation(tp,LOCATION_MZONE,seq1-1) then nseq=seq1-1
else nseq=seq1+1 end
Duel.MoveSequence(c,nseq)
local cg=c:GetColumnGroup()
local g=Duel.GetMatchingGroup(c10852583.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,cg)
local g=c:GetColumnGroup()
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.Destroy(g,REASON_EFFECT)
......
......@@ -35,9 +35,8 @@ function c12097275.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SelectTarget(tp,aux.nzatk,tp,0,LOCATION_MZONE,1,1,nil)
end
function c12097275.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
......
......@@ -55,7 +55,6 @@ function c19036557.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c19036557.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c19036557.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
......
......@@ -53,19 +53,16 @@ end
function c22219822.lkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_LINK)
end
function c22219822.desfilter(c,g)
return g:IsContains(c)
end
function c22219822.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=Group.CreateGroup()
local lg=Duel.GetMatchingGroup(c22219822.lkfilter,tp,0,LOCATION_MZONE,nil)
for tc in aux.Next(lg) do
tg:Merge(tc:GetLinkedGroup())
end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c22219822.desfilter(chkc,tg) end
if chk==0 then return Duel.IsExistingTarget(c22219822.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tg) end
if chkc then return tg:IsContains(chkc) and chkc:IsCanBeEffectTarget(e) end
if chk==0 then return tg:IsExists(Card.IsCanBeEffectTarget,1,nil,e) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c22219822.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tg)
local g=tg:FilterSelect(tp,Card.IsCanBeEffectTarget,1,1,nil,e)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c22219822.desop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -68,4 +68,4 @@ function c34294855.upop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
end
......@@ -69,7 +69,7 @@ function c37310367.disop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
local sc=g:GetFirst()
if sc==rc then sc=g:GetNext() end
if sc:IsControler(tp) and sc:IsRace(RACE_CYBERS) and rc:IsControler(1-tp) then
if sc:IsControler(tp) and sc:IsRace(RACE_CYBERSE) and rc:IsControler(1-tp) then
while sc do
Duel.NegateRelatedChain(sc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
......
......@@ -32,7 +32,7 @@ end
function c59604521.filter(c,e,tp)
return c:IsSetCard(0xfb) and c:IsType(TYPE_LINK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c59604521.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
function c59604521.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c59604521.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c59604521.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
......
......@@ -40,7 +40,7 @@ function c63492244.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local mg=eg:GetFirst():GetMaterial()
if chkc then return mg:IsContains(chkc) and c63492244.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and mg:IsExists(c63492244.spfilter,1,c,e,tp) end
and mg:IsExists(c63492244.spfilter,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=mg:FilterSelect(tp,c63492244.spfilter,1,1,nil,e,tp)
Duel.SetTargetCard(g)
......
......@@ -21,6 +21,6 @@ function c68937720.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,1000)
end
function c68937720.aclimit(e,re,tp)
local loc=re:GetActivateLocation()
return loc==LOCATION_HAND and re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsImmuneToEffect(e)
local rc=re:GetHandler()
return rc:IsLocation(LOCATION_HAND) and rc:IsType(TYPE_MONSTER) and not rc:IsImmuneToEffect(e)
end
......@@ -50,7 +50,7 @@ end
function c72819261.filter(c)
return (c:IsSetCard(0x400d) or c:IsSetCard(0x113)) and not c:IsCode(72819261) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c72819261.sgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c72819261.sgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c72819261.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
......
......@@ -12,7 +12,7 @@ function c83828288.initial_effect(c)
end
function c83828288.filter(c,tp)
local lv=c:GetLevel()
return lv>0 and c:IsFaceup() and c:IsAbleToDeck() and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>=lv and Duel.IsPlayerCanDraw(tp,lv)
return lv>0 and c:IsFaceup() and c:IsAbleToHand() and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>=lv and Duel.IsPlayerCanDraw(tp,lv)
end
function c83828288.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c83828288.filter(chkc,tp) 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