Commit 5d7d7d0a authored by Tachibana's avatar Tachibana

eme

parent fc37238e
Pipeline #8481 passed with stages
in 23 minutes and 18 seconds
No preview for this file type
--量子妖海干涉
function c24865312.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(24865312,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local m=24865312
local cm=_G["c"..m]
function cm.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24865312,1))
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCountLimit(1,24865312)
e2:SetCondition(c24865312.discon)
e2:SetTarget(c24865312.distg)
e2:SetOperation(c24865312.disop)
e2:SetCountLimit(1,m)
e2:SetCondition(cm.discon)
e2:SetTarget(cm.distg)
e2:SetOperation(cm.disop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
......@@ -23,47 +20,47 @@ function c24865312.initial_effect(c)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCategory(CATEGORY_TODECK)
e4:SetCountLimit(1,24865312)
e4:SetCountLimit(1,m)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetTarget(c24865312.drtg)
e4:SetOperation(c24865312.drop)
e4:SetTarget(cm.drtg)
e4:SetOperation(cm.drop)
c:RegisterEffect(e4)
end
function c24865312.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and Duel.IsExistingMatchingCard(c24865312.discfilter,tp,LOCATION_MZONE+LOCATION_FZONE,0,1,nil)
function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) and Duel.IsExistingMatchingCard(cm.discfilter,tp,LOCATION_MZONE+LOCATION_FZONE,0,1,nil)
end
function c24865312.discfilter(c)
function cm.discfilter(c)
local b1=c:IsFaceup() and c:IsSetCard(0xb10) and c:IsType(TYPE_MONSTER) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
local b2=c:IsFaceup() and c:IsSetCard(24865310)
return b1 or b2
end
function c24865312.distg(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c24865312.disop(e,tp,eg,ep,ev,re,r,rp)
function cm.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c24865312.texfilter(c)
function cm.texfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsCode(24865310) and c:IsAbleToDeck()
end
function c24865312.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c24865312.texfilter(chkc) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(c24865312.texfilter,tp,LOCATION_GRAVE,0,1,c) and c:IsAbleToDeck() end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.texfilter(chkc) and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(cm.texfilter,tp,LOCATION_GRAVE,0,1,c) and c:IsAbleToDeck() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c24865312.texfilter,tp,LOCATION_GRAVE,0,1,1,c)
local g=Duel.SelectTarget(tp,cm.texfilter,tp,LOCATION_GRAVE,0,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
end
function c24865312.drop(e,tp,eg,ep,ev,re,r,rp)
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK) and c:IsRelateToEffect(e) then
......
......@@ -20,7 +20,7 @@ function c24865314.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(24865314)
e2:SetRange(LOCATION_MZONE)
e2:SetRange(LOCATION_ONFIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
c:RegisterEffect(e2)
......@@ -29,7 +29,7 @@ function c24865314.initial_effect(c)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e3:SetCountLimit(1,24865414)
e3:SetCountLimit(1)
e3:SetCost(c24865314.cost)
e3:SetTarget(c24865314.tg)
e3:SetOperation(c24865314.op)
......
......@@ -32,7 +32,7 @@ function c24865315.initial_effect(c)
e3:SetCondition(c24865315.atkcon)
e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e3:SetCode(EVENT_CHAINING)
e3:SetCountLimit(1,24865415)
e3:SetCountLimit(1)
e3:SetTarget(c24865315.tg)
e3:SetOperation(c24865315.op)
c:RegisterEffect(e3)
......
......@@ -32,7 +32,7 @@ function c24865316.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e3:SetCode(EVENT_CHAINING)
e3:SetCondition(c24865316.atkcon)
e3:SetCountLimit(1,24865416)
e3:SetCountLimit(1)
e3:SetTarget(c24865316.tg)
e3:SetOperation(c24865316.op)
c:RegisterEffect(e3)
......
......@@ -31,7 +31,7 @@ function c24865317.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e3:SetCondition(c24865317.atkcon)
e3:SetCode(EVENT_CHAINING)
e3:SetCountLimit(1,24865417)
e3:SetCountLimit(1)
e3:SetTarget(c24865317.tg)
e3:SetOperation(c24865317.op)
c:RegisterEffect(e3)
......
......@@ -35,7 +35,7 @@ function c24865318.initial_effect(c)
e3:SetCondition(c24865318.atkcon)
e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e3:SetCode(EVENT_CHAINING)
e3:SetCountLimit(1,24865418)
e3:SetCountLimit(1)
e3:SetTarget(c24865318.tg)
e3:SetOperation(c24865318.op)
c:RegisterEffect(e3)
......
......@@ -56,7 +56,7 @@ function c24865320.lzop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c24865320.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevel(9)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevel(9) and c:IsControler(tp)
end
function c24865320.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
......
......@@ -29,7 +29,7 @@ function c24865321.initial_effect(c)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e3:SetCode(EVENT_CHAINING)
e3:SetCountLimit(1,24865321)
e3:SetCountLimit(1)
e3:SetTarget(c24865321.tg)
e3:SetOperation(c24865321.op)
c:RegisterEffect(e3)
......
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