Commit aa1cb460 authored by Nemo Ma's avatar Nemo Ma

fix

parent 87444d02
...@@ -4,127 +4,127 @@ ...@@ -4,127 +4,127 @@
local s = c33700424 local s = c33700424
local id = 33700424 local id = 33700424
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
local e0 = Effect.CreateEffect(c) local e0 = Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE) e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN) e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--Draw in hand --Draw in hand
local e1 = Effect.CreateEffect(c) local e1 = Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id, 0)) e1:SetDescription(aux.Stringid(id, 0))
e1:SetCategory(CATEGORY_DRAW) e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_TRIGGER_O + EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_TRIGGER_O + EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_PHASE + PHASE_END) e1:SetCode(EVENT_PHASE + PHASE_END)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1, id) e1:SetCountLimit(1, id)
e1:SetCondition(s.drcon) e1:SetCondition(s.drcon)
e1:SetCost(s.drcost) e1:SetCost(s.drcost)
e1:SetTarget(s.drtg) e1:SetTarget(s.drtg)
e1:SetOperation(s.drop) e1:SetOperation(s.drop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Count activations/summons while face-up --Count activations/summons while face-up
local ea = Effect.CreateEffect(c) local ea = Effect.CreateEffect(c)
ea:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS) ea:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
ea:SetRange(LOCATION_SZONE) ea:SetRange(LOCATION_SZONE)
ea:SetCode(EVENT_SUMMON_SUCCESS) ea:SetCode(EVENT_SUMMON_SUCCESS)
ea:SetOperation(s.countop) ea:SetOperation(s.countop)
c:RegisterEffect(ea) c:RegisterEffect(ea)
local eb = ea:Clone() local eb = ea:Clone()
eb:SetCode(EVENT_SPSUMMON_SUCCESS) eb:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(eb) c:RegisterEffect(eb)
local ec = ea:Clone() local ec = ea:Clone()
ec:SetCode(EVENT_CHAINING) ec:SetCode(EVENT_CHAINING)
c:RegisterEffect(ec) c:RegisterEffect(ec)
--Draw on field --Draw on field
local e2 = Effect.CreateEffect(c) local e2 = Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id, 1)) e2:SetDescription(aux.Stringid(id, 1))
e2:SetCategory(CATEGORY_DRAW) e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_TRIGGER_F + EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_TRIGGER_F + EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_PHASE + PHASE_END) e2:SetCode(EVENT_PHASE + PHASE_END)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1, id) e2:SetCountLimit(1, id)
e2:SetLabelObject(ea) e2:SetLabelObject(ea)
e2:SetCondition(s.drcon2) e2:SetCondition(s.drcon2)
e2:SetTarget(s.drtg2) e2:SetTarget(s.drtg2)
e2:SetOperation(s.drop2) e2:SetOperation(s.drop2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.drcon(e, tp, eg, ep, ev, re, r, rp) function s.drcon(e, tp, eg, ep, ev, re, r, rp)
local eff, ns, ss = Duel.GetActivityCount(tp, ACTIVITY_CHAIN, ACTIVITY_SUMMON, ACTIVITY_SPECIALSUMMON) local eff, ns, ss = Duel.GetActivityCount(tp, ACTIVITY_CHAIN, ACTIVITY_SUMMON, ACTIVITY_SPECIALSUMMON)
return (eff + ns + ss == 0) and (tp == Duel.GetTurnPlayer()) return (eff + ns + ss == 0) and (tp == Duel.GetTurnPlayer())
end end
function s.drcost(e, tp, eg, ep, ev, re, r, rp, chk) function s.drcost(e, tp, eg, ep, ev, re, r, rp, chk)
local c = e:GetHandler() local c = e:GetHandler()
if chk == 0 then if chk == 0 then
return not c:IsPublic() return not c:IsPublic()
end end
--reveals as part of activation innately --reveals as part of activation innately
end end
function s.drtg(e, tp, eg, ep, ev, re, r, rp, chk) function s.drtg(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then if chk == 0 then
return Duel.IsPlayerCanDraw(tp, 1) return Duel.IsPlayerCanDraw(tp, 1)
end end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0, CATEGORY_DRAW, nil, 0, tp, 1) Duel.SetOperationInfo(0, CATEGORY_DRAW, nil, 0, tp, 1)
end end
function s.drop(e, tp, eg, ep, ev, re, r, rp) function s.drop(e, tp, eg, ep, ev, re, r, rp)
local p, d = Duel.GetChainInfo(0, CHAININFO_TARGET_PLAYER, CHAININFO_TARGET_PARAM) local p, d = Duel.GetChainInfo(0, CHAININFO_TARGET_PLAYER, CHAININFO_TARGET_PARAM)
Duel.Draw(p, d, REASON_EFFECT) Duel.Draw(p, d, REASON_EFFECT)
end end
function s.countop(e, tp, eg, ep, ev, re, r, rp) function s.countop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler() local c = e:GetHandler()
if rp == tp and (not re or re:GetHandler() ~= c) then if rp == tp and (not re or re:GetHandler() ~= c) then
c:RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD, 0, 0) c:RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD, 0, 0)
end end
end end
function s.drcon2(e, tp, eg, ep, ev, re, r, rp) function s.drcon2(e, tp, eg, ep, ev, re, r, rp)
return e:GetHandler():GetFlagEffect(id) == 0 return e:GetHandler():GetFlagEffect(id) == 0 and (tp == Duel.GetTurnPlayer())
end end
function s.drtg2(e, tp, eg, ep, ev, re, r, rp, chk) function s.drtg2(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then if chk == 0 then
return Duel.IsPlayerCanDraw(tp, 3) return Duel.IsPlayerCanDraw(tp, 3)
end end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(3) Duel.SetTargetParam(3)
Duel.SetOperationInfo(0, CATEGORY_DRAW, nil, 0, tp, 3) Duel.SetOperationInfo(0, CATEGORY_DRAW, nil, 0, tp, 3)
end end
function s.setfilter(c, tp) function s.setfilter(c, e, tp)
if c:IsType(TYPE_MONSTER) then if c:IsType(TYPE_MONSTER) then
return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and
c:IsCanBeSpecialSummoned(e, 0, tp, false, false, POS_FACEDOWN_DEFENSE) c:IsCanBeSpecialSummoned(e, 0, tp, false, false, POS_FACEDOWN_DEFENSE)
else else
return (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp, LOCATION_SZONE) > 0) and c:IsSSetable() return (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp, LOCATION_SZONE) > 0) and c:IsSSetable()
end end
end end
function s.drop2(e, tp, eg, ep, ev, re, r, rp) function s.drop2(e, tp, eg, ep, ev, re, r, rp)
local p, d = Duel.GetChainInfo(0, CHAININFO_TARGET_PLAYER, CHAININFO_TARGET_PARAM) local p, d = Duel.GetChainInfo(0, CHAININFO_TARGET_PLAYER, CHAININFO_TARGET_PARAM)
Duel.Draw(p, d, REASON_EFFECT) Duel.Draw(p, d, REASON_EFFECT)
local og = Duel.GetOperatedGroup():Filter(s.setfilter, nil, tp) local og = Duel.GetOperatedGroup():Filter(s.setfilter, nil, e, tp)
local c = e:GetHandler() local c = e:GetHandler()
if not Duel.IsExistingMatchingCard(Card.IsFaceup, tp, LOCATION_ONFIELD, 0, 1, c) and og then if not Duel.IsExistingMatchingCard(Card.IsFaceup, tp, LOCATION_ONFIELD, 0, 1, c) and og then
local cg = Group.CreateGroup() local cg = Group.CreateGroup()
while #og > 0 and Duel.SelectYesNo(tp, aux.Stringid(id, 2)) do while #og > 0 and Duel.SelectYesNo(tp, aux.Stringid(id, 2)) do
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SET) Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_SET)
local tc = og:Select(tp, 1, 1, nil):GetFirst() local tc = og:Select(tp, 1, 1, nil):GetFirst()
if tc:IsType(TYPE_MONSTER) then if tc:IsType(TYPE_MONSTER) then
Duel.SpecialSummonStep(tc, 0, tp, tp, false, false, POS_FACEDOWN_DEFENSE) Duel.SpecialSummonStep(tc, 0, tp, tp, false, false, POS_FACEDOWN_DEFENSE)
else else
Duel.SSet(tp, tc) Duel.SSet(tp, tc)
end end
cg:AddCard(tc) cg:AddCard(tc)
og:RemoveCard(tc) og:RemoveCard(tc)
og = og:Filter(s.setfilter, nil, tp) og = og:Filter(s.setfilter, nil, e, tp)
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
Duel.ConfirmCards(1 - tp, cg) Duel.ConfirmCards(1 - tp, cg)
end end
end end
...@@ -17,7 +17,7 @@ function c33700905.initial_effect(c) ...@@ -17,7 +17,7 @@ function c33700905.initial_effect(c)
--act limit --act limit
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCode(EFFECT_CANNOT_ACTIVATE) e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,1) e3:SetTargetRange(1,1)
......
...@@ -9,7 +9,7 @@ function cm.initial_effect(c) ...@@ -9,7 +9,7 @@ function cm.initial_effect(c)
local f=function(e) local f=function(e)
return Duel.IsAbleToEnterBP() return Duel.IsAbleToEnterBP()
end end
local e1=rsef.I(c,{m,0},1,nil,nil,LOCATION_MZONE,f,rscost.rmxyzs(true),nil,cm.op) local e1=rsef.I(c,{m,0},1,nil,nil,LOCATION_MZONE,f,rscost.rmxyz(true),nil,cm.op)
local e2=rsef.STO(c,EVENT_BATTLE_DESTROYING,{m,1},nil,nil,"de",cm.xyzcon,nil,cm.xyztg,cm.xyzop) local e2=rsef.STO(c,EVENT_BATTLE_DESTROYING,{m,1},nil,nil,"de",cm.xyzcon,nil,cm.xyztg,cm.xyzop)
end end
function cm.xyzcon(e,tp,eg,ep,ev,re,r,rp) function cm.xyzcon(e,tp,eg,ep,ev,re,r,rp)
......
--盖亚意识 篝
function c33701122.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c33701122.mfilter,1,1)
c:EnableReviveLimit()
--link summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33701122,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,33701122)
e1:SetCondition(c33701122.condition)
e1:SetTarget(c33701122.target)
e1:SetOperation(c33701122.operation)
c:RegisterEffect(e1)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33701122,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,337011220)
e1:SetCondition(c33701122.drcon)
e1:SetTarget(c33701122.drtg)
e1:SetOperation(c33701122.drop)
c:RegisterEffect(e1)
--spsummon bgm
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e8:SetCode(EVENT_SPSUMMON_SUCCESS)
e8:SetOperation(c33701122.sumsuc)
c:RegisterEffect(e8)
local e9=e8:Clone()
e9:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e9)
end
function c33701122.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(33701122,2))
end
function c33701122.mfilter(c)
return c:IsLevelBelow(4) and c:IsLinkAttribute(ATTRIBUTE_EARTH) and c:IsType(TYPE_TUNER)
end
function c33701122.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c33701122.tgfilter(c,tp,ec)
local mg=Group.FromCards(ec,c)
return c:IsFaceup() and c:IsSummonType(SUMMON_TYPE_SPECIAL) and Duel.IsExistingMatchingCard(c33701122.lfilter,tp,LOCATION_EXTRA,0,1,nil,mg)
end
function c33701122.lfilter(c,mg)
return c:IsAttribute(ATTRIBUTE_EARTH) and not c:IsCode(33701122) and c:IsLinkSummonable(mg,nil,2,2)
end
function c33701122.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c33701122.tgfilter,tp,0,LOCATION_MZONE,1,nil,tp,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c33701122.tgfilter,tp,0,LOCATION_MZONE,1,1,nil,tp,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c33701122.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsControler(tp)
and tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsControler(1-tp) and not tc:IsImmuneToEffect(e) then
local mg=Group.FromCards(c,tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c33701122.lfilter,tp,LOCATION_EXTRA,0,1,1,nil,mg)
local lc=g:GetFirst()
if lc then
Duel.LinkSummon(tp,lc,mg,nil,2,2)
end
end
Duel.Hint(HINT_MUSIC,0,aux.Stringid(33701122,2))
end
function c33701122.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c33701122.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c33701122.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
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