Commit f042ca2e authored by Tachibana's avatar Tachibana

eme

parent b087c79d
No preview for this file type
...@@ -19,6 +19,7 @@ function cm.initial_effect(c) ...@@ -19,6 +19,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--RemoveOverlayCard --RemoveOverlayCard
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_DISABLE) e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
...@@ -36,7 +37,6 @@ function cm.initial_effect(c) ...@@ -36,7 +37,6 @@ function cm.initial_effect(c)
e3:SetCode(EVENT_TO_GRAVE) e3:SetCode(EVENT_TO_GRAVE)
e3:SetTarget(cm.tgtg) e3:SetTarget(cm.tgtg)
e3:SetOperation(cm.tgop) e3:SetOperation(cm.tgop)
e3:SetCountLimit(1,m+2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.filsp(c,tp) function cm.filsp(c,tp)
......
...@@ -24,7 +24,7 @@ function cm.initial_effect(c) ...@@ -24,7 +24,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--lock --lock
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1)) e2:SetDescription(aux.Stringid(m,2))
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
......
...@@ -19,7 +19,7 @@ function cm.initial_effect(c) ...@@ -19,7 +19,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--battle --battle
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0)) e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_BATTLE_CONFIRM) e2:SetCode(EVENT_BATTLE_CONFIRM)
......
...@@ -19,6 +19,7 @@ function cm.initial_effect(c) ...@@ -19,6 +19,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--RemoveOverlayCard --RemoveOverlayCard
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,m+1) e2:SetCountLimit(1,m+1)
......
...@@ -132,7 +132,7 @@ end ...@@ -132,7 +132,7 @@ end
function c19500029.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c19500029.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local link=c:GetLinkedGroupCount() local link=c:GetLinkedGroupCount()
if chk==0 then return link>1 and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD+LOCATION_DECK,LOCATION_ONFIELD+LOCATION_DECK,2,nil) end if chk==0 then return link>0 and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD+LOCATION_DECK,LOCATION_ONFIELD+LOCATION_DECK,2,nil) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,e:GetHandler()) local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
......
...@@ -112,7 +112,7 @@ function c9310038.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -112,7 +112,7 @@ function c9310038.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=kg:GetCount() local ct=kg:GetCount()
if chk==0 and c:GetSummonType()==SUMMON_TYPE_SYNCHRO and kg:FilterCount(aux.NecroValleyFilter(c9310038.filter0),nil,e,tp,c)==ct then if chk==0 and c:GetSummonType()==SUMMON_TYPE_SYNCHRO and kg:FilterCount(aux.NecroValleyFilter(c9310038.filter0),nil,e,tp,c)==ct then
local chkf=tp local chkf=tp
local mg=Duel.GetMatchingGroup(c9310038.filter0,tp,LOCATION_GRAVE,0,nil,e,tp,c) local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c9310038.filter0),tp,LOCATION_GRAVE,0,nil,e,tp,c)
local res=Duel.IsExistingMatchingCard(c9310038.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf) local res=Duel.IsExistingMatchingCard(c9310038.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
......
...@@ -148,11 +148,8 @@ end ...@@ -148,11 +148,8 @@ end
function c9310043.thcon(e,tp,eg,ep,ev,re,r,rp) function c9310043.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c9310043.cfilter,1,nil,tp) return eg:IsExists(c9310043.cfilter,1,nil,tp)
end end
function c9310043.cfilter2(c)
return c:IsFaceup() and c:IsCode(9310027)
end
function c9310043.thcon2(e,tp,eg,ep,ev,re,r,rp) function c9310043.thcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c9310043.cfilter,tp,LOCATION_ONFIELD,0,1,nil) return Duel.IsEnvironment(9310027)
end end
function c9310043.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c9310043.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end if chk==0 then return e:GetHandler():IsAbleToHand() end
......
--早见虹羽·葵 --早见虹羽·葵
local m=9390006 local m=9390006
local cm=_G["c"..m] local cm=_G["c"..m]
Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c) function cm.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,6,2,nil,nil,99)
--activate from hand
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetCountLimit(1,m)
e1:SetCondition(cm.handcon)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.descon1)
e2:SetCost(cm.descost)
e2:SetTarget(cm.destg)
e2:SetOperation(cm.desop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCondition(cm.descon2)
c:RegisterEffect(e3)
end
function cm.handcon(e)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsType,1,nil,TYPE_TRAP)
end
function cm.descon1(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():GetOverlayGroup():IsExists(Card.IsType,1,nil,TYPE_TRAP)
end
function cm.descon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsType,1,nil,TYPE_TRAP)
end
function cm.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
local ct=Duel.GetOperatedGroup():GetFirst()
e:SetLabelObject(ct)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
if e:GetLabelObject():IsSetCard(0x9f93) then
if bit.band(re:GetHandler():GetOriginalType(),TYPE_MONSTER)~=0 then
e:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
else
e:SetCategory(CATEGORY_DESTROY)
end
end
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT) then
if e:GetLabelObject():IsSetCard(0x9f93) and not tc:IsLocation(LOCATION_HAND+LOCATION_DECK) and aux.NecroValleyFilter()(tc) then
if tc:IsType(TYPE_MONSTER) and (not tc:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
or tc:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,tc)>0)
and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
Duel.ConfirmCards(1-tp,tc)
elseif (tc:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
and tc:IsSSetable() and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
Duel.SSet(tp,tc)
end
end
end
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