Commit 6dd83690 authored by 聖園ミカ's avatar 聖園ミカ 🐟

7

parent 45fec4f9
No preview for this file type
...@@ -21,8 +21,8 @@ function cm.initial_effect(c) ...@@ -21,8 +21,8 @@ function cm.initial_effect(c)
e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e4:SetCategory(CATEGORY_TODECK) e4:SetCategory(CATEGORY_TODECK)
e4:SetCode(EVENT_REMOVE) e4:SetCode(EVENT_REMOVE)
e4:SetTarget(cm.target) e4:SetTarget(cm.thtg)
e4:SetOperation(cm.operation) e4:SetOperation(cm.thop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function cm.ffilter(c,fc,sub,mg,sg) function cm.ffilter(c,fc,sub,mg,sg)
...@@ -49,25 +49,30 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,25 +49,30 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
function cm.filter(c,fc,sub,mg,sg) function cm.thfilter(c,e)
return c:IsFaceupEx() and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e) return c:IsFaceupEx() and c:IsAbleToDeck() and c:IsCanBeEffectTarget(e)
end end
function cm.fselect(g) function cm.thfilter2(c,g)
return g:GetClassCount(Card.GetCode)==1 return g:IsExists(Card.IsCode,2,c,c:GetCode())
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_GRAVE,0,nil,e) if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and cm.thfilter(chkc,e) end
if chkc then return false end local g=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e)
if chk==0 then return g:CheckSubGroup(cm.fselect,3,3) end if chk==0 then return g:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:SelectSubGroup(tp,cm.fselect,false,3,3) local g1=g:FilterSelect(tp,cm.thfilter2,1,1,nil,g)
Duel.SetTargetCard(sg) if g1:GetCount()>0 then
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,3,0,0) local g2=g:FilterSelect(tp,Card.IsCode,2,2,g1:GetFirst(),g1:GetFirst():GetCode())
g1:Merge(g2)
Duel.SetTargetCard(g1)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,3,0,0)
end
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not g then return end
local sg=g:Filter(Card.IsRelateToEffect,nil,e) local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>0 then if sg:GetCount()>0 then
Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end end
end end
...@@ -3,6 +3,8 @@ local m=18588001 ...@@ -3,6 +3,8 @@ local m=18588001
local cm=_G["c"..m] local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua") Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c) function cm.initial_effect(c)
--same effect send this card to grave and spsummon another card check
local e0=aux.AddThisCardInGraveAlreadyCheck(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
...@@ -16,10 +18,11 @@ function cm.initial_effect(c) ...@@ -16,10 +18,11 @@ function cm.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_REMOVE) e2:SetCode(EVENT_REMOVE)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,m) e2:SetCountLimit(1,m)
e2:SetLabelObject(e0)
e2:SetCondition(cm.sscon) e2:SetCondition(cm.sscon)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.sstg) e2:SetTarget(cm.sstg)
...@@ -57,29 +60,36 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,29 +60,36 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function cm.splimit(e,c) function cm.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_PLANT) return not (c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_PLANT))
end end
function cm.cfilter(c,tp) function cm.cfilter(c,tp,se)
return c:IsType(TYPE_FUSION) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_PLANT) return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_PLANT) and c:IsType(TYPE_FUSION)
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp)
end and (se==nil or c:GetReasonEffect()~=se)
function cm.ssfilter(c,e,tp)
return c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.sscon(e,tp,eg,ep,ev,re,r,rp) function cm.sscon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp) local se=e:GetLabelObject():GetLabelObject()
return eg:IsExists(cm.cfilter,1,nil,tp,se)
end
function cm.ssfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_PLANT) and c:IsType(TYPE_FUSION)
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousControler(tp)
and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.sstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.sstg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local mg=eg:Filter(cm.cfilter,nil,tp):Filter(cm.ssfilter,nil,e,tp) if chkc then return false end
if chkc then return mg:IsContains(chkc) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return #mg>0 end and eg:IsExists(cm.ssfilter,1,nil,e,tp) end
local g=mg Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if #mg>1 then local tg
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if #eg==1 then
g=mg:Select(tp,1,1,nil) tg=eg:Clone()
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
tg=eg:FilterSelect(tp,cm.ssfilter,1,1,nil,e,tp)
end end
Duel.SetTargetCard(g) Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tg,1,0,0)
end end
function cm.ssop(e,tp,eg,ep,ev,re,r,rp) function cm.ssop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -71,7 +71,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,7 +71,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
local tc = g:GetFirst() local tc = g:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
if Duel.SSet(tp,tc)~=0 and e:GetHandler():IsRelateToEffect(e) and Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) then if Duel.SSet(tp,tc)~=0 then
if tc:IsType(TYPE_QUICKPLAY) then if tc:IsType(TYPE_QUICKPLAY) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,2)) e1:SetDescription(aux.Stringid(id,2))
...@@ -90,14 +90,15 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -90,14 +90,15 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
local e1=Effect.CreateEffect(e:GetHandler()) if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and e:GetHandler():IsRelateToEffect(e) and Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
e1:SetCode(EFFECT_CHANGE_TYPE) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(TYPE_TRAP+TYPE_CONTINUOUS) e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e:GetHandler():RegisterEffect(e1) e1:SetValue(TYPE_TRAP+TYPE_CONTINUOUS)
e:GetHandler():RegisterEffect(e1)
end
end end
end end
function s.selffilter(c) function s.selffilter(c)
......
...@@ -9,10 +9,20 @@ function s.initial_effect(c) ...@@ -9,10 +9,20 @@ function s.initial_effect(c)
e3:SetCode(EFFECT_ATTACK_ALL) e3:SetCode(EFFECT_ATTACK_ALL)
e3:SetValue(1) e3:SetValue(1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--actlimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetValue(1)
e2:SetCondition(s.actcon)
c:RegisterEffect(e2)
--atk up --atk up
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e1:SetOperation(s.upop) e1:SetOperation(s.upop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -40,7 +50,11 @@ function s.upop(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,7 +50,11 @@ function s.upop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
--
function s.actcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end
--
function s.thfilter(c) function s.thfilter(c)
return c:IsSetCard(0x6410) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x6410) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end end
......
...@@ -4,7 +4,7 @@ local cm=_G["c"..m] ...@@ -4,7 +4,7 @@ local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--link summon --link summon
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddLinkProcedure(c,cm.matfilter,1) aux.AddLinkProcedure(c,cm.mfilter,1)
--search --search
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
......
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