Commit e2422fc1 authored by salix5's avatar salix5

fix: multiple target

c21007444 諸刃の活人剣術
http://www.db.yugioh-card.com/yugiohdb/faq_search.action?ope=5&fid=12356&keyword=&tag=-1
If the location count of MZONE is less than 2, the player can choose 1 card form the 2 target.
The destroy is effect is changed into the form similar to c27174286 異次元からの帰還

c66957584 インフェルニティガン
If the location count of M_ZONE is less than 2, it will not special summon any monster.

c86197239 インフェルニティ・ミラージュ
fix card name

c22842214 シー・ランサー
http://www.db.yugioh-card.com/yugiohdb/faq_search.action?ope=5&fid=6643&keyword=&tag=-1
1. If it is not on the field when its effect resolves, the target cards should be sent ot grave.
2. If the location of SZONE is not enough, the player can choose appropriate number of card form those targets.

c92901944 スクラップ・サーチャー
The sp_summon effect cannot be activated if スクラップ・サーチャー itself is in the group of destroyed Scrap monsters.
parent 16a98132
......@@ -23,32 +23,45 @@ function c21007444.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c21007444.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()==0 then return end
local tg=sg:GetFirst()
while tg do
if Duel.SpecialSummonStep(tg,0,tp,tp,false,false,POS_FACEUP_ATTACK) then
tg:RegisterFlagEffect(21007444,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
local sg0=g:Filter(Card.IsRelateToEffect,nil,e)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local sg=nil
if sg0:GetCount()==0 or ft<=0 then return end
if ft<sg0:GetCount() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=sg0:FilterSelect(tp,c21007444.filter,ft,ft,nil,e,tp)
else
sg=sg0.Clone()
end
if sg:GetCount()>0 then
local tg=sg:GetFirst()
local fid=e:GetHandler():GetFieldID()
while tg do
if Duel.SpecialSummonStep(tg,0,tp,tp,false,false,POS_FACEUP_ATTACK) then
tg:RegisterFlagEffect(21007444,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1,fid)
end
tg=sg:GetNext()
end
tg=sg:GetNext()
Duel.SpecialSummonComplete()
sg:KeepAlive()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetOperation(c21007444.desop)
e1:SetLabel(fid)
e1:SetLabelObject(sg)
Duel.RegisterEffect(e1,tp)
end
Duel.SpecialSummonComplete()
sg:KeepAlive()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetOperation(c21007444.desop)
e1:SetLabelObject(sg)
Duel.RegisterEffect(e1,tp)
end
function c21007444.desfilter(c)
return c:GetFlagEffect(21007444)>0
function c21007444.desfilter(c,fid)
return c:GetFlagEffect(21007444)==fid
end
function c21007444.desop(e,tp,eg,ep,ev,re,r,rp)
local sg=e:GetLabelObject()
local dg=sg:Filter(c21007444.desfilter,nil)
local dg=sg:Filter(c21007444.desfilter,nil,e:GetLabel())
sg:DeleteGroup()
if dg:GetCount()>0 then
local tg1=dg:GetFirst()
......
......@@ -48,21 +48,36 @@ end
function c22842214.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if c:IsFacedown() or not c:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_SZONE)<g:GetCount() then return end
local tc=g:GetFirst()
while tc do
Duel.Equip(tp,tc,c,false,true)
tc:RegisterFlagEffect(22842214,RESET_EVENT+0x1fe0000,0,0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c22842214.eqlimit)
tc:RegisterEffect(e1)
tc=g:GetNext()
local tg0=g:Filter(Card.IsRelateToEffect,nil,e)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if tg0:GetCount()==0 or ft<=0 then return end
if c:IsFaceup() and c:IsRelateToEffect(e) then
local tg=nil
if ft<tg0:GetCount() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
tg=tg0:FilterSelect(tp,c22842214.filter,ft,ft,nil)
else
tg=tg0.Clone()
end
if tg:GetCount()>0 then
local tc=tg:GetFirst()
while tc do
Duel.Equip(tp,tc,c,false,true)
tc:RegisterFlagEffect(22842214,RESET_EVENT+0x1fe0000,0,0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c22842214.eqlimit)
tc:RegisterEffect(e1)
tc=tg:GetNext()
end
Duel.EquipComplete()
end
else
Duel.SendtoGrave(tg0,REASON_EFFECT)
end
Duel.EquipComplete()
end
function c22842214.eqfilter(c,ec)
return c:GetFlagEffect(22842214)~=0 and c:IsHasCardTarget(ec) and not c:IsStatus(STATUS_DESTROY_CONFIRMED)
......
......@@ -66,15 +66,8 @@ end
function c66957584.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0 then return end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()==0 then return end
if ft>=g:GetCount() then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg2=sg:Select(tp,ft,ft,nil)
Duel.SpecialSummon(sg2,0,tp,tp,false,false,POS_FACEUP)
end
if sg:GetCount()==0 or ft<sg:GetCount() then return end
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
--インフェルニティ·ミラージュ
--インフェルニティミラージュ
function c86197239.initial_effect(c)
--cannot special summon
local e1=Effect.CreateEffect(c)
......
--スクラップ·サーチャー
--スクラップサーチャー
function c92901944.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
......@@ -26,7 +26,7 @@ function c92901944.cfilter(c,tp)
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP)
end
function c92901944.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c92901944.cfilter,1,e:GetHandler(),tp)
return eg:IsExists(c92901944.cfilter,1,e:GetHandler(),tp) and not eg:IsContains(e:GetHandler())
end
function c92901944.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
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