Commit 4e3cdfa7 authored by VanillaSalt's avatar VanillaSalt

fix

parent 37002deb
......@@ -25,7 +25,7 @@ end
function c10131855.repop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if g:GetCount()>0 then
local sg=g:RandomSelect(1-tp,1,nil)
local sg=g:RandomSelect(1-tp,1)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
end
end
......
......@@ -11,7 +11,7 @@ function c18000338.initial_effect(c)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e1)
c:RegisterEffect(e2)
end
function c18000338.condition(e)
local c=e:GetHandler()
......
......@@ -34,6 +34,7 @@ function c21254443.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingTarget(c21254443.filter,tp,LOCATION_GRAVE,0,2,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c21254443.filter,tp,LOCATION_GRAVE,0,2,2,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,0,0)
end
function c21254443.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
......
......@@ -72,7 +72,7 @@ function c29357956.sprcon(e,c)
local sg=Group.CreateGroup()
return mg:IsExists(c29357956.fselect,1,nil,tp,mg,sg)
end
function c29357956.spop(e,tp,eg,ep,ev,re,r,rp,c)
function c29357956.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c29357956.spfilter,tp,LOCATION_MZONE,0,nil)
local sg=Group.CreateGroup()
while sg:GetCount()<3 do
......
......@@ -17,9 +17,9 @@ function c36033786.posfilter(c)
end
function c36033786.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c36033786.posfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c36033786.posfilter,tp,0,LOCATION_MZONE,1,nil,POS_FACEUP_ATTACK) end
if chk==0 then return Duel.IsExistingTarget(c36033786.posfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,c36033786.posfilter,tp,0,LOCATION_MZONE,1,1,nil,POS_FACEUP_ATTACK)
local g=Duel.SelectTarget(tp,c36033786.posfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c36033786.posop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -97,19 +97,19 @@ function c43387895.copyop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1)
if not tc:IsType(TYPE_TRAPMONSTER) then
local cid=c:CopyEffect(code,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,1)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(43387895,1))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e3:SetLabelObject(e1)
e3:SetLabel(cid)
e3:SetOperation(c43387895.rstop)
c:RegisterEffect(e3)
end
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(43387895,1))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCountLimit(1)
e3:SetRange(LOCATION_MZONE)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e3:SetLabelObject(e1)
e3:SetLabel(cid)
e3:SetOperation(c43387895.rstop)
c:RegisterEffect(e3)
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
......
......@@ -15,60 +15,31 @@ function c56343672.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeckAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function c56343672.ctfilter(c)
return c:IsFaceup() and c:IsType(TYPE_LINK)
end
function c56343672.spfilter(c,e,tp,zone)
return c:GetLevel()>0 and not c:IsCode(56343672) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function c56343672.spfilter0(c,e,tp)
return c:GetLevel()>0 and not c:IsCode(56343672) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp)
end
function c56343672.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local zone=bit.band(Duel.GetLinkedZone(tp),0x1f)
if zone==0 then return false end
local tempfix=false
local ct=0
for i=0,4 do
local z=bit.lshift(1,i)
local c=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if bit.band(zone,z)>0 then
if not c then
ct=ct+1
elseif c==e:GetHandler() then
tempfix=true
ct=ct+1
end
end
end
if ct==0 then return false end
local zone=Duel.GetLinkedZone(tp)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)
local seq=e:GetHandler():GetSequence()
if seq<5 and bit.extract(zone,seq)~=0 then ct=ct+1 end
if ct<=0 then return false end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
if not tempfix then
local g=Duel.GetMatchingGroup(c56343672.spfilter,tp,LOCATION_DECK,0,nil,e,tp,zone)
return g:CheckWithSumEqual(Card.GetLevel,6,1,ct)
else
local g=Duel.GetMatchingGroup(c56343672.spfilter0,tp,LOCATION_DECK,0,nil,e,tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and g:CheckWithSumEqual(Card.GetLevel,6,1,ct)
end
local g=Duel.GetMatchingGroup(c56343672.spfilter,tp,LOCATION_DECK,0,nil,e,tp,zone)
return g:CheckWithSumEqual(Card.GetLevel,6,1,ct)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c56343672.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local zone=bit.band(Duel.GetLinkedZone(tp),0x1f)
if zone==0 then return end
local ct=0
for i=0,4 do
local z=bit.lshift(1,i)
if bit.band(zone,z)>0 and Duel.CheckLocation(tp,LOCATION_MZONE,i) then
ct=ct+1
end
end
if ct==0 then return end
local zone=Duel.GetLinkedZone(tp)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)
if ct<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ct=1 end
local g=Duel.GetMatchingGroup(c56343672.spfilter,tp,LOCATION_DECK,0,nil,e,tp,zone)
if ct>0 and g:CheckWithSumEqual(Card.GetLevel,6,1,ct) then
if g:CheckWithSumEqual(Card.GetLevel,6,1,ct) then
local fid=c:GetFieldID()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectWithSumEqual(tp,Card.GetLevel,6,1,ct)
local tc=sg:GetFirst()
......
......@@ -24,34 +24,15 @@ function c5821478.initial_effect(c)
e2:SetTarget(c5821478.damtg)
e2:SetOperation(c5821478.damop)
c:RegisterEffect(e2)
if not Duel.GetLinkedGroup then
function Duel.GetLinkedGroup(p,s,o)
local g=Group.CreateGroup()
local loc1,loc2=0,0
if s==1 then loc1=LOCATION_MZONE end
if o==1 then loc2=LOCATION_MZONE end
local tg=Duel.GetMatchingGroup(c5821478.lgfilter,p,loc1,loc2,nil)
local tc=tg:GetFirst()
while tc do
local lg=tc:GetLinkedGroup()
if lg:GetCount()>0 then
g:Merge(lg)
end
tc=tg:GetNext()
end
return g
end
end
end
function c5821478.lgfilter(c)
return c:IsFaceup() and c:IsType(TYPE_LINK)
end
function c5821478.cfilter(c,g)
return g:IsContains(c)
function c5821478.cfilter(c,zone)
local seq=c:GetSequence()
if c:IsControler(1) then seq=seq+16 end
return bit.extract(zone,seq)~=0
end
function c5821478.descon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetLinkedGroup(tp,1,1)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c5821478.cfilter,1,nil,g)
local zone=Duel.GetLinkedZone(0)+Duel.GetLinkedZone(1)*0x10000
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c5821478.cfilter,1,nil,zone)
end
function c5821478.desfilter(c)
return c:GetSequence()<5
......
......@@ -7,49 +7,6 @@ function c58297729.initial_effect(c)
e1:SetTarget(c58297729.target)
e1:SetOperation(c58297729.activate)
c:RegisterEffect(e1)
if not Duel.RockPaperScissors then
function Duel.RockPaperScissors()
local rock,paper,xors=0,0,0
if c101001180 then
rock=101001180
else
rock=71786742
end
if c101001181 then
paper=101001181
else
paper=45286019
end
if c101001182 then
xors=101001182
else
xors=1045143
end
local rocktemp=Duel.CreateToken(0,rock)
local papertemp=Duel.CreateToken(0,paper)
local xorstemp=Duel.CreateToken(0,xors)
local ch=Group.FromCards(rocktemp,papertemp,xorstemp)
Duel.Remove(ch,POS_FACEUP,REASON_RULE)
local res=-1
repeat
local r0=ch:Select(0,1,1,nil)
local r1=ch:Select(1,1,1,nil)
local rct0=r0:GetFirst():GetCode()
local rct1=r1:GetFirst():GetCode()
Duel.Hint(HINT_CARD,1,rct0)
Duel.Hint(HINT_CARD,0,rct1)
if rct0==rct1 then
res=-1
elseif ((rct0 == rock and rct1 == paper) or (rct0 == paper and rct1 == xors) or (rct0 == xors and rct1 == rock)) then
res=1
else
res=0
end
until res==0 or res==1
Duel.SendtoDeck(ch,nil,-2,REASON_RULE)
return res
end
end
end
function c58297729.target(e,tp,eg,ep,ev,re,r,rp,chk)
local a=Duel.GetAttacker()
......
......@@ -62,7 +62,7 @@ function c62306203.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.SelectTarget(tp,c62306203.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c62306203.spop2(e,tp,eg,ep,ev,re,r,rp,chk)
function c62306203.spop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
......
......@@ -2,7 +2,7 @@
function c98700941.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(60953949,0))
e1:SetDescription(aux.Stringid(98700941,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
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