Commit b2301b8d authored by mercury233's avatar mercury233

fix

parent f8efcff3
#created by ...
#main
100285001
100285002
100285004
100285006
100286001
100286002
100286003
100286004
100286005
100286006
100286007
100286008
100286009
100286010
100286011
100286012
100286013
100286014
100286015
100286016
100286017
100286018
100286019
100286020
#extra
100285003
100285005
!side
......@@ -2,7 +2,6 @@
#main
101108027
101108063
100285002
100287006
100287011
100287019
......@@ -15,11 +14,6 @@
101108022
101108023
101108025
101108036
101108037
101108043
101108046
101108048
100287007
100287013
100287020
......@@ -27,19 +21,6 @@
100287035
100287046
100200210
100285006
100286005
100286006
100286007
100286008
100286009
100286010
100286011
100286012
100286013
100286014
100286015
100286016
101108013
101108014
101108015
......@@ -50,32 +31,25 @@
101108061
101108062
101108076
100286001
100286002
100286003
100286004
100286017
100286018
100286019
100286020
101108001
101108002
101108034
101108052
101108069
100285004
100285001
100284001
100284002
100284003
#extra
101108036
101108037
101108043
101108046
101108048
101108050
100285005
101108039
101108040
101108041
101108042
101108044
101108045
100285003
!side
100284001
100284002
100284003
--曇天気スレット
function c28806532.initial_effect(c)
--place
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(28806532,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,28806532)
e1:SetCondition(c28806532.tfcon)
e1:SetTarget(c28806532.tftg)
e1:SetOperation(c28806532.tfop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_REMOVE)
e2:SetOperation(c28806532.spreg)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(28806532,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetRange(LOCATION_REMOVED)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetCondition(c28806532.spcon)
e3:SetTarget(c28806532.sptg)
e3:SetOperation(c28806532.spop)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
end
function c28806532.tfcfilter(c,tp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(0x109) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp)
end
function c28806532.tfcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c28806532.tfcfilter,1,e:GetHandler(),tp)
end
function c28806532.tffilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsType(TYPE_FIELD) and c:IsSetCard(0x109)
and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function c28806532.tftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c28806532.tffilter(chkc,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c28806532.tffilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local ct=math.min((Duel.GetLocationCount(tp,LOCATION_SZONE)),2)
local g=Duel.SelectTarget(tp,c28806532.tffilter,tp,LOCATION_GRAVE,0,1,ct,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,g:GetCount(),0,0)
end
function c28806532.tfop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()<=0 then return end
local ct=math.min(2,(Duel.GetLocationCount(tp,LOCATION_SZONE)))
if ct<1 then return end
if g:GetCount()>ct then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
g=g:Select(tp,1,ct,nil)
end
for tc in aux.Next(g) do
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
function c28806532.spreg(e,tp,eg,ep,ev,re,r,rp)
if not re then return end
local c=e:GetHandler()
local rc=re:GetHandler()
if c:IsReason(REASON_COST) and rc:IsSetCard(0x109) and c:IsPreviousLocation(LOCATION_ONFIELD) and re:IsActivated() then
e:SetLabel(Duel.GetTurnCount()+1)
c:RegisterFlagEffect(28806532,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,2)
end
end
function c28806532.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabelObject():GetLabel()==Duel.GetTurnCount() and e:GetHandler():GetFlagEffect(28806532)>0
end
function c28806532.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
e:GetHandler():ResetFlagEffect(28806532)
end
function c28806532.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
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