Commit 848d91e4 authored by JoyJ's avatar JoyJ

update weather cards

parent 0226e008
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
--·这张卡在对方回合被送去墓地或除外的场合才能发动。自己从卡组抽1张,然后可以从手卡把1只【天气】怪兽特殊召唤。 --·这张卡在对方回合被送去墓地或除外的场合才能发动。自己从卡组抽1张,然后可以从手卡把1只【天气】怪兽特殊召唤。
-- --
--天气本家陷阱·魔法卡增加效果 --天气本家陷阱·魔法卡增加效果
--·自己·对方回合可以发动。这张卡返回卡组,从自己卡组·手卡·墓地·除外的卡中把1张【天气】永续魔法·陷阱卡在自己场上表侧表示放置。 --·自己·对方回合,这张卡已经表侧表示的状态下可以发动。这张卡返回卡组,从自己卡组·手卡·墓地·除外的卡中把1张【天气】永续魔法·陷阱卡在自己场上表侧表示放置。
-- --
--影灵衣本家仪式怪兽(索菲娅除外)增加效果 --影灵衣本家仪式怪兽(索菲娅除外)增加效果
--·多个卡名的此类效果1回合最多能使用5次。 --·多个卡名的此类效果1回合最多能使用5次。
...@@ -62,102 +62,120 @@ function CUNGUI.RegisterMonsterSpecialEffects(c) ...@@ -62,102 +62,120 @@ function CUNGUI.RegisterMonsterSpecialEffects(c)
end end
end end
function InitWeather(c) --天气本家怪兽增加效果
--·这张卡通常召唤成功的场合才能发动。从卡组把最多2只【天气】怪兽在场上特殊召唤。这个效果的发动后,直到回合结束自己不是【天气】怪兽不能特殊召唤。这个效果不会被无效化。
end --·这张卡特殊召唤成功的场合才能发动。选场上1张卡的效果无效化。
--·这张卡在对方回合被送去墓地或除外的场合才能发动。自己从卡组抽1张,然后可以从手卡把1只【天气】怪兽特殊召唤。
function CUNGUI.InitFireFormation(c) --
--【炎舞】魔法·陷阱卡得到以下效果: --天气本家陷阱·魔法卡增加效果
--这个卡名的这个效果1回合只能使用1次,这张卡送去墓地或被除外的场合才能选以下1个效果发动。 --·自己·对方回合可以发动。这张卡返回卡组,从自己卡组·手卡·墓地·除外的卡中把1张【天气】永续魔法·陷阱卡在自己场上表侧表示放置。
--·选1张自己卡组·墓地·除外的【炎星】或【炎舞】卡加入手卡。 --
local e1=Effect.CreateEffect(c) function CUNGUI.InitWeather(c)
e1:SetDescription(aux.Stringid(41546,0)) if c:IsType(TYPE_SPELL+TYPE_TRAP) then
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) CUNGUI.InitWeatherSpellTrap(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) else
e1:SetCode(EVENT_REMOVE) CUNGUI.InitWeatherMonster(c)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,c:GetCode()+51)
e1:SetTarget(CUNGUI.ywthtg)
e1:SetOperation(CUNGUI.ywthop)
c:RegisterEffect(e1)
e1=e1:Clone()
e1:SetCode(EVENT_TO_GRAVE)
c:RegisterEffect(e1)
--·选1只自己卡组·墓地·除外的【炎星】怪兽特殊召唤。
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(102380,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,c:GetCode()+51)
e2:SetTarget(CUNGUI.ywsptg)
e2:SetOperation(CUNGUI.ywspop)
c:RegisterEffect(e2)
e2=e2:Clone()
e2:SetCode(EVENT_TO_GRAVE)
c:RegisterEffect(e2)
--·选2张自己墓地·除外的【炎舞】魔法·陷阱卡在场上表侧表示放置。
local e3=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(102380,0))
e2:SetCategory(CATEGORY_LEAVE_GRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,c:GetCode()+51)
e2:SetTarget(CUNGUI.ywtftg)
e2:SetOperation(CUNGUI.ywtfop)
c:RegisterEffect(e3)
e3=e3:Clone()
e3:SetCode(EVENT_TO_GRAVE)
c:RegisterEffect(e3)
end
function CUNGUI.ywtffilter(c)
return c:IsAbleToHand() and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup())
and c:IsSetCard(0x79) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function CUNGUI.ywtftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>1
and Duel.IsExistingMatchingCard(CUNGUI.ywtffilter,tp,0x30,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,2,tp,0x30)
end
function CUNGUI.ywtfop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(CUNGUI.ywtffilter),tp,0x30,0,2,2,nil)
if #g<2 then return end
for tc in aux.Next(g) do
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end end
end end
function CUNGUI.ywthfilter(c)
return c:IsAbleToHand() and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup()) function CUNGUI.InitWeatherMonster(c)
and (c:IsSetCard(0x79) or c:IsSetCard(0x7c)) --summon - spsummon
end local e1=Effect.CreateEffect(c)
function CUNGUI.ywthtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) e1:SetDescription(aux.Stringid(3779662,1))
if chk==0 then return Duel.IsExistingMatchingCard(CUNGUI.ywthfilter,tp,0x31,0,1,nil) end e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,0x31) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(CUNGUI.weasptg)
e1:SetOperation(CUNGUI.weaspop)
c:RegisterEffect(e1)
--disable
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(28388927,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(CUNGUI.weadistg)
e2:SetOperation(CUNGUI.weadisop)
c:RegisterEffect(e2)
end end
function CUNGUI.ywthop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) function CUNGUI.weadistg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(CUNGUI.ywthfilter),tp,0x31,0,1,1,nil) if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and aux.NegateAnyFilter(chkc) end
if #g<1 then return end if chk==0 then return Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SendtoHand(g,nil,REASON_EFFECT) local g=Duel.GetMatchingGroup(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function CUNGUI.weadisop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local tc=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,0,1,1,nil):GetFirst()
if tc then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
if tc:IsType(TYPE_TRAPMONSTER) then
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_TRAPMONSTER)
tc:RegisterEffect(e2)
end
end
end end
function CUNGUI.ywspfilter(c,e,tp)
return c:IsSetCard(0x79) and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup()) function CUNGUI.weaspfilter(c,e,tp)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x109) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function CUNGUI.ywsptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetMZoneCount(tp)>0 function CUNGUI.weasptg(e,tp,eg,ep,ev,re,r,rp,chk)
and Duel.IsExistingMatchingCard(CUNGUI.ywspfilter,tp,0x31,0,1,nil) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0x31) and Duel.IsExistingMatchingCard(CUNGUI.weaspfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function CUNGUI.weaspop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if ft>2 then ft=2 end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,CUNGUI.weaspfilter,tp,LOCATION_DECK,0,1,ft,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end end
function CUNGUI.ywspop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) function CUNGUI.InitWeatherSpellTrap(c)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(CUNGUI.ywspfilter),tp,0x31,0,1,1,nil) local e1=Effect.CreateEffect(c)
if #g<1 then return end e2:SetDescription(aux.Stringid(7093411,1))
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetTarget(CUNGUI.weatftg)
e2:SetOperation(CUNGUI.weatfop)
c:RegisterEffect(e2)
end
function CUNGUI.weatffilter(c,tp)
return c:IsSetCard(0x109)
and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function CUNGUI.weatftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>-1
and Duel.IsExistingMatchingCard(CUNGUI.weatffilter,tp,0x33,0,1,nil,tp) end
end
function CUNGUI.weatfop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain(0) and Duel.SendtoDeck(c,nil,2,REASON_EFFECT)>0
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,CUNGUI.weatffilter,tp,0x33,0,1,1,nil,tp):GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
end end
function CUNGUI.InitNekroz(c) function CUNGUI.InitNekroz(c)
--影灵衣本家仪式怪兽(索菲娅除外)增加效果 --影灵衣本家仪式怪兽(索菲娅除外)增加效果
...@@ -170,7 +188,7 @@ function CUNGUI.InitNekroz(c) ...@@ -170,7 +188,7 @@ function CUNGUI.InitNekroz(c)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_DECK) e1:SetRange(LOCATION_DECK)
e1:SetValue(SUMMON_VALUE_SELF) e1:SetValue(98765)
c:RegisterEffect(e1) c:RegisterEffect(e1)
e1=Effect.CreateEffect(c) e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -181,10 +199,36 @@ function CUNGUI.InitNekroz(c) ...@@ -181,10 +199,36 @@ function CUNGUI.InitNekroz(c)
e1:SetCondition(CUNGUI.neksplcon) e1:SetCondition(CUNGUI.neksplcon)
e1:SetTarget(CUNGUI.neksplimit) e1:SetTarget(CUNGUI.neksplimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--这个方法特殊召唤的这张卡离场时返回卡组
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(51196805,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetLabelObject(c)
e2:SetCondition(CUNGUI.neksplcon)
e2:SetOperation(CUNGUI.nekrmop)
c:RegisterEffect(e2
--redirect
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCondition(CUNGUI.neksplcon)
e3:SetValue(LOCATION_DECKSHF)
c:RegisterEffect(e3))
end end
function CUNGUI.neksplcon(e,tp,eg,ep,ev,re,r,rp) function CUNGUI.neksplcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_VALUE_SELF) return e:GetHandler():IsSummonType(98765)
end
function CUNGUI.nekrmop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if c:GetFlagEffect(98765432) == 0 then
c:RegisterFlagEffect(98765432,RESET_EVENT+RESETS_STANDARD,0,2)
else
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
end
end end
function CUNGUI.splimit(e,c) function CUNGUI.neksplimit(e,c)
return c:IsLocation(LOCATION_EXTRA) return c:IsLocation(LOCATION_EXTRA)
end end
\ No newline at end of file
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