Commit 10a50ecf authored by Huangnan's avatar Huangnan

fix

parent ebd0cca8
Pipeline #38122 passed with stages
in 34 minutes and 41 seconds
No preview for this file type
--月球意识 篝 --月球意识 篝
function c33701060.initial_effect(c) local s,id,o=GetID()
function s.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit() c:EnableReviveLimit()
--special summon --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33701060,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCost(c33701060.spcost) e2:SetCost(s.spcost)
e2:SetTarget(c33701060.sptg) e2:SetTarget(s.sptg)
e2:SetOperation(c33701060.spop) e2:SetOperation(s.spop)
c:RegisterEffect(e2)
--disable field
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_DRAW)
e2:SetCode(EVENT_PHASE+PHASE_END,2)
e2:SetCountLimit(1)
e2:SetCondition(s.thcon)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--spsummon bgm
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e8:SetCode(EVENT_SPSUMMON_SUCCESS)
e8:SetOperation(c33701060.sumsuc)
c:RegisterEffect(e8)
local e9=e8:Clone()
e9:SetCode(EVENT_SUMMON_SUCCESS)
c:RegisterEffect(e9)
end
function c33701060.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(33701060,0))
end end
function c33701060.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function c33701060.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,33701058,0,0x4011,0,3000,10,RACE_PLANT,ATTRIBUTE_EARTH) end and Duel.IsPlayerCanSpecialSummonMonster(tp,33701058,0,0x4011,0,3000,10,RACE_PLANT,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end end
function c33701060.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end local c=e:GetHandler()
if Duel.IsPlayerCanSpecialSummonMonster(tp,33701058,0,0x4011,0,3000,10,RACE_PLANT,ATTRIBUTE_EARTH) then if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,33701058,0,0x4011,0,3000,10,RACE_PLANT,ATTRIBUTE_EARTH) then
local token=Duel.CreateToken(tp,33701058) local token=Duel.CreateToken(tp,33701058)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK)
local e1=Effect.CreateEffect(e:GetHandler()) -- 不会被战斗破坏
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1) e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
token:RegisterEffect(e1) token:RegisterEffect(e1)
local e3=Effect.CreateEffect(e:GetHandler()) -- 不能改变表示形式
e3:SetType(EFFECT_TYPE_EQUIP) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_CHANGE_POSITION) e3:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e3:SetReset(RESET_EVENT+RESETS_STANDARD) e3:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
token:RegisterEffect(e3) token:RegisterEffect(e3)
local de=Effect.CreateEffect(e:GetHandler()) -- 给衍生物加Flag
de:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) token:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
de:SetCode(EVENT_PHASE+PHASE_END,2) -- 注册结束阶段效果
de:SetCategory(CATEGORY_TOHAND) local e2=Effect.CreateEffect(c)
de:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
de:SetCountLimit(1) e2:SetCode(EVENT_PHASE+PHASE_END)
de:SetValue(c33701060.aclimit) e2:SetCountLimit(1)
de:SetTarget(c33701060.destg) e2:SetLabelObject(token)
de:SetOperation(c33701060.desop) e2:SetCondition(s.thcon)
Duel.RegisterEffect(de,tp) e2:SetOperation(s.thop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end end
end end
function c33701060.aclimit(e,re,tp) function s.cfilter(c)
return not re:GetHandler():IsCode(33701058) return c:IsFaceup() and c:IsCode(33701058)
end end
function c33701060.destg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thcon(e,tp,eg,ep,ev,re,r,rp)
if chk==0 then return true end local token=e:GetLabelObject()
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD) return token and token:GetFlagEffect(id)>0 and token:IsLocation(LOCATION_MZONE)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and c:GetFlagEffect(id)>0 and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0
and Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) end
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1)
end end
function c33701060.desop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e)) local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT) if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
Duel.BreakEffect() Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
Duel.Draw(1-tp,1,REASON_EFFECT) Duel.Draw(1-tp,1,REASON_EFFECT)
......
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