Commit 17959947 authored by VanillaSalt's avatar VanillaSalt

fix

parent 3fb19fcb
......@@ -39,22 +39,22 @@ function c30575681.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c30575681.eqfilter1(c,ec)
return ec:CheckEquipTarget(c)
end
function c30575681.eqfilter2(c,tp)
function c30575681.eqfilter1(c)
return c:IsSetCard(0x207a) and c:GetEquipTarget()
and Duel.IsExistingTarget(c30575681.eqfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,c:GetEquipTarget(),c)
and Duel.IsExistingTarget(c30575681.eqfilter2,0,LOCATION_MZONE,LOCATION_MZONE,1,c:GetEquipTarget(),c)
end
function c30575681.eqfilter2(c,ec)
return c:IsFaceup() and ec:CheckEquipTarget(c)
end
function c30575681.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(c30575681.eqfilter2,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil,tp) end
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c30575681.eqfilter1,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g1=Duel.SelectTarget(tp,c30575681.eqfilter2,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil,tp)
local g1=Duel.SelectTarget(tp,c30575681.eqfilter1,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil)
local tc=g1:GetFirst()
e:SetLabelObject(tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g2=Duel.SelectTarget(tp,c30575681.eqfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,tc:GetEquipTarget(),tc)
local g2=Duel.SelectTarget(tp,c30575681.eqfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,tc:GetEquipTarget(),tc)
end
function c30575681.eqop(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetLabelObject()
......
......@@ -78,8 +78,7 @@ function c3580032.spfilter(c,e,tp)
end
function c3580032.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c3580032.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
end
and Duel.IsExistingMatchingCard(c3580032.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c3580032.spop(e,tp,eg,ep,ev,re,r,rp)
......@@ -95,7 +94,7 @@ function c3580032.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c3580032.scfilter(c)
return c:IsSetCard(0x107a) and c:IsSynchroSummonable(nil,nil)
return c:IsSetCard(0x107a) and c:IsSynchroSummonable(nil)
end
function c3580032.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c3580032.scfilter,tp,LOCATION_EXTRA,0,1,nil) end
......
......@@ -54,13 +54,13 @@ end
function c35952884.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=c:GetMaterial()
local ct=mg:FilterCount(mg,c35952884.mfilter,nil)
local ct=mg:FilterCount(c35952884.mfilter,nil)
if bit.band(r,REASON_SYNCHRO)~=0 and ct>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetReset(RESET_EVENT+0x1ff0000)
e1:SetValue(ct)
e1:SetValue(ct-1)
c:RegisterEffect(e1)
end
end
......
......@@ -55,7 +55,7 @@ function c52198054.target1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
e:SetLabel(1)
e:GetHandler():RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(40555959,2))
e:GetHandler():RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(52198054,2))
else
e:SetCategory(0)
e:SetProperty(0)
......
......@@ -19,7 +19,7 @@ function c60229110.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsFacedown() end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsFacedown(),tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local g=Duel.SelectTarget(tp,Card.IsFacedown,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c60229110.operation(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -6,7 +6,7 @@ function c66970385.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,66970385)
e1:SetCountLimit(1,66970385+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c66970385.condition)
e1:SetTarget(c66970385.target)
e1:SetOperation(c66970385.activate)
......@@ -16,14 +16,14 @@ function c66970385.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function c66970385.filter(c,e,tp)
return c:IsSetCard(0x107a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x107a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(c66970385.eqfilter,tp,LOCATION_GRAVE,0,1,nil,tp,c)
end
function c66970385.eqfilter(c,tp,ec)
return c:IsSetCard(0x207a) and c:CheckUniqueOnField(tp) and c:CheckEquipTarget(ec)
end
function c66970385.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) end
if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c66970385.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......@@ -40,7 +40,8 @@ function c66970385.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local ec=tg:GetFirst()
if ec==tc then ec=tg:GetNext() end
if tc:IsRelateToEffect(e) and ec:IsRelateToEffect(e) and ec:CheckUniqueOnField(tp) and ec:CheckEquipTarget(tc) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
if tc:IsRelateToEffect(e) and ec:IsRelateToEffect(e) and ec:CheckUniqueOnField(tp) and ec:CheckEquipTarget(tc)
and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.Equip(tp,ec,tc)
end
end
......@@ -20,7 +20,10 @@ function c73125233.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
local tc=g:GetFirst()
if tc and tc:IsAbleToDeck() then
Duel.SetOperationInfo(0,CATEGORY_TODECK,tc,1,0,0)
end
end
function c73125233.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -53,7 +53,7 @@ function c87288189.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end
if chk==0 then return true end
local ct=1
if e:GetLabel()==1 and Duel.SelectYesNo(tp,aux.Stringid(87288189,2)) then ct=2 end
if e:GetLabel()==1 then ct=2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
......
......@@ -13,7 +13,7 @@ function c99311109.initial_effect(c)
c:RegisterEffect(e1)
end
function c99311109.cfilter(c)
return c:GetFlagEffect(LOCATION_EXTRA)~=0
return c:GetSummonLocation()==LOCATION_EXTRA
end
function c99311109.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c99311109.cfilter,tp,LOCATION_MZONE,0,1,nil)
......
......@@ -938,6 +938,5 @@ function Auxiliary.PendOperation()
local g=Duel.SelectMatchingCard(tp,Auxiliary.PConditionFilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,ft,nil,e,tp,lscale,rscale)
sg:Merge(g)
end
Duel.Hint(HINT_OPSELECTED,1-tp,aux.Stringid(0,1074))
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