Commit 034163a7 authored by 花桃白音's avatar 花桃白音

fix --lion and nina's events in bathroom#113&114

parent 67fd0995
--久违的沐浴 莉昂与妮娜
--久违的沐浴 莉昂与妮娜
local m = 4210113
local cm=_G["c"..m]
function cm.initial_effect(c)
iFunc(c).c("RegisterEffect",iFunc(c)
.e("SetCategory",CATEGORY_TOHAND)
.e("SetCategory",CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
.e("SetType",EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
.e("SetCode",EVENT_SPSUMMON_SUCCESS)
.e("SetRange",LOCATION_HAND)
.e("SetCondition",function(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(function(c,tp) return c:IsSummonPlayer(1-tp) and c:IsPreviousLocation(LOCATION_GRAVE) end,1,nil,tp) end)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return iCount(0,tp,m,1) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
local g=eg:Filter(cm.filter,nil)
if chk==0 then return iCount(0,tp,m,1) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and #g>0 end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)end)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#g,0,0)end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil)
local g=eg:Filter(cm.filter,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
if Duel.SendtoGrave(g,REASON_EFFECT) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end)
end)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetCategory",CATEGORY_TOHAND)
.e("SetType",EFFECT_TYPE_QUICK_O)
......
--梦幻的温泉 莉昂
--梦幻的温泉 莉昂
local m = 4210114
local cm=_G["c"..m]
function cm.initial_effect(c)
iFunc(c).c("RegisterEffect",iFunc(c)
.e("SetCategory",CATEGORY_TOHAND)
.e("SetCategory",CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
.e("SetType",EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
.e("SetCode",EVENT_SPSUMMON_SUCCESS)
.e("SetRange",LOCATION_HAND)
.e("SetCondition",function(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(function(c,tp) return c:IsSummonPlayer(1-tp) and c:IsPreviousLocation(LOCATION_HAND) end,1,nil,tp) end)
.e("SetTarget",function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return iCount(0,tp,m,1) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
local g = eg:Filter(cm.filter,nil)
if chk==0 then return iCount(0,tp,m,1) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and #g>0 end
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)end)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,#g,0,0)end)
.e("SetOperation",function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil)
local g=eg:Filter(cm.filter,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
if Duel.SendtoHand(g,nil,REASON_EFFECT) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) end)
end)
.Return()).c("RegisterEffect",iFunc(c)
.e("SetCategory",CATEGORY_SPECIAL_SUMMON)
.e("SetType",EFFECT_TYPE_QUICK_O)
......
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